Skip to content

e2e: add snapshot metadata e2e tests for RBD - #6459

Merged
mergify[bot] merged 2 commits into
ceph:develfrom
Rakshith-R:worktree-e2e-snapshot-metadata
Aug 19, 2026
Merged

e2e: add snapshot metadata e2e tests for RBD#6459
mergify[bot] merged 2 commits into
ceph:develfrom
Rakshith-R:worktree-e2e-snapshot-metadata

Conversation

@Rakshith-R

@Rakshith-R Rakshith-R commented Aug 5, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Vendor github.com/kubernetes-csi/external-snapshot-metadata for sidecar gRPC API
  • Add 8 e2e test cases for CSI snapshot metadata (CBT) covering GetMetadataAllocated and GetMetadataDelta sidecar API
  • Tests require --operator-deployment (ceph-csi-operator mode)

Test Cases

# Test Validates
1 Allocated blocks 4 blocks at 4MB offsets returned correctly
2 Delta blocks Only changed blocks between two snapshots
3 Starting offset Blocks before offset are skipped
4 Empty volume 0 blocks for empty snapshot
5 No-change delta 0 delta blocks when nothing changed
6 Max-results batching Response batching respects limit
7 Invalid audience Unauthenticated error on wrong token audience
8 Missing RBAC PermissionDenied error without RBAC

Architecture

  • snapshot_metadata_helper.go: Infrastructure setup/teardown (TLS certs, OperatorConfig patch, sidecar verification, SMS CRD/CR, RBAC, port-forward, gRPC client)
  • snapshot_metadata.go: 8 Ginkgo test cases in Describe("RBD") > Context("[SnapshotMetadata]", Ordered)

Test plan

  • go build ./... passes in e2e/
  • All 8 TCs pass in minikube + Rook Ceph + ceph-csi-operator (3 consecutive green runs)

depends-on: #6452

🤖 Generated with Claude Code

@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e/k8s-1.36/rbd

@mergify mergify Bot added the component/testing Additional test cases or CI work label Aug 5, 2026
@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e-operator/k8s-1.36/rbd

1 similar comment
@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e-operator/k8s-1.36/rbd

@Rakshith-R
Rakshith-R force-pushed the worktree-e2e-snapshot-metadata branch from 486cc9f to 06cf113 Compare August 5, 2026 14:22
@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e-operator/k8s-1.36/rbd

@Rakshith-R
Rakshith-R marked this pull request as ready for review August 6, 2026 07:53
@Rakshith-R
Rakshith-R requested review from a team as code owners August 6, 2026 07:53
Copilot AI lite review requested due to automatic review settings August 6, 2026 07:53

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds an RBD-focused E2E test suite that validates the Kubernetes SnapshotMetadata (CBT) sidecar gRPC API (GetMetadataAllocated, GetMetadataDelta) when running Ceph-CSI via the operator, and vendors the required external SnapshotMetadata API dependency into the e2e/ module.

Changes:

  • Add SnapshotMetadata E2E coverage for RBD (8 test cases) plus supporting infra/helper code (TLS, CRD/CR, RBAC, port-forward, gRPC client).
  • Vendor github.com/kubernetes-csi/external-snapshot-metadata and update e2e/ module dependencies (OpenTelemetry, go-openapi, fsnotify, genproto, etc.).
  • Update e2e/ module metadata (go.mod, go.sum, vendored module manifests/files) to reflect the new dependency set.

Reviewed changes

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

