Skip to content

Fix shared scraper - #10432

Merged
shettyvarun268 merged 4 commits into
mainfrom
fix-shared-scraper
Apr 29, 2026
Merged

shettyvarun268 merged 4 commits into
mainfrom
fix-shared-scraper

Conversation

@shettyvarun268

Copy link
Copy Markdown
Contributor

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

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
shettyvarun268 marked this pull request as ready for review April 29, 2026 20:28
@shettyvarun268
shettyvarun268 merged commit f4599b6 into main Apr 29, 2026
47 checks passed
@shettyvarun268
shettyvarun268 deleted the fix-shared-scraper branch April 29, 2026 20:35
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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Multi-codebase Cloud Functions deployment fails with "Container Healthcheck failed" in v15.15.0

2 participants