Skip to content

feat(flags): switch local evaluation endpoint to /flags/definitions#182

Merged
marandaneto merged 1 commit into
mainfrom
feat/flags-definitions-endpoint-v2
Apr 20, 2026
Merged

feat(flags): switch local evaluation endpoint to /flags/definitions#182
marandaneto merged 1 commit into
mainfrom
feat/flags-definitions-endpoint-v2

Conversation

@patricio-posthog
Copy link
Copy Markdown
Contributor

Motivation and Context

The Rust feature flags definitions fleet now serves 100% of /api/feature_flag/local_evaluation traffic in all environments. This switches the SDK's default polling URL from the legacy Django path to the Rust endpoint's native path (/flags/definitions).

The old /api/feature_flag/local_evaluation path remains registered as a route alias on the Rust service, so older SDK versions continue to work.

Replaces #179 which was incorrectly opened against master.

How did you test it?

  • Updated all test mock HTTP servers to match the new path
  • Fixed /flags prefix collision in test handlers (use exact path match so /flags doesn't swallow /flags/definitions)
  • Fixed operator precedence bug in TestGetFeatureFlagPayloadWithPersonalKey_LocalComputationFailure
  • go build ./... passes

@patricio-posthog patricio-posthog requested a review from a team as a code owner April 16, 2026 15:44
@patricio-posthog patricio-posthog added release Add this label to trigger a release from a PR bump-patch Trigger a patch bump when merging this PR labels Apr 16, 2026
@github-actions
Copy link
Copy Markdown
Contributor

posthog-go Compliance Report

Date: 2026-04-16 15:45:39 UTC
Duration: 180ms

⚠️ Some Tests Failed

0/1 tests passed, 1 failed


Feature_Flags Tests

⚠️ 0/1 tests passed, 1 failed

View Details
Test Status Duration
Request Payload.Request With Person Properties Device Id 4ms

Failures

request_payload.request_with_person_properties_device_id

404, message='Not Found', url='http://sdk-adapter:8080/get_feature_flag'

Copy link
Copy Markdown

@turnipdabeets turnipdabeets left a comment

Choose a reason for hiding this comment

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

low context approval!

@marandaneto marandaneto merged commit 639678c into main Apr 20, 2026
15 checks passed
@marandaneto marandaneto deleted the feat/flags-definitions-endpoint-v2 branch April 20, 2026 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bump-patch Trigger a patch bump when merging this PR release Add this label to trigger a release from a PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants