fix(app): redirect to run summary screen based on run endpoint #13125
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.
Overview
This PR changes the app's current run route logic to reroute based on info coming from the
/runs/runId
endpoint rather than the/runs
endpoint. This is because the run summary screen reads data from the/runs/runId
endpoint and we want run state information to be coming from the same place.This fixes a bug where a run would succeed/fail but we wouldn't render the run succeeded/failed spash screen inside the run summary screen. The reason this bug was happening was because the app would redirect the run summary screen when the
/runs
endpoint reflected that the current run is in a completed/failed/stop requested state. BUT the run summary screen only renders the splash when the/runs/runId
endpoint reflects that the run is in a completed/failed state. Because these are two different endpoints with two different react queries with two different refetch intervals, the data got out of sync.closes RQA-1098
Risk assessment
Low