Skip to content

feat(snippets): add flag override snippets for the Java SDK - #718

Draft
kinyoklion wants to merge 2 commits into
mainfrom
rlamb/overrides-snippets-java
Draft

kinyoklion wants to merge 2 commits into
mainfrom
rlamb/overrides-snippets-java

Conversation

@kinyoklion

@kinyoklion kinyoklion commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Summary

  • Add Java snippets for a new "Flag overrides" SDK docs page: a data system configured with FileOverrides.source(), the source options (two files, IGNORE duplicate key handling, and watching), and a check of isOverrideAffected() on the evaluation reason.
  • The API is in the open feat: Add the overrideAffected indicator to EvaluationReason java-core#218 to fix(metadata): ingest new data and regenerate products #225 stack and is not released yet. The jvm validator resolves the newest 7.x release (7.17.4 today), so the three new snippets fail to compile (cannot find symbol: FileOverrides) until a release with flag overrides ships. Do not merge before then.
  • The snippets were compiled and run against a jar built from the top of the stack (fix(metadata): ingest new data and regenerate products #225 at d9ec2af), with the same imports the java-syntax-only scaffold provides and the shared override file examples in JSON and YAML; every flag evaluated to the documented value and reason kind. The existing datasaving/file-bootstrap snippet passes the stock validator.

Opened from termag

SDK-3494


Note

Overview
Adds three new Java server SDK reference snippets under features/overrides to support upcoming “Flag overrides” docs.

The snippets show wiring FileOverrides.source() into LDConfig via Components.dataSystem().defaultMode().overrides(...), including a basic single-file example, an advanced builder with multiple paths, DuplicateKeysHandling.IGNORE, and ChangeDetection.WATCHING, and detecting overrides at evaluation time with detail.getReason().isOverrideAffected().

Each snippet uses the existing java-syntax-only scaffold for validation. They depend on FileOverrides APIs that are not yet in a released 7.x artifact, so CI compilation will fail until a release that includes flag overrides ships (as noted in the PR description).

Reviewed by Cursor Bugbot for commit 7cd5c84. Bugbot is set up for automated code reviews on this repo. Configure here.

@kinyoklion

Copy link
Copy Markdown
Member Author

bugbot review

@cursor cursor Bot left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Stale Bugbot comment from a previous run.

@kinyoklion

Copy link
Copy Markdown
Member Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 7cd5c84. Configure here.

This branch has not been deployed

No deployments
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.

1 participant