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(sdk): Fix opsgroups dependency resolution #4370

Merged
merged 1 commit into from
Aug 27, 2020

Conversation

mr-real
Copy link
Contributor

@mr-real mr-real commented Aug 13, 2020

Description of your changes:
There is a bug in the Compiler class when it resolves dependencies for Ops and OpsGroups. The nature of this bug is the following: when a dependency is an OpsGroup, compiler fails with an uncaught exception because it tries to access the wrong variable. This diff fixes this bug by changing the variable to access.

This gist surfaces the bug and proves the fix:

Checklist:

  • The title for your pull request (PR) should follow our title convention.
  • Do you want this pull request (PR) cherry-picked into the current release branch? - Yes, please! Can I please have cherrypick-approved label added to the pull request when it gets accepted? Thanks!
    • (Recommended.) Ask the PR approver to add the cherrypick-approved label to this PR. The release manager adds this PR to the release branch in a batch update.

@google-cla
Copy link

google-cla bot commented Aug 13, 2020

Thanks for your pull request. It looks like this may be your first contribution to a Google open source project (if not, look below for help). Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please visit https://cla.developers.google.com/ to sign.

Once you've signed (or fixed any issues), please reply here with @googlebot I signed it! and we'll verify it.


What to do if you already signed the CLA

Individual signers
Corporate signers

ℹ️ Googlers: Go here for more info.

@google-cla google-cla bot added the cla: no label Aug 13, 2020
@kubeflow-bot
Copy link

This change is Reviewable

@k8s-ci-robot
Copy link
Contributor

Hi @sabiroid. Thanks for your PR.

I'm waiting for a kubeflow member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@mr-real
Copy link
Contributor Author

mr-real commented Aug 13, 2020

@googlebot I signed it!

@google-cla
Copy link

google-cla bot commented Aug 13, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@google-cla
Copy link

google-cla bot commented Aug 13, 2020

We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google.
In order to pass this check, please resolve this problem and then comment @googlebot I fixed it.. If the bot doesn't comment, it means it doesn't think anything has changed.

ℹ️ Googlers: Go here for more info.

@Bobgy
Copy link
Contributor

Bobgy commented Aug 14, 2020

/assign @Ark-kun @numerology @chensun

@Ark-kun
Copy link
Contributor

Ark-kun commented Aug 15, 2020

/ok-to-test

@mr-real
Copy link
Contributor Author

mr-real commented Aug 17, 2020

So, some tests seem to have failed, but I am pretty sure my change is not the reason. Are there any action items for me as for now?

@Ark-kun
Copy link
Contributor

Ark-kun commented Aug 20, 2020

@sabiroid Thank you for this fix for the DSL compiler.
Can you comment on which scenarios are broken before the fix? I just wonder why this hasn't been triggered before.

P.S. Maybe you can add a small compiler test to the test suite.
/lgtm

@Ark-kun
Copy link
Contributor

Ark-kun commented Aug 20, 2020

/test kubeflow-pipelines-tfx-python36

1 similar comment
@Ark-kun
Copy link
Contributor

Ark-kun commented Aug 21, 2020

/test kubeflow-pipelines-tfx-python36

@mr-real
Copy link
Contributor Author

mr-real commented Aug 21, 2020

@Ark-kun Sure, it's all in the description! The broken scenario is when something depends on an OpsGroup. Here is an example Python code resulting in an exception without a fix and in correct yaml with a fix: https://gist.github.com/sabiroid/08bb7d8e5a413f7d465bbb119df5449c

Also amended the PR with the unit test :)

@mr-real
Copy link
Contributor Author

mr-real commented Aug 22, 2020

/assign @Ark-kun

@Ark-kun
Copy link
Contributor

Ark-kun commented Aug 26, 2020

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Ark-kun

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

@mr-real
Copy link
Contributor Author

mr-real commented Aug 27, 2020

/test kubeflow-pipeline-upgrade-test
/test kubeflow-pipeline-sample-test

@k8s-ci-robot k8s-ci-robot merged commit 22b7b99 into kubeflow:master Aug 27, 2020
Jeffwan pushed a commit to Jeffwan/pipelines that referenced this pull request Dec 9, 2020
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.

7 participants