Skip to content

Commit

Permalink
Merge branch 'main' into tab/telemetry-event
Browse files Browse the repository at this point in the history
  • Loading branch information
tabVersion committed Jun 28, 2024
2 parents c9e588a + ed09372 commit fb3aa40
Show file tree
Hide file tree
Showing 122 changed files with 3,675 additions and 902 deletions.
1 change: 1 addition & 0 deletions .typos.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ extend-exclude = [
"src/sqlparser/tests/testdata/",
"src/frontend/planner_test/tests/testdata",
"src/tests/sqlsmith/tests/freeze",
"src/license/src/manager.rs",
"Cargo.lock",
"**/Cargo.toml",
"**/go.mod",
Expand Down
159 changes: 155 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 6 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ members = [
"src/frontend/planner_test",
"src/java_binding",
"src/jni_core",
"src/license",
"src/meta",
"src/meta/dashboard",
"src/meta/model_v2",
Expand Down Expand Up @@ -138,6 +139,10 @@ arrow-array-iceberg = { package = "arrow-array", version = "52" }
arrow-schema-iceberg = { package = "arrow-schema", version = "52" }
arrow-buffer-iceberg = { package = "arrow-buffer", version = "52" }
arrow-cast-iceberg = { package = "arrow-cast", version = "52" }
# TODO
# After apache/iceberg-rust#411 is merged, we move to the upstream version.
iceberg = { git = "https://github.com/risingwavelabs/iceberg-rust.git", rev = "0c6e133e6f4655ff9ce4ad57b577dc7f692dd902" }
iceberg-catalog-rest = { git = "https://github.com/risingwavelabs/iceberg-rust.git", rev = "0c6e133e6f4655ff9ce4ad57b577dc7f692dd902" }
arrow-array = "50"
arrow-arith = "50"
arrow-cast = "50"
Expand Down Expand Up @@ -213,6 +218,7 @@ risingwave_frontend = { path = "./src/frontend" }
risingwave_hummock_sdk = { path = "./src/storage/hummock_sdk" }
risingwave_hummock_test = { path = "./src/storage/hummock_test" }
risingwave_hummock_trace = { path = "./src/storage/hummock_trace" }
risingwave_license = { path = "./src/license" }
risingwave_mem_table_spill_test = { path = "./src/stream/spill_test" }
risingwave_meta = { path = "./src/meta" }
risingwave_meta_dashboard = { path = "./src/meta/dashboard" }
Expand Down
2 changes: 1 addition & 1 deletion docker/dashboards/risingwave-dev-dashboard.json

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions e2e_test/batch/catalog/pg_settings.slt.part
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ postmaster backup_storage_url
postmaster barrier_interval_ms
postmaster checkpoint_frequency
postmaster enable_tracing
postmaster license_key
postmaster max_concurrent_creating_streaming_jobs
postmaster pause_on_next_bootstrap
user application_name
Expand Down
59 changes: 59 additions & 0 deletions e2e_test/error_ui/simple/license.slt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Set the license key to a free tier key.
statement ok
ALTER SYSTEM SET license_key TO 'eyJhbGciOiJSUzUxMiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiJydy10ZXN0IiwidGllciI6ImZyZWUiLCJpc3MiOiJ0ZXN0LnJpc2luZ3dhdmUuY29tIiwiZXhwIjo5OTk5OTk5OTk5fQ.ALC3Kc9LI6u0S-jeMB1YTxg1k8Azxwvc750ihuSZgjA_e1OJC9moxMvpLrHdLZDzCXHjBYi0XJ_1lowmuO_0iPEuPqN5AFpDV1ywmzJvGmMCMtw3A2wuN7hhem9OsWbwe6lzdwrefZLipyo4GZtIkg5ZdwGuHzm33zsM-X5gl_Ns4P6axHKiorNSR6nTAyA6B32YVET_FAM2YJQrXqpwA61wn1XLfarZqpdIQyJ5cgyiC33BFBlUL3lcRXLMLeYe6TjYGeV4K63qARCjM9yeOlsRbbW5ViWeGtR2Yf18pN8ysPXdbaXm_P_IVhl3jCTDJt9ctPh6pUCbkt36FZqO9A';

query error
SELECT rw_test_paid_tier();
----
db error: ERROR: Failed to run the query

Caused by these errors (recent errors listed first):
1: Expr error
2: error while evaluating expression `test_paid_tier()`
3: feature TestPaid is only available for tier Paid and above, while the current tier is Free

Hint: You may want to set a license key with `ALTER SYSTEM SET license_key = '...';` command.


# Set the license key to an invalid key.
statement ok
ALTER SYSTEM SET license_key TO 'invalid';

query error
SELECT rw_test_paid_tier();
----
db error: ERROR: Failed to run the query

Caused by these errors (recent errors listed first):
1: Expr error
2: error while evaluating expression `test_paid_tier()`
3: feature TestPaid is not available due to license error
4: invalid license key
5: InvalidToken


# Set the license key to empty. This demonstrates the default behavior in production, i.e., free tier.
statement ok
ALTER SYSTEM SET license_key TO '';

query error
SELECT rw_test_paid_tier();
----
db error: ERROR: Failed to run the query

Caused by these errors (recent errors listed first):
1: Expr error
2: error while evaluating expression `test_paid_tier()`
3: feature TestPaid is only available for tier Paid and above, while the current tier is Free

Hint: You may want to set a license key with `ALTER SYSTEM SET license_key = '...';` command.


# Set the license key to default. In debug mode, this will set the license key to a paid tier key.
statement ok
ALTER SYSTEM SET license_key TO DEFAULT;

query T
SELECT rw_test_paid_tier();
----
t
Loading

0 comments on commit fb3aa40

Please sign in to comment.