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

fix(backend): Update compiler with new test sdk and fix dag publisher execution id #1425

Merged
merged 2 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:

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

Using the logic of root dag publisher, publisher's parent dag should be the driver dag execution id. Thus we need to update that logic.

@Tomcli
Copy link
Member Author

Tomcli commented Dec 6, 2023

/assign @yhwang

@@ -378,7 +378,7 @@ func (i *pubDagDriverInputs) getParentDagID(isExitHandler bool) string {
if isExitHandler && i.parentDagID == compiler.RootComponentName {
return fmt.Sprintf("$(params.%s)", paramParentDagID)
} else if i.inLoopDag {
return fmt.Sprintf("$(params.%s)", paramParentDagID)
return taskOutputParameter(getDAGDriverTaskName(i.parentDagID), paramExecutionID)
Copy link
Member

Choose a reason for hiding this comment

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

merge this with the else block?

Copy link
Member Author

Choose a reason for hiding this comment

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

I believe we have 4 cases here,

  1. if root
  2. if exit handler root
  3. if subdag
  4. else

In all our current test cases, we only trigger the last two scenarios because it doesn't make sense for publisher to be root or exit handler root. We can either keep all these 4 scenarios to be in sync with getParentDagID. Or we can just make the whole function to return taskOutputParameter(getDAGDriverTaskName(i.parentDagID), paramExecutionID).

WDYT? I would just go ahead and check if getParentDagID != "" or nil then return taskOutputParameter else raise error.

Copy link
Member

Choose a reason for hiding this comment

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

for me, logically, merging them and adding comments there would be good. otherwise, it's confusing.

@google-oss-prow google-oss-prow bot added size/L and removed size/M 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

@google-oss-prow google-oss-prow bot added the lgtm label Dec 7, 2023
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 552c477 into kubeflow:v2-integration Dec 7, 2023
3 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