Closed
Conversation
Now that we have a datadriven framework available to exercise tenant capabilities, we can move tests in `TestMultiTenantAdminFunction` to make use of this. This patch rewrites SPLIT/SCATTER related tests to make use of the datadriven test framework. As is, the construction is cumbersome to work with. The move is done with the next commit in mind, where we will change the default behavior of split/scatter capabilities. To that end, I've only moved the tests that were in my way. At some point we should get rid of this entire thing and rewrite it to use the datadriven test framework. That day is not today. Epic: none Release note: None
AdminSplit and AdminScatter requests are subject to capability checks. Previously, these capabilities were codified in the "enabled" form. As such, by default, secondary tenants did not have the ability to perform these operations. This is in violation of what secondary tenants could do prior to 23.1, at a time before capabilities existed. Moreover, RESTORE/IMPORT rely on performing these operations for performance. This made disallowing these operations by default a performance regression. This patch flips the phrasing of how these capabilities are stored on the proto to use the "disable" verbiage. As such, secondary tenants are able to perform splits and scatters by default. However, no change is made to the public interface -- users above the `tenantcapabilitiespb` package continue to interact with these capabilities as they were before, oblivious to how these things are stored on disk. As part of this patch, we also clean up a testing knob that was used by various backup, CDC, and logictests to override capability checks in the Authorizer. We no longer need this with the new defaults. Fixes cockroachdb#96736 Release note: None
Now that tenants are able to perform splits by default, we can cleanup `TestMultiTenantAdminFunction` to not use a setupCapability concept. Epic: none Release note: None
…state Release note: None
22f7216 to
fea1df6
Compare
e794f51 to
879bd1c
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
for cockroachdb#98546