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 boolean default value serialization bug #8444

Conversation

connor-mccarthy
Copy link
Member

@connor-mccarthy connor-mccarthy commented Nov 11, 2022

Description of your changes:
Fixes a bug where default values for boolean inputs were sometimes
serialized as numbers (e.g., 1.0 for true) instead of booleans.

Checklist:

@google-oss-prow
Copy link

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@google-oss-prow
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from connor-mccarthy by writing /assign @connor-mccarthy in a comment. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found 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

@connor-mccarthy
Copy link
Member Author

/test all

@connor-mccarthy
Copy link
Member Author

/assign @chensun

@@ -132,19 +132,19 @@ components:
defaultValue: gbtree
parameterType: STRING
label_column:
defaultValue: '0'
defaultValue: 0.0
Copy link
Member Author

@connor-mccarthy connor-mccarthy Nov 11, 2022

Choose a reason for hiding this comment

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

Note that these changes were not the intent of this fix, but the improved default_value setting logic caught this type inconsistency that was previously bypassed.

@connor-mccarthy connor-mccarthy marked this pull request as ready for review November 11, 2022 21:49
@google-oss-prow google-oss-prow bot requested a review from james-jwu November 11, 2022 21:49
@google-oss-prow
Copy link

@connor-mccarthy: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
kubeflow-pipelines-sdk-execution-tests b9bf088 link false /test kubeflow-pipelines-sdk-execution-tests

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. I understand the commands that are listed here.

@connor-mccarthy
Copy link
Member Author

Test failures are unrelated to these changes

@IronPan
Copy link
Member

IronPan commented Nov 11, 2022

/lgtm
Thanks for the quick fix!

@connor-mccarthy
Copy link
Member Author

Manually merging, as test failures are unrelated to this PR.

I tested execution of sample pipelines with the corrected true/false boolean defaults, as well as the xgboost pipeline sample that was updated by this PR.

@connor-mccarthy connor-mccarthy merged commit 9e9e108 into kubeflow:master Nov 11, 2022
jlyaoyuli pushed a commit to jlyaoyuli/pipelines that referenced this pull request Jan 5, 2023
* add test cases

* fix bug

* add v1 component yaml back compat changes

* update golden snapshot
@connor-mccarthy
Copy link
Member Author

Fixes #8302

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.

3 participants