Skip to content

Conversation

@kinyoklion
Copy link
Member

@kinyoklion kinyoklion commented Jan 21, 2026

This pipes the fdv1 fallback header, and the environment ID, through the data sources. It doesn't utilize either piece of information.

This is draft while I sort publishing the okhttp-evensource.


Note

Introduces header propagation and response handling improvements across FDv2 data sources.

  • Adds HeaderConstants and plumbs x-ld-fd-fallback and x-ld-envid from HTTP/stream events into FDv2SourceResult (new fdv1Fallback flag) and ChangeSet environment ID
  • Refactors FDv2Requestor.FDv2PayloadResponse to include isSuccess, statusCode, and factory methods (success, failure, none); 304 now returns a non-null "none" response
  • Updates DefaultFDv2Requestor, PollingBase, PollingInitializerImpl, and StreamingSynchronizerImpl to use structured responses and extract headers for error handling and changeset conversion
  • Extends unit tests to cover header propagation, new response semantics, ETag/304 handling, and error paths; replaces exception-based HTTP error assertions with response-based checks
  • Bumps dependency okhttp-eventsource to 4.2.0

Written by Cursor Bugbot for commit 5a4533f. This will update automatically on new commits. Configure here.

@kinyoklion kinyoklion marked this pull request as ready for review January 23, 2026 20:58
@kinyoklion kinyoklion requested a review from a team as a code owner January 23, 2026 20:58
if (response.code() == 304) {
logger.debug("FDv2 polling request returned 304: not modified");
future.complete(null);
future.complete(FDv2PayloadResponse.none(response.code()));
Copy link
Member Author

Choose a reason for hiding this comment

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

Instead of having null indicate no transfer I made an explicit none.

Copy link

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.

@kinyoklion kinyoklion merged commit 8469d3c into main Jan 26, 2026
21 checks passed
@kinyoklion kinyoklion deleted the rlamb/connect-headers-to-data-sources branch January 26, 2026 18:11
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.

3 participants