Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(e2e): simplify Cypress record key usage #29327

Merged
merged 12 commits into from
Jun 24, 2024

Conversation

rusackas
Copy link
Member

SUMMARY

The Cypress Record Key on the repo secrets is no longer base-64 encoded, so there's no need for this decoding. We also might as well just call it the CYPRESS_RECORD_KEY everywhere to match the name of the repo secret, for sanity's sake.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@@ -65,7 +64,6 @@ def get_cypress_cmd(
)
else:
# Run local, but split the execution
os.environ.pop("CYPRESS_RECORD_KEY", None)
Copy link
Member

Choose a reason for hiding this comment

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

Do we not want that pop? In the case of running off the repo where the env var is always present, it may always disregard the use_dashboard param effectively

Copy link
Member Author

Choose a reason for hiding this comment

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

¯_(ツ)_/¯ I wasn't sure... I'll add it back in... it certainly doesn't hurt.

@github-actions github-actions bot added the github_actions Pull requests that update GitHub Actions code label Jun 21, 2024
@rusackas rusackas merged commit 4fe04e6 into master Jun 24, 2024
33 checks passed
@rusackas rusackas deleted the simplifying-cypress-key-use branch June 24, 2024 16:07
@michael-s-molina
Copy link
Member

michael-s-molina commented Jun 26, 2024

@rusackas I don't know if this PR is the source for the problem but we can execute Cypress anymore for release branches such as 4.0. This is problematic because we need the whole suite of tests when pushing to release branches in order to check if the release is good to go.

Opening Cypress...
  Your Record Key b9c81...2394a is not valid with this projectId: ud5x2f
  
  It may have been recently revoked by you or another user.
  
  Please log into the Dashboard to see the valid Record Keys.
  
  https://on.cypress.io/dashboard/projects/ud5x2f

@rusackas
Copy link
Member Author

It should run the tests on those branches, just not with the cypress dashboard enabled. I rotated the key, and changed the action to use the repos secret, so you may have to pull this in as a cherry?

@michael-s-molina
Copy link
Member

It was a little tricky, because 4.0 structure is completely different than master, but I was able to cherry-pick the necessary changes to make Cypress work again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
github_actions Pull requests that update GitHub Actions code size/S
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants