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

chore: Update pre-commit checks to ensure common standards are followed #377

Closed
wants to merge 4 commits into from
Closed

chore: Update pre-commit checks to ensure common standards are followed #377

wants to merge 4 commits into from

Conversation

bryantbiggs
Copy link
Contributor

What does this PR do?

  • Update pre-commit checks to ensure common standards are followed; see Rules for full list of available rules that tflint offers

Motivation

  • Ensure that we provide all the relevant configurations and only those that are required/used
  • Ensure module follows standards and conventions adopted by wider community

More

  • Yes, I have tested the PR using my local account setup (Provide any test evidence report under Additional Notes)
  • Yes, I have added a new example under examples to support my PR
  • Yes, I have created another PR for add-ons under add-ons repo (if applicable)
  • Yes, I have updated the docs for this feature
  • Yes, I ran pre-commit run -a with this PR

Note: Not all the PRs required examples and docs except a new pattern or add-on added.

For Moderators

  • E2E Test successfully complete before merge?

Additional Notes

@bryantbiggs
Copy link
Contributor Author

Opening early to show the output caught by these changes in CI

@@ -1,10 +1,10 @@
# TODO - different name since if its not going to run on PRs
Copy link
Contributor Author

@bryantbiggs bryantbiggs Mar 30, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This workflow requires access to secrets for ROLE_TO_ASSUME which open source contributors outside the org will not have access, resulting in the error

Error: Credentials could not be loaded, please check your action inputs: Could not load credentials from any providers

I think most of what happens in this workflow is duplicated in https://github.com/aws-samples/aws-eks-accelerator-for-terraform/blob/main/.github/workflows/pre-commit.yaml, we could probably remove this and rely on the other tests we have in place. TBD

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This pr-test workflow was used mainly for PRs raised through branches(not from forks). This might not be required anymore since we have a proper CI solution for examples.

@@ -1,97 +1,77 @@
name: pre-commit

on:
push:
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is better to show users on pull-requests and doesn't require any credential access so flipping to run on PRs

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Most of the other changes are just updates from the original workflow I created which now uses composite workflows

.pre-commit-config.yaml Outdated Show resolved Hide resolved
Copy link
Contributor

@vara-bonthu vara-bonthu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@bryantbiggs
Copy link
Contributor Author

Closing for now to keep focus on launch activities - will re-open later

1 similar comment
@bryantbiggs
Copy link
Contributor Author

Closing for now to keep focus on launch activities - will re-open later

@bryantbiggs bryantbiggs closed this Apr 3, 2022
@bryantbiggs bryantbiggs closed this Apr 3, 2022
@bryantbiggs bryantbiggs deleted the chore/update-pre-commit-checks branch April 3, 2022 20:11
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.

3 participants