Check server API version and warn if it's too old#89
Merged
atimin merged 10 commits intoMay 15, 2025
Conversation
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a check for the server API version and warns when the server is too far behind the SDK, while also updating tests and deprecation notices to reflect the newer API expectations. Key changes include:
- Updating the test expectations and payload parameters for bucket record removal.
- Enhancing the HTTP client to parse and validate the API version header.
- Revising deprecation messages and removing legacy URL‐based query generation.
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/reduct/entry_api_test.cc | Adjusted test cases to match the new query payload and expected outcomes. |
| src/reduct/internal/http_client.{h,cc} | Updated API version parsing and warning logic. |
| src/reduct/http_options.h | Changed API prefix constant to constexpr. |
| src/reduct/client.h | Updated deprecation messages with additional removal version notes. |
| src/reduct/bucket.{h,cc} | Removed legacy URL query building and refined deprecation messages. |
| src/CMakeLists.txt & CMakeLists.txt | Updated compile definitions and minimum CMake requirements. |
| README.md & CHANGELOG.md | Updated documentation to reflect supported API versions and deprecations. |
| .github/workflows/ci.yml | Adjusted CI workflow filters to accommodate the new API version tag. |
Comments suppressed due to low confidence (1)
src/reduct/bucket.cc:241
- The fallback branch for URL-based queries has been removed in favor of always using a JSON payload; please confirm that this design change is fully compatible with all expected server API versions.
auto [json_payload, json_err] = QueryOptionsToJsonString("REMOVE", start, stop, options);
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #88
Please check if the PR fulfills these requirements
What kind of change does this PR introduce?
Feature
What was changed?
The PR adds a check for the version of the server API and compares it with the current version . If it's 3 minor versions older then the SDK prints warnings.
Related issues
(Add links to related issues)
Does this PR introduce a breaking change?
(What changes might users need to make in their application due to this PR?)
Other information: