Skip to content

Commit 5a5bba6

Browse files
committed
Naming things: Rename environment variables
- `CRATEDB_CLOUD_CLUSTER_ID` to `CRATEDB_CLUSTER_ID` - `CRATEDB_CLOUD_CLUSTER_NAME` to `CRATEDB_CLUSTER_NAME`
1 parent d7ed2da commit 5a5bba6

File tree

18 files changed

+33
-33
lines changed

18 files changed

+33
-33
lines changed

cratedb_toolkit/cluster/core.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,15 +49,15 @@ class ManagedClusterSettings:
4949
Setting(
5050
click=click.Option(
5151
param_decls=["--cluster-id"],
52-
envvar="CRATEDB_CLOUD_CLUSTER_ID",
52+
envvar="CRATEDB_CLUSTER_ID",
5353
help="CrateDB Cloud cluster identifier (UUID)",
5454
),
5555
group="cluster-identifier",
5656
),
5757
Setting(
5858
click=click.Option(
5959
param_decls=["--cluster-name"],
60-
envvar="CRATEDB_CLOUD_CLUSTER_NAME",
60+
envvar="CRATEDB_CLUSTER_NAME",
6161
help="CrateDB Cloud cluster name",
6262
),
6363
group="cluster-identifier",
@@ -170,8 +170,8 @@ def from_env(cls, stop_on_exit: bool = False) -> "ManagedCluster":
170170
When the toolkit environment is configured with `settings_accept_env`,
171171
the settings can be specified that way:
172172
173-
export CRATEDB_CLOUD_CLUSTER_ID='<YOUR_CLUSTER_ID_HERE>'
174-
export CRATEDB_CLOUD_CLUSTER_NAME='<YOUR_CLUSTER_NAME_HERE>'
173+
export CRATEDB_CLUSTER_ID='<YOUR_CLUSTER_ID_HERE>'
174+
export CRATEDB_CLUSTER_NAME='<YOUR_CLUSTER_NAME_HERE>'
175175
"""
176176
if not CONFIG.settings_accept_cli and not CONFIG.settings_accept_env:
177177
raise DatabaseAddressMissingError(
@@ -333,7 +333,7 @@ def load_table(
333333
334334
Synopsis
335335
--------
336-
export CRATEDB_CLOUD_CLUSTER_ID=95998958-4d96-46eb-a77a-a894e7dde128
336+
export CRATEDB_CLUSTER_ID=95998958-4d96-46eb-a77a-a894e7dde128
337337
ctk load table https://cdn.crate.io/downloads/datasets/cratedb-datasets/cloud-tutorials/data_weather.csv.gz
338338
339339
https://console.cratedb.cloud

cratedb_toolkit/exception.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class DatabaseAddressMissingError(ClickException):
2222
EXTENDED_MESSAGE = (
2323
f"{STANDARD_MESSAGE}. "
2424
"Use --cluster-id / --cluster-name / --sqlalchemy-url / --http-url CLI options "
25-
"or CRATEDB_CLOUD_CLUSTER_ID / CRATEDB_CLOUD_CLUSTER_NAME / CRATEDB_SQLALCHEMY_URL / CRATEDB_HTTP_URL "
25+
"or CRATEDB_CLUSTER_ID / CRATEDB_CLUSTER_NAME / CRATEDB_SQLALCHEMY_URL / CRATEDB_HTTP_URL "
2626
"environment variables."
2727
)
2828

cratedb_toolkit/job/cli.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313

1414
@click.command(name="list-jobs")
1515
@click.option(
16-
"--cluster-id", envvar="CRATEDB_CLOUD_CLUSTER_ID", type=str, required=True, help="CrateDB Cloud cluster identifier"
16+
"--cluster-id", envvar="CRATEDB_CLUSTER_ID", type=str, required=True, help="CrateDB Cloud cluster identifier"
1717
)
1818
@click.option(
1919
"--format",

cratedb_toolkit/option.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
import click
22

33
option_cluster_id = click.option(
4-
"--cluster-id", envvar="CRATEDB_CLOUD_CLUSTER_ID", type=str, required=False, help="CrateDB Cloud cluster identifier"
4+
"--cluster-id", envvar="CRATEDB_CLUSTER_ID", type=str, required=False, help="CrateDB Cloud cluster identifier"
55
)
66
option_cluster_name = click.option(
7-
"--cluster-name", envvar="CRATEDB_CLOUD_CLUSTER_NAME", type=str, required=False, help="CrateDB Cloud cluster name"
7+
"--cluster-name", envvar="CRATEDB_CLUSTER_NAME", type=str, required=False, help="CrateDB Cloud cluster name"
88
)
99
option_sqlalchemy_url = click.option(
1010
"--sqlalchemy-url", envvar="CRATEDB_SQLALCHEMY_URL", type=str, required=False, help="CrateDB SQLAlchemy URL"

cratedb_toolkit/util/croud.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def invoke(self) -> t.Any:
7878
if "Resource not found" in message:
7979
explanation = (
8080
"Apparently, the addressed cluster resource was not found. "
81-
"Please validate the `--cluster-id` option, or the `CRATEDB_CLOUD_CLUSTER_ID` environment variable "
81+
"Please validate the `--cluster-id` option, or the `CRATEDB_CLUSTER_ID` environment variable "
8282
"used by CrateDB Toolkit."
8383
)
8484
if "Another cluster operation is currently in progress" in message:

doc/backlog/main.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252
- UX: Provide Bash/zsh completion
5353
- Beautify `list-jobs` output
5454
- `ctk list-clusters`
55-
- Store `CRATEDB_CLOUD_CLUSTER_ID` into `cratedb_toolkit.constants`
55+
- Store `CRATEDB_CLUSTER_ID` into `cratedb_toolkit.constants`
5656
- Cloud Tests: Verify file uploads
5757
- Docs: Add examples in more languages: Java, JavaScript, Lua, PHP
5858
- Docs:

doc/bugs.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ orphan: true
77
##
88

99
```
10-
$ croud clusters import-jobs list --cluster-id=$CRATEDB_CLOUD_CLUSTER_ID --format=table
10+
$ croud clusters import-jobs list --cluster-id=$CRATEDB_CLUSTER_ID --format=table
1111
Traceback (most recent call last):
1212
File "/Users/amo/dev/crate/ecosystem/cratedb-retentions/.venv/bin/croud", line 8, in <module>
1313
sys.exit(main())

doc/cluster/_address.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ in different situations, managed or not.
66
:CLI options:
77
`--cluster-id`, `--cluster-name`, `--sqlalchemy-url`, `--http-url`
88
:Environment variables:
9-
`CRATEDB_CLOUD_CLUSTER_ID`, `CRATEDB_CLOUD_CLUSTER_NAME`, `CRATEDB_SQLALCHEMY_URL`, `CRATEDB_HTTP_URL`
9+
`CRATEDB_CLUSTER_ID`, `CRATEDB_CLUSTER_NAME`, `CRATEDB_SQLALCHEMY_URL`, `CRATEDB_HTTP_URL`
1010

1111
:::{note}
1212
- All address options are mutually exclusive.

doc/cluster/backlog.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ a patch for some item, it will be very much welcome.
1212
[issues]: https://github.com/crate/cratedb-toolkit/issues
1313

1414
## Iteration +1
15-
- CLI: Naming things: Rename `--cluster-id` to `--id`, etc.
16-
- CLI: Naming things: Rename `CRATEDB_CLOUD_CLUSTER_NAME` to `CRATEDB_CLUSTER_NAME`, etc.
1715
- CLI: Is it possible to just use `--url` instead of `--sqlalchemy-url` or `--http-url`?
1816
- CLI: Is it possible to just use `--cluster` to address a cluster, effectively shrinking
1917
all four addressing options into a single one? Maybe optionally?
@@ -77,3 +75,5 @@ a patch for some item, it will be very much welcome.
7775
- Documentation
7876
- Naming things: s/UniversalCluster/DatabaseCluster/`
7977
- CLI: Naming things: Rename `--cratedb-sqlalchemy-url` to `--sqlalchemy-url`, etc.
78+
- CLI: Naming things: Rename `--cluster-id` to `--id`, etc.
79+
- CLI: Naming things: Rename `CRATEDB_CLOUD_CLUSTER_NAME` to `CRATEDB_CLUSTER_NAME`, etc.

doc/cluster/python.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ export CRATEDB_CLOUD_API_SECRET='<YOUR_API_SECRET_HERE>'
3939
environment variables.
4040

4141
:Environment variables:
42-
`CRATEDB_CLOUD_CLUSTER_ID`, `CRATEDB_CLOUD_CLUSTER_NAME`, `CRATEDB_SQLALCHEMY_URL`, `CRATEDB_HTTP_URL`
42+
`CRATEDB_CLUSTER_ID`, `CRATEDB_CLUSTER_NAME`, `CRATEDB_SQLALCHEMY_URL`, `CRATEDB_HTTP_URL`
4343

4444
:::{note}
4545
- All address options are mutually exclusive.

0 commit comments

Comments
 (0)