-
Notifications
You must be signed in to change notification settings - Fork 353
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(PipelineJob): allow PipelineSpec as param #774
Conversation
a31e745
to
80319e7
Compare
builder.update_pipeline_root(pipeline_root) | ||
builder.update_runtime_parameters(parameter_values) | ||
runtime_config_dict = builder.build() | ||
if pipeline_spec_only: |
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 can be covered by the else
block. So you don't even need this flag.
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.
Updated, thanks!
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.
Sorry I wasn't very clear with the last comment, I meant you could use PipelineRuntimeConfigBuilder.from_job_spec_json(pipeline_job)
for both cases, something like:
if pipeline_json.get("pipelineSpec") is not None:
pipeline_job = pipeline_json
pipeline_root = ...
else:
pipeline_job = {"pipelineSpec": pipeline_json, "runtimeConfig": {}}
pipeline_root = ...
builder = pipeline_utils.PipelineRuntimeConfigBuilder.from_job_spec_json(pipeline_job)
builder.update_pipeline_root(pipeline_root)
builder.update_runtime_parameters(parameter_values)
runtime_config_dict = builder.build()
This will result shorter and cleaner code.
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.
Got it, thanks!
/lgtm Thanks! |
No description provided.