-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
117769: cli/demo: expand demo://tenant to postgres:// URL r=dt a=dt The SQL connection URLs are large and somewhat unwieldy when used with \c to reconnect or in PCR control statements. One particular source of friction, beyond the sheer length of the string making statements harder to read or modify by hand, is that the connection string in it includes values that are specific to a given `demo` session, meaning a subsequent session cannot simply re-run the same commands from the recorded shell history as they contain the ephemeral ports and passwords. This change adds a small special-case to the shell when it is running in demo mode, so that it will replace any occurrence of a string of the form 'demo://<cluster_name>' with the pgurl for the virtual cluster of that name on its first server. For example, when used reconnecting the shell itself to a different pgurl: ``` demo@127.0.0.1:26257/system/defaultdb> \c demo://demoapp using new connection URL: postgresql://demo:demo36905@127.0.0.1:26257/defaultdb?options=-ccluster%3Ddemoapp&sslmode=require&sslrootcert=%2FUsers%2Fuser%2F.cockroach-demo%2Fca.crt demo@127.0.0.1:26257/demoapp/defaultdb> \c demo://system using new connection URL: postgresql://demo:demo36905@127.0.0.1:26257/defaultdb?options=-ccluster%3Dsystem&sslmode=require&sslrootcert=%2FUsers%2Fuser%2F.cockroach-demo%2Fca.crt ``` For another example, when used in the content of a statement that will be sent to the database: ``` demo@127.0.0.1:26257/system/defaultdb> create virtual cluster t2 from replication of demoapp on 'demo://system'; CREATE VIRTUAL CLUSTER FROM REPLICATION 0 demo@127.0.0.1:26257/system/defaultdb> SELECT source_cluster_uri FROM [SHOW VIRTUAL CLUSTER t2 WITH REPLICATION STATUS]; source_cluster_uri ------------------------------------------------------------------------------------------------------------------------ postgresql://demo:redacted@127.0.0.1:26257/defaultdb?options=-ccluster%3Dsystem&sslmode=require&sslrootcert=redacted ``` The substitutions are performed after recording the line in the shell history, so that the history is kept in terms of the short name that remains constant across demo sessions. Release note: none. Epic: none. 117976: sql: remove unused functions r=mgartner a=mgartner #### sql: remove unused functions The best code is no code. Release note: None #### sql/tests: add "_test" suffix to file name The commit renames a test file, `virtual_cluster_name.go`, to match the naming convention. I believe the test in the was being run in CI before, despite the misnaming. Epic: None Release note: None 117990: generate-logictest: skip certain CCL configurations under `race` r=rail a=rickystewart For whatever reason these particular configurations are particularly prone to timing out under `race`. Presumably they are more sensitive to the extra load. The other configurations seem not to have this issue. Epic: none Release note: None Co-authored-by: David Taylor <tinystatemachine@gmail.com> Co-authored-by: Marcus Gartner <marcus@cockroachlabs.com> Co-authored-by: Ricky Stewart <ricky@cockroachlabs.com>
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.