Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Conversation

@t3chguy
Copy link
Member

@t3chguy t3chguy commented May 4, 2022


This change is marked as an internal change (Task), so will not be included in the changelog.

@t3chguy t3chguy added the T-Task Refactoring, enabling or disabling functionality, other engineering tasks label May 4, 2022
@t3chguy t3chguy marked this pull request as ready for review May 4, 2022 13:34
@t3chguy t3chguy requested a review from a team as a code owner May 4, 2022 13:34
Copy link
Collaborator

@jryans jryans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems like a reasonable step forward! 😄 Perhaps we'll later find we want to split these steps up a bit more, but seems good for now.

Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Generally looks great - could you also update docs/cypress.md with the state of play?


// Await Synapse healthcheck
await new Promise<void>((resolve, reject) => {
childProcess.execFile("docker", [
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do we need to run this as a curl in the docker container? Couldn't we just poll in javascript?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh, I guess you get the retries / timeout for free, and you know there's a curl in the docker container. If I've guessed correctly please comment. :)

Copy link
Member Author

@t3chguy t3chguy May 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes correct, we can't use cy.request as it doesn't retry on total connection failure
We could use http but that's horribly unusable, don't want to have to bring in another dep like fetch or axios where it isn't needed
This is a price of leaning into the cypress anti-pattern of standing up servers in tasks

Comment on lines +45 to +46
const username = Cypress._.uniqueId("userId_");
const password = Cypress._.uniqueId("password_");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is fun - is this a cypress internal or something and what's it doing?

Copy link
Member Author

@t3chguy t3chguy May 4, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its a re-exported lodash https://lodash.com/docs/4.17.15#uniqueId - sequential id generator, nothing fancy

@t3chguy t3chguy requested a review from dbkr May 4, 2022 13:56
Copy link
Member

@dbkr dbkr left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@t3chguy t3chguy enabled auto-merge (squash) May 4, 2022 14:04
@t3chguy t3chguy merged commit 77a437f into develop May 4, 2022
@t3chguy t3chguy deleted the t3chguy/cypress-skip-login branch May 4, 2022 14:11
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

T-Task Refactoring, enabling or disabling functionality, other engineering tasks

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants