Repository navigation
Fix shared scraper - #10432
Merged
Merged
Fix shared scraper#10432
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request fixes a bug where deploying multi-codebase functions failed due to shared SourceTokenScraper instances across changesets. The fix moves the instantiation of scraperV1 and scraperV2 inside the changesets.map loop in fabricator.ts, ensuring isolation. A corresponding unit test has been added to fabricator.spec.ts to verify this behavior, and the CHANGELOG.md has been updated. I have no feedback to provide as there were no review comments.
shettyvarun268
marked this pull request as ready for review
April 29, 2026 20:28
joehan
approved these changes
Apr 29, 2026
bkendall
pushed a commit
that referenced
this pull request
Jul 9, 2026
* Isolate source token scrapers per changeset * Add changelog entry for shared source token scraper fix * Fix lint issues in fabricator spec file
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.
This pull request fixes a regression introduced in the function rename deletion sequence refactor #10317 where a single shared instance of SourceTokenScraper was used across all changesets. Because Cloud Functions source and build tokens are unique to a specific codebase and region, sharing a single scraper caused a source token from the first codebase to be incorrectly reused during the deployment of functions from a second codebase, leading to build mismatches and container health check failures.
To resolve this issue, we isolate the scraper instances within each regional changeset during the initial create and update phase. This restores the original isolation model so that only functions within the exact same region and codebase reuse the same build token, while retaining the correct deployment deletion sequence. We also added unit test coverage in the deployment fabricator spec to ensure that each changeset maintains independent scrapers and prevents any token leakage across changesets.
Fixes #10428