Report all changelog errors at once and surface fetch failures in add#3472
Report all changelog errors at once and surface fetch failures in add#3472cotti wants to merge 1 commit into
Conversation
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>
|
Warning Review limit reached
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 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 configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (8)
✨ Finishing Touches✨ Simplify code
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. Comment |
Why
Two pain points were reported while bundling a serverless release:
changelog bundleaborts on the first invalid entry, so a release with many broken changelog files (e.g. missingtitle) forces a fix-and-rerun loop, one error at a time.changelog addsilently degrades when a PR/issue can't be fetched from GitHub: the entry bypassesrules.createlabel filtering and is written withtitle/typecommented out. With a missing/unauthorizedGITHUB_TOKENthis 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 abundleerror.What
BundleBuilder.BuildResolvedEntries(thebundlepath) andBundleValidationService.ValidateBundleEntriesAsync(therenderpath) now validate every entry and report all problems in a single pass before failing, instead of returning on the first error.changelog addnow 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.--strict-fetchflag 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.docs/cli-schema.jsonand documented the flag + fetch-failure behavior indocs/cli/changelog/cmd-add.md.Tests added for both behaviors; full
Elastic.Changelog.Testssuite passes and the AOT publish is clean.Made with Cursor