-
Notifications
You must be signed in to change notification settings - Fork 38
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: Custom Host Requirements ui now accepts decimals. #523
Conversation
541a79f
to
8bb1a04
Compare
Nit; please add a screenshot to the PR description next time? |
90f9bd5
to
f7c0f2d
Compare
Signed-off-by: Eric Osiowy <[email protected]>
6824a29
to
7dfedd7
Compare
Quality Gate failedFailed conditions |
min: int = MIN_INT_VALUE, | ||
max: int = MAX_INT_VALUE, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should the double spin box have ints for the min/max? Does openjd specify what they do and if they should be float min/max?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
min needs to be 0 (non-negative). Max could be float max.
Fixes: Bug: Fleet Worker Requirements lets values to be set in AWS console that cannot be set in the submitter UI
What was the problem/requirement? (What/Why)
Through the command line, Custom Host Requirements allow for decimal values. Through the UI it wasn't possible to enter a decimal value.
What was the solution? (How)
Switched the
OptionalSpinBox
control to inherit fromQDoubleSpinBox
. It also defaults to allowing values with 2 decimal places.The hardware requirements use the same OptionalSpinBox control. They don't need decimals so I set them to have 0 decimal places.
I also checked the OpenJD spec to make sure that host requirements could have floating point values.
What is the impact of this change?
The submitters that use this UI (like Blender) will behave more like their cli counterparts.
How was this change tested?
Built locally and installed into the Blender submitter. Opened Blender and submitted Jobs with Host Requirements with the integrated submitter.
Was this change documented?
No.
Does this PR introduce new dependencies?
This library is designed to be integrated into third-party applications that have bespoke and customized deployment environments. Adding dependencies will increase the chance of library version conflicts and incompatabilities. Please evaluate the addition of new dependencies. See the Dependencies section of DEVELOPMENT.md for more details.
Is this a breaking change?
No
Does this change impact security?
No
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.