Skip to content

RCBC-540, RCBC-541: Update protostellar version to latest & add GHA testing with CNG#226

Open
DemetrisChr wants to merge 2 commits intocouchbase:mainfrom
DemetrisChr:RCBC-541-cng-testing
Open

RCBC-540, RCBC-541: Update protostellar version to latest & add GHA testing with CNG#226
DemetrisChr wants to merge 2 commits intocouchbase:mainfrom
DemetrisChr:RCBC-541-cng-testing

Conversation

@DemetrisChr
Copy link
Copy Markdown
Contributor

@DemetrisChr DemetrisChr commented Apr 17, 2026

Motivation

Although protostellar has stability 'uncommitted', we should ensure that it is being kept up to date and tested whenever we make new changes to avoid breakage.

Changes

  • Add a GHA job for testing against a 8.0.0 cluster with CNG
  • Update the protostellar protocol to latest
  • Various protostellar updates/fixes:
    • Update data structure classes to handle the case where observability is not set up (as is the case for PS)
    • Remove routing stub from the PS client - it was unused, and has now been dropped by the protocol
    • Updates to tests with minor adjustments and skips, due to unsupported features or CNG bugs
    • Add missing methods from the PS Cluster/Scope classes, raising FeatureNotAvailable
    • Update CouchbaseError#to_s to be able to handle messages which are frozen strings
    • Add support for ignore_if_exists in create_primary_index and create_index
    • Update get_and_lock requests to use lock_time_secs instead of lock_time (breaking code change in the PS protocol)

@DemetrisChr DemetrisChr force-pushed the RCBC-541-cng-testing branch 8 times, most recently from 920000d to 6811b4c Compare April 18, 2026 00:31
@DemetrisChr DemetrisChr marked this pull request as ready for review April 20, 2026 09:19
@DemetrisChr DemetrisChr requested review from avsej and Copilot April 20, 2026 09:19
@DemetrisChr DemetrisChr changed the title RCBC-541: Update protostellar version to latest & add GHA testing with CNG RCBC-540, RCBC-541: Update protostellar version to latest & add GHA testing with CNG Apr 20, 2026
Copy link
Copy Markdown

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 updates the Protostellar (couchbase2) protocol bindings and adjusts the Ruby SDK/tests to better support running against the Stellar Gateway (CNG), including adding a dedicated GitHub Actions job to exercise that path.

Changes:

  • Add a new CI job for running the test suite against Couchbase Server 8.0.0 via CNG, including new composite actions to provision the cluster and start the gateway.
  • Update Protostellar protocol/generated code and related request generators (e.g., KV get-and-lock lock time field; query index create options).
  • Make observability/tracing/metrics more robust when not configured (notably for Protostellar), and update tests to skip unsupported areas.

Reviewed changes