Show a summary per file
File Description
e2e/snapshot_metadata.go Adds 8 SnapshotMetadata E2E test cases for RBD in operator mode.
e2e/snapshot_metadata_helper.go Adds infra helpers (TLS, OperatorConfig patching, CRD/CR, RBAC, port-forward, gRPC client).
e2e/go.mod Adds external-snapshot-metadata + grpc dependency; bumps/adjusts indirect deps.
e2e/go.sum Updates checksums for new/updated dependencies.
e2e/vendor/modules.txt Records newly vendored module set (incl. external-snapshot-metadata) and version bumps.
e2e/vendor/github.com/kubernetes-csi/external-snapshot-metadata/pkg/api/schema_grpc.pb.go Vendored SnapshotMetadata gRPC API client/server stubs used by E2E.
e2e/vendor/github.com/kubernetes-csi/external-snapshot-metadata/LICENSE Vendored license file for external-snapshot-metadata.
e2e/vendor/go.opentelemetry.io/otel/versions.yaml Vendored OTel module-set version bumps.
e2e/vendor/go.opentelemetry.io/otel/version.go Updates OTel version constant.
e2e/vendor/go.opentelemetry.io/otel/trace/internal/telemetry/span.go OTel trace JSON marshal refactor (vendor update).
e2e/vendor/go.opentelemetry.io/otel/trace/config.go Skips experimental options in stable config constructors (vendor update).
e2e/vendor/go.opentelemetry.io/otel/trace/auto.go Updates semconv import + adds BYTESLICE/SLICE handling (vendor update).
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/schema.go Adds vendored semconv v1.41.0 package.
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/README.md Adds semconv v1.41.0 README (vendor).
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/MIGRATION.md Adds semconv v1.41.0 migration doc (vendor).
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/exception.go Adds semconv v1.41.0 exception constants (vendor).
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/error_type.go Adds semconv v1.41.0 ErrorType helpers (vendor).
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.41.0/doc.go Adds semconv v1.41.0 package docs (vendor).
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/otelconv/metric.go Vendor update: metric helpers + Enabled short-circuits.
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/error_type.go Vendor update: fmt-wrapped error unwrapping for ErrorType.
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.40.0/attribute_group.go Vendor update: comment formatting + whitespace fixes.
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/otelconv/metric.go Vendor update: metric helpers formatting.
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/httpconv/metric.go Vendor update: doc layout tweaks.
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.39.0/attribute_group.go Vendor update: comment formatting + whitespace fixes.
e2e/vendor/go.opentelemetry.io/otel/semconv/v1.37.0/attribute_group.go Vendor update: comment formatting + whitespace fixes.
e2e/vendor/go.opentelemetry.io/otel/propagation/baggage.go Vendor update: enforce baggage limits + limit error reporting.
e2e/vendor/go.opentelemetry.io/otel/metric/syncint64.go Vendor update: skip experimental options in config constructors.
e2e/vendor/go.opentelemetry.io/otel/metric/syncfloat64.go Vendor update: skip experimental options in config constructors.
e2e/vendor/go.opentelemetry.io/otel/metric/instrument.go Vendor update: settable attr options + skip experimental options.
e2e/vendor/go.opentelemetry.io/otel/metric/doc.go Vendor update: docs for gauges + Enabled optimization guidance.
e2e/vendor/go.opentelemetry.io/otel/metric/config.go Vendor update: skip experimental options in Meter config.
e2e/vendor/go.opentelemetry.io/otel/metric/asyncint64.go Vendor update: skip experimental options in async config constructors.
e2e/vendor/go.opentelemetry.io/otel/metric/asyncfloat64.go Vendor update: skip experimental options in async config constructors.
e2e/vendor/go.opentelemetry.io/otel/baggage/baggage.go Vendor update: enforce 8192-byte parsing limit + error truncation.
e2e/vendor/go.opentelemetry.io/otel/attribute/type_string.go Vendor update: add BYTESLICE and SLICE types.
e2e/vendor/go.opentelemetry.io/otel/attribute/set.go Vendor update: Value.String in MarshalLog + minor reflection assignment.
e2e/vendor/go.opentelemetry.io/otel/attribute/kv.go Vendor update: add ByteSlice/Slice KeyValue helpers.
e2e/vendor/go.opentelemetry.io/otel/attribute/key.go Vendor update: add ByteSlice/Slice Key helpers.
e2e/vendor/go.opentelemetry.io/otel/attribute/hash.go Vendor update: hash BYTESLICE/SLICE values + refactor hashing.
e2e/vendor/go.opentelemetry.io/otel/attribute/encoder.go Vendor update: keep Emit output w/ lint suppression.
e2e/vendor/go.opentelemetry.io/otel/Makefile Vendor update: benchmark sharding variables.
e2e/vendor/go.opentelemetry.io/otel/dependencies.Dockerfile Vendor update: bump weaver image.
e2e/vendor/go.opentelemetry.io/otel/CONTRIBUTING.md Vendor update: semconv version references + guidance edits.
e2e/vendor/go.opentelemetry.io/otel/CHANGELOG.md Vendor update: add 1.44.0 release notes/links.
e2e/vendor/go.opentelemetry.io/otel/AGENTS.md Vendor adds upstream agent guide doc.
e2e/vendor/go.opentelemetry.io/otel/.golangci.yml Vendor update: semconv depguard + revive arg key renames.
e2e/vendor/github.com/go-openapi/swag/README.md Vendor update: docs/links and module list changes.
e2e/vendor/github.com/go-openapi/swag/loading/options.go Vendor update: add WithRoot confinement + security notes.
e2e/vendor/github.com/go-openapi/swag/loading/loading.go Vendor update: safer http(s) scheme detection + FS-backed path handling.
e2e/vendor/github.com/go-openapi/swag/loading/doc.go Vendor update: expanded security documentation.
e2e/vendor/github.com/go-openapi/swag/loading_iface.go Vendor update: avoid extra allocations in default options assembly.
e2e/vendor/github.com/go-openapi/swag/jsonname_iface.go Vendor update: jsonname import relocation/deprecation plumbing.
e2e/vendor/github.com/go-openapi/swag/go.work Vendor update: includes new pools module.
e2e/vendor/github.com/go-openapi/swag/CONTRIBUTORS.md Vendor update: contributor counts/links.
e2e/vendor/github.com/go-openapi/swag/.golangci.yml Vendor update: enable additional linters.
e2e/vendor/github.com/go-openapi/swag/.gitignore Vendor update: ignores worktree artifacts.
e2e/vendor/github.com/go-openapi/jsonreference/README.md Vendor update: docs links + announcement block comment.
e2e/vendor/github.com/go-openapi/jsonreference/CONTRIBUTORS.md Vendor update: contributor counts/formatting.
e2e/vendor/github.com/go-openapi/jsonreference/.gitignore Vendor update: ignore list adjustments.
e2e/vendor/github.com/go-openapi/jsonpointer/README.md Vendor update: announcements and project status text.
e2e/vendor/github.com/go-openapi/jsonpointer/pointer.go Vendor update: doc/comment restructuring and behavior clarifications.
e2e/vendor/github.com/go-openapi/jsonpointer/options.go Vendor update: jsonname import relocation + doc tweaks.
e2e/vendor/github.com/go-openapi/jsonpointer/jsonname/name_provider.go Vendor update: globals lint suppression + minor refactors.
e2e/vendor/github.com/go-openapi/jsonpointer/jsonname/ifaces.go Vendor update: doc formatting.
e2e/vendor/github.com/go-openapi/jsonpointer/jsonname/go_name_provider.go Vendor update: reflect.Pointer usage + minor refactors.
e2e/vendor/github.com/go-openapi/jsonpointer/jsonname/doc.go Vendor adds SPDX + package doc.
e2e/vendor/github.com/go-openapi/jsonpointer/ifaces.go Vendor update: docs + jsonname import relocation.
e2e/vendor/github.com/go-openapi/jsonpointer/errors.go Vendor update: doc formatting.
e2e/vendor/github.com/go-openapi/jsonpointer/CONTRIBUTORS.md Vendor update: contributor counts/links.
e2e/vendor/github.com/go-openapi/jsonpointer/.golangci.yml Vendor update: linter configuration.
e2e/vendor/github.com/fsnotify/fsnotify/README.md Vendor update: Go version requirement + expanded platform notes.
e2e/vendor/github.com/fsnotify/fsnotify/internal/windows.go Vendor update: remove SetRlimit stub.
e2e/vendor/github.com/fsnotify/fsnotify/internal/unix2.go Vendor adds IgnoringEINTR helper.
e2e/vendor/github.com/fsnotify/fsnotify/internal/unix.go Vendor update: removes SetRlimit implementation.
e2e/vendor/github.com/fsnotify/fsnotify/internal/freebsd.go Vendor update: removes SetRlimit implementation.
e2e/vendor/github.com/fsnotify/fsnotify/internal/darwin.go Vendor update: removes SetRlimit implementation.
e2e/vendor/github.com/fsnotify/fsnotify/internal/debug_openbsd.go Vendor update: debug mask list trimming.
e2e/vendor/github.com/fsnotify/fsnotify/internal/debug_netbsd.go Vendor update: debug mask list trimming.
e2e/vendor/github.com/fsnotify/fsnotify/internal/debug_kqueue.go Vendor update: debug output formatting tweak.
e2e/vendor/github.com/fsnotify/fsnotify/internal/debug_freebsd.go Vendor update: debug mask list reorder/trim.
e2e/vendor/github.com/fsnotify/fsnotify/internal/debug_dragonfly.go Vendor update: debug mask list trimming.
e2e/vendor/github.com/fsnotify/fsnotify/internal/debug_darwin.go Vendor update: debug mask list trimming.
e2e/vendor/github.com/fsnotify/fsnotify/fsnotify.go Vendor update: docs + internal flags for recursion.
e2e/vendor/github.com/fsnotify/fsnotify/CONTRIBUTING.md Vendor update: adds internal debug command notes.
e2e/vendor/github.com/fsnotify/fsnotify/CHANGELOG.md Vendor update: adds 1.10.x entries.
e2e/vendor/github.com/fsnotify/fsnotify/backend_windows.go Vendor update: concurrency fixes + unsafe.Slice usage.
e2e/vendor/github.com/fsnotify/fsnotify/backend_kqueue.go Vendor update: fd leak fix + IgnoringEINTR usage + state dump.
e2e/vendor/github.com/fsnotify/fsnotify/backend_inotify.go Vendor update: improved errors + recursion/watch flag semantics.
e2e/vendor/github.com/fsnotify/fsnotify/backend_fen.go Vendor update: IgnoringEINTR usage.
e2e/vendor/github.com/fsnotify/fsnotify/.cirrus.yml Vendor removes Cirrus CI config.

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

