Skip to content

[rust] Add version-aware integration test harness (0.9.x / 1.x)#632

Open
gnuhpc wants to merge 8 commits into
apache:mainfrom
gnuhpc:pr/5-integration-tests
Open

[rust] Add version-aware integration test harness (0.9.x / 1.x)#632
gnuhpc wants to merge 8 commits into
apache:mainfrom
gnuhpc:pr/5-integration-tests

Conversation

@gnuhpc

@gnuhpc gnuhpc commented Jun 19, 2026

Copy link
Copy Markdown
Contributor

What

Adds an integration-test harness and tests for the 1.x admin surface:

  • Cargo.toml: integration_tests + fluss_v1 feature flags (the latter gates tests exercising APIs only on 1.x servers).
  • admin_extended.rs: end-to-end tests for the extended admin methods (ACLs, cluster configs, rebalance, server tags, producer offsets, KV snapshots, table stats).
  • admin_v1.rs: tests for the 1.x-only RPCs.
  • test_fluss.rs: wires the new test modules.

Tests tolerate UnsupportedVersion so the same suite runs green against both 0.9.x and 1.x server images.

Stack

Part 5/6, stacked on #631#630#629#628. All target main.

🤖 Generated with Claude Code

@gnuhpc

gnuhpc commented Jun 20, 2026

Copy link
Copy Markdown
Contributor Author

Rebased on top of updated #631. Test fixtures migrated from proto::Pb* literals to the new domain types in metadata/.

Verified against real Java Fluss 0.9.1-incubating (68/68 tests pass without fluss_v1 — version-gated tests no-op) and Fluss 1.0-SNAPSHOT-dev (73/73 with fluss_v1).

warmbupt and others added 8 commits June 22, 2026 10:34
Add message wrappers for the remaining 1.x RPC APIs:
- KV snapshot lifecycle: acquire/release/drop lease, list, metadata,
  latest snapshots, lake snapshot
- Server management: add/remove server tag, rebalance + progress +
  cancel, get cluster health, list remote log manifests
- Producer offsets: register/get/delete
- ScanKv (API 1061): full KV-table bucket scan request/response
Replace raw i32 with proper Rust enums matching the Java Fluss
definitions: GoalType (ReplicaDistribution/LeaderDistribution/RackAware)
and ServerTag (PermanentOffline/TemporaryOffline). Addresses reviewer
feedback on PR apache#630.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add 27 new admin methods to FlussAdmin:
- Database/table extensions: list_database_summaries, alter_database,
  alter_table, get_table_stats
- KV snapshot operations: get_latest_kv_snapshots,
  get_kv_snapshot_metadata, create_kv_snapshot_lease, get_lake_snapshot
- ACL management: create_acls, list_acls, drop_acls
- Cluster configuration: describe_cluster_configs, alter_cluster_configs
- Server management: add_server_tag, remove_server_tag, rebalance,
  list_rebalance_progress, cancel_rebalance
- Producer offsets: register_producer_offsets, get_producer_offsets,
  delete_producer_offsets
- Monitoring: get_cluster_health, list_remote_log_manifests
- KV snapshots: list_kv_snapshots, release_kv_snapshot_lease,
  drop_kv_snapshot_lease
…dable

- Add ClusterHealthStatus enum (Green/Yellow/Red/Unknown) to cluster_health.rs
- Add RebalanceStatus enum (NotStarted..Timeout) to rebalance.rs
- Replace raw i32/i64 with BucketId/TableId/PartitionId aliases in
  kv_snapshot.rs, lake_snapshot.rs, rebalance.rs, producer_offsets.rs
- Expose readable parameter in admin.get_lake_snapshot() instead of
  hardcoding None

Addresses reviewer feedback on PR apache#631.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…hot_lease)

Extends the BucketId/TableId/PartitionId alias consistency fix to
table_stats.rs (BucketStatsRequest, BucketStats) and
kv_snapshot_lease.rs (KvSnapshotLeaseForBucket, KvSnapshotLeaseForTable).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Now that pr/3 provides GoalType and ServerTag enums in the RPC
wrappers, update the admin client methods to use them in their
public signatures too.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace raw SERVER_TAG_TEMPORARY_OFFLINE const with ServerTag::TemporaryOffline
- Add readable parameter to get_lake_snapshot call

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gnuhpc gnuhpc force-pushed the pr/5-integration-tests branch from 003548f to 5b79a57 Compare June 22, 2026 02:50
@gnuhpc

gnuhpc commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

Updated integration tests to use domain enums (ServerTag::TemporaryOffline, GoalType) and the new get_lake_snapshot() 3-arg signature. No more hardcoded i32 constants in test code.

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.

2 participants