Copilot reviewed 26 out of 56 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/tests.yml Switch server test job to shared cluster action; add new test_cng_linux_x86_64 job targeting CNG on 8.0.0.
.github/actions/create-cluster/action.yml New composite action to install/run cbdinocluster, create a multi-node cluster, create bucket, load sample data.
.github/actions/start-cng/action.yml New composite action to checkout/build/start Stellar Gateway and output a couchbase2 connection string + CA cert path.
test/test_helper.rb Adjust consistency helper selection for Protostellar runs.
test/tracing_test.rb Skip tracing tests under Protostellar; fix durable replace options usage.
test/opentelemetry_test.rb Skip OTel tracer/meter tests under Protostellar.
test/metrics_test.rb Skip metrics tests under Protostellar.
test/search_test.rb Skip search tests under Protostellar.
test/scope_search_index_manager_test.rb Skip scoped search index manager tests under Protostellar.
test/query_test.rb Skip query setup for Protostellar due to CNG index-creation issue.
test/query_index_manager_test.rb Adjust setup/tracing assertions to accommodate Protostellar limitations and CNG issues.
test/collection_query_index_manager_test.rb Skip collection query index tests under Protostellar due to CNG issue.
test/crud_test.rb Split replica-not-found tests and add Protostellar skips for known CNG issue.
lib/couchbase/utils/observability.rb Allow nil backend and ensure nil tracer/meter become no-ops to avoid failures when observability isn’t configured.
lib/couchbase/errors.rb Make CouchbaseError#to_s resilient to frozen strings.
lib/couchbase/datastructures/couchbase_list.rb Default to an Observability wrapper when collection doesn’t have one.
lib/couchbase/datastructures/couchbase_map.rb Default to an Observability wrapper when collection doesn’t have one.
lib/couchbase/datastructures/couchbase_queue.rb Default to an Observability wrapper when collection doesn’t have one.
lib/couchbase/datastructures/couchbase_set.rb Default to an Observability wrapper when collection doesn’t have one.
lib/couchbase/protostellar/client.rb Remove unused routing stub wiring.
lib/couchbase/protostellar/cluster.rb Add missing method search_indexes raising FeatureNotAvailable.
lib/couchbase/protostellar/scope.rb Add missing method search_indexes raising FeatureNotAvailable.
lib/couchbase/protostellar/request_generator/kv.rb Update GetAndLock request to use lock_time_secs field.
lib/couchbase/protostellar/request_generator/admin/query.rb Add ignore_if_exists support for primary/secondary index create requests.
lib/couchbase/protostellar/request_generator/admin/collection.rb Validate max_expiry is non-negative; map to max_expiry_secs.
lib/couchbase/protostellar/generated/kv/v1/kv_pb.rb Regenerated Protostellar KV protobuf definitions.
lib/couchbase/protostellar/generated/kv/v1/kv_services_pb.rb Regenerated Protostellar KV gRPC service definitions/comments.
lib/couchbase/protostellar/generated/query/v1/query_pb.rb Regenerated Protostellar Query protobuf definitions.
lib/couchbase/protostellar/generated/query/v1/query_services_pb.rb Regenerated Protostellar Query gRPC service definitions/comments.
lib/couchbase/protostellar/generated/search/v1/search_pb.rb Regenerated Protostellar Search protobuf definitions (incl. KNN additions).
lib/couchbase/protostellar/generated/search/v1/search_services_pb.rb Regenerated Protostellar Search gRPC service definitions/comments.
lib/couchbase/protostellar/generated/analytics/v1/analytics_pb.rb Regenerated Protostellar Analytics protobuf definitions.
lib/couchbase/protostellar/generated/analytics/v1/analytics_services_pb.rb Regenerated Protostellar Analytics gRPC service definitions/comments.
lib/couchbase/protostellar/generated/view/v1/view_pb.rb Regenerated Protostellar View protobuf definitions.
lib/couchbase/protostellar/generated/view/v1/view_services_pb.rb Regenerated Protostellar View gRPC service definitions/comments.
lib/couchbase/protostellar/generated/transactions/v1/transactions_pb.rb Regenerated Protostellar Transactions protobuf definitions.
lib/couchbase/protostellar/generated/transactions/v1/transactions_services_pb.rb Regenerated Protostellar Transactions gRPC service definitions/comments.
lib/couchbase/protostellar/generated/routing/v2/routing_pb.rb Add regenerated Routing v2 protobuf definitions.
lib/couchbase/protostellar/generated/routing/v2/routing_services_pb.rb Add regenerated Routing v2 gRPC service definitions/comments.
lib/couchbase/protostellar/generated/routing/v1/routing_pb.rb Remove obsolete Routing v1 protobuf definitions.
lib/couchbase/protostellar/generated/routing/v1/routing_services_pb.rb Remove obsolete Routing v1 gRPC service definitions.
lib/couchbase/protostellar/generated/admin/query/v1/query_pb.rb Regenerated Admin Query protobuf definitions (incl. WaitForIndexOnline).
lib/couchbase/protostellar/generated/admin/query/v1/query_services_pb.rb Regenerated Admin Query gRPC service definitions/comments.
lib/couchbase/protostellar/generated/admin/search/v1/search_pb.rb Regenerated Admin Search protobuf definitions.
lib/couchbase/protostellar/generated/admin/search/v1/search_services_pb.rb Regenerated Admin Search gRPC service definitions/comments.
lib/couchbase/protostellar/generated/admin/collection/v1/collection_pb.rb Regenerated Admin Collection protobuf definitions (adds manifest_uid, update).
lib/couchbase/protostellar/generated/admin/collection/v1/collection_services_pb.rb Regenerated Admin Collection gRPC service definitions/comments.
lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_pb.rb Regenerated Admin Bucket protobuf definitions (adds flush + history retention fields).
lib/couchbase/protostellar/generated/admin/bucket/v1/bucket_services_pb.rb Regenerated Admin Bucket gRPC service definitions/comments.
lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_pb.rb Add regenerated Admin Analytics protobuf definitions.
lib/couchbase/protostellar/generated/admin/analytics/v1/analytics_services_pb.rb Add regenerated Admin Analytics gRPC service definitions/comments.
lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_pb.rb Regenerated internal hooks protobuf definitions (adds WatchRequests).
lib/couchbase/protostellar/generated/internal/hooks/v1/hooks_services_pb.rb Regenerated internal hooks gRPC service definitions/comments.
lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_pb.rb Add regenerated internal XDCR protobuf definitions.
lib/couchbase/protostellar/generated/internal/xdcr/v1/xdcr_services_pb.rb Add regenerated internal XDCR gRPC service definitions/comments.
Comments suppressed due to low confidence (1)

test/crud_test.rb:102

  • In test_get_all_replicas_does_not_exist, the test is skipped when env.protostellar?, but the body still contains an if env.protostellar? branch. That branch is now unreachable and makes the expected behavior unclear. Either remove the dead branch or adjust the skip/expectations so the test covers the intended Protostellar behavior.

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

Comment thread .github/actions/create-cluster/action.yml
Comment thread test/test_helper.rb
@DemetrisChr DemetrisChr force-pushed the RCBC-541-cng-testing branch from 6811b4c to 860210f Compare April 20, 2026 16:56
@DemetrisChr DemetrisChr force-pushed the RCBC-541-cng-testing branch from 860210f to a5d3c27 Compare April 21, 2026 10:53
@DemetrisChr DemetrisChr requested a review from Copilot April 21, 2026 15:06
Copy link
Copy Markdown

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

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

Comments suppressed due to low confidence (1)

test/crud_test.rb:100

  • This test now unconditionally skips in Protostellar mode, which makes the subsequent if env.protostellar? branch unreachable/dead code. Simplify by removing the conditional and keeping only the non-Protostellar assertion (or drop the skip and keep the conditional if you still want to assert the Protostellar behavior once ING-1496 is resolved).

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

Comment thread .github/actions/start-cng/action.yml
Comment thread test/query_index_manager_test.rb
Comment thread lib/couchbase/protostellar/request_generator/admin/collection.rb
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