Comment thread e2e/snapshot_metadata.go
dynClient, err = dynamic.NewForConfig(f.ClientConfig())
Expect(err).ShouldNot(HaveOccurred())

testNamespace = "sms-e2e-test"
Comment on lines +243 to +270
// patchOperatorConfigWithTLS patches the OperatorConfig CR to add a
// tls-key volume, triggering operator sidecar injection.
func patchOperatorConfigWithTLS(namespace, tlsSecretName string) error {
patch := fmt.Sprintf(`{"spec":{"driverSpecDefaults":{"controllerPlugin":{"volumes":[{"volume":{"name":"tls-key","secret":{"secretName":%q}},"mount":{"name":"tls-key","mountPath":"/tmp/certificates","readOnly":true}}]}}}}`, tlsSecretName)

args := []string{
"operatorconfigs.csi.ceph.io",
OperatorConfigName,
"--type=merge",
"-p",
patch,
}

return retryKubectlArgs(namespace, kubectlPatch, deployTimeout, args...)
}

// unpatchOperatorConfigTLS removes the controllerPlugin volumes.
func unpatchOperatorConfigTLS(namespace string) error {
args := []string{
"operatorconfigs.csi.ceph.io",
OperatorConfigName,
"--type=json",
"-p",
`[{"op":"remove","path":"/spec/driverSpecDefaults/controllerPlugin/volumes"}]`,
}

return retryKubectlArgs(namespace, kubectlPatch, deployTimeout, args...)
}
Comment thread e2e/snapshot_metadata.go
Comment on lines +147 to +156
if clientSet != nil {
if err := clientSet.CoreV1().Secrets(cephCSINamespace).Delete(
context.TODO(), rbdProvisionerSecretName, metav1.DeleteOptions{}); err != nil {
framework.Logf("Warning: failed to delete provisioner secret: %v", err)
}
if err := clientSet.CoreV1().Secrets(cephCSINamespace).Delete(
context.TODO(), rbdNodePluginSecretName, metav1.DeleteOptions{}); err != nil {
framework.Logf("Warning: failed to delete node secret: %v", err)
}
}
Comment thread e2e/snapshot_metadata_helper.go Outdated
Comment on lines +425 to +472
if _, err := clientSet.CoreV1().ServiceAccounts(testNamespace).Create(ctx, sa, metav1.CreateOptions{}); err != nil {
return fmt.Errorf("failed to create SA %s: %w", saName, err)
}

