Repository navigation
fix: Add E3725 for FSx FileSystemType-specific StorageCapacity - #4708
Merged
Merged
Conversation
AWS::FSx::FileSystem StorageCapacity limits depend on FileSystemType. Add rule E3725 with an if/then extension enforcing the correct per-type bounds: Windows 32-65536 GiB, OpenZFS 64-524288 GiB, Lustre minimum 1200 GiB, ONTAP minimum 1024 GiB. Lustre and ONTAP have no static per-file-system maximum (the ceiling is an adjustable account quota), so none is imposed. Companion to the enhanced-schemas change that removes the stale, unconditional Windows-only maximum of 65536 which produced false W1030 warnings on valid Lustre capacities. Fixes aws-cloudformation#4706
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #4708 +/- ##
=======================================
Coverage 94.66% 94.67%
=======================================
Files 434 435 +1
Lines 15561 15577 +16
Branches 3019 3019
=======================================
+ Hits 14731 14747 +16
Misses 453 453
Partials 377 377
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Add valid and below-minimum cases for the SCRATCH_1 and PERSISTENT_1 Lustre deployment types, documenting that E3725 applies the 1200 GiB minimum to every Lustre DeploymentType (the rule keys on FileSystemType, not DeploymentType).
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.
What
Adds rule E3725 with an
if/thenextension (aws_fsx_filesystem/storage_capacity.json) that validatesAWS::FSx::FileSystemStorageCapacityagainst the correct bounds for eachFileSystemType:Why
Fixes #4706. The enhanced provider schema carried a single unconditional
minimum: 32/maximum: 65536onStorageCapacity— but those are the FSx for Windows File Server SSD limits. Applied to every FileSystemType, the stale65536cap produced a falseW1030warning on valid LustrePERSISTENT_2capacities (e.g. a parameter withMaxValue: 460800).Lustre and ONTAP have no static per-file-system maximum — the documented Lustre ceiling is an adjustable, account-level Service Quota, not a template constraint — so this rule imposes only a per-type minimum for them and no maximum. That is what makes the false warning disappear without inventing a fabricated ceiling.
The unconditional Windows-only min/max is removed in the companion schema change: aws-cloudformation/resource-provider-enhanced-schemas#37 (merged). This rule supplies the correct per-type validation that a single unconditional value cannot express.
Validation
test/unit/rules/resources/fsx/test_file_system_storage_capacity.py(17 cases: valid per-type min/max, the FSx Lustre max size false positive W1030 #4706 Lustre scenario, and per-type violations with exact messages).ruff check,ruff format --check,isort --checkclean on the new files.--update-documentationregenerateddocs/rules.md.{value} is less than the minimum of {N} for '{FileSystemType}' file systemson genuine violations.