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

chore: implement Delete config policies API handlers #9927

Merged
merged 3 commits into from
Sep 16, 2024

Conversation

amandavialva01
Copy link
Contributor

@amandavialva01 amandavialva01 commented Sep 12, 2024

Ticket

CM-488

Description

Implement API handlers for Delete config policies for workspace-level and global scopes.

Test Plan

CI passes (automated testing).

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

Copy link

netlify bot commented Sep 12, 2024

Deploy Preview for determined-ui canceled.

Name Link
🔨 Latest commit 3a40afa
🔍 Latest deploy log https://app.netlify.com/sites/determined-ui/deploys/66e8b91ba9cc86000830f4ec

Copy link

codecov bot commented Sep 12, 2024

Codecov Report

Attention: Patch coverage is 85.36585% with 6 lines in your changes missing coverage. Please review.

Project coverage is 54.51%. Comparing base (062cb52) to head (3a40afa).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
master/internal/api_config_policies.go 85.29% 5 Missing ⚠️
...ternal/configpolicy/postgres_task_config_policy.go 83.33% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #9927   +/-   ##
=======================================
  Coverage   54.50%   54.51%           
=======================================
  Files        1253     1252    -1     
  Lines      156630   156654   +24     
  Branches     3599     3600    +1     
=======================================
+ Hits        85368    85396   +28     
+ Misses      71129    71125    -4     
  Partials      133      133           
Flag Coverage Δ
backend 45.17% <85.36%> (+0.03%) ⬆️
harness 72.75% <ø> (ø)
web 54.28% <ø> (ø)

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

Files with missing lines Coverage Δ
master/internal/configpolicy/utils.go 95.83% <100.00%> (ø)
...ternal/configpolicy/postgres_task_config_policy.go 93.44% <83.33%> (+4.38%) ⬆️
master/internal/api_config_policies.go 48.61% <85.29%> (+48.61%) ⬆️

... and 4 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.

Nice work! Left some comments.

master/internal/api_config_policies.go Show resolved Hide resolved
master/internal/api_config_policies.go Outdated Show resolved Hide resolved
master/internal/api_config_policies.go Outdated Show resolved Hide resolved
master/internal/api_config_policies.go Show resolved Hide resolved
master/internal/api_config_policies.go Outdated Show resolved Hide resolved
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.

LGTM - great work!

)

func TestDeleteWorkspaceConfigPolicies(t *testing.T) {
// TODO (CM-520): Make test cases for experiment config policies.
Copy link
Contributor

Choose a reason for hiding this comment

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

Nice callout / reminder.

)

// WorkloadType is the type of workload (experiment or NTSC) that the task config policy applies to.
type WorkloadType string
Copy link
Contributor

Choose a reason for hiding this comment

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

This was a great idea. Just a little ahead of its time, perhaps. Thanks for keeping the codebase clean!

@amandavialva01 amandavialva01 force-pushed the amanda/DeleteTCPs branch 2 times, most recently from 19df360 to 17bdc3c Compare September 16, 2024 21:09
@amandavialva01 amandavialva01 enabled auto-merge (squash) September 16, 2024 21:11
@amandavialva01 amandavialva01 merged commit 26b0954 into main Sep 16, 2024
85 of 98 checks passed
@amandavialva01 amandavialva01 deleted the amanda/DeleteTCPs branch September 16, 2024 23:27
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.

2 participants