Skip to content
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

[ENG-2621] Fix bug where status in workflow header is not correctly updated #1156

Merged
merged 1 commit into from
Mar 31, 2023

Conversation

vsreekanti
Copy link
Contributor

Describe your changes and why you are making these changes

Previously, we were hardcoding the workflow status to show an indicator for the execution status of the most recent workflow run. That had two issues:

  1. When you switched workflow runs, it would not update accordingly.
  2. If you hit the refresh button on the UI, the status would not change.

1 was fixable simply by updating the index of the status check to match the selected run, but 2 was a tougher challenge because we would have to load the whole workflow state again, which would cause the whole page to go white and then re-render.

#1108 introduced the workflow history store which enabled us to fix this problem more simply. Now, the workflow header reads the status from the workflow history rather than from the workflow reducers dagResults list. The refresh button can simply refresh the workflow history store, and the status will update accordingly. This PR also fixes 1 by doing the index management that I mentioned above.

This PR also does a little bit of work to prevent flashing as things render on the UI. Previously, we would return null when loading metadata, which would cause a bunch of layout shifts to happen when the metadata finally loaded. This PR's updates are not perfect, but we essentially enter some "empty" states when metadata is loading, so elements render and then update when the metadata loads. As you can see, this still causes some flashing when the state ultimately loads, but the layout does not shift.

Related issue number (if any)

ENG-2621

Loom demo (if any)

https://www.loom.com/share/822115ef4be14e7fa0ec9a7b5bc6862e

Checklist before requesting a review

  • I have created a descriptive PR title. The PR title should complete the sentence "This PR...".
  • I have performed a self-review of my code.
  • I have included a small demo of the changes. For the UI, this would be a screenshot or a Loom video.
  • If this is a new feature, I have added unit tests and integration tests.
  • I have run the integration tests locally and they are passing.
  • I have run the linter script locally (See python3 scripts/run_linters.py -h for usage).
  • All features on the UI continue to work correctly.
  • Added one of the following CI labels:
    • run_integration_test: Runs integration tests
    • skip_integration_test: Skips integration tests (Should be used when changes are ONLY documentation/UI)

@vsreekanti vsreekanti added the skip_integration_test Skips required integration test (only documentation/UI changes) label Mar 31, 2023
@vsreekanti vsreekanti merged commit cd110c3 into main Mar 31, 2023
@vsreekanti vsreekanti deleted the eng-2621-the-workflow-status-does-not-get-updated branch March 31, 2023 19:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip_integration_test Skips required integration test (only documentation/UI changes)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants