-
Notifications
You must be signed in to change notification settings - Fork 122
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
fix(sdk): Update SDK to pull artifact related information from annotations #259
Conversation
/cc @ckadner |
/lgtm |
@@ -464,8 +464,8 @@ def _op_to_template(op: BaseOp, pipelinerun_output_artifacts={}, enable_artifact | |||
output_annotation = pipelinerun_output_artifacts.get(processed_op.name, []) | |||
output_annotation.append( | |||
{ | |||
'name': output_artifact['name'], | |||
'path': output_artifact['path'], | |||
'name': output_artifact.get('name'), |
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.
can output_artifact['name']
or output_artifact['path']
ever be missing here (raising a KeyError
)? If so, should the get
return a default value like empty string ""
?
output_artifact['name']
is used 2 lines down with direct key access as opposed to using dict.get()
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.
It was a merge from feng's PR yesterday, I can replace all of them to use .get() with defaults to make it consistent.
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
/approve |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: animeshsingh The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
/close |
Which issue is resolved by this Pull Request:
Related #241
Description of your changes:
As we move to multi-user for KFP, we want to inject certain artifact config via the annotations because we cannot change the Tekton API Spec. Thus, update the SDK to pull the related information from annotations without adding any breaking change.
Also we add few extra information to the annotations related to the artifact keys, so the UI can pull them based on similar requirements in #241.
Environment tested:
python --version
): 3.7tkn version
): 1.14.0kubectl version
): 1.16/etc/os-release
):Checklist:
The title for your pull request (PR) should follow our title convention. Learn more about the pull request title convention used in this repository.
PR titles examples:
fix(frontend): fixes empty page. Fixes #1234
Use
fix
to indicate that this PR fixes a bug.feat(backend): configurable service account. Fixes #1234, fixes #1235
Use
feat
to indicate that this PR adds a new feature.chore: set up changelog generation tools
Use
chore
to indicate that this PR makes some changes that users don't need to know.test: fix CI failure. Part of #1234
Use
part of
to indicate that a PR is working on an issue, but shouldn't close the issue when merged.Do you want this pull request (PR) cherry-picked into the current release branch?
If yes, use one of the following options:
cherrypick-approved
label to this PR. The release manager adds this PR to the release branch in a batch update.