-
Notifications
You must be signed in to change notification settings - Fork 3.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cli/sql: announce the target tenant in the output #100920
Conversation
@@ -47,28 +47,37 @@ eexpect "does not exist" | |||
eexpect "defaultdb>" | |||
send "\\q\r" | |||
eexpect eof | |||
|
|||
spawn $argv sql --no-line-editor -u root -d cluster:demo-tenant |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems like this test file is being skipped. should we re-enable it?
there's a lot of other disabled ones too. perhaps we can check that they don't regress with this change, even if they are not re-enabled right now.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good call. I'll check them manually in this PR, then send another PR separately to re-enable them.
This change ensures that a clear warning is printed in the SQL shell when the user connects to the system tenant and there are secondary tenants defined. For example: ``` % ./cockroach sql --certs-dir=~/.cockroach-demo -d cluster:system \# \# Welcome to the CockroachDB SQL shell. \[...] \# \# \# ATTENTION: YOUR ARE CONNECTED TO THE SYSTEM TENANT OF A MULTI-TENANT CLUSTER. \# PROCEED WITH CAUTION. YOU ARE RESPONSIBLE FOR ENSURING THAT YOU DO NOT \# PERFORM ANY OPERATIONS THAT COULD DAMAGE THE CLUSTER OR OTHER TENANTS. \# [...] root@localhost:26257/defaultdb> ``` Release note: None
This change extends the SQL prompt with the name of the tenant the prompt is connected to, if it was specified in the URL. For example: ``` % ./cockroach sql --certs-dir=~/.cockroach-demo -d cluster:foo ... root@localhost:26257/foo/defaultdb> ``` Release note: None
…ocally Sometimes the shell invoked by `expect` adds additional escape characters in-between the output of a process and the next prompt. This patch makes the test more robust in that case. Release note: None
21c8ada
to
27c0a29
Compare
I have checked manually that all the disabled tests still pass. I'll send a separate PR to un-skip them. bors r=rafiss |
lint error bors r- |
Canceled. |
We aim to de-emphasize the word "tenant" in user-facing features. This patch achieves this for `cockroach demo` by making the tenant name "demoapp" instead of "demo-tenant". Release note: None
bors r=rafiss |
Build succeeded: |
Encountered an error creating backports. Some common things that can go wrong:
You might need to create your backport manually using the backport tool. error setting reviewers, but backport branch blathers/backport-release-23.1-100920 is ready: POST https://api.github.com/repos/cockroachdb/cockroach/pulls/101049/requested_reviewers: 422 Reviews may only be requested from collaborators. One or more of the teams you specified is not a collaborator of the cockroachdb/cockroach repository. [] Backport to branch 23.1.x failed. See errors above. 🦉 Hoot! I am a Blathers, a bot for CockroachDB. My owner is dev-inf. |
Fixes #93129.
Epic: CRDB-23559
See individual commits for details.