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

GitHub action workflow enhancement: Identify regression in resource support #2131

Open
quixoticmonk opened this issue Dec 13, 2024 · 0 comments

Comments

@quixoticmonk
Copy link
Collaborator

Community Note

  • Please vote on this issue by adding a 👍 reaction to the original issue to help the community and maintainers prioritize this request
  • Please do not leave "+1" or other comments that do not add relevant new information or questions, they generate extra noise for issue followers and do not help prioritize the request
  • If you are interested in working on this issue or have submitted a pull request, please leave a comment
  • The resources and data sources in this provider are generated from the CloudFormation schema, so they can only support the actions that the underlying schema supports. For this reason submitted bugs should be limited to defects in the generation and runtime code of the provider. Customizing behavior of the resource, or noting a gap in behavior are not valid bugs and should be submitted as enhancements to AWS via the CloudFormation Open Coverage Roadmap.

Description

Add a GitHub workflow to proactively find any regression in resource support.

Pseudo code

  • Generate the current list of resources from CloudFormation registry filtered on the provisioning type and TypeNamePrefix of AWS.
  • Requires access to an AWS account unless there is another public endpoint which can be used to derive this.
      - name: Generate current resource list
        run: |
          aws cloudformation list-types \
            --type RESOURCE \
            --visibility PUBLIC \
            --provisioning-type FULLY_MUTABLE \
            --filters TypeNamePrefix="AWS::" | \
          jq -r '.TypeSummaries[].TypeName' | sort > supported-resources.txt

  • Read the list of existing schema files from internal/service/cloudformation/schemas directory on the awscc GitHub repo to get the currently supported list or another means of doing that. GitHub APIs might limit the calls to 1000 files at a point in time unless you clone the repo.
#!/bin/bash

dir="${1:-.}"

output_file="current-resources.txt"
for file in "$dir"/*.json; do
    basename=$(basename "$file")
    modified_name=$(echo "${basename%.json}" | tr '_' '::')
    echo "AWS::$modified_name" >> "$output_file"
done

sort -o "$output_file" "$output_file"

  • Find the diff between them resource list.
      - name: Compare with reference list
        run: |       
          # Generate diff      
          diff_output=$(diff -u supported-resources.txt current-resources.txt || true)

  • Notify/Generate a PR based on preference.
@quixoticmonk quixoticmonk changed the title GitHub action workflow enhancement: GitHub action workflow enhancement: Identity regression in resource support Dec 13, 2024
@quixoticmonk quixoticmonk changed the title GitHub action workflow enhancement: Identity regression in resource support GitHub action workflow enhancement: Identify regression in resource support Dec 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant