Repository navigation
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces dynamic configuration for CI-enabled repositories, replacing hardcoded repository lists with a configurable ciEnabledRepos set. It refactors GithubWebhookSubscription to decouple WANT_LGTM reconciliation from CI-enabled repositories, allowing for more flexible repository routing. Additionally, it improves the robustness of the webhook handlers and optimizes lock acquisition for WANT_LGTM reconciliation. The reviewer suggests further optimizations to lock acquisition in _handleWantLgtmPullRequest and _handleCreate to reduce overhead, and recommends adding error handling to _handleCreate to prevent potential 500 errors from malformed payloads.
jtmcdole
force-pushed
the
want-lgtm-only-repos
branch
3 times, most recently
from
December 4, 2026 21:25
be0781d to
c4f13e1
Compare
Only force check run recreation on pull_request reopened when the stored state is a completed neutral waiver (such as the pre-close waiver), so Pub/Sub retries of reopened webhooks do not create duplicate check runs.
jtmcdole
force-pushed
the
want-lgtm-only-repos
branch
8 times, most recently
from
December 4, 2026 22:35
5daee58 to
bf492a6
Compare
…gured repos Decouple WANT_LGTM reconciliation from PullRequestManager onto a dedicated want_lgtm_lock key so non-CI repositories such as flutter/rfc can run WANT_LGTM without .ci.yaml, LUCI, GoB, or PullRequestState overhead. Gate CI-only handlers (issues, create, workflow_job, non-WANT_LGTM check_run, merge_group GoB/scheduler, and GithubWebhook Firestore merge_group archiving) on Config.supportedRepos, and return 200 OK with a warning log instead of HTTP 500 for unconfigured repositories.
jtmcdole
force-pushed
the
want-lgtm-only-repos
branch
from
December 4, 2026 22:44
bf492a6 to
79a101a
Compare
jtmcdole
marked this pull request as ready for review
December 4, 2026 22:46
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.
What I'm trying to do: enable WANT_LGTM on repositories that don't have CICD. Cocoon's "supportedRepos" are for cicd / merge queue / luci scheduling. So this hoists it out as a first-class citizen.
--- ai summary follows.
Summary
Allow repositories such as
flutter/rfcto enableWANT_LGTMmerge blocking without onboarding to.ci.yaml, LUCI, GoB, orPullRequestManager.The dynamic
ciEnabledReposconfiguration anduseForAllReposremoval were split into a separate PR (#5238) to keep this change focused on webhook routing and retry idempotency. Both PRs are independent and can merge in either order.This PR is organized into two atomic commits:
want_lgtm: keep reopened check run reconciliation idempotent on retrypull_requestreopenedwhen the stored state is a completed neutral waiver (such as the pre-close waiver), preventing duplicate check runs on Pub/Sub retries.webhooks: fork CI and WANT_LGTM routing and return 200 OK for unconfigured reposWANT_LGTMreconciliation fromPullRequestManageronto a dedicated lowercasedwant_lgtm_lock_<owner>_<repo>_<pr>Redis lock key, with a success-gated 7-daywant_lgtm_done:<messageId>cache marker on CI paths so CI retries cannot replay stale PR payloads over newerWANT_LGTMstate.WANT_LGTMrouting inGithubWebhookSubscriptionacrosspull_request,pull_request_review,check_run,merge_group,issues,create, andworkflow_jobso non-CI repositories skip.ci.yaml, LUCI, GoB, andPullRequestState.log.warn) instead of HTTP 500 for unconfigured repositories to avoid seven-day Pub/Sub retry storms on per-repo rollback, while preserving Firestore self-healing waivers for openin_progresscheck runs.GithubWebhookFirestoremerge_grouparchiving onconfig.supportedReposso non-CI merge queue events do not enterMergeQueueHooks.Rollout Notes
wantLgtm.enabled: falseuntil this binary rolls out (so no N-1 instance sharespr_lockwithwant_lgtm_lock).flutter/rfctowantLgtm.enabledReposinapp_dart/config.yaml, land Drive Config.supportedRepos from dynamic ciEnabledRepos and remove useForAllRepos #5238, add"flutter/rfc"toAPP_DART_GITHUBAPP_INSTALLATIONS, flush via/api/flush-cache?key=APP_DART_GITHUBAPP_INSTALLATIONS, and install the Cocoon GitHub App onflutter/rfc.Testing
dart format --output=none --set-exit-if-changed app_dart/lib/ app_dart/test/ packages/cocoon_integration_test/lib/: 0 diffs.dart analyze --fatal-infos(app_dart,packages/cocoon_integration_test): 0 issues.dart testinapp_dart: 1,278/1,278 passed.dart testinpackages/cocoon_integration_test: 49/49 passed.