Skip to content

Reduce CI deployment noise#3303

Open
nhatnghiho wants to merge 2 commits into
aws:mainfrom
nhatnghiho:cleanup-deployments
Open

Reduce CI deployment noise#3303
nhatnghiho wants to merge 2 commits into
aws:mainfrom
nhatnghiho:cleanup-deployments

Conversation

@nhatnghiho

@nhatnghiho nhatnghiho commented Jun 17, 2026

Copy link
Copy Markdown
Contributor

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-approve deployments from history once the triggering tests have finished (regardless of success status). As a result, it will also remove notifications like XYZ temporarily deployed to auto-approve 2 weeks ago — with GitHub Actions from the PRs. This does not impact Github CI checks, as CI statuses will still be present in the PRs.

Callouts:

Only auto-approve deployments will be deleted. As the name suggests, auto-approve deployments are always approved for AWS-LC members, so keeping them has no value to us. manual-approval deployments 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.

@codecov-commenter

codecov-commenter commented Jun 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.17%. Comparing base (d426e06) to head (6a23cb5).
⚠️ Report is 15 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

permissions:
deployments: write
steps:
- uses: actions/checkout@v5

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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({

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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?

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