cr := &rbacv1.ClusterRole{
ObjectMeta: metav1.ObjectMeta{Name: smsClusterRole},
Rules: []rbacv1.PolicyRule{
{
APIGroups: []string{"snapshot.storage.k8s.io"},
Resources: []string{"volumesnapshots", "volumesnapshotcontents"},
Verbs: []string{"get", "list", "watch"},
},
{
APIGroups: []string{"cbt.storage.k8s.io"},
Resources: []string{"snapshotmetadataservices"},
Verbs: []string{"get", "list"},
},
{
APIGroups: []string{""},
Resources: []string{"serviceaccounts/token"},
Verbs: []string{"create", "get"},
},
},
}
if _, err := clientSet.RbacV1().ClusterRoles().Create(ctx, cr, metav1.CreateOptions{}); err != nil {
return fmt.Errorf("failed to create ClusterRole %s: %w", smsClusterRole, err)
}

crb := &rbacv1.ClusterRoleBinding{
ObjectMeta: metav1.ObjectMeta{Name: smsClusterRole},
RoleRef: rbacv1.RoleRef{
APIGroup: "rbac.authorization.k8s.io",
Kind: "ClusterRole",
Name: smsClusterRole,
},
Subjects: []rbacv1.Subject{
{
Kind: "ServiceAccount",
Name: saName,
Namespace: testNamespace,
},
},
}
if _, err := clientSet.RbacV1().ClusterRoleBindings().Create(ctx, crb, metav1.CreateOptions{}); err != nil {
return fmt.Errorf("failed to create ClusterRoleBinding %s: %w", smsClusterRole, err)
}

