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

task/WP-288: Implement Queue Filter #883

Merged
merged 8 commits into from
Oct 24, 2023
Merged

Conversation

tjgrafft
Copy link
Collaborator

@tjgrafft tjgrafft commented Oct 10, 2023

Overview

We know some apps only work on certain queues, and for these apps we want to be able to control which queues show up for the user in the queue selection dropdown.

Direction
Develop a queue filter schema based on a flag in the app's notes field, and implement this on the frontend. I suggest something along the lines of app -> notes -> queueFilter -> [], and if there is no queueFilter flag (or nothing in the array), show all queues

Reference
Talk to Sal for details on the schema for the queue filter in an app definition

Related

Changes

  • Added additional, final filter that first checks if queueFilter flag exists. If it does it then checks each of the queueNames to see if they're included in the queueFilter array. If they are present, they're added as options to the dropdown.
  • If the queueFilter flag doesn't exist for the current application, it includes all available queues (that meet the first filter requirement of max/min nodeCount) in the dropdown instead.
  • Added queueFilter to appShape (which is an array of strings).
  • Added initial value for queueFilter to be app.definition.notes.queueFilter.

Testing

  1. Sal updated the Namd application to include a queueFilter property in its app.definition.notes flag.
  2. Go to https://cep.test/workbench/applications/
  3. Navigate to the Simulation category and select the "NAMD" app, e.g. https://pprd.frontera-portal.tacc.utexas.edu/workbench/applications/namd?appVersion=2.14
  4. Scroll down to Configuration -> Queue. (By default it should show 'small' as the queue)
  5. Click queue dropdown. You should see 5 queues available. 'development', 'flex', 'normal', 'nvdimm', 'small'.
  6. console.log(app.definition.notes.queueFilter). You should see an array with those 5 elements.
  7. Compare with another application. For example, OpenSeesMP (also in Simulation category).
  8. Clicking on OpenSeesMP queue dropdown should show all 10 available queues. OpenSeesMP does not have a queueFilter flag in it's app.defintion.notes, so it will give all available queue options from original filter.
  9. You can also check by console.log(app.exec_sys.batchLogicalQueues). This will show you all the available queues that would show up in the dropdown with the first filter. You can compare NAMD's batchLogicalQueues array with its queueFilter array.
  10. Below is a screenshot showing NAMD's batchLogicalQueue array (10 total elements). Versus its queueFilter array (5 elements)

UI

Screenshot 2023-10-10 at 11 02 09 AM

Notes

This was designed so that in the future when we update other applications or create new applications, we can include queueFilter property in app.definition.notes and further filter which queues we want the users to see on the frontend.

*Frontera system is currently undergoing maintenance, so might have to wait to test dropdown.

@codecov
Copy link

codecov bot commented Oct 10, 2023

Codecov Report

Merging #883 (96e4a2e) into main (e427c97) will increase coverage by 0.00%.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #883   +/-   ##
=======================================
  Coverage   63.32%   63.33%           
=======================================
  Files         428      428           
  Lines       12243    12246    +3     
  Branches     2514     2518    +4     
=======================================
+ Hits         7753     7756    +3     
  Misses       4284     4284           
  Partials      206      206           
Flag Coverage Δ
javascript 69.69% <100.00%> (+0.01%) ⬆️
unittests 56.99% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files Coverage Δ
...nt/src/components/Applications/AppForm/AppForm.jsx 83.82% <100.00%> (+0.20%) ⬆️

Copy link
Collaborator

@chandra-tacc chandra-tacc 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, thanks for adding this feature. And good to see tests added too. Tested the following:

  1. app forms with and without queue filter
  2. use queue filter based to adjust default and submit job
  3. use app without queue filter and submit job.

One minor change, can you remove queueFilter in job submission payload, if it exists ? At that point it is not needed, exec queue is already populated.
See payload below:
Screenshot 2023-10-17 at 2 12 57 PM

@rstijerina rstijerina changed the title task/WP-288-QueueFilter-v1 task/WP-288: Implement Queue Filter Oct 18, 2023
Copy link
Member

@rstijerina rstijerina left a comment

Choose a reason for hiding this comment

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

Works well, one change request in addition to Chandra's comment

@@ -44,6 +44,7 @@ const appShape = PropTypes.shape({
coresPerNode: PropTypes.number,
maxMinutes: PropTypes.number,
tags: PropTypes.arrayOf(PropTypes.string),
queueFilter: PropTypes.arrayOf(PropTypes.string),
Copy link
Member

Choose a reason for hiding this comment

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

I think we can drop these changes on lines 47 and 272, as these don't correspond to default fields on the form

Copy link
Collaborator Author

@tjgrafft tjgrafft Oct 18, 2023

Choose a reason for hiding this comment

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

Yep this change addresses Chandra's comment, in regard to getting rid of 47 and 272 gets rid of queueFilter showing up in the job submission payload.

Copy link
Collaborator

@chandra-tacc chandra-tacc left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for addressing comments.

@chandra-tacc chandra-tacc merged commit fa8c979 into main Oct 24, 2023
6 checks passed
@chandra-tacc chandra-tacc deleted the task/WP-288-QueueFilter branch October 24, 2023 19:21
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.

3 participants