Configuration Source Extraction part 2/5 - Add flagsSnapshotId Field #208
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Configuration Source Extraction part 2/5 - Add flagsSnapshotId Field
🥞 Configuration Refactor Stacked Pull Requests 🥞
🔲 Make HTTP client injectable via constructor (#207)
🔲 Integrate default HTTP client implementation (#206)
🔲 Add configuration HTTP client interface (#205)
👉 Add flagsSnapshotId field to Configuration (this PR)
✅ Extract DTO interfaces for downstream SDK extensibility (#197)
⬇️
feature/v4(trunk)Motivation and Context
This PR adds a
flagsSnapshotIdfield to theConfigurationclass as preparation for HTTP ETag-based caching. While this PR only adds the field structure, future PRs will populate it from HTTP responses to enable efficient caching.The flagsSnapshotId will store HTTP ETag values, enabling:
Description
Adds the
flagsSnapshotIdfield to Configuration with all necessary boilerplate, but does not yet implement HTTP caching behavior.Changes
flagsSnapshotIdfield toConfigurationclass (private final String, @nullable)equals(),hashCode(), andtoString()to include the new fieldgetFlagsSnapshotId()with comprehensive JavaDocConfiguration.Builderto accept and pass through flagsSnapshotId parameterConfiguration.builder()call sites throughout codebase to pass nullWhy Field-Only Approach?
This PR intentionally does NOT modify
EppoHttpClientbecause:EppoHttpClientwill be deleted in PR Configuration Source Extraction part 4/5 - Integrate Default HTTP Client #206 (replaced withDefaultEppoConfigurationHttpClient)Future Implementation (PR #206)
When the new HTTP client is integrated, the flagsSnapshotId will be populated:
ConfigurationResponse.getETag()Configuration.builder(payload, eTag)ConfigurationRequestorwill useconfig.getFlagsSnapshotId()for If-None-Match headersHow has this been documented?
getFlagsSnapshotId()methodHow has this been tested?
./gradlew javadoc)Configuration.builder()calls updated to include null parameterConfigurationBuilderTest- constructor calls updatedConfigurationRequestorTest- builder calls updatedBaseEppoClientTest- builder calls updatedBaseEppoClientBanditTest- builder calls updatedBreaking Changes
Configurationconstructor now requires aflagsSnapshotIdparameter (4th-to-last position). This is an internal API used only within this repository, so external impact is zero.Migration: Any code directly calling the Configuration constructor must add
nullas the 4th-to-last parameter.Dependencies
Depends on: PR #197 (typo/dto-interface-extraction)
Blocks: PRs #205, #206, #207