return nil
Comment thread e2e/snapshot_metadata.go
Comment on lines +131 to +134
AfterAll(func() {
if conn != nil {
_ = conn.Close()
}
Comment thread e2e/snapshot_metadata_helper.go Outdated
smsServiceName = "csi-snapshot-metadata"
smsTestSAName = "sms-e2e-tester"
smsClusterRole = "sms-e2e-tester"
smsLocalPort = 6443
@mergify

mergify Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Merge Protections

🟢 All 2 merge protections satisfied — ready to merge.

Show 2 satisfied protections

🟢 ⛓️ Depends-On Requirements

Requirement based on the presence of Depends-On in the body of the pull request

🟢 🚦 Auto-queue

When all merge protections are satisfied, this pull request will be queued automatically.

"name": smsDriverName,
},
"spec": map[string]interface{}{
"caCert": caCertPEM,

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This might double encode, verify is this should be string(caCertPEM)

Comment thread e2e/snapshot_metadata_helper.go Outdated
SerialNumber: big.NewInt(2),
Subject: pkix.Name{CommonName: smsServiceName},
DNSNames: []string{
fmt.Sprintf(".%s", driverNamespace),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

invalid DNS name, leading .

Comment thread e2e/snapshot_metadata.go Outdated
expectedOffsets := []int64{4 * smsBlockBytes, 5 * smsBlockBytes}
verifyBlockMetadata(blocks, expectedOffsets, smsBlockBytes)

err = deleteSnapshot(&snapTarget, deployTimeout)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Can you do defer cleannup() similar to TC-1 ?
also for TC-5

LabelSelector: metav1.FormatLabelSelector(deploy.Spec.Selector),
})
if err != nil {
return false, err

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Check for isRetryableAPIError ?

Comment thread e2e/snapshot_metadata_helper.go Outdated
framework.Logf("Warning: failed to unpatch OperatorConfig: %v", err)
}

_ = waitForDeploymentComplete(clientSet, operatorRBDDeploymentName, operatorNamespace, deployTimeout)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Why discard the errors?

Comment thread e2e/snapshot_metadata.go
err = createConfigMap(rbdDirPath, clientSet, f)
Expect(err).ShouldNot(HaveOccurred(), "failed to create configmap")

key, err := createCephUser(f, keyringRBDProvisionerUsername, rbdProvisionerCaps("", ""))

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

createCephUser not cleaned up in AfterAll()

@Rakshith-R
Rakshith-R force-pushed the worktree-e2e-snapshot-metadata branch from 06cf113 to 5d97b6a Compare August 10, 2026 08:27
@Rakshith-R
Rakshith-R requested a balanced review from Copilot August 10, 2026 09:41

Copilot AI left a comment

Copy link
Copy Markdown

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 3 out of 93 changed files in this pull request and generated no new comments.

Suppressed comments (4)

e2e/snapshot_metadata.go:65

  • This guard ignores the existing --test-rbd and upgrade-testing switches. As a result, operator-based CephFS-only runs (--test-rbd=false) still execute this RBD suite and create RBD users, classes, and snapshots; upgrade runs can execute it too. Match the established RBD suite guard in e2e/rbd.go:353-356 in addition to requiring operator deployment.
		BeforeAll(func() {
			if !operatorDeployment {
				Skip("snapshot metadata tests require --operator-deployment")
			}

e2e/snapshot_metadata.go:133

  • The teardown guard must mirror the setup skip condition. Once setup also skips when RBD testing is disabled or upgrade testing is active, AfterAll may still run; without the same guard it proceeds with uninitialized clients/resources and can panic or delete unrelated resources.
		AfterAll(func() {
			if !operatorDeployment {
				return
			}

e2e/snapshot_metadata.go:205

  • The base snapshot is only deleted at the successful end of the test. Any failure while remounting, writing, creating the target snapshot, or validating the stream skips that deletion, and the deferred PVC cleanup then cannot fully remove an RBD image that still has this snapshot. Register cleanup for snapBase immediately here (and remove the explicit deletion at the end), as the no-change test already does.
			defer func() {
				_ = deletePVCAndValidatePV(clientSet, pvc, deployTimeout)
			}()

e2e/snapshot_metadata_helper.go:543

  • Sleeping does not verify that kubectl port-forward became ready. If it exits during startup (for example, because port 9443 is occupied or no endpoint is available), this function still returns success; grpc.NewClient is lazy, so setup also succeeds and the first RPC fails later without the kubectl error. Wait for kubectl's forwarding-ready output while selecting on done and a timeout, and return the captured process error if it exits first.
	go func() {
		done <- cmd.Wait()
	}()

	time.Sleep(3 * time.Second)

@Rakshith-R

Copy link
Copy Markdown
Contributor Author

@Mergifyio rebase

@mergify

mergify Bot commented Aug 17, 2026

Copy link
Copy Markdown
Contributor

rebase

🛑 The pull request rule doesn't match anymore

Details

This action has been cancelled.

@ceph-csi-bot
ceph-csi-bot force-pushed the worktree-e2e-snapshot-metadata branch from 5d97b6a to 7de8425 Compare August 17, 2026 05:36
@Rakshith-R

Copy link
Copy Markdown
Contributor Author

/test ci/centos/mini-e2e-operator/k8s-1.36

Comment thread e2e/snapshot_metadata.go Outdated
@@ -0,0 +1,441 @@
/*
Copyright 2025 The Ceph-CSI Authors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2026

Comment thread e2e/snapshot_metadata_helper.go Outdated
@@ -0,0 +1,756 @@
/*
Copyright 2025 The Ceph-CSI Authors.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2026

Comment thread e2e/snapshot_metadata.go Outdated
pvc, snapBase := createBlockVolumeWithSnapshot(f, clientSet, testNamespace,
"snap-base", []int{0, 1, 2, 3})
defer func() {
_ = deletePVCAndValidatePV(clientSet, pvc, deployTimeout)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

delete even Snapshot in defer?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

other places have cleanupBlockVolumeAndSnapshot

Comment thread e2e/snapshot_metadata_helper.go Outdated
}
framework.Logf("Created TLS secret %s", smsTLSSecretName)

// 4. Patch OperatorConfig CR → triggers sidecar injection

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

2 & 3 are missing 😄

Comment thread e2e/snapshot_metadata_helper.go Outdated

// createSnapshotMetadataService creates the K8s Service for the sidecar.
func createSnapshotMetadataService(clientSet kubernetes.Interface, namespace, deploymentName string) error {
ctx := context.TODO()

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

caller createSnapshotMetadataService already has context defined pass down instead.

@Rakshith-R
Rakshith-R force-pushed the worktree-e2e-snapshot-metadata branch from 7de8425 to 80bb2d5 Compare August 17, 2026 08:30
Comment thread e2e/snapshot_metadata.go
testNamespace string
)

BeforeAll(func() {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

skip this when we are running nfs/cephfs/nvme tests?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

done

@Rakshith-R
Rakshith-R force-pushed the worktree-e2e-snapshot-metadata branch from 80bb2d5 to 79718be Compare August 17, 2026 12:12
@Rakshith-R
Rakshith-R requested a review from Madhu-1 August 17, 2026 12:12
@mergify
mergify Bot dismissed iPraveenParihar’s stale review August 17, 2026 12:13

Pull request has been modified.

@nixpanic

Copy link
Copy Markdown
Member

/queue

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

@Mergifyio rebase

@mergify

mergify Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

rebase

🛑 The pull request rule doesn't match anymore

Details

This action has been cancelled.

Add github.com/kubernetes-csi/external-snapshot-metadata v1.1.0 to
e2e/go.mod for the sidecar gRPC API used by snapshot metadata e2e tests.

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Rakshith R <rar@redhat.com>
Add 8 end-to-end test cases for CSI snapshot metadata (CBT) covering
the sidecar gRPC API for GetMetadataAllocated and GetMetadataDelta.

Tests require --operator-deployment and exercise:
- Allocated block retrieval with exact offset verification
- Delta block detection between two snapshots
- Starting offset filtering
- Empty volume and no-change delta edge cases
- Max-results batching across streaming responses
- Authentication rejection with invalid audience
- Authorization rejection without RBAC

Assisted-by: Claude <noreply@anthropic.com>
Signed-off-by: Rakshith R <rar@redhat.com>
@ceph-csi-bot
ceph-csi-bot force-pushed the worktree-e2e-snapshot-metadata branch from 79718be to 453dcd2 Compare August 19, 2026 07:54
@ceph-csi-bot ceph-csi-bot added ok-to-test Label to trigger E2E tests and removed queued/rebase labels Aug 19, 2026
@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.35

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.35

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/upgrade-tests-cephfs

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.34

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/k8s-e2e-external-storage/1.36

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e/k8s-1.35

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/upgrade-tests-rbd

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.36

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e-helm/k8s-1.34

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e/k8s-1.36

@ceph-csi-bot

Copy link
Copy Markdown
Collaborator

/test ci/centos/mini-e2e/k8s-1.34

@ceph-csi-bot ceph-csi-bot added ci/in-progress/e2e This label acts like a guard and prevents Mergify from adding the `ok-to-test` label again. and removed ok-to-test Label to trigger E2E tests labels Aug 19, 2026
@mergify mergify Bot removed the ci/in-progress/e2e This label acts like a guard and prevents Mergify from adding the `ok-to-test` label again. label Aug 19, 2026
@mergify

mergify Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Deprecation notice: This pull request comes from a fork and was queued with update_method=rebase and update_bot_account impersonation. This capability will be removed on July 1, 2026. After this date, the merge queue will no longer be able to rebase fork pull requests with this configuration. To avoid disruption, switch to update_method=merge in your queue rule.

@mergify

mergify Bot commented Aug 19, 2026

Copy link
Copy Markdown
Contributor

Merge Queue Status

  • Entered queue2026-08-19 11:22 UTC · Rule: default · triggered by merge protections
  • Checks skipped · PR is already up-to-date
  • Merged2026-08-19 11:22 UTC · at 453dcd29b4facda5d428df16b82b05ffc3b5c6a8 · rebase

This pull request spent 45 seconds in the queue, including 9 seconds running CI.

Required conditions to merge

@mergify
mergify Bot merged commit ab0923e into ceph:devel Aug 19, 2026
44 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

component/testing Additional test cases or CI work

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants