Skip to content

Commit 9bdf431

Browse files
committed
work on docs, tests, etc.
1 parent 359af53 commit 9bdf431

File tree

194 files changed

+1526
-995
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

194 files changed

+1526
-995
lines changed

.env.example

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,6 @@ ASTRA_EXE_PATH=build/native/nativeCompile/astra
2020
# Required for lifecycle tests: Cloud provider/region where resources will be created
2121
ASTRA_CLOUD=
2222
ASTRA_REGION=
23+
24+
# Set to true to enable running (potentially long running and costly) PCU lifecycle tests
25+
ASTRA_RUN_PCU_LIFECYCLE_TESTS=false

.idea/dictionaries/project.xml

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/inspectionProfiles/Project_Default.xml

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.idea/workspace.xml

Lines changed: 382 additions & 192 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

README.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -351,7 +351,23 @@ This may unfortunately require some changes to your scripts if you are relying o
351351
<details>
352352
<summary><strong>CSV schema changes</strong></summary>
353353
354-
TODO
354+
Previously,the CSV output of commands would be somewhat inconsistent, or even invalid CSV in some cases (bugs).
355+
356+
Now, every command supporting CSV output will return an RFC-4180-compliant response of exactly this schema:
357+
358+
```csv
359+
code,message,data_field_1,data_field_2,...
360+
```
361+
362+
The `code` field will be of type `"OK" | "UNCAUGHT" | "DATABASE_NOT_FOUND" | "..."`, and if no rows are present, an implicit OK code should be assumed.
363+
364+
The `message` field will be a human-friendly message describing the result or error of the command (if applicable), and will be empty if there is nothing to say.
365+
366+
The remaining fields will be the relevant data fields for the command, and may be empty if there is no data to show.
367+
368+
The `code` and `message` fields may be repeated for each row of data, to keep the CSV schema consistent.
369+
370+
Note that values _may_ be wrapped in quotes as necessary to ensure valid CSV output, as per the RFC-4180 specification.
355371
</details>
356372
357373
### Consistent flag names and behavior

build.gradle.kts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ dependencies {
2929
implementation("org.slf4j:slf4j-nop:2.0.17")
3030

3131
// for underlying api calls
32-
implementation("com.datastax.astra:astra-db-java:2.0.0")
32+
implementation("com.datastax.astra:astra-db-java:2.1.0")
3333
// implementation("com.datastax.astra:astra-sdk-devops:1.2.9")
3434
implementation(files("astra-sdk-devops.jar")) // temporary until it's on maven central
3535

reflected.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ com.datastax.astra.client.tables.definition.rows.Row
2727
com.datastax.astra.client.tables.definition.columns.*
2828
com.datastax.astra.client.tables.definition.*
2929

30-
# Pcu gateways (TODO replace w/ SDK paths when available)
30+
# Pcu gateways
3131
com.dtsx.astra.cli.gateways.pcu.vendored.domain.*
3232
com.dtsx.astra.sdk.pcu.domain.*
3333

scripts/install.sh

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
#!/usr/bin/env sh
22

3-
# TODO detect if you are migrating from v0.x
4-
53
set -eu
64
IFS=$(printf '\n\t')
75

@@ -188,9 +186,9 @@ while [ "$AUTO_YES_INSTALL" = 0 ]; do
188186
echo ""
189187
echo "${RED}To use a custom installation path, please globally set the ASTRA_HOME environment variable.${RESET}"
190188
echo ""
191-
echo "This variable $(tput bold)must remain in place forever${RESET} (e.g. in your shell profile like $(underline "~/.bashrc"), $(underline "~/.zshrc"), etc.) so that the CLI can always locate its home directory."
189+
echo "This variable $(tput bold)must remain in place forever${RESET} (e.g. in your shell profile like $(underline "~/.zprofile"), $(underline "~/.bash_profile"), etc.) so that the CLI can always locate its home directory."
192190
echo ""
193-
echo "After setting it, restart your terminal or run 'source ~/.bashrc' (or the appropriate file) to apply the change."
191+
echo "After setting it, restart your terminal or run 'source ~/.zprofile' (or the appropriate file) to apply the change."
194192
exit 1
195193
;;
196194
[Cc]* )

src/main/java/com/dtsx/astra/cli/AstraCli.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ public static void main(String... args) {
135135
CliPropertiesImpl.mkAndLoadSysProps(cliEnv, MemoizedCliProperties::new),
136136
OutputType.HUMAN,
137137
new AstraColors(Ansi.AUTO),
138-
new AstraLogger(Level.REGULAR, getCtx, false, Optional.empty(), true),
138+
new AstraLogger(Level.REGULAR, getCtx, false, Optional.empty(), Optional.empty()),
139139
new AstraConsole(System.in, mkPrintWriter(System.out, "stdout"), mkPrintWriter(System.err, "stderr"), null, getCtx, false),
140140
new AstraHome(getCtx),
141141
FileSystems.getDefault(),

src/main/java/com/dtsx/astra/cli/commands/AbstractCmd.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ public final void run() {
129129
ctx.fs(),
130130
ctx.gateways(),
131131
ctx.upgradeNotifier(),
132-
ctx.forceUseProfile()
132+
ctx.forceProfileForTesting()
133133
));
134134
}
135135

0 commit comments

Comments
 (0)