Skip to content

sql: resolve test tenant randomization for observability tests#161874

Merged
craig[bot] merged 1 commit intocockroachdb:masterfrom
dhartunian:davidh/tenant-test-cleanup
Feb 5, 2026
Merged

sql: resolve test tenant randomization for observability tests#161874
craig[bot] merged 1 commit intocockroachdb:masterfrom
dhartunian:davidh/tenant-test-cleanup

Conversation

@dhartunian
Copy link
Copy Markdown
Collaborator

This addresses the three tests that had test tenant randomization disabled under issue #156145.

TestShowRangesWithDetails now runs with tenant randomization enabled. The underlying tenant_span_stats() function is designed for tenant use and the test passes with an external process virtual cluster.

TestShowRangesUnavailableReplicas remains disabled for tenants because it requires controlling server lifecycle (stopping servers to create unavailable ranges) and uses manual replication mode - both are KV-layer infrastructure operations that tenants cannot perform.

TestTxnContentionEventsTableWithRangeDescriptor remains disabled for tenants because it tests contention event handling for range descriptor keys, which are KV-internal keys that secondary tenants never interact with. Note that TestTxnContentionEventsTableMultiTenant already tests contention events with tenants enabled and passes.

For the two tests that must remain system-tenant-only, the annotation was changed from TestDoesNotWorkWithSecondaryTenantsButWeDontKnowWhyYet to TestIsSpecificToStorageLayerAndNeedsASystemTenant to clearly indicate these are intentional exclusions, not bugs.

Closes: #156145

Release note: None

@cockroach-teamcity
Copy link
Copy Markdown
Member

This change is Reviewable

Copy link
Copy Markdown
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

Thanks!

@yuzefovich reviewed 2 files and all commit messages, and made 2 comments.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dhartunian and @kyle-a-wong).


-- commits line 11 at r1:
Just double-checking that you stressed this test for a bit - it must have failed at least once a few months ago which is what caused me to disable tenant randomization.

Copy link
Copy Markdown
Collaborator Author

@dhartunian dhartunian left a comment

Choose a reason for hiding this comment

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

@dhartunian made 1 comment.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @kyle-a-wong and @yuzefovich).


-- commits line 11 at r1:

Previously, yuzefovich (Yahor Yuzefovich) wrote…

Just double-checking that you stressed this test for a bit - it must have failed at least once a few months which is what caused me to disable tenant randomization.

Haven't. Will do.

Copy link
Copy Markdown
Member

@yuzefovich yuzefovich left a comment

Choose a reason for hiding this comment

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

@yuzefovich made 1 comment.
Reviewable status: :shipit: complete! 0 of 0 LGTMs obtained (waiting on @dhartunian and @kyle-a-wong).


-- commits line 11 at r1:

Previously, dhartunian (David Hartunian) wrote…

Haven't. Will do.

Looks like it's failing on stress CI already 😬

@dhartunian dhartunian force-pushed the davidh/tenant-test-cleanup branch 2 times, most recently from aa398dc to d4210a3 Compare January 28, 2026 23:41
@github-actions
Copy link
Copy Markdown
Contributor

Potential Bug(s) Detected

The three-stage Claude Code analysis has identified potential bug(s) in this PR that may warrant investigation.

Next Steps:
Please review the detailed findings in the workflow run.

Note: When viewing the workflow output, scroll to the bottom to find the Final Analysis Summary.

After you review the findings, please tag the issue as follows:

  • If the detected issue is real or was helpful in any way, please tag the issue with O-AI-Review-Real-Issue-Found
  • If the detected issue was not helpful in any way, please tag the issue with O-AI-Review-Not-Helpful

@github-actions github-actions bot added the o-AI-Review-Potential-Issue-Detected AI reviewer found potential issue. Never assign manually—auto-applied by GH action only. label Jan 28, 2026
@dhartunian dhartunian force-pushed the davidh/tenant-test-cleanup branch from d4210a3 to 83d4744 Compare January 29, 2026 16:23
This addresses the three tests that had test tenant randomization
disabled under issue cockroachdb#156145.

TestShowRangesWithDetails now runs with tenant randomization enabled.
The underlying tenant_span_stats() function is designed for tenant use
and the test passes with an external process virtual cluster.

TestShowRangesUnavailableReplicas remains disabled for tenants because
it requires controlling server lifecycle (stopping servers to create
unavailable ranges) and uses manual replication mode - both are
KV-layer infrastructure operations that tenants cannot perform.

TestTxnContentionEventsTableWithRangeDescriptor remains disabled for
tenants because it tests contention event handling for range descriptor
keys, which are KV-internal keys that secondary tenants never interact
with. Note that TestTxnContentionEventsTableMultiTenant already tests
contention events with tenants enabled and passes.

For the two tests that must remain system-tenant-only, the annotation
was changed from TestDoesNotWorkWithSecondaryTenantsButWeDontKnowWhyYet
to TestIsSpecificToStorageLayerAndNeedsASystemTenant to clearly
indicate these are intentional exclusions, not bugs.

Closes: cockroachdb#156145

Release note: None
@dhartunian dhartunian force-pushed the davidh/tenant-test-cleanup branch from 83d4744 to eb469d4 Compare February 4, 2026 20:18
@dhartunian dhartunian added the O-AI-Review-Real-Issue-Found AI reviewer found real issue label Feb 4, 2026
@dhartunian
Copy link
Copy Markdown
Collaborator Author

bors r=yuzefovich

@yuzefovich
Copy link
Copy Markdown
Member

bors r+

@craig
Copy link
Copy Markdown
Contributor

craig bot commented Feb 5, 2026

@craig craig bot merged commit ee39b49 into cockroachdb:master Feb 5, 2026
26 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

o-AI-Review-Potential-Issue-Detected AI reviewer found potential issue. Never assign manually—auto-applied by GH action only. O-AI-Review-Real-Issue-Found AI reviewer found real issue v26.2.0-prerelease

Projects

None yet

Development

Successfully merging this pull request may close these issues.

observability: investigate skipped tests under test tenant

3 participants