Skip to content
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

Validate deployment files #3884

Draft
wants to merge 6 commits into
base: main
Choose a base branch
from

Conversation

kddejong
Copy link
Contributor

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 --template-parameters that will accept the parameters for the template being run
  • 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 2 times, most recently from db21b73 to 12cf66e Compare December 18, 2024 18:27
Copy link

codecov bot commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 74.40273% with 75 lines in your changes missing coverage. Please review.

Project coverage is 93.43%. Comparing base (700563c) to head (6c18ed7).

Files with missing lines Patch % Lines
src/cfnlint/rules/deployment_files/Parameters.py 32.65% 32 Missing and 1 partial ⚠️
src/cfnlint/config.py 72.54% 14 Missing ⚠️
src/cfnlint/runner/template/runner.py 82.60% 7 Missing and 5 partials ⚠️
src/cfnlint/runner/deployment_file/runner.py 82.92% 5 Missing and 2 partials ⚠️
src/cfnlint/runner/cli.py 66.66% 3 Missing and 2 partials ⚠️
src/cfnlint/runner/exceptions.py 77.77% 1 Missing and 1 partial ⚠️
src/cfnlint/core.py 66.66% 1 Missing ⚠️
src/cfnlint/rules/_rule.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #3884      +/-   ##
==========================================
- Coverage   93.85%   93.43%   -0.43%     
==========================================
  Files         365      376      +11     
  Lines       12516    12719     +203     
  Branches     2572     2600      +28     
==========================================
+ Hits        11747    11884     +137     
- Misses        424      483      +59     
- Partials      345      352       +7     
Flag Coverage Δ
unittests 93.39% <74.40%> (-0.43%) ⬇️

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.

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