Skip to content

Commit

Permalink
V1 - Update to switch to CloudFormation provider schemas (#2583)
Browse files Browse the repository at this point in the history
* Convert to using CloudFormation provider schemas
* Many rule changes and API changes as we converted from specs to schemas

---------

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
  • Loading branch information
kddejong and github-actions[bot] authored May 3, 2024
1 parent 10b6a8b commit 30ee387
Show file tree
Hide file tree
Showing 4,950 changed files with 864,941 additions and 796,638 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
3 changes: 0 additions & 3 deletions .coveragerc

This file was deleted.

2 changes: 1 addition & 1 deletion .github/ISSUE_TEMPLATE/1.bug_report.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ body:
For reference, the current version of cfn-lint is <img src="https://badge.fury.io/py/cfn-lint.svg" />.
Cfn-lint uses the [CloudFormation Resource Specifications](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/cfn-resource-specification.html) as the base to do validation. These files are included as part of the application version. Please update to the latest version of `cfn-lint` or update the spec files manually (`cfn-lint -u`)
Cfn-lint uses the [CloudFormation resource provider schemas](https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/resource-type-schemas.html) as the base to do validation. These files are included as part of the application version. Please update to the latest version of `cfn-lint` or update the spec files manually (`cfn-lint -u`)
- type: input
attributes:
label: CloudFormation Lint Version
Expand Down
5 changes: 3 additions & 2 deletions .github/workflows/cd-pypi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ jobs:
python-version: "3.x"
- name: Install dependencies
run: |
pip install --upgrade setuptools wheel twine
pip install --upgrade pip
pip install --upgrade setuptools build wheel twine
- name: Build and publish
run: |
python setup.py sdist bdist_wheel
python -m build
- name: Publish to PyPI
uses: pypa/gh-action-pypi-publish@release/v1
with:
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/ci-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,14 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Lint
run: |
pip install pre-commit
pre-commit run --all-files
- name: Run Tox
run: |
tox -e style
tox -e type
tox -e py
- uses: codecov/[email protected]
tox -e py -- -m "data or not data"
- uses: codecov/[email protected]
if: matrix.os == 'ubuntu-latest'
with:
token: ${{ secrets.CODECOV_TOKEN }}
Expand Down Expand Up @@ -71,3 +73,4 @@ jobs:
with:
ignore-vulns: |
GHSA-r9hx-vwmv-q579
PYSEC-2022-43012
9 changes: 6 additions & 3 deletions .github/workflows/ci-pr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,13 @@ jobs:
python-version: ${{ matrix.python }}
- name: Install Tox and any other packages
run: pip install tox
- name: Run Lint
run: |
pip install pre-commit
pre-commit run --all-files
- name: Run Tox
run: |
tox -e style
tox -e type
tox -e py
tox -e py -- -m "data or not data"
mv coverage.xml coverage-${{ matrix.python }}.xml
- name: Store coverage file
uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -78,3 +80,4 @@ jobs:
with:
ignore-vulns: |
GHSA-r9hx-vwmv-q579
PYSEC-2022-43012
5 changes: 3 additions & 2 deletions .github/workflows/maintenance-v0.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
- uses: actions/setup-python@v5
with:
python-version: 3
-
-
id: maintenance
run: |
latest_sam_cli=`curl -s https://api.github.com/repos/aws/aws-sam-cli/releases/latest | jq -r .tag_name | cut -c 2-`
Expand All @@ -26,6 +26,7 @@ jobs:
scripts/update_specs_services_from_ssm.py
scripts/update_specs_from_pricing.py
scripts/update_serverless_aws_policies.py
scripts/update_schemas_from_aws_api.py
cfn-lint --update-specs
echo "specversion=$(jq -r .ResourceSpecificationVersion src/cfnlint/data/CloudSpecs/us-east-1.json)" >> $GITHUB_OUTPUT
echo "date=$(date +'%Y-%m-%d')" >> $GITHUB_OUTPUT
Expand All @@ -40,7 +41,7 @@ jobs:
body: |
- Update CloudFormation specs to ${{ steps.maintenance.outputs.specversion }}
- Update Specs from pricing data as of ${{ steps.maintenance.outputs.date }}
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
delete-branch: true
title: chore(specs) - Update CloudFormation specs to ${{ steps.maintenance.outputs.specversion }}
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,8 @@ htmlcov/
.coverage
.coverage.*
.cache
.pytest_cache/
.ruff_cache/
nosetests.xml
coverage.xml
*.cover
Expand Down
44 changes: 44 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
hooks:
- id: check-ast
- id: check-json
exclude: "(test/fixtures/templates/bad/json_parse.json|test/fixtures/templates/bad/core/config_invalid_json.json|test/fixtures/templates/bad/duplicate.json)"
- id: check-toml
- id: check-vcs-permalinks
- id: check-yaml
exclude: "test/fixtures/templates/"
args: [--unsafe]
- id: debug-statements
- id: end-of-file-fixer
- id: mixed-line-ending
args: [--fix, auto]
- id: trailing-whitespace
- repo: https://github.com/psf/black
rev: 24.2.0
hooks:
- id: black
- repo: https://github.com/PyCQA/isort
rev: 5.13.2
hooks:
- id: isort
- repo: https://github.com/charliermarsh/ruff-pre-commit
rev: "v0.2.2"
hooks:
- id: ruff
- repo: https://github.com/PyCQA/bandit
rev: "1.7.7"
hooks:
- id: bandit
additional_dependencies:
- "bandit[toml]"
args: ["-c", "pyproject.toml"]
- repo: https://github.com/pre-commit/mirrors-mypy
rev: "v1.8.0"
hooks:
- id: mypy
additional_dependencies:
- "types-PyYAML"
- "types-regex"
- "types-requests"
Loading

0 comments on commit 30ee387

Please sign in to comment.