-
Notifications
You must be signed in to change notification settings - Fork 6
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
ci: Move AWS CDK check into it's own GHA job #998
Conversation
Currently CI will fail when the version of AWS CDK libraries being used are over 5 releases out of date. This forces us to keep somewhat up to date with releases, however it does introduce an odd situation: 1. Raise PR 2. CI passes on PR 3. PR gets approved 4. New AWS CDK released 5. PR merged 6. Semantic Release creates a new release 7. Robot that keeps `version` in `package.json` up to date raises PR 8. Robot PR fails CI and cannot be automatically merged When this happens we usually update the branch of the robot's PR to remove the AWS CDK check, allowing CI to pass. This isn't great as we put the check back in the next PR. This is noise. This change moves the AWS CDK check into a discrete job in GHA. This should mean we can resolve the above solution by updating the branch protection rules, allowing the AWS CDK check to fail but still require the tests to pass. This yields less noise in the repository.
There's a little dance to do with this PR:
|
We could also bypass this check automatically for machine users, for example: https://github.com/guardian/cdk/pull/1000/files#diff-944291df2c9c06359d37cc8833d182d705c9e8c3108e7cfe132d61a06e9133ddR22. |
🎉 This PR is included in version 32.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
YES! Even more reason to move away from |
Currently when a new release is made (via Semantic Release), a robot will raise and merge a PR to update `version` in `package.json`. This is handy as we can browse the file to see what the latest version is. I don't think it's necessary for the release process - Semantic Release gets the latest version number from npm. It comes at a slight cost, however: - A bit of PR noise. We're not expected to interacted with the robot's PRs, but the `CODEOWNERS` rules mean we get added as reviewers. - An odd scenario where our CI checks don't pass and the robot's PR cannot be automatically merged. See #998. This change moves to a simpler model of keeping `version` in `package.json` completly static between releases. If one would like to find the number of the latest version, npm or GitHub releases can be used.
What does this change?
Currently CI will fail when the version of AWS CDK libraries being used are over 5 releases out of date. This forces us to keep somewhat up to date with releases, however it does introduce an odd situation:
version
inpackage.json
up to date raises PRThe latest example of this can be seen on:
Where #977 passed CI (step 2) and was merged (step 5) and #995 (step 7) is now failing it's CI checks (step 8).
When this happens we usually update the branch of the robot's PR to remove the AWS CDK check, allowing CI to pass. This isn't great as we put the check back in the next PR. This is noise.
This change moves the AWS CDK check into a discrete job in GHA. This should mean we can resolve the above solution by updating the branch protection rules, allowing the AWS CDK check to fail but still require the tests to pass.
This yields less noise in the repository.
How to test
CI should pass and there should be another build report.
How can we measure success?
#995 can be merged before #997 and thus the revision history stays truthful.
More importantly though, we able to ignore the AWS CDK check a little more easily.
Have we considered potential risks?
???
Checklist
Footnotes
Consider whether this is something that will mean changes to projects that have already been migrated, or to the CDK CLI tool. If changes are required, consider adding a checklist here and/or linking to related PRs. ↩
If you are adding a new construct or pattern, has new documentation been added? If you are amending defaults or changing behaviour, are the existing docs still valid? ↩