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

View and Edit Subscriptions in full cores. #644

Conversation

ks47
Copy link
Contributor

@ks47 ks47 commented Mar 7, 2020

Fixes #639

Changed the subscriptions display so as to display straight cores instead of cores*100.

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Mar 7, 2020

CLA Check
The committers are authorized under a signed CLA.

Copy link
Collaborator

@bcipriano bcipriano left a comment

Choose a reason for hiding this comment

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

Thanks for sending this!

This is looking good. One thing -- the "Edit Subscription Size" and "Edit Burst Size" dialogs still show the larger numbers -- those will need to be changed too.

(To be clear -- you get to those dialogs by right-clicking on each subscription in the list.)

@ks47
Copy link
Contributor Author

ks47 commented Mar 11, 2020

Thanks for the feedback,
Can you please clear one query:
Is it possible for a job to be assigned part of a core ( i.e., can we edit the size to 988.23);
If not then why does the database has size values in terms of hundredths of a core, e.g 100,000 ?

@bcipriano
Copy link
Collaborator

That's correct -- it is possible to utilize only partial cores, which is why the data is stored that way.

However it's more of a "power user" type of feature. The most common way of using OpenCue is to only use full cores.

So I think we should keep the database/API values as they are, and only change the GUI.

@ks47
Copy link
Contributor Author

ks47 commented Mar 12, 2020

Changes have been made :)
I guess the tests have failed due to #648

@bcipriano
Copy link
Collaborator

#648 is merged so please rebase or merge master into your branch. That should hopefully fix the tests.

Changed the subscriptions display so as to display straight cores instead of cores*100.
Changed the "Edit Subscription Size" and "Edit Burst Size" widgets so that they no longer display cores*100 but straight cores.
@ks47 ks47 force-pushed the fix-display-hundredths-of-a-core branch from 57e769a to 10ab364 Compare March 13, 2020 07:25
@ks47
Copy link
Contributor Author

ks47 commented Mar 13, 2020

Done, let me know if its alright.

@bcipriano
Copy link
Collaborator

Tests didn't re-run automatically -- we seem to be having some problem with our Azure integration -- but I re-ran them manually here: https://dev.azure.com/cipriano0988/OpenCue%20Testing/_build/results?buildId=769&view=results

Tests passing now, as you can see.

Copy link
Collaborator

@bcipriano bcipriano left a comment

Choose a reason for hiding this comment

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

Getting close -- one more change needed to get the correct values passed back into the API backend.

Also, please update the PR title to be more descriptive. Something like "Display and edit subscriptions in full cores."

The PR titles get copied into our release notes automatically, so it's good to imagine you're reading release notes and think about what information you'd need to understand exactly what changed.

Thanks!

@@ -1138,7 +1138,7 @@ def editSize(self, rpcObjects=None):
"contact the resource department."
minSize = 0
decimalPlaces = 0
(value, choice) = QtWidgets.QInputDialog.getDouble(self._caller, title, body, current,
(value, choice) = QtWidgets.QInputDialog.getDouble(self._caller, title, body, current/100.0,
Copy link
Collaborator

Choose a reason for hiding this comment

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

Remember that the API backend is still expecting values in hundredths of a core, so when you call cuebotCall below you need to multiple value by 100 there.

Also -- please update the tests for editSize and editBurst to assert that the correct value (i.e. the input * 100) is passed to setSize/setBurst.

To run the unit tests locally you can change to the cuegui directory then run python setup.py test .

Updated editSize and editBurst so that they send values in terms of hundredths of a core.
Updated Tests for the same.
@ks47 ks47 changed the title Update SubscriptionsWidget.py Subscriptions View and Edit Subscriptions in full cores Mar 17, 2020
@ks47
Copy link
Contributor Author

ks47 commented Mar 17, 2020

All changes made. Let me know if anything else is to be done :)

Copy link
Collaborator

@bcipriano bcipriano left a comment

Choose a reason for hiding this comment

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

Looks good to me!

Waiting on a second approval now. @smith1511 @larsbijl @gregdenton

@bcipriano bcipriano changed the title Subscriptions View and Edit Subscriptions in full cores View and Edit Subscriptions in full cores. Mar 18, 2020
@bcipriano
Copy link
Collaborator

@smith1511 @larsbijl @gregdenton Could we get a second review here please? This is tied to Summer of Code work so I'd like to get it merged ASAP.

@larsbijl
Copy link
Contributor

LGTM

@larsbijl larsbijl merged commit c67a3f7 into AcademySoftwareFoundation:master Mar 24, 2020
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.

Subscriptions are displayed in hundredths-of-a-core
3 participants