-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Upgrades cypress to 13.15.1 #198715
Upgrades cypress to 13.15.1 #198715
Conversation
Pinging @elastic/security-solution (Team: SecuritySolution) |
ae5760c
to
574336a
Compare
Pinging @elastic/obs-ux-infra_services-team (Team:obs-ux-infra_services) |
🤖 GitHub commentsExpand to view the GitHub comments
Just comment with:
|
2177bcc
to
4c23685
Compare
@michaelolo24 The APM cypress tests failing is a known issue and we'll fix that soon. Sorry for that. |
Thanks @cauemarcondes ! Since I would rather not skip tests, I'll wait for those issues to be fixed and then will push this upgrade. Thank you! |
3f13009
to
3261fd1
Compare
@cauemarcondes - We actually may end up skipping them to get the upgrade in as running cypress locally has become increasingly difficult. I tried to be judicious in skipping only the specific tests that we're failing rather than whole blocks. If it helps, I think the fix for service_overview, service_inventory, and agent_configuration files may involve either updating the input/combobox components for For the |
3261fd1
to
a7c48ac
Compare
I've got a PR skipping the problematic tests: #199336 |
@michaelolo24 my PR has been merged. |
a7c48ac
to
73fbb46
Compare
thanks! I rebased this PR accordingly |
@cauemarcondes can you take one more look and review this PR? The build is green it's ready to go and we need an approval from the @elastic/obs-ux-infra_services-team. |
@@ -88,7 +88,7 @@ describe('Service inventory', () => { | |||
cy.visitKibana(serviceInventoryHref); | |||
}); | |||
|
|||
it('with the correct environment when changing the environment', () => { | |||
it.skip('with the correct environment when changing the environment', () => { |
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.
@michaelolo24 these tests are not failing on main AFAICT
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.
I unskipped all the tests, let's see what the build says!
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.
@cauemarcondes over the last 2 builds (this one and that one) we have 3 tests failing:
service_inventory/service_inventory.cy.ts
service_overview/service_overview.cy.ts
settings/agent_configurations.cy.ts
These are the 3 tests that @michaelolo24 had skipped and I unskipped in my last commit.
If these are not failing on main
, can you help us figuring out why these 3 tests would consistently fail?
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.
@PhilippeOberti / @michaelolo24 after checking out your branch and running the test I could not see any specific problem with the tests you mentioned. They are breaking, as CI pointed, but there is no clear reason why. This is the error showed on the console:
2024-11-18 11:58:49.047 Cypress Helper (Renderer)[30120:5226514] CoreText note: Set a breakpoint on CTFontLogSystemFontNameRequest to debug.
We detected that the Electron Renderer process just crashed.
We have failed the current spec but will continue running the next spec.
This can happen for a number of different reasons.
If you're running lots of tests on a memory intense application.
- Try increasing the CPU/memory on the machine you're running on.
- Try enabling experimentalMemoryManagement in your config file.
- Try lowering numTestsKeptInMemory in your config file during 'cypress open'.
You can learn more here:
https://on.cypress.io/renderer-process-crashed
(Results)
┌────────────────────────────────────────────────────────────────────────────────────────────────┐
│ Tests: 1 │
│ Passing: 0 │
│ Failing: 1 │
│ Pending: 0 │
│ Skipped: 0 │
│ Screenshots: 0 │
│ Video: true │
│ Duration: 11 seconds │
│ Spec Ran: service_inventory.cy.ts │
└────────────────────────────────────────────────────────────────────────────────────────────────┘
I double-cheked and the tests are indeed passing on the main branch.
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.
I remember @michaelolo24 added this experimentalMemoryManagement
to the config file (here) but I think Glo said it wasn't in the right place.
I just pushed a commit moving it to the e2e
location, hopefully that will do the trick here... if not I don't know what to do...
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.
considering there are only 3 files modified in this PR, 2 of them are package.json
and its lock file, and the third one being the experimentalMemoryManagement
change to the config file to try to fix the failing tests, I think it's safe to say that the failures are due to the Cypress update...
If we want to continue updating Cypress, I think we need to re-work these 3 tests a bit to make them work with the newer version.
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.
This version works. Although we're not doing like the previous test, we are just opening the combo box and selecting the element.
it('with the correct environment when changing the environment', () => {
cy.intercept('GET', '/internal/apm/suggestions?*').as('environmentSuggestionOptions');
cy.wait(mainAliasNames);
cy.wait('@environmentSuggestionOptions');
cy.getByTestSubj('environmentFilter').click();
cy.contains('button', 'production').click();
cy.expectAPIsToHaveBeenCalledWith({
apisIntercepted: mainAliasNames,
value: 'environment=production',
});
});
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.
Thanks @cauemarcondes, makes sense ! Would you be willing to commit the changes for the three files directly to the PR?
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.
Hey @michaelolo24 I was trying to fix the tests but the browser keeps crasing all the time with this message:
We detected that the Chrome Renderer process just crashed.
We have failed the current spec but will continue running the next spec.
This can happen for a number of different reasons.
If you're running lots of tests on a memory intense application.
- Try increasing the CPU/memory on the machine you're running on.
- Try enabling experimentalMemoryManagement in your config file.
- Try lowering numTestsKeptInMemory in your config file during 'cypress open'.
You can learn more here:
https://on.cypress.io/renderer-process-crashed
Unfortunatly I don't feel comfortable approving this PR until this is fixed.
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.
Yea, this goes back to the error I was seeing when interacting with the environmentFilter
dropdown. Suspecting cypress crashes due to an infinite loop of trying to delete the field values, but not being able to delete...but not 100% sure. I was able to get the changes I made working locally, but because of the way the component works, it's hard to properly test the suggestion api since you can't clear the environment field. We'll see if this current ci run passes. If so, please feel free to make modifications you'd like to make to my changes to better fit APM's expectations as the tests shouldn't crash any longer 🤞🏾
Flaky Test Runner Stats🟠 Some tests failed. - kibana-flaky-test-suite-runner#7478[❌] APM - Cypress: 20/25 tests passed. |
16972f2
to
117565d
Compare
💛 Build succeeded, but was flaky
Failed CI StepsTest FailuresMetrics [docs]
History
|
Flaky Test Runner Stats🎉 All tests passed! - kibana-flaky-test-suite-runner#7480[✅] APM - Cypress: 25/25 tests passed. |
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.
LGTM
## Summary This PR upgrades cypress to `13.15.1`. This is needed to fix an very annoying issue where Cypress tests hangs when ran locally and when the window is not focused See Cypress issue here: cypress-io/cypress#28392 --------- Co-authored-by: PhilippeOberti <[email protected]>
## Summary This PR upgrades cypress to `13.15.1`. This is needed to fix an very annoying issue where Cypress tests hangs when ran locally and when the window is not focused See Cypress issue here: cypress-io/cypress#28392 --------- Co-authored-by: PhilippeOberti <[email protected]>
Summary
This PR upgrades cypress to
13.15.1
. This is needed to fix an very annoying issue where Cypress tests hangs when ran locally and when the window is not focusedSee Cypress issue here: cypress-io/cypress#28392