determined-ai / determined

Determined is an open-source machine learning platform that simplifies distributed training, hyperparameter tuning, experiment tracking, and resource management. Works with PyTorch and TensorFlow.
https://determined.ai
Apache License 2.0
3k stars 350 forks source link

fix: edit/move modals for projects in workspaces unexpectedly closes [DET-10388] #9588

Closed eecsliu closed 3 months ago

eecsliu commented 3 months ago

Ticket

Description

Projects (under workspaces) modals get closed randomly when in list view and RBAC enabled. This change band-aids the problem by making sure the problematic code doesn't get called unless it has to.

Test Plan

  1. Open devcluster with this version + RBAC enabled.
  2. Create two workspaces (A and B), and inside workspace A create a project (A1).
  3. Navigate to workspace A and show a list view of projects
  4. In the list view, click on the project actions for A1 and select the move action
  5. Before selecting the destination workspace, wait 5-10 seconds. Make sure the modal does not disappear in this time period.
  6. Select the destination workspace and continue. The workspace should be moved properly.
  7. Next, navigate to the workspace B and show a list view of the projects. You should see A1 there.
  8. Select the actions expansion and click "Edit"
  9. Repeat step 5, then complete editing and make sure changes are upserted.

Checklist

netlify[bot] commented 3 months ago

Deploy Preview for determined-ui ready!

Name Link
Latest commit d96c9d363594d57564d46ba005a14153bf981553
Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/667dee874810400008c8d007
Deploy Preview https://deploy-preview-9588--determined-ui.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

codecov[bot] commented 3 months ago

Codecov Report

Attention: Patch coverage is 0% with 28 lines in your changes missing coverage. Please review.

Project coverage is 45.26%. Comparing base (13e92e4) to head (73e072b). Report is 1 commits behind head on main.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #9588 +/- ## ========================================== - Coverage 49.86% 45.26% -4.61% ========================================== Files 1247 923 -324 Lines 162293 121980 -40313 Branches 2887 2887 ========================================== - Hits 80922 55209 -25713 + Misses 81200 66600 -14600 Partials 171 171 ``` | [Flag](https://app.codecov.io/gh/determined-ai/determined/pull/9588/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | Coverage Ξ” | | |---|---|---| | [harness](https://app.codecov.io/gh/determined-ai/determined/pull/9588/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | `?` | | | [web](https://app.codecov.io/gh/determined-ai/determined/pull/9588/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | `46.21% <0.00%> (-0.02%)` | :arrow_down: | Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#carryforward-flags-in-the-pull-request-comment) to find out more. | [Files](https://app.codecov.io/gh/determined-ai/determined/pull/9588?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai) | Coverage Ξ” | | |---|---|---| | [webui/react/src/pages/WorkspaceDetails.tsx](https://app.codecov.io/gh/determined-ai/determined/pull/9588?src=pr&el=tree&filepath=webui%2Freact%2Fsrc%2Fpages%2FWorkspaceDetails.tsx&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai#diff-d2VidWkvcmVhY3Qvc3JjL3BhZ2VzL1dvcmtzcGFjZURldGFpbHMudHN4) | `0.00% <0.00%> (ΓΈ)` | | ... and [324 files with indirect coverage changes](https://app.codecov.io/gh/determined-ai/determined/pull/9588/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=determined-ai)