Learn connected projects from the API instead of connection strings - #540
Merged
Merged
Conversation
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
vincent-derks
marked this pull request as ready for review
September 30, 2026 15:35
AndyBitz
approved these changes
Oct 1, 2026
This branch was successfully deployed
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.
Build-time only, no public API added.
@vercel/prepare-flags-definitionslearns which other projects to embed by asking the API which projects granted this deployment's project access to their flags (GET /v1/feature-flags/connections/sources, deployment OIDC token asAuthorization: Bearer, scoped to the token's project). Theflags:projectId=connection string introduced in #517 is removed from@vercel/flags-coreand no longer read by the prepare step; aprojectIdoption will take its place. The header plumbing in flags-core stays and is unreachable for now.Best effort by design: the lookup is capped at 5s and any failure logs at debug level and embeds the project's own definitions exactly as before. Connected projects then fall back to fetching at runtime.
Dependency: the endpoint is not live yet. Until it is, every OIDC build pays one extra round trip that ends in a debug log. This is why the change is safe to release ahead of the API. The endpoint returns the full list (no pagination); connection counts per project are small.
Tests: sources from the API are embedded with the source header, the own project id and invalid ids are skipped, the lookup carries a timeout signal, a failing lookup still embeds own definitions. The flags-core black-box tests for the source header return with the
projectIdoption.