Skip to content

feat(feature-flags): generalize driver-side cache - #495

Closed
cathleeny wants to merge 2 commits into
databricks:mainfrom
cathleeny:feature/general-driver-flags
Closed

cathleeny wants to merge 2 commits into
databricks:mainfrom
cathleeny:feature/general-driver-flags

Conversation

@cathleeny

Copy link
Copy Markdown
Collaborator

Summary

  • Move and generalize the existing telemetry feature-flag cache into internal/featureflags; retain all returned values and add six typed getters.
  • Share values by workspace ID, with normalized host as a fallback, and use authenticated transport supplied by each caller.
  • Honor the connector-service TTL, falling back to 15 minutes when it is missing or invalid.
  • Use the existing x/sync singleflight dependency to coalesce cold loads. During refresh, one caller fetches while other callers immediately read stale values; failed refreshes retain those values.
  • Route telemetry through the Boolean getter and retain reference-counted cleanup.

No new cache library, kernel version bump, kernel-selection flag, or automatic pre-kernel GET is included.

Validation

Using Go 1.25:

  • Full unit suite: go test ./... passed.
  • Feature-flag and telemetry tests passed with the race detector.
  • Cold-load/workspace and stale-reader concurrency tests passed for 30 repeated race-detector runs.
  • The new stale-reader regression test failed before the fix and passed afterward.
  • go vet ./... and golangci-lint passed (0 issues).

Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
Signed-off-by: Cathleen Yan <58714163+cathleeny@users.noreply.github.com>
@cathleeny

Copy link
Copy Markdown
Collaborator Author

Replaced by #496, a direct upstream draft with identical commits. Closing this fork-based draft.

@cathleeny cathleeny closed this Oct 6, 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.

1 participant