Skip to content

ci: validate changelog fragment filenames#4586

Merged
xrmx merged 10 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/changelog-fragment-validation
May 18, 2026
Merged

ci: validate changelog fragment filenames#4586
xrmx merged 10 commits into
open-telemetry:mainfrom
MikeGoldsmith:mike/changelog-fragment-validation

Conversation

@MikeGoldsmith
Copy link
Copy Markdown
Member

Summary

Extends the existing fragment-existence check so each newly added changelog fragment is also validated by basename against <PR_NUMBER>.<type> (where <type>added | changed | deprecated | removed | fixed). Catches two failure modes the existence check doesn't:

Also adds a one-line note to the do-not-edit comment in each towncrier-managed CHANGELOG.md (root + the 4 independent packages: opamp-client, resource-detector-azure, propagator-aws-xray, sdk-extension-aws) flagging that the existing static ## Unreleased entries pre-date towncrier and need folding into the first towncrier-generated release manually — towncrier build inserts new release blocks above that section rather than merging.

Same fixes also being applied to opentelemetry-python (open-telemetry/opentelemetry-python#5212) and originally caught in opentelemetry-python-genai (open-telemetry/opentelemetry-python-genai#16).

Test plan

  • CI runs the new validation step on this PR (which has the Skip Changelog label, so the workflow as a whole skips — verification of the validation itself is via a follow-up PR that intentionally adds a bad fragment, or by inspection of the workflow logic)
  • Confirm the existence check still gates on at least one fragment being added

Extend the existing fragment-existence check so it also rejects fragments
whose basename doesn't match <PR_NUMBER>.<type> (where type is one of
added, changed, deprecated, removed, fixed). This catches typos in the
PR number or in the fragment type that would otherwise render a wrong
PR link, or be silently dropped, in the rendered changelog.

Also note in the do-not-edit comment of each towncrier-managed CHANGELOG.md
(root and the 4 independent packages) that the existing static "## Unreleased"
entries pre-date towncrier and must be folded into the first towncrier-built
release manually — towncrier inserts new release blocks above that section
without merging.

Assisted-by: Claude Opus 4.7 (1M context)
@MikeGoldsmith MikeGoldsmith requested a review from a team as a code owner May 15, 2026 08:53
@MikeGoldsmith MikeGoldsmith added the Skip Changelog PRs that do not require a CHANGELOG.md entry label May 15, 2026
@MikeGoldsmith MikeGoldsmith moved this to Ready for review in Python PR digest May 15, 2026
Comment thread .github/workflows/changelog.yml
Comment thread opamp/opentelemetry-opamp-client/CHANGELOG.md Outdated
@xrmx xrmx enabled auto-merge (squash) May 18, 2026 13:19
@xrmx xrmx merged commit c3b8e39 into open-telemetry:main May 18, 2026
753 checks passed
@github-project-automation github-project-automation Bot moved this from Ready for review to Done in Python PR digest May 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Skip Changelog PRs that do not require a CHANGELOG.md entry

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants