-
Notifications
You must be signed in to change notification settings - Fork 354
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
test: [M3-8478] - Fix Cypress StackScript Linode deploy test flake #10826
test: [M3-8478] - Fix Cypress StackScript Linode deploy test flake #10826
Conversation
We'll try to merge this after @AzureLatte's PR #10788 just in case there are merge conflicts |
@jaalah-akamai I'm assuming it fails consistently, too? There's another issue related to this test (but which also impacts others) that's captured by M3-8471 but I believe is unrelated to the flake I'm trying to address here. You could help me narrow it down a lot:
|
Coverage Report: ❌ |
Report
|
I bet this has to do with the region changes again? |
Thanks @jaalah-akamai, I'm intrigued. The DOM printout makes it pretty clear why the test is failing: it expects the label and ID text to be inside the same element, e.g. But I'm baffled where this is coming from, and haven't been able to reproduce this at all on my end, even messing around with the Gecko and Linode Create v2 feature flags. Any idea where this is coming from? |
@hana-linode Can we double check this? This appears to be causing the issue. It's outside the |
Thanks for the find, @jaalah-akamai! I can update the Cypress One thing that @abailly-akamai noticed here, however, is that this change prevents users from searching for regions by ID in the drop-down. That breaks a couple tests which we can fix on a case-by-case basis, but I'm wondering if that ought to be treated as a bug and fixed in the component instead? (cc @hana-linode) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jdamore-linode This branch does seem to fix the issue I was seeing previously for me. 🤔 It passed all 12 times with yarn up
and another 12 with yarn build && yarn start:manager:ci
.
Thanks @coliu-akamai! Re-running it might let it pass -- that failure indicates Cypress tried to create a Linode in a region without availability, and the region gets randomly selected based on what's returned by the Since that test tries to create a Linode of type |
Description 📝
This resolves some causes of test flakiness in the StackScript Linode deploy test in
create-stackscript.spec.ts
.There seem to be two main causes of flake for this test in CI, and this PR attempts to fix both:
I also changed the way that StackScripts get entered into the create form. Using
cy.type()
to input the script is slow and adds several seconds to our test runtime, so I've circumvented it by setting the field's value directly.I ran the test on repeat 30 times (with the other test skipped) and it passed each time.
(cc @mjac0bs -- I'm curious if you continue seeing failures with these changes? No worries if you don't have time to take a look!)
Changes 🔄
How to test 🧪
Because this test doesn't fail every time, CI may not be the most reliable way to gauge the effectiveness of this change.
You can run the test locally with this command (feel free to skip the other test since it's a slow one and isn't related to these changes):
yarn cy:run -s "cypress/e2e/core/stackscripts/create-stackscripts.spec.ts"
As an Author I have considered 🤔
Check all that apply