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: Custom Host Requirements ui now accepts decimals. #523

Merged
merged 2 commits into from
Jan 9, 2025

Conversation

erico-aws
Copy link
Contributor

@erico-aws erico-aws commented Nov 29, 2024

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 from QDoubleSpinBox. 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.

  • This PR adds one or more new dependency Python packages. I acknowledge I have reviewed the considerations for adding dependencies in DEVELOPMENT.md.
  • This PR does not add any new dependencies.

Is this a breaking change?

No

Does this change impact security?

No

Screenshot 2024-12-18 at 10 30 56 AM

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@erico-aws erico-aws requested a review from a team as a code owner November 29, 2024 20:46
@erico-aws erico-aws force-pushed the add_dec_to_SpinBox branch 3 times, most recently from 541a79f to 8bb1a04 Compare November 29, 2024 21:33
miabatta
miabatta previously approved these changes Dec 2, 2024
leongdl
leongdl previously approved these changes Dec 5, 2024
@leongdl
Copy link
Contributor

leongdl commented Dec 5, 2024

Nit; please add a screenshot to the PR description next time?

@erico-aws erico-aws dismissed stale reviews from leongdl and miabatta via f7c0f2d December 18, 2024 16:31
miabatta
miabatta previously approved these changes Dec 18, 2024
Copy link

sonarqubecloud bot commented Jan 9, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
39.4% Duplication on New Code (required ≤ 3%)

See analysis details on SonarQube Cloud

Comment on lines +951 to +952
min: int = MIN_INT_VALUE,
max: int = MAX_INT_VALUE,
Copy link
Contributor

@epmog epmog Jan 9, 2025

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?

Copy link
Contributor Author

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.

@erico-aws erico-aws merged commit 1046924 into aws-deadline:mainline Jan 9, 2025
24 of 25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Fleet Worker Requirements lets values to be set in AWS console that cannot be set in the submitter UI
4 participants