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

feat(tekton-kfptask): Update kfptask to publish completed dag status #1426

Merged
merged 3 commits into from
Dec 7, 2023

Conversation

Tomcli
Copy link
Member

@Tomcli Tomcli commented Dec 6, 2023

Which issue is resolved by this Pull Request:
Resolves #

Description of your changes:
Our current publisher only being executed when the dag is completed. Thus it make sense to also update mlmd status as complete for that dag.

For failing status, caching entry, and dag output artifacts, it only make sense to implement it after we merged the publisher as part of the sub-dag reconciliation logic. Otherwise any failed sub-dag will never run the publisher task and the cache entry and output artifacts info has different logic when it became part of the sub-dag reconciliation logic.

Environment tested:

  • Python Version (use python --version):
  • Tekton Version (use tkn version):
  • Kubernetes Version (use kubectl version):
  • OS (e.g. from /etc/os-release):

Checklist:

@Tomcli
Copy link
Member Author

Tomcli commented Dec 6, 2023

/cc @yhwang
This is just to show we can update the dag publisher when it's completed. It cannot be a complete implementation using the current publisher design as the failed dag never able to run the publisher task and update the dag.

This is a POC design and I will try to propose something more complete to the KFP community's driver package when we have a more complete design.

@google-oss-prow google-oss-prow bot requested a review from yhwang December 6, 2023 23:39
status := pb.Execution_COMPLETE
execution, err := mlmd.GetExecution(ctx, opts.DAGExecutionID)
if err = mlmd.PublishExecution(ctx, execution, outputParameters, nil, status); err != nil {
return fmt.Errorf("failed to publish: %w", err)
Copy link
Member

Choose a reason for hiding this comment

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

no need to construct a new error here, because of the defer

Copy link
Member Author

Choose a reason for hiding this comment

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

The defer statement is the high level debugging for this function, the fmt error is just to help print out more specific error statement.

Copy link
Member

@yhwang yhwang Dec 7, 2023

Choose a reason for hiding this comment

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

nope, this error gets overridden by the deffer. there is no meaning to construct a new error here.

I got it. I thought there is only one type of error here. NVM

@google-oss-prow google-oss-prow bot added size/M and removed size/S labels Dec 7, 2023
Copy link
Member

@yhwang yhwang left a comment

Choose a reason for hiding this comment

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

/lgtm

Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Tomcli, yhwang

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot merged commit eaa2de6 into kubeflow:master Dec 7, 2023
15 checks passed
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