-
Notifications
You must be signed in to change notification settings - Fork 83
Project domain attribute for workflow Execution config #298
Project domain attribute for workflow Execution config #298
Conversation
Signed-off-by: Prafulla Mahindrakar <prafulla.mahindrakar@gmail.com>
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.
looks good! do you mind updating the PR title and linking the issue
@@ -4,6 +4,7 @@ package workflowexecutionconfig | |||
|
|||
type AttrFetchConfig struct { | |||
AttrFile string `json:"attrFile" pflag:",attribute file name to be used for generating attribute for the resource type."` | |||
Gen bool `json:"gen" pflag:",generates an empty workflow execution config file with conformance to the api format."` |
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.
love this!
Project: project, | ||
Domain: domain, | ||
Workflow: workflow, | ||
WorkflowExecutionConfig: &admin.WorkflowExecutionConfig{ |
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.
this is great, but it's too bad we have to manually update this if the proto structure changes. is there anyways to use reflection somehow to populate all the fields from the proto definition?
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.
So we can dump it in following way if we enable EmitDefaults in jsnonpb.Marshaller.
The user still has to know the types for each of the fields when modifying it.
annotations: null
labels: null
maxParallelism: 0
rawOutputDataConfig: null
securityContext: null
Having a customized default lets us give a sample structure with the populated types which is something like this.
And also this gives us to go beyond one level and define deeper customized objects instead of default which would be nil.
annotations:
values:
cliAnnotationKey: cliAnnotationValue
domain: development
labels:
values:
cliLabelKey: cliLabelValue
max_parallelism: 10
project: flytesnacks
raw_output_data_config:
output_location_prefix: cliOutputLocationPrefix
security_context:
run_as:
k8s_service_account: default
I understand its going to be maintenance to add a new field and requires a corresponding change in the default but doesn't this provide a more user friendly option.
Let me know what you think.
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.
prioritizing user-friendliness definitely is the superior option! I don't imagine we'll update the proto structure too frequently so this seems like a superior choice 👍
Signed-off-by: Prafulla Mahindrakar <prafulla.mahindrakar@gmail.com>
Signed-off-by: Prafulla Mahindrakar <prafulla.mahindrakar@gmail.com>
Signed-off-by: Prafulla Mahindrakar <prafulla.mahindrakar@gmail.com>
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.
one more nit: please update the PR title!
Signed-off-by: Prafulla Mahindrakar <prafulla.mahindrakar@gmail.com>
@katrogan need your re-approval. Also please have a look at this issue flyteorg/flyte#2287 |
Signed-off-by: Prafulla Mahindrakar <prafulla.mahindrakar@gmail.com> Signed-off-by: pmahindrakar-oss <prafulla.mahindrakar@gmail.com>
Signed-off-by: Prafulla Mahindrakar prafulla.mahindrakar@gmail.com
TL;DR
Refer the flyteadmin PR for how this feature is used
flyteorg/flyteadmin#378
No existing project domain attribute for execution config
Generate a sample file for project domain attribute for execution config
Sample file contents
Update project domain attribute for execution config
GET an existing project domain attribute for execution config
Delete project domain attribute for workflow exeuction config.
Type
Are all requirements met?
Complete description
How did you fix the bug, make the feature etc. Link to any design docs etc
Tracking Issue
flyteorg/flyte#2070
Follow-up issue
NA