Skip to content

Validate deployment files#3884

Merged
kddejong merged 15 commits intoaws-cloudformation:mainfrom
kddejong:fix/issue/3721
Jun 30, 2025
Merged

Validate deployment files#3884
kddejong merged 15 commits intoaws-cloudformation:mainfrom
kddejong:fix/issue/3721

Conversation

@kddejong
Copy link
Copy Markdown
Contributor

@kddejong kddejong commented Dec 18, 2024

Issue #, if available:
fix #3721
Description of changes:

  • Add rule E2900 to validate parameters in a deployment file match the parameters in a template
    • Validate that Pattern matches
    • Validate AllowedValues match the parameter value
    • If the parameter doesn't have a Default value the value is required in the deployment file
    • Validate the type of a parameter as it relates to singular and list types
  • Add new parameter --deployment-files that will take a list of deployment files to validate
  • Add new parameter --parameter-files that will take a list of strings (or glob pattern) to read parameter files from. You can only provide one template when using this parameter.
  • Add new parameter --template-parameters that will accept the parameters for the template being run. You can only provide one template when using this parameter.
  • Better structure of the runner module with expansion for support of deployment files and separating out template logic so it can be used by deployment files option

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

@kddejong kddejong force-pushed the fix/issue/3721 branch 3 times, most recently from 12cf66e to d623724 Compare December 18, 2024 18:30
@codecov
Copy link
Copy Markdown

codecov Bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 94.96718% with 23 lines in your changes missing coverage. Please review.

Project coverage is 94.40%. Comparing base (5f45b2d) to head (ec856be).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/cfnlint/runner/template/runner.py 87.65% 5 Missing and 5 partials ⚠️
src/cfnlint/runner/cli.py 77.77% 4 Missing and 4 partials ⚠️
src/cfnlint/helpers.py 33.33% 1 Missing and 1 partial ⚠️
src/cfnlint/core.py 50.00% 1 Missing ⚠️
src/cfnlint/rules/_rule.py 50.00% 1 Missing ⚠️
src/cfnlint/rules/functions/_BaseFn.py 93.75% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3884      +/-   ##
==========================================
+ Coverage   94.27%   94.40%   +0.12%     
==========================================
  Files         397      411      +14     
  Lines       13527    13845     +318     
  Branches     2683     2741      +58     
==========================================
+ Hits        12753    13070     +317     
+ Misses        425      424       -1     
- Partials      349      351       +2     
Flag Coverage Δ
unittests 94.38% <94.96%> (+0.12%) ⬆️

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

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@kddejong kddejong force-pushed the fix/issue/3721 branch 2 times, most recently from 9494437 to 6c18ed7 Compare December 19, 2024 22:15
@kddejong kddejong force-pushed the fix/issue/3721 branch 5 times, most recently from 7e57f0f to 1e79c52 Compare January 4, 2025 17:10
@kddejong kddejong force-pushed the fix/issue/3721 branch 8 times, most recently from 839feec to 16af481 Compare January 10, 2025 19:54
@kddejong kddejong force-pushed the fix/issue/3721 branch 3 times, most recently from 9517058 to 4274877 Compare January 24, 2025 23:08
@kddejong kddejong marked this pull request as ready for review January 27, 2025 19:24
@kddejong kddejong force-pushed the fix/issue/3721 branch 7 times, most recently from ed1e408 to fe9bc2c Compare January 28, 2025 22:15
@kddejong kddejong force-pushed the fix/issue/3721 branch 6 times, most recently from e45a126 to 639b4da Compare March 5, 2025 17:21
@kddejong kddejong force-pushed the fix/issue/3721 branch 2 times, most recently from 8f4a89e to 61cc03a Compare March 18, 2025 14:51
@kddejong kddejong force-pushed the fix/issue/3721 branch 3 times, most recently from 0c28543 to b7969b4 Compare May 9, 2025 15:32
@kddejong kddejong merged commit 78eb5b7 into aws-cloudformation:main Jun 30, 2025
22 checks passed
@kddejong kddejong deleted the fix/issue/3721 branch June 30, 2025 18:05
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.

[Feature] Stack deployment file validation

1 participant