On commit status refresh and with no check run updates, use cached version of action retrieves #13531
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
@sergiou87 caught a caching bug that was most reproducible if you opened the check runs popover and then navigate away from desktop for a > minute (status refresh wait time). Then return to app and close and open the popover, the action job steps will no longer show but the checks will. Apparently loading the checks as if action job steps/workflow were not applicable to the repo.
Below showing no job steps when jobs steps should be present.
@niik paired with me on it and narrowed it down to where we have a condition that says not to retrieve the action steps if the checks did not change between last refresh. Currently we were just using the new checks with no action steps. This PR updates it to map the currently cached action workflow and job steps to the just refreshed checks.
In a future PR, we may try to split the actions workflow and job step caching from the commit store to make this logic cleaner and hopefully easier to catch this sort of problem.
Screenshots
After trying 3 times to reproduce, I am unable too.
Release notes
Notes: [Fixed] Job steps on pull-request check run list are no longer intermittently missing