-
Notifications
You must be signed in to change notification settings - Fork 20
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
[PCUI] Support On-Demand Capacity Reservations and Capacity Blocks for PCUI #347
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…locks) for PCUI - Added CapacityReservationTarget select component allowing users to choose between CapacityReservationId, CapacityReservationResourceGroupArn, or none at both queue and compute resource levels. - Implemented dynamic placeholders to guide users on the required inputs for CapacityReservationId and CapacityReservationResourceGroupArn. - Introduced CAPACITY_BLOCK as a new purchase type option in the UI. - Automatically hide the Allocation Strategy selection when CAPACITY_BLOCK is selected as the purchase type, adhering to the expected behavior in ParallelCluster. - Applied CapacityReservationTarget select component in queue and compute resource levels, maintaining consistency with ParallelCluster's behavior.
…locks) for PCUI - Removed the usage of the odcrCbSelection component at the queue level due to conflicts in queues.mapper.ts when converting SingleInstanceComputeResource to MultiInstanceComputeResource. - Implemented logic to automatically hide the instance type selection and exclude the Instances section in the YAML when CapacityReservationId is selected. - Made the Instances property of MultiInstanceComputeResource optional. - Updated the mechanism in queues.mapper.ts to resolve the conversion conflict.
…ources to adapt the new changes. Now if CapacityReservationId is selected, Instances can be empty.
…documentation links and note on instance type usage. Move related string correctly under compute resources instead of advanced options. Tiny changes on format and comments.
himani2411
reviewed
Aug 23, 2024
frontend/locales/en/strings.json
Outdated
"label": "CapacityReservationTarget", | ||
"help": { | ||
"title": "Capacity Reservations and Capacity Blocks", | ||
"description": "Learn how to configure Capacity Reservations and Capacity Blocks in ParallelCluster.", |
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.
I dont think this should be the description! This should tell them what to do rather than ask them to Learn
Other wise the whole CR LGTM
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.
Fixed.
himani2411
approved these changes
Aug 26, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
feat: Support ODCR(On-Demand Capacity Reservations) and CB(Capacity Blocks) for PCUI
Changes
CapacityReservationTarget
select component at the compute resource level, allowing users to choose betweenCapacityReservationId
,CapacityReservationResourceGroupArn
, or none.CapacityReservationId
andCapacityReservationResourceGroupArn
.CAPACITY_BLOCK
as a new purchase type option in the UI.CAPACITY_BLOCK
is selected, following the expected behavior in ParallelCluster.Instances
section in the YAML whenCapacityReservationId
is selected.Instances
property ofMultiInstanceComputeResource
optional.queues.mapper.ts
to resolve the conversion conflict.CapacityReservationTarget
in queue types.validateComputeResources
to adapt to the new changes, allowingInstances
to be empty ifCapacityReservationId
is selected.Note:
ParallelCluster supports
CapacityReservationTarget
at both the queue and compute resource levels. However, the official documentation (Launch Instances into On-Demand Capacity Reservations (ODCR) - ParallelCluster, Launch Instances Using Capacity Blocks - ParallelCluster) recommends managingCapacityReservationTarget
at the compute resource level. IfCapacityReservationTarget
is specified at both the queue and compute resource levels, the compute resource level option overrides the queue level option.Implementing
CapacityReservationTarget
at the queue level is unnecessary, as it adds complexity and requires significant refactoring due to internal PCUI mechanisms that conflict with this implementation. The decision not to implementCapacityReservationTarget
at the queue level does not impact customers, given that control at the compute resource level aligns with best practices and recommendations.How Has This Been Tested?
Manually test passed, and worked as expected.
References
Launch Instances into On-Demand Capacity Reservations (ODCR) - ParallelCluster
Launch Instances Using Capacity Blocks - ParallelCluster
aws parallelcluster Scheduling section
PR Quality Checklist
react-i18next
library (useTranslation hook and/or Trans component), see an example herenpm run build
builds without any errorIn order to increase the likelihood of your contribution being accepted, please make sure you have read both the Contributing Guidelines and the Project Guidelines
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.