perf(cicd): batch release-data lookups over GraphQL — ~1,076 requests to ~78, and fix Closes: #N - #37369
Draft
sfreudenthaler wants to merge 2 commits into
Draft
Conversation
Contributor
|
Claude finished @sfreudenthaler's task in 1m 46s —— View job ReviewRead all four changed files and traced the two GraphQL paths against their tests. This is a clean, well-reasoned transport swap — injection is properly guarded (sha New Issues
Notes (non-blocking, no action needed)
Test coverage for the new behavior is thorough — batch arithmetic, dedup, unmerged filtering, cross-repo filtering, oid-injection rejection, error propagation, and body/label null handling are all exercised. Nice work. · |
Commit->PR resolution was one REST call per commit: 485 for a full release, and both release scripts resolve the same range in the same pipeline run, so the release pipeline spent ~1,076 calls on it. Batched over GraphQL aliases in the shared transport (50 commits/query) that becomes 20, and the 35 mandated half-second sleeps go away. The bigger win is correctness. gather-release-data now reads linked issues from `closingIssuesReferences` instead of regex-matching the PR body. The regex required whitespace directly after the keyword, so `Closes: #N` — the form CLAUDE.md mandates for every dotCMS PR, because the link-issue merge gate requires it — never matched. On v26.09.02-01 that cost 23 of 51 PRs their issue cross-link. Verified over v26.08.24-01...v26.09.02-01: identical PR set, titles, labels and categories; linked issues 25/51 PRs -> 48/51. The release-qa-status markdown report is unchanged apart from one issue label GitHub's own automation edited between runs. Closes: #35763 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
sfreudenthaler
force-pushed
the
tech-debt-release-data-graphql
branch
from
September 3, 2026 21:03
062869f to
ae781a7
Compare
#37140 fixed the draft-ordering and duplicate-tag hazards but landed tests only for findPreviousTag's hasNotes walk-back. The `if (release.draft) continue;` guard is load-bearing: dotCMS/core has 6 draft releases matching the standard tag pattern, one of which duplicates a published tag, so an unfiltered list both mis-orders the walk-back and makes findIndex ambiguous. Now that the transport is shared, one test covers both scripts. Refs: #37138 Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
sfreudenthaler
changed the base branch from
main
to
refactor-share-release-github
September 3, 2026 21:04
Closes: #NCloses: #N
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes: #35763
Note
Draft, and stacked on #37387 (the transport extraction), which is itself now based on
mainsince #37361 merged. Base retargets automatically as the stack lands. Not for review until #37387 is in.Why this is stacked
Because #37387 puts the transport in one place, this migration is written once and both release scripts get it. Before the extraction, the same change would have had to be applied twice — which is precisely the pattern that produced #37201 and #37138.
The perf half
Commit→PR resolution was one REST call per commit. Under merge commits a release carries 5-10x more commits than PRs, so the loop scaled with the wrong number — and both scripts resolve the same range in the same pipeline run:
Those
sleep(500)calls were added in #37213 to stay under the secondary rate limit. On the batched path they are unnecessary.The correctness half — the reason this is worth doing now
gather-release-dataextracted linked issues with a body regex requiring whitespace directly after the keyword:/(?:close[sd]?|fix(?:e[sd])?|resolve[sd]?)\s+#(\d+)/giCloses #123Closes: #123Fixes: #123closes dotCMS/core#123Resolves: https://github.com/dotCMS/core/issues/123Closes: #NNN— with the colon — is the form CLAUDE.md mandates for every dotCMS PR, because thelink-issuemerge gate requires it. The house style was the one form that didn't match.closingIssuesReferencesreads the relationship GitHub itself renders, so the regex is deleted rather than patched. (release-qa-statusalready used this API — it was ahead on linked issues and behind on commit→PR resolution, which is what interleaved drift looks like.)Verification
Both scripts run over
v26.08.24-01...v26.09.02-01(485 commits, 51 PRs):release-qa-status's markdown report is unchanged apart from one issue label GitHub's own release automation edited between the two runs (Next Release→Release : 26.09.03-01).The PR set, titles, labels and categories match exactly — for those fields this is a pure transport swap. The only behavioural change is linked issues, and it is a strict improvement. The three PRs still without a link genuinely close nothing.
Don't read this as a speed PR. Wall clock only moved 51s → 38s locally, where network latency dominates and CI runners are faster. The value is ~78 requests instead of ~1,076 inside the release pipeline, and the linked-issue fix.
Tests
76 across the three packages. The GraphQL transport tests live in
shared/and now cover both scripts at once: merge/branch commit dedup, unmerged-PR filtering, batch arithmetic (120 commits → 3 queries, not 120), oid validation rejecting an alias-injection attempt, and error propagation instead of silent batch loss.gather-release-datakeeps its own tests for cross-repo ref filtering, body truncation and null body/labels.Also re-adds draft-filtering coverage for
listStandardReleaseTags(#37138), which #37140 shipped untested — now one test covers both scripts.Deliberately unchanged
listStandardReleaseTagsstays REST, so@octokit/plugin-throttlingstays with it. It still paginates the full release list, which is dozens of requests given the CLI and LTS tag volume.release-qa-status'sfetchPRDetailsstays REST. It needsauthor/authorType/urlfor the Slack digest and is only ~7-51 calls; batching it is a separate change with its own review surface.🤖 Generated with Claude Code