Reduce CI deployment noise#3303
Open
nhatnghiho wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #3303 +/- ##
==========================================
+ Coverage 78.15% 78.17% +0.01%
==========================================
Files 693 693
Lines 123783 123803 +20
Branches 17193 17194 +1
==========================================
+ Hits 96742 96777 +35
+ Misses 26122 26107 -15
Partials 919 919 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
| permissions: | ||
| deployments: write | ||
| steps: | ||
| - uses: actions/checkout@v5 |
Contributor
There was a problem hiding this comment.
why v5 here but v4 below?
| console.log(`Found ${deployments.data.length} deployments for ${env} (sha: ${sha})`); | ||
| for (const d of deployments.data) { | ||
| try { | ||
| await github.rest.repos.createDeploymentStatus({ |
Contributor
There was a problem hiding this comment.
what do we even use this notion of "deployments" for? instead of cleaning up the unneeded deployments, can we just disable them altogether?
| repo: context.repo.repo, | ||
| environment: env, | ||
| sha: sha, | ||
| per_page: 100, |
Contributor
There was a problem hiding this comment.
presumably 100 is enough today, but do we have to limit page size? if the page size grows >100, do we need to paginate here?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of changes:
Deployment notifications have been especially noisy in PRs. They provide no meaningful information, except for when an external contributor needs us to approve the CI. Otherwise, they make it very hard to review conversations when the history gets too long.
This change removes
auto-approvedeployments from history once the triggering tests have finished (regardless of success status). As a result, it will also remove notifications likeXYZ temporarily deployed to auto-approve 2 weeks ago — with GitHub Actionsfrom the PRs. This does not impact Github CI checks, as CI statuses will still be present in the PRs.Callouts:
Only
auto-approvedeployments will be deleted. As the name suggests,auto-approvedeployments are always approved for AWS-LC members, so keeping them has no value to us.manual-approvaldeployments remain untouched, in case we want a track of the requesters and approvers of those deployments.Testing:
Verified that it worked on my personal fork. Changes will only be applied after this PR is merged.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and the ISC license.