-
Notifications
You must be signed in to change notification settings - Fork 357
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: add unmarshal functions for task config policies #9896
Conversation
✅ Deploy Preview for determined-ui canceled.
|
func MarshalConfigPolicy(configPolicy interface{}) *structpb.Struct { | ||
return protoutils.ToStruct(configPolicy) | ||
|
||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the symmetry of having a function defined for discoverability, but it's not adding any new functionality.
return false | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the workload type defined in model
instead and moving workload type validation to configpolicy.utils
.
@@ -11,15 +11,14 @@ message PutWorkspaceConfigPoliciesRequest { | |||
// The workspace the config policies apply to. Use global API for | |||
// global config policies. | |||
int32 workspace_id = 1; | |||
// Specifies which workload type the config policies apply to: EXPERIMENT or | |||
// NTSC. | |||
// The workload type the config policies apply to: EXPERIMENT or NTSC. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I noticed I had missed some spots when fixing descriptions in #9880. Fixing it now.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #9896 +/- ##
==========================================
- Coverage 54.80% 54.68% -0.13%
==========================================
Files 1237 1264 +27
Lines 154974 156878 +1904
Branches 3597 3597
==========================================
+ Hits 84938 85790 +852
- Misses 69905 70957 +1052
Partials 131 131
Flags with carried forward coverage won't be shown. Click here to find out more.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Great work and good test coverage!
Ticket
CM-502
Description
Introduce unmarshal functions to process user input for task config policies.
Test Plan
Covered by unit tests.
Checklist
docs/release-notes/
See Release Note for details.