Skip to content

Report all changelog errors at once and surface fetch failures in add#3472

Open
cotti wants to merge 1 commit into
mainfrom
changelog/report-all-errors-and-strict-fetch
Open

Report all changelog errors at once and surface fetch failures in add#3472
cotti wants to merge 1 commit into
mainfrom
changelog/report-all-errors-and-strict-fetch

Conversation

@cotti
Copy link
Copy Markdown
Contributor

@cotti cotti commented Jun 5, 2026

Why

Two pain points were reported while bundling a serverless release:

  1. changelog bundle aborts on the first invalid entry, so a release with many broken changelog files (e.g. missing title) forces a fix-and-rerun loop, one error at a time.
  2. changelog add silently degrades when a PR/issue can't be fetched from GitHub: the entry bypasses rules.create label filtering and is written with title/type commented out. With a missing/unauthorized GITHUB_TOKEN this produced ~225 unfiltered, title-less changelogs instead of 68 — and the failure was buried among hundreds of per-PR warnings, only showing up later as a bundle error.

What

  • BundleBuilder.BuildResolvedEntries (the bundle path) and BundleValidationService.ValidateBundleEntriesAsync (the render path) now validate every entry and report all problems in a single pass before failing, instead of returning on the first error.
  • changelog add now emits a single aggregate summary at the end of bulk creation when PRs/issues couldn't be fetched (e.g. 3 of 225 pull request(s) could not be fetched from GitHub...), with remediation guidance. Default behavior is unchanged: warning, exit 0, best-effort files still written.
  • New --strict-fetch flag escalates fetch failures to an error (non-zero exit) so CI fails loudly on a token/rate-limit problem rather than producing unfiltered changelogs. Files are still written for inspection.
  • Regenerated docs/cli-schema.json and documented the flag + fetch-failure behavior in docs/cli/changelog/cmd-add.md.

Tests added for both behaviors; full Elastic.Changelog.Tests suite passes and the AOT publish is clean.

Made with Cursor

Two related fixes to the changelog tooling:

- bundle/render now report every invalid changelog entry in a single
  pass instead of aborting on the first, so a release with several
  broken files no longer requires fixing-and-rerunning one at a time.
- changelog add now emits an aggregate summary when PRs/issues can't be
  fetched from GitHub (the failure that silently bypasses rules.create
  filtering and writes title-less entries), plus a new --strict-fetch
  flag to escalate those failures to a non-zero exit for CI.

Co-authored-by: Cursor <cursoragent@cursor.com>
@cotti cotti requested review from a team as code owners June 5, 2026 01:08
@cotti cotti requested a review from reakaleek June 5, 2026 01:08
@cotti cotti temporarily deployed to integration-tests June 5, 2026 01:08 — with GitHub Actions Inactive
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Jun 5, 2026

Warning

Review limit reached

@cotti, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 14 minutes and 23 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 0926a2f4-292c-4d64-9cb3-694632dea65f

📥 Commits

Reviewing files that changed from the base of the PR and between d115285 and bb68df2.

📒 Files selected for processing (8)
  • docs/cli-schema.json
  • docs/cli/changelog/cmd-add.md
  • src/services/Elastic.Changelog/Bundling/BundleBuilder.cs
  • src/services/Elastic.Changelog/Creation/ChangelogCreationService.cs
  • src/services/Elastic.Changelog/Rendering/BundleValidationService.cs
  • src/tooling/docs-builder/Commands/ChangelogCommand.cs
  • tests/Elastic.Changelog.Tests/Changelogs/BundleChangelogsTests.cs
  • tests/Elastic.Changelog.Tests/Changelogs/Create/PrFetchFailureTests.cs
✨ Finishing Touches
✨ Simplify code
  • Create PR with simplified code
  • Commit simplified code in branch changelog/report-all-errors-and-strict-fetch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant