-
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
ACI - Update logic for pulling runs on Runs page and Specs list #26693
Comments
Hey team! Please add your planning poker estimate with Zenhub @astone123 @jordanpowell88 @lmiller1990 @marktnoonan @mike-plummer |
This does not seem to be working for me, at least as I understand it. I created a branch, modified a test, and pushed. The UI never updates with the latest run. This is still the case, even if I restart the runner. Here's a long video of it: Here is my test project: https://github.com/cypress-io/aci-test-projects Do I need a specific Cloud preview environment perhaps, or did I miss something else in the test plan? |
I tried again without a git repo, and it's working great - updating as expected, etc. I wonder if I'm doing something incorrectly, or there's a bug / something missing that breaks when you've got a git repo. Working w/o git repo: ok.mov |
@lmiller1990 I watched your video and not sure why that is not working for you. You do not need a specific Cloud environment nor do you need to use a binary of the app for this to work. I will recreate your scenario and make sure I did not break something critical. |
@lmiller1990 Here is long video showing my tests using the
Sorry the video is blurry. I had to trim it down and save it 720p to get it under 100MB. new_aci_logic_trimmed_720.mov |
I will test again. The one thing I'm doing differently is creating a new branch with |
Released in This comment thread has been locked. If you are still experiencing this issue after upgrading to |
Current behavior
The Specs list page and the Runs page use different methods for querying for runs to show the relevant Cloud data on those pages. The Debug page introduced a third way by pulling runs that map to the local Git tree.
Expected bahavior
The Specs list page and Runs page will also use the local Git tree to find the most relevant runs that map to the local developer's checked out code.
What the Debug page does...
The Debug page uses the local Git tree to determine which runs to show for debugging. This is done by pulling the latest 100 git hashes (i.e. shas) and passing them to Cypress Cloud via the GraphQL endpoint
runsByCommitShas
in theRelevantRunsDatasource
. The Cloud returns a list of runs that map to the commit hashes that were passed and the runs are filtered down to the set of "relevant" runs for the Debug page.Specs List
The Specs List page currently pulls cloud data using the following GraphQL fields from
CloudProjectSpec
:averageDuration
isConsideredFlaky
flakyStatus
specsRun
It only sends this part of the GraphQL query if a Git branch is available.
Polling
It also leverages a polling mechanism using the subscription
startPollingForSpecs
. This polls the Cloud every 30 seconds (or can be changed by a value returned from the Cloud query) and returns a timestamp in a field fromcloudLatestRunUpdateSpecData.mostRecentUpdate
. This value is the latest updated time for the runs it is interested in. The front end tracks changes in this timestamp and queries the Cloud again if it changes.Updates
The existing fields should be swapped out for new fields that leverage a set of
cloudRunIds
:averageDurationForRunIds
isConsideredFlakyForRunIds
flakyStatusForRunIds
specRunsForRunIds
The
cloudRunIds
are theid
field from theCloudRun
type, not therunNumber
that is shown in the UI. The App should pass as manyids
as possible up to a max of 100 to these endpoints.specRunsForRunIds
will return results for as many matchingCloudSpecRuns
as it finds. The App should use the latest 4 for the Run Dots.Runs page
The Runs page currently pulls the 10 most recent runs for the Project and shows them in reverse chronological order. If a user stays on the page, then any new runs that start while on the page will get added to the top of the list.
Polling
Polling is done on the front end in
RunsContainer.vue
source. This polls every 15 seconds but has a strange behavior if the page has already been viewed and Urql has cached the results. The timeout used starts 15 seconds after the component is mounted. If the original GraphQL query has already been cached, then it can appear that the results are delayed by 15 seconds.Updates
If the most recent 100 Git hashes is found with the GitDataSource, the Runs page should leverage the same pattern as the Debug page to pull the 10 most recent runs based on the local Git tree. This should use the polling being done in
RelevantRunsDatasource
to prevent additional polling queries to the Cloud. To simplify this change, the page can just always show the most recent 10 runs. Thus, if a polling cycle occurs while on the page and a new run is started, then that would be the latest run with 9 more below it.If no local Git hashes are found, then the page should default back to pulling the most recent 10 runs for the Cloud project. Update the logic so there is no delay in pulling the latest data if Urql has already cached the results.
Acceptance Criteria
RelevantRunsDataSource
and not introduce additional polling.The text was updated successfully, but these errors were encountered: