Skip to content

ci: avoid duplicating release notes on existing releases#3919

Open
locker95 wants to merge 1 commit into
google:masterfrom
locker95:fix/duplicate-release-notes
Open

ci: avoid duplicating release notes on existing releases#3919
locker95 wants to merge 1 commit into
google:masterfrom
locker95:fix/duplicate-release-notes

Conversation

@locker95

Copy link
Copy Markdown
Contributor

Problem

Several cAdvisor GitHub releases contain duplicated release notes (e.g. What's Changed, PR list, Full Changelog appear twice):

Root cause

The Release Binaries workflow uses softprops/action-gh-release with generate_release_notes: true.

That action appends freshly generated notes to any existing release body. Maintainers typically create the GitHub Release (with auto-generated notes, author = maintainer) before this workflow finishes building and uploads binaries. The create-release job then finds the existing release and regenerates notes, producing a duplicate body.

Timeline for v0.60.5 (same pattern on other tags):

  1. Release created/published by maintainer with notes (~05:07–05:08)
  2. Tag push starts the workflow (~05:08)
  3. create-release job runs later (~05:18) and softprops appends notes again
  4. Assets are uploaded by github-actions[bot]

Fix

Before calling softprops, check whether the release already has a body:

  • Body presentgenerate_release_notes: false (only attach artifacts)
  • No release / empty bodygenerate_release_notes: true (generate notes once)

Test

Workflow YAML only; verified against release timeline and softprops update path (prepareReleaseMutation concatenates generated notes onto an existing body).

Fixes #3901

softprops/action-gh-release appends newly generated notes to any
existing release body. Maintainers typically create the GitHub Release
(with auto-generated notes) before this workflow uploads binaries, so
generate_release_notes: true was duplicating What's Changed sections.

Only request note generation when the release does not already have a
body; otherwise just attach the built artifacts.

Fixes google#3901

Signed-off-by: Dean Chen <862469039@qq.com>
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.

Duplicate release notes in multiple cAdvisor releases

1 participant