Skip to content

fix: Cypress tests failing in Github Actions, fix resize-linode.spec.ts failure, address DatabaseBackups.test.tsx flake - #11561

Merged
bnussman-akamai merged 5 commits into
linode:developfrom
bnussman-akamai:fix/cypress-chrome-not-working
Jan 24, 2025
Merged

bnussman-akamai merged 5 commits into
linode:developfrom
bnussman-akamai:fix/cypress-chrome-not-working

Conversation

@bnussman-akamai

@bnussman-akamai bnussman-akamai commented Jan 23, 2025 •

Copy link
Copy Markdown
Member

Description 📝

  • An attempt to fix our failing Cypress test that run in Github Actions
    • I believe the issue was caused by a chrome update. It seems the issue started happening on runs that use Chrome 132 (example). Things worked on Chrome 131 (example).
    • Chrome 132 no longer supports the old headless mode according to this post so this PR removes the old headless mode flag we were using
    • This issue is not happening in our Jenkins cypress pipeline because that uses an older Chrome version that I believe is included in the cypress docker image
  • Skips the flakey tests in DatabaseBackups.test.tsx
    • It has gotten out of hand
    • I can't take it anymore 😖 In my opinion it is hurting us more than it is helping us
  • Fixes resize-linode.spec.ts failure caused by an API change

Preview 📷

Screenshot 2025-01-23 at 4 16 11 PM

How to test 🧪

  • I am able to reproduce with yarn cy:run locally and this change fixes the issue
    • We should just confirm that this doesn't cause any regressions like "indefinite test hanging". This is why this extra config was added in the first place
  • Because the e2e Github Actions only runs on develop, staging, and master I can't easily test this
    • I think we just have to merge and hope, but let me know if you have ideas on how to test this
Author Checklists

As an Author, to speed up the review process, I considered 🤔

👀 Doing a self review
❔ Our contribution guidelines
🤏 Splitting feature into small PRs
➕ Adding a changeset
🧪 Providing/improving test coverage
🔐 Removing all sensitive information from the code and PR description
🚩 Using a feature flag to protect the release
👣 Providing comprehensive reproduction steps
📑 Providing or updating our documentation
🕛 Scheduling a pair reviewing session
📱 Providing mobile support
♿ Providing accessibility support


  • I have read and considered all applicable items listed above.

As an Author, before moving this PR from Draft to Open, I confirmed ✅

  • All unit tests are passing
  • TypeScript compilation succeeded without errors
  • Code passes all linting rules

@bnussman-akamai bnussman-akamai added e2e Indicates that a PR touches Cypress tests in some way github_actions Pull requests that update GitHub Actions code labels Jan 23, 2025
@bnussman-akamai bnussman-akamai self-assigned this Jan 23, 2025
@bnussman-akamai
bnussman-akamai requested a review from a team as a code owner January 23, 2025 21:19
@bnussman-akamai
bnussman-akamai requested review from jdamore-linode and removed request for a team January 23, 2025 21:19
@github-actions

Copy link
Copy Markdown

Coverage Report: ✅
Base Coverage: 79.04%
Current Coverage: 79.04%

@bnussman-akamai
bnussman-akamai requested a review from a team as a code owner January 23, 2025 23:35
@bnussman-akamai
bnussman-akamai requested review from hkhalil-akamai and pmakode-akamai and removed request for a team January 23, 2025 23:35
cy.wait('@linodeResize');
cy.contains(
"Your linode will be warm resized and will automatically attempt to power off and restore to it's previous state."
"Your linode will be warm resized and will automatically attempt to power off and restore to its previous state."

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This message comes from the /v4/account/notifications endpoint. The API team changed it's to its in API PR #7365

};

// Disable Chrome's new headless implementation.
// This attempts to resolve indefinite test hanging.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I haven't seen any hanging so far 🤞

@bnussman-akamai bnussman-akamai changed the title fix: Cypress tests in Github Actions fix: Cypress tests failing in Github Actions and fix resize-linode.spec.ts failure Jan 23, 2025
@linode-gh-bot

Copy link
Copy Markdown

Cloud Manager UI test results

🎉 480 passing tests on test run #5 ↗︎

❌ Failing✅ Passing↪️ Skipped🕐 Duration
0 Failing480 Passing2 Skipped93m 52s

@bnussman-akamai bnussman-akamai changed the title fix: Cypress tests failing in Github Actions and fix resize-linode.spec.ts failure fix: Cypress tests failing in Github Actions, fix resize-linode.spec.ts failure, address DatabaseBackups.test.tsx flake Jan 24, 2025

@abailly-akamai abailly-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks! looks good and we can monitor and see if there's any issue arising.

I have also noticed how much longer it takes for the coverage jobs to run.. I don't think it used to take that long?

Screenshot 2025-01-24 at 10 15 48

* 1. https://github.com/linode/manager/pull/11130
* 2. https://github.com/linode/manager/pull/11394
*/
describe.skip('Database Backups (Legacy)', () => {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think you can just delete it. I fully support this 😄

@dwiley-akamai
dwiley-akamai self-requested a review January 24, 2025 15:29
@bnussman-akamai

Copy link
Copy Markdown
Member Author

@abailly-akamai I think 17 min is pretty typical now. I looked back in time a bit. It was closer to 15 minutes about 2 months ago https://github.com/linode/manager/actions/runs/11917205050

@dwiley-akamai dwiley-akamai left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hopefully this fixes it 🤞🏾

@bnussman-akamai
bnussman-akamai merged commit c92372c into linode:develop Jan 24, 2025
@cypress

cypress Bot commented Jan 24, 2025

Copy link
Copy Markdown

Cloud Manager E2E    Run #7123

Run Properties:  status check passed Passed #7123  •  git commit c92372c062: fix: Cypress tests failing in Github Actions, fix `resize-linode.spec.ts` failur...
Project Cloud Manager E2E
Branch Review develop
Run status status check passed Passed #7123
Run duration 28m 17s
Commit git commit c92372c062: fix: Cypress tests failing in Github Actions, fix `resize-linode.spec.ts` failur...
Committer Banks Nussman
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 3
Tests that did not run due to a developer annotating a test with .skip  Pending 2
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 482
View all changes introduced in this branch ↗︎

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

e2e Indicates that a PR touches Cypress tests in some way github_actions Pull requests that update GitHub Actions code

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

6 participants