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

feat: Config Policies UI, Workspaces Experiments [CM-521] #10009

Merged
merged 5 commits into from
Oct 3, 2024
Merged

Conversation

johnkim-det
Copy link
Contributor

@johnkim-det johnkim-det commented Oct 2, 2024

Ticket

CM-521

Description

Add secondary tabs for "Experiments" and "Tasks" to "Config Policies" tab on Workspace Details page. Also made changes to

  • call delete endpoint when saving an empty document
  • Not display JSON brackets when loading with empty config policies object
  • display CodeEditor in read-only mode when user does not have permissions to modify
Screenshot 2024-10-02 at 12 26 31 PM Screenshot 2024-10-02 at 12 26 49 PM Screenshot 2024-10-02 at 12 27 05 PM Screenshot 2024-10-02 at 12 27 12 PM

Test Plan

Only in EE:
"Config Policies" tab on Workspace Details page should display secondary tabs for "Experiments" and "Tasks"
Non-admin should not see Apply button, and should see CodeEditor in read-only mode.
Admin should be able to Apply (with valid YAML syntax that modifies what's fetched).
Should be able to remove all YAML and Apply without error.

Checklist

  • Changes have been manually QA'd
  • New features have been approved by the corresponding PM
  • User-facing API changes have the "User-facing API Change" label
  • Release notes have been added as a separate file under docs/release-notes/
    See Release Note for details.
  • Licenses have been included for new code which was copied and/or modified from any external code

@johnkim-det johnkim-det requested a review from a team as a code owner October 2, 2024 15:39
@cla-bot cla-bot bot added the cla-signed label Oct 2, 2024
Copy link

netlify bot commented Oct 2, 2024

Deploy Preview for determined-ui ready!

Name Link
🔨 Latest commit 0fa8e1b
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66fd750751a9eb0008122265
😎 Deploy Preview https://deploy-preview-10009--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.

Copy link

codecov bot commented Oct 2, 2024

Codecov Report

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

Project coverage is 50.57%. Comparing base (25ca6d0) to head (0fa8e1b).
Report is 11 commits behind head on main.

Files with missing lines Patch % Lines
webui/react/src/components/ConfigPolicies.tsx 67.46% 27 Missing ⚠️
webui/react/src/services/apiConfig.ts 90.90% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #10009      +/-   ##
==========================================
- Coverage   54.59%   50.57%   -4.02%     
==========================================
  Files        1258      949     -309     
  Lines      157136   128623   -28513     
  Branches     3617     3616       -1     
==========================================
- Hits        85795    65057   -20738     
+ Misses      71208    63433    -7775     
  Partials      133      133              
Flag Coverage Δ
harness ?
web 54.37% <72.00%> (+0.02%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
webui/react/src/services/api.ts 97.83% <100.00%> (+0.01%) ⬆️
webui/react/src/services/apiConfig.ts 74.19% <90.90%> (+0.08%) ⬆️
webui/react/src/components/ConfigPolicies.tsx 68.09% <67.46%> (+3.02%) ⬆️

... and 309 files with indirect coverage changes

Copy link
Contributor

@kkunapuli kkunapuli left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The screenshots of the code change look great! I love how experiments and tasks are in separate tabs. I think it's organized and clear.

From a project perspective, LGTM! I will leave the code review to more qualified people. :)

Copy link
Contributor

@gt2345 gt2345 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I logged in as admin but do not have MODIFY_WORKSPACE_CONFIG_POLICIES permission, I wonder which roles have this permission?
I feel like it would be clearer to have an explicit Delete button, but not a blocker.

@johnkim-det johnkim-det merged commit 80b29fa into main Oct 3, 2024
82 of 94 checks passed
@johnkim-det johnkim-det deleted the CM-521 branch October 3, 2024 16:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants