[Validators] Relax validator PlacementGroupCapacityReservationValidator by accepting PG-ODCR when PG is omitted/disabled in cluster config.#7252
Merged
gmarciani merged 2 commits intoaws:developfrom Mar 2, 2026
Conversation
f9bcc53 to
779cbe3
Compare
779cbe3 to
5f4e320
Compare
5a01896 to
1e7fe92
Compare
| subnet=queue.networking.subnet_ids[0], | ||
| instance_types=compute_resource.instance_types, | ||
| multi_az_enabled=queue.multi_az_enabled, | ||
| subnet_id_az_mapping=queue.networking.subnet_id_az_mapping, |
Contributor
There was a problem hiding this comment.
Why deleting this parameter?
Contributor
Author
There was a problem hiding this comment.
it was injected only to provide the AZ in the error message:
There are no open or targeted ODCRs that match the instance_type 'c5n.9xlarge' in 'us-east-1b' and no placement group provided. Please either provide a placement group or add an ODCR that does not target a placement group and targets the instance type.
Not required anymore because we are removing that validation logic as part of the relaxation.
hanwen-cluster
previously approved these changes
Mar 2, 2026
…or by accepting PG-ODCR when PG is omitted/disabled in cluster config. This relaxation is safe because, when PG in cluster config is omitted/disabled, the ODCR decides the placement using its own PG. This relaxation allows users to consume PG-ODCR having cross-account PG.
1e7fe92 to
3a8655a
Compare
…ator` to better guide the user in addressing the failure. In particular: 1. we now specify the queue that contains the problem. 2. we now specify that you can set PlacementGroup/Enabled=false even if you are using a PG-ODCR.
3a8655a to
7dae62a
Compare
hanwen-cluster
approved these changes
Mar 2, 2026
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #7252 +/- ##
========================================
Coverage 90.06% 90.06%
========================================
Files 182 182
Lines 16646 16620 -26
========================================
- Hits 14992 14969 -23
+ Misses 1654 1651 -3
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
This file contains hidden or 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
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 of changes
Relax validator PlacementGroupCapacityReservationValidator by accepting PG-ODCR when PG is omitted/disabled in cluster config.
This relaxation is safe because, when PG in cluster config is omitted/disabled, the ODCR decides the placement using its own PG. See doc: https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/cr-cpg.html
This relaxation allows users to consume PG-ODCR having cross-account PG.
UX
Given a cluster config with a PG-ODCR and omitted/disabled PG, the CLI now succeeds with more helpful warning:
while it used to fail with less helpful messages:
Now:
Changes
Tests
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.