-
Notifications
You must be signed in to change notification settings - Fork 597
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
automating maintenance with Github actions #1792
Conversation
IAM actions currently required: https://github.com/aws-cloudformation/cfn-python-lint/blob/1ad5de337c3a388d949c30b738e48d15fae2092b/scripts/update_specs_services_from_ssm.py#L131 https://github.com/aws-cloudformation/cfn-python-lint/blob/1ad5de337c3a388d949c30b738e48d15fae2092b/scripts/update_specs_from_pricing.py#L90
.github/workflows/maintenance.yaml
Outdated
@@ -0,0 +1,28 @@ | |||
on: | |||
schedule: | |||
- cron: '*/15 * * * *' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems aggressive for how frequently these things change.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It won't change anything if nothing has changed, and it'll just update the same PR if anything has changed, so I considered running frequently and we could just merge it right before releases. Every 15 minutes seems to still be getting ThrottlingException when calling the GetProducts operation
though so trying every 35 minutes now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We might be able to use pricing files instead of the pricing API?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can also temporarily disable Github actions if we need to patch Resource Specification bugs any week
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@miparnisari / anyone else receiving Run failed: .github/workflows/maintenance.yaml
emails from their fork because they don't have secrets.AWS_ACCESS_KEY_ID
/secrets.AWS_SECRET_ACCESS_KEY
set: GitHub Actions notifications can be disabled (doesn't look more configurable yet unless using email rules), individual workflows can be disabled, or AWS credentials set (currently requires these IAM actions):
"ssm:GetParametersByPath",
"pricing:GetProducts"
d26b664
to
3694cb3
Compare
[
"ssm:GetParametersByPath",
"iam:ListPolicies",
"pricing:GetProducts"
] |
Encrypted secrets
for IAM actions currently required (set here):cfn-lint/scripts/update_specs_services_from_ssm.py
Line 131 in 1ad5de3
cfn-lint/scripts/update_specs_from_pricing.py
Line 90 in 1ad5de3
GitHub Actions usage is free for public repositories
Shortest interval you can run scheduled workflows is once every 5 minutes
(takes while before schedules actions run at all in a new repo
)peter-evans/create-pull-request
, might get stuck on peter-evans/create-pull-request#48tested in my fork since I wasn't sure how to test in this repo without pushing