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

Add Type validation for Cluster Configuration Parameters #593

Merged
merged 2 commits into from
Jul 18, 2024

Conversation

Ygnas
Copy link
Contributor

@Ygnas Ygnas commented Jul 16, 2024

Issue link

https://issues.redhat.com/browse/RHOAIENG-9435

What changes have been made

Added Type Validation for Parameters

Verification steps

In Cluster Configuration change any of the parameters to a wrong type. Should get an error similar to this:
'num_workers' should be of type <class 'int'>, got list

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • Testing is not required for this change

Copy link
Contributor

@Bobbins228 Bobbins228 left a comment

Choose a reason for hiding this comment

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

Tested this out and works as expected /lgtm

Copy link
Collaborator

@KPostOffice KPostOffice left a comment

Choose a reason for hiding this comment

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

Nice work! I have a few comments

src/codeflare_sdk/cluster/config.py Outdated Show resolved Hide resolved
src/codeflare_sdk/cluster/config.py Outdated Show resolved Hide resolved
src/codeflare_sdk/cluster/config.py Outdated Show resolved Hide resolved
src/codeflare_sdk/cluster/config.py Outdated Show resolved Hide resolved
@Ygnas Ygnas force-pushed the RHOAIENG-9435 branch 6 times, most recently from c09a6eb to 9dc6c56 Compare July 18, 2024 10:49
Copy link
Collaborator

@KPostOffice KPostOffice left a comment

Choose a reason for hiding this comment

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

This is great, everything works as expected, just a small comment on the TypeError content.

src/codeflare_sdk/cluster/config.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@KPostOffice KPostOffice left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Jul 18, 2024
Copy link
Contributor

openshift-ci bot commented Jul 18, 2024

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: KPostOffice

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jul 18, 2024
@openshift-merge-bot openshift-merge-bot bot merged commit 9c1e65d into project-codeflare:main Jul 18, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants