Skip to content

chore: bump version to 260304.0.0#89

Merged
drmingdrmer merged 2 commits intodatabendlabs:mainfrom
drmingdrmer:037-stream-append
Mar 4, 2026
Merged

chore: bump version to 260304.0.0#89
drmingdrmer merged 2 commits intodatabendlabs:mainfrom
drmingdrmer:037-stream-append

Conversation

@drmingdrmer
Copy link
Member

Changelog

chore: bump version to 260304.0.0

Add changelog entry for 260304.0.0 and a test asserting the current
package version is present in the gRPC compatibility changelog.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

feat: add gRPC version compatibility changelog

Add GrpcVersionCompat struct and grpc_changelog() function that
records min-compatible client/server versions at each package version
where compatibility changed. Consumers use .range(..=v).last() to
look up the applicable entry for any historical version.

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com


Zhang Yanpo and others added 2 commits March 4, 2026 23:50
Add `GrpcVersionCompat` struct and `grpc_changelog()` function that
records min-compatible client/server versions at each package version
where compatibility changed. Consumers use `.range(..=v).last()` to
look up the applicable entry for any historical version.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add changelog entry for 260304.0.0 and a test asserting the current
package version is present in the gRPC compatibility changelog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings March 4, 2026 16:12
Copy link
Collaborator

@xp-trumpet xp-trumpet left a comment

Choose a reason for hiding this comment

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

@xp-trumpet reviewed 3 files and all commit messages.
Reviewable status: :shipit: complete! all files reviewed, all discussions resolved (waiting on drmingdrmer).

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: cc64e87729

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR bumps the workspace version to 260304.0.0 and introduces a gRPC compatibility changelog API intended to let consumers look up minimum compatible client/server versions for historical package versions.

Changes:

  • Bump package/workspace version to 260304.0.0 and update version-related unit tests.
  • Add GrpcVersionCompat and grpc_changelog() to record min compatible gRPC client/server versions by package version.
  • Add tests ensuring the changelog aligns with MIN_CLIENT_VERSION / MIN_SERVER_VERSION.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.

File Description
crates/common/version/src/lib.rs Registers and re-exports the new gRPC changelog module; updates version assertions to 260304.0.0.
crates/common/version/src/grpc_changelog.rs New compatibility changelog data structure, builder function, and unit tests.
Cargo.toml Workspace version bump to 260304.0.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +96 to +100
assert!(
changelog.contains_key(&current),
"changelog must contain an entry for the current version {}",
current
);
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

test_grpc_changelog_contains_current_version enforces that every release version must have an explicit changelog entry, even when compatibility didn't change (which is why 260304.0.0 had to be added). If the goal is to ensure the changelog can answer queries for the current version, a more stable assertion is to look up changelog.range(..=current).next_back() and validate it matches MIN_CLIENT_VERSION/MIN_SERVER_VERSION (and optionally that current >= *changelog.keys().next_back().unwrap()).

Suggested change
assert!(
changelog.contains_key(&current),
"changelog must contain an entry for the current version {}",
current
);
let (_, compat) = changelog
.range(..=current)
.next_back()
.unwrap_or_else(|| {
panic!(
"changelog must contain an entry for or before the current version {}",
current
)
});
assert_eq!(
compat.min_client, MIN_CLIENT_VERSION,
"changelog entry for or before current version {} must match MIN_CLIENT_VERSION",
current
);
assert_eq!(
compat.min_server, MIN_SERVER_VERSION,
"changelog entry for or before current version {} must match MIN_SERVER_VERSION",
current
);

Copilot uses AI. Check for mistakes.
//!
//! Records the minimum compatible client and server versions at each package
//! version where compatibility changed. Consumers use
//! `.range(..=v).last()` to find the applicable entry for a given version.
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

The docs recommend using .range(..=v).last() to find the applicable entry. On a BTreeMap, last() will iterate through the entire range (O(n)); since BTreeMap::Range is a DoubleEndedIterator, using .range(..=v).next_back() returns the same entry without scanning.

Suggested change
//! `.range(..=v).last()` to find the applicable entry for a given version.
//! `.range(..=v).next_back()` to find the applicable entry for a given version.

Copilot uses AI. Check for mistakes.
Comment on lines +32 to +80
/// Returns a changelog mapping each package version (where compatibility
/// changed) to the min-compatible client and server versions at that point.
///
/// Only versions where `min_client` or `min_server` changed are included.
pub fn grpc_changelog() -> BTreeMap<Version, GrpcVersionCompat> {
const fn ver(major: u64, minor: u64, patch: u64) -> Version {
Version::new(major, minor, patch)
}

let mut m = BTreeMap::new();

// 260205.0.0: client adds ExpireInMillis, PutSequential (server since 1.2.770)
m.insert(ver(260205, 0, 0), GrpcVersionCompat {
min_client: ver(1, 2, 676),
min_server: ver(1, 2, 770),
});

// 260214.0.0: client adds KvGetMany(srv:1.2.869), TransactionPrevValue(srv:1.2.304)
m.insert(ver(260214, 0, 0), GrpcVersionCompat {
min_client: ver(1, 2, 676),
min_server: ver(1, 2, 869),
});

// 260217.0.0: client adds KvTransactionPutMatchSeq (server since 260217.0.0)
#[cfg(feature = "txn-put-match-seq")]
m.insert(ver(260217, 0, 0), GrpcVersionCompat {
min_client: ver(1, 2, 676),
min_server: ver(260217, 0, 0),
});

// 260217.0.0: without txn-put-match-seq, no new client requirement
#[cfg(not(feature = "txn-put-match-seq"))]
m.insert(ver(260217, 0, 0), GrpcVersionCompat {
min_client: ver(1, 2, 676),
min_server: ver(1, 2, 869),
});

// 260304.0.0: no compatibility change
#[cfg(feature = "txn-put-match-seq")]
m.insert(ver(260304, 0, 0), GrpcVersionCompat {
min_client: ver(1, 2, 676),
min_server: ver(260217, 0, 0),
});

#[cfg(not(feature = "txn-put-match-seq"))]
m.insert(ver(260304, 0, 0), GrpcVersionCompat {
min_client: ver(1, 2, 676),
min_server: ver(1, 2, 869),
});
Copy link

Copilot AI Mar 4, 2026

Choose a reason for hiding this comment

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

The function/docs state that only versions where min_client/min_server changed are included, but the map unconditionally adds an entry for 260304.0.0 even though the comment says "no compatibility change". This inconsistency will force adding a new entry on every version bump; consider either (a) removing no-op entries like 260304.0.0 and updating the docs/tests to use a range(..=v).next_back() lookup, or (b) changing the docs to explicitly state that the current version is always present even when compatibility did not change.

Copilot uses AI. Check for mistakes.
@drmingdrmer drmingdrmer added this pull request to the merge queue Mar 4, 2026
Merged via the queue into databendlabs:main with commit a5975a4 Mar 4, 2026
7 checks passed
@drmingdrmer drmingdrmer deleted the 037-stream-append branch March 4, 2026 16:22
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