feat(FLAGS-38): [DRAFT] expose Flagship configuration versions by karishnu · Pull Request #7821 · cloudflare/workerd · GitHub
Skip to content

feat(FLAGS-38): [DRAFT] expose Flagship configuration versions - #7821

Open
karishnu wants to merge 3 commits into
cloudflare:mainfrom
karishnu:feat/FLAGS-38-binding-configuration-version
Open

karishnu wants to merge 3 commits into
cloudflare:mainfrom
karishnu:feat/FLAGS-38-binding-configuration-version

Conversation

@karishnu

@karishnu karishnu commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • add generic Flagship binding value and details methods
  • preserve inferred primitive return types
  • expose the current Flagship evaluation configuration version
  • regenerate Workers type snapshots and extend type coverage

Dependencies

The configuration version lets the Flagship OpenFeature provider invalidate cached binding evaluations without maintaining a background stream in Worker isolates.

Test plan

  • just generate-types
  • bazel test //types:test/types/flagship

This adds type declarations for RPC methods implemented by the Flagship service. The change is additive, and the existing get() method remains available with a deprecation notice, so no compatibility flag is needed.
@clanky-the-clanker

Copy link
Copy Markdown

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Is there any context you can share about deprecating this API? It's quite rare we deprecate an API on a binding, so just wanna learn more about the case here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

AFAIK Record<string, unknown> cannot be used to match an interface and this would fail:

interface Config { theme: string }
const fallback: Config = { theme: "light" };

flags.getObjectValue("config", fallback); // accepted
flags.getValue("config", fallback);       // TypeScript error
flags.getDetails("config", fallback);     // TypeScript error

@karishnu karishnu changed the title feat(FLAGS-38): expose Flagship configuration versions feat(FLAGS-38): [DRAFT] expose Flagship configuration versions Oct 19, 2026
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.

2 participants