-
Notifications
You must be signed in to change notification settings - Fork 1
task/WA-193: Develop a dynamic profile system for dynamic exec system apps #1312
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
base: main
Are you sure you want to change the base?
Changes from all commits
4875305
3868942
ac03157
85e90ec
1f305f0
dbc9eca
8600f01
1fb1ae8
4987272
d1caacf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -675,6 +675,48 @@ export const AppSchemaForm = ({ app }) => { | |
| ) { | ||
| job.memoryMB = queue.maxMemoryMB; | ||
| } | ||
| if (isAppUsingDynamicExecSystem(app)) { | ||
| if (!job.parameterSet.schedulerOptions) { | ||
| job.parameterSet.schedulerOptions = []; | ||
| } | ||
| // pick the right profile for the right exec system | ||
|
|
||
| const isValidDynamicExecSystems = | ||
| Array.isArray(app.definition.notes.dynamicExecSystems) && | ||
| app.definition.notes.dynamicExecSystems.every( | ||
| (s) => typeof s === 'object' && s !== null && 'systemId' in s | ||
| ); | ||
| if (!isValidDynamicExecSystems) { | ||
| return ( | ||
| <div | ||
| id="appDetail-wrapper" | ||
| className="has-message appDetail-error" | ||
| > | ||
| <SectionMessage type="warning"> | ||
| {'DynamicExecSystems for this application are invalid'} | ||
| </SectionMessage> | ||
| </div> | ||
| ); | ||
| } | ||
|
|
||
| const selectedSystem = app.definition.notes.dynamicExecSystems.find( | ||
| (s) => s.systemId === job.execSystemId | ||
| ); | ||
| const profileName = selectedSystem?.profileName; | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If no profile name is found, we'll want to skip the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yep, good catch.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added a check for |
||
| if (!!profileName) { | ||
| job.parameterSet.schedulerOptions = [ | ||
| ...job.parameterSet.schedulerOptions.filter( | ||
| (opt) => !opt.arg.startsWith('--tapis-profile') | ||
| ), | ||
| { | ||
| name: 'TACC Scheduler Profile', | ||
| arg: `--tapis-profile ${profileName}`, | ||
| description: 'Scheduler profile for HPC clusters at TACC', | ||
| include: true, | ||
| }, | ||
| ]; | ||
| } | ||
| } | ||
|
|
||
| // Add allocation scheduler option | ||
| if (job.allocation) { | ||
|
|
||
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.
If the
dynamicExecSystemsfield does not correspond to our expectations as an array of objects, we'll need to handle those cases hereThere 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.
Added a check for
isValidDynamicExecSystems