-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
feat: IATR cloud data backend #25316
feat: IATR cloud data backend #25316
Conversation
# Conflicts: # packages/app/src/debug/DebugContainer.vue # packages/app/src/pages/Debug.vue
…rning test names for review
Test summaryRun details
View run in Cypress Dashboard ➡️ Failures
Flakiness
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings. You can manage this integration in this project's settings in the Cypress Dashboard |
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.
Is working great locally minus the issues I pointed out on Slack. Just a couple comments and it looks like there's a couple from Zach still pending as well, will approve assuming they are answered
packages/graphql/src/schemaTypes/objectTypes/gql-Subscription.ts
Outdated
Show resolved
Hide resolved
packages/graphql/src/schemaTypes/objectTypes/gql-CurrentProject.ts
Outdated
Show resolved
Hide resolved
packages/data-context/src/sources/RelevantRunSpecsDataSource.ts
Outdated
Show resolved
Hide resolved
@marktnoonan Yes, there are some scenarios causing "flashes" of content. I am going to file a follow up issue for that. |
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.
Tested as described in the PR and everything works. I have a few questions and captured them on the fly here: https://www.loom.com/share/bd58758e23d8469d9300dbe5fb37288d - it's a long one but might be good for reference.
There are a few instances where state flickers and I think some strategic debounces or waits could help us out as we polish. Nvm, I saw our earlier convo that we'll make a new issue.
The main usability issue I see at the the moment is the need to manually click a button called "View Run" (which is different to the other button "View in Cypress Cloud") on the just-finished run in order to "promote it" to be the run that you are actively debugging.
It feels weird that when Cypress "knows about a run" in the Debug page, it's possible for the run's page not to know about that run yet, and that there's no way to click through to the Cloud from the pending run. I think this has to do with the fact that we don't poll in the background when the user is not on the runs page, and we don't immediately poll again when they come back to it.
None of these are blocking issues for this PR, just a head start on feedback on the feature overall I guess.
User facing changelog
N/A merging to feature branch
Additional details
Background
This PR moves the logic for determining the "relevant" run for the new Debug page to the server and exposing it through a GraphQL query. The server handles fetching the git hashes to send to the Cypress cloud and processing the runs returned to determine the appropriate run(s) for the front end.
What is a "relevant" run?
A "relevant" run for the Debug page is determined by looking up runs in a Cypress Cloud project that have a Git commit sha that matches one of the last 100 commit shas in the users's current development project. If the current environment does not use Git, then the Debug feature will not be available for that project. See the
RelevantRunsDataSource
to see the logic for how the "current" and "next" relevant runs are determined.Main Components
GQL Updates/Additions
testsForReviewBySpec
testsForReviewBySpec
. Currently just a placeholdermovetoNextRelevantRun
for front end to indicate that the cached run just be removed and the newest run used as the current runrelevantRuns
to allow for the front end to see changes to the current and next relevant runsrelevantRunSpecChange
to allow for the banner and page that are showing updating spec counts for RUNNING builds to updateDependency Updates
mocha-junit-reporter
andmoch-multi-reporters
to thedata-context
package directlypackage.json
. They would make a call out to the peer dependency formocha
which is currently an older version at the root of the project. Various versions of mocha are used throughout the mono-repo that should be looked at.Other Updates
Updated the various parts of the Debug feature that was using hardcoded
runNumber
s to use the newuseRelevantRuns
composable and delay the initial queries until the value is found.Steps to test
In order to test this PR, you will currently need to have the Cypress Cloud running locally or point to Cloud staging
RelevantRunsDataSource
How has the user experience changed?
N/A Backend changes only
PR Tasks
cypress-documentation
?type definitions
?