From 4ad4622fcf6ad90fe06b134ab6851f86c3c6cb26 Mon Sep 17 00:00:00 2001 From: slinkydeveloper Date: Tue, 26 Mar 2024 17:13:56 +0100 Subject: [PATCH] Squashed 'crates/service-protocol/service-protocol/' changes from 4378d559..29b28f98 29b28f98 Modify Input/Output schema in deployment_manifest_schema.json (#80) 26d91e69 Replace protocol Empty message with custom one, so we remove the dependency on protobuf built-in messages (#79) 61ae44b2 Update documentation on error codes (#77) 576a1b26 Add HandlerType. Fix #1092 (#76) 0624d092 Payload schema for input and output. This provides basic format awareness. (#74) git-subtree-dir: crates/service-protocol/service-protocol git-subtree-split: 29b28f9867734bc01dd47c4666d9d56c90b626f5 --- .cargo/config.toml | 38 - .dockerignore | 6 - .github/actions/clean-runner/action.yml | 14 - .github/actions/install-protoc/action.yml | 32 - .github/workflows/binaries.yml | 129 - .github/workflows/ci.yml | 85 - .github/workflows/deps.yml | 34 - .github/workflows/docker.yml | 152 - .github/workflows/helm.yml | 48 - .../.github => .github}/workflows/lint.yaml | 0 .github/workflows/npm.yml | 126 - .github/workflows/postrelease.yml | 12 - .github/workflows/release.yml | 101 - .gitignore | 18 +- .ignore | 1 - .../.prettierrc.toml => .prettierrc.toml | 0 .../.protolint.yaml => .protolint.yaml | 0 Cargo.lock | 7881 ----------------- Cargo.toml | 175 - LICENSE | 123 +- README.md | 109 +- charts/restate-helm/.helmignore | 23 - charts/restate-helm/Chart.yaml | 9 - charts/restate-helm/README.md | 9 - charts/restate-helm/templates/_helpers.tpl | 22 - charts/restate-helm/templates/service.yaml | 24 - .../templates/serviceaccount.yaml | 15 - .../templates/servicemonitor.yaml | 41 - .../restate-helm/templates/statefulset.yaml | 82 - charts/restate-helm/values.yaml | 60 - cli/Cargo.toml | 75 - cli/build.rs | 29 - cli/src/app.rs | 128 - cli/src/art.rs | 38 - cli/src/build_info.rs | 52 - cli/src/cli_env.rs | 371 - cli/src/clients/datafusion_helpers.rs | 1036 --- cli/src/clients/datafusion_http_client.rs | 166 - cli/src/clients/errors.rs | 51 - cli/src/clients/metas_client.rs | 193 - cli/src/clients/metas_interface.rs | 125 - cli/src/clients/mod.rs | 20 - cli/src/commands/components/describe.rs | 151 - cli/src/commands/components/list.rs | 124 - cli/src/commands/components/mod.rs | 26 - .../commands/components/status/agg_status.rs | 70 - .../components/status/detailed_status.rs | 85 - cli/src/commands/components/status/mod.rs | 338 - cli/src/commands/deployments/describe.rs | 165 - cli/src/commands/deployments/list.rs | 174 - cli/src/commands/deployments/mod.rs | 29 - cli/src/commands/deployments/register.rs | 433 - cli/src/commands/deployments/remove.rs | 190 - cli/src/commands/examples.rs | 248 - cli/src/commands/invocations/cancel.rs | 59 - cli/src/commands/invocations/describe.rs | 143 - cli/src/commands/invocations/list.rs | 242 - cli/src/commands/invocations/mod.rs | 25 - cli/src/commands/mod.rs | 17 - cli/src/commands/sql.rs | 93 - cli/src/commands/state/edit.rs | 106 - cli/src/commands/state/get.rs | 77 - cli/src/commands/state/mod.rs | 23 - cli/src/commands/state/util.rs | 214 - cli/src/commands/whoami.rs | 121 - cli/src/lib.rs | 21 - cli/src/main.rs | 37 - cli/src/ui/component_methods.rs | 94 - cli/src/ui/console.rs | 355 - cli/src/ui/deployments.rs | 147 - cli/src/ui/invocations.rs | 270 - cli/src/ui/mod.rs | 31 - cli/src/ui/output.rs | 96 - cli/src/ui/stylesheet.rs | 82 - cli/src/ui/watcher.rs | 113 - clippy.toml | 2 - crates/admin/Cargo.toml | 65 - crates/admin/src/error.rs | 27 - crates/admin/src/lib.rs | 19 - crates/admin/src/options.rs | 55 - crates/admin/src/rest_api/components.rs | 167 - crates/admin/src/rest_api/deployments.rs | 257 - crates/admin/src/rest_api/error.rs | 133 - crates/admin/src/rest_api/handlers.rs | 87 - crates/admin/src/rest_api/health.rs | 27 - crates/admin/src/rest_api/invocations.rs | 109 - crates/admin/src/rest_api/mod.rs | 146 - crates/admin/src/rest_api/subscriptions.rs | 177 - crates/admin/src/service.rs | 103 - crates/admin/src/state.rs | 68 - crates/admin/src/storage_query/error.rs | 80 - crates/admin/src/storage_query/mod.rs | 24 - crates/admin/src/storage_query/query.rs | 270 - crates/base64-util/Cargo.toml | 11 - crates/base64-util/src/lib.rs | 20 - crates/benchmarks/Cargo.toml | 47 - crates/benchmarks/README.md | 73 - .../benchmarks/benches/throughput_parallel.rs | 109 - .../benches/throughput_sequential.rs | 74 - crates/benchmarks/build.rs | 18 - crates/benchmarks/proto/counter.proto | 31 - crates/benchmarks/src/lib.rs | 163 - crates/bifrost/Cargo.toml | 48 - crates/bifrost/src/bifrost.rs | 382 - crates/bifrost/src/error.rs | 29 - crates/bifrost/src/lib.rs | 49 - crates/bifrost/src/loglet.rs | 200 - crates/bifrost/src/loglets/file_loglet.rs | 76 - crates/bifrost/src/loglets/memory_loglet.rs | 372 - crates/bifrost/src/loglets/mod.rs | 13 - crates/bifrost/src/metadata.rs | 135 - crates/bifrost/src/options.rs | 64 - crates/bifrost/src/read_stream.rs | 172 - crates/bifrost/src/service.rs | 68 - crates/bifrost/src/types.rs | 140 - crates/bifrost/src/watchdog.rs | 140 - crates/cluster-controller/Cargo.toml | 28 - crates/cluster-controller/src/lib.rs | 15 - crates/cluster-controller/src/options.rs | 19 - crates/cluster-controller/src/service.rs | 44 - crates/codederror/.gitignore | 4 - crates/codederror/Cargo.toml | 14 - crates/codederror/README.md | 7 - crates/codederror/derive/Cargo.toml | 16 - crates/codederror/derive/src/ast.rs | 151 - crates/codederror/derive/src/attr.rs | 131 - crates/codederror/derive/src/expand.rs | 167 - crates/codederror/derive/src/generics.rs | 96 - crates/codederror/derive/src/lib.rs | 32 - crates/codederror/derive/src/prop.rs | 29 - crates/codederror/derive/src/valid.rs | 118 - crates/codederror/src/lib.rs | 290 - crates/codederror/tests/test.rs | 159 - crates/core/Cargo.toml | 44 - crates/core/src/lib.rs | 25 - crates/core/src/metadata/manager.rs | 456 - crates/core/src/metadata/mod.rs | 185 - crates/core/src/metric_definitions.rs | 32 - crates/core/src/network/error.rs | 38 - crates/core/src/network/message_router.rs | 206 - crates/core/src/network/mod.rs | 17 - crates/core/src/network/network_sender.rs | 44 - crates/core/src/task_center.rs | 657 -- crates/core/src/task_center_types.rs | 108 - crates/core/src/test_env.rs | 302 - crates/errors/Cargo.toml | 26 - crates/errors/src/error_codes/META0001.md | 23 - crates/errors/src/error_codes/META0002.md | 19 - crates/errors/src/error_codes/META0003.md | 8 - crates/errors/src/error_codes/META0004.md | 10 - crates/errors/src/error_codes/META0005.md | 5 - crates/errors/src/error_codes/META0006.md | 11 - crates/errors/src/error_codes/META0007.md | 5 - crates/errors/src/error_codes/META0008.md | 6 - crates/errors/src/error_codes/META0009.md | 9 - crates/errors/src/error_codes/META0010.md | 10 - crates/errors/src/error_codes/META0011.md | 9 - crates/errors/src/error_codes/RT0001.md | 9 - crates/errors/src/error_codes/RT0002.md | 5 - crates/errors/src/error_codes/RT0003.md | 8 - crates/errors/src/error_codes/RT0004.md | 10 - crates/errors/src/error_codes/RT0005.md | 9 - crates/errors/src/error_codes/RT0006.md | 11 - crates/errors/src/error_codes/RT0007.md | 8 - crates/errors/src/error_codes/RT0008.md | 10 - crates/errors/src/error_codes/RT0009.md | 9 - crates/errors/src/fmt.rs | 154 - crates/errors/src/helper.rs | 40 - crates/errors/src/lib.rs | 53 - crates/fs-util/Cargo.toml | 16 - crates/fs-util/src/lib.rs | 79 - crates/futures-util/Cargo.toml | 22 - crates/futures-util/src/command.rs | 196 - crates/futures-util/src/lib.rs | 12 - crates/futures-util/src/pipe.rs | 607 -- crates/ingress-dispatcher/Cargo.toml | 42 - crates/ingress-dispatcher/src/dispatcher.rs | 395 - crates/ingress-dispatcher/src/error.rs | 19 - crates/ingress-dispatcher/src/lib.rs | 358 - crates/ingress-http/Cargo.toml | 72 - crates/ingress-http/src/handler/awakeables.rs | 129 - .../src/handler/component_handler.rs | 288 - crates/ingress-http/src/handler/error.rs | 129 - crates/ingress-http/src/handler/health.rs | 56 - crates/ingress-http/src/handler/mod.rs | 89 - .../ingress-http/src/handler/path_parsing.rs | 150 - crates/ingress-http/src/handler/tests.rs | 431 - crates/ingress-http/src/handler/tracing.rs | 67 - crates/ingress-http/src/layers/load_shed.rs | 134 - crates/ingress-http/src/layers/mod.rs | 12 - .../src/layers/tracing_context_extractor.rs | 70 - crates/ingress-http/src/lib.rs | 78 - crates/ingress-http/src/metric_definitions.rs | 34 - crates/ingress-http/src/options.rs | 65 - crates/ingress-http/src/server.rs | 328 - crates/ingress-kafka/Cargo.toml | 48 - crates/ingress-kafka/src/consumer_task.rs | 258 - crates/ingress-kafka/src/lib.rs | 23 - crates/ingress-kafka/src/options.rs | 110 - .../src/subscription_controller.rs | 368 - crates/invoker-api/Cargo.toml | 26 - crates/invoker-api/src/effects.rs | 40 - crates/invoker-api/src/entry_enricher.rs | 108 - crates/invoker-api/src/handle.rs | 77 - crates/invoker-api/src/journal_reader.rs | 82 - crates/invoker-api/src/lib.rs | 23 - crates/invoker-api/src/state_reader.rs | 101 - crates/invoker-api/src/status_handle.rs | 137 - crates/invoker-impl/Cargo.toml | 61 - crates/invoker-impl/src/input_command.rs | 213 - .../src/invocation_state_machine.rs | 373 - crates/invoker-impl/src/invocation_task.rs | 867 -- crates/invoker-impl/src/lib.rs | 1230 --- crates/invoker-impl/src/metric_definitions.rs | 35 - crates/invoker-impl/src/options.rs | 156 - crates/invoker-impl/src/quota.rs | 46 - .../invoker-impl/src/state_machine_manager.rs | 140 - crates/invoker-impl/src/status_store.rs | 100 - crates/meta-rest-model/Cargo.toml | 25 - crates/meta-rest-model/src/components.rs | 54 - crates/meta-rest-model/src/deployments.rs | 199 - crates/meta-rest-model/src/handlers.rs | 20 - crates/meta-rest-model/src/lib.rs | 14 - crates/meta-rest-model/src/subscriptions.rs | 80 - crates/meta/Cargo.toml | 52 - crates/meta/src/error.rs | 39 - crates/meta/src/lib.rs | 91 - crates/meta/src/service.rs | 461 - crates/meta/src/storage.rs | 436 - crates/network/Cargo.toml | 46 - crates/network/src/connection.rs | 140 - crates/network/src/connection_manager.rs | 813 -- crates/network/src/error.rs | 81 - crates/network/src/handshake.rs | 121 - crates/network/src/lib.rs | 22 - crates/network/src/metric_definitions.rs | 80 - crates/network/src/networking.rs | 148 - crates/network/src/utils.rs | 41 - crates/node-protocol/Cargo.toml | 29 - crates/node-protocol/build.rs | 41 - crates/node-protocol/proto/common.proto | 35 - crates/node-protocol/proto/node.proto | 66 - crates/node-protocol/src/codec.rs | 163 - crates/node-protocol/src/common.rs | 71 - crates/node-protocol/src/error.rs | 19 - crates/node-protocol/src/ingress.rs | 57 - crates/node-protocol/src/lib.rs | 50 - crates/node-protocol/src/metadata.rs | 114 - crates/node-protocol/src/node.rs | 108 - crates/node-protocol/src/status.rs | 16 - crates/node-services/Cargo.toml | 27 - crates/node-services/build.rs | 45 - .../proto/cluster_ctrl_svc.proto | 37 - crates/node-services/proto/node_svc.proto | 64 - crates/node-services/src/lib.rs | 23 - crates/node/Cargo.toml | 82 - crates/node/src/lib.rs | 290 - .../network_server/handler/cluster_ctrl.rs | 61 - .../src/network_server/handler/metadata.rs | 52 - crates/node/src/network_server/handler/mod.rs | 254 - .../node/src/network_server/handler/node.rs | 158 - crates/node/src/network_server/metrics.rs | 38 - crates/node/src/network_server/mod.rs | 20 - crates/node/src/network_server/multiplex.rs | 132 - crates/node/src/network_server/options.rs | 68 - .../src/network_server/prometheus_helpers.rs | 166 - crates/node/src/network_server/service.rs | 204 - crates/node/src/network_server/state.rs | 20 - crates/node/src/options.rs | 75 - crates/node/src/roles/admin.rs | 108 - crates/node/src/roles/mod.rs | 15 - crates/node/src/roles/worker.rs | 291 - crates/pb/Cargo.toml | 23 - crates/pb/build.rs | 344 - .../proto/dev/restate/internal/events.proto | 21 - .../proto/dev/restate/internal/messages.proto | 48 - .../proto/dev/restate/internal/services.proto | 95 - crates/pb/src/lib.rs | 129 - crates/queue/Cargo.toml | 25 - crates/queue/benches/queue_benchmark.rs | 55 - crates/queue/src/io.rs | 138 - crates/queue/src/lib.rs | 72 - crates/queue/src/segmented_queue.rs | 313 - crates/schema-api/Cargo.toml | 32 - crates/schema-api/src/lib.rs | 672 -- crates/schema-impl/Cargo.toml | 35 - crates/schema-impl/src/component.rs | 67 - crates/schema-impl/src/deployment.rs | 86 - crates/schema-impl/src/lib.rs | 306 - .../schema-impl/src/schemas_impl/component.rs | 131 - .../src/schemas_impl/deployment.rs | 678 -- crates/schema-impl/src/schemas_impl/mod.rs | 280 - .../src/schemas_impl/subscription.rs | 130 - crates/schema-impl/src/subscriptions.rs | 40 - crates/serde-util/Cargo.toml | 25 - crates/serde-util/src/default.rs | 22 - crates/serde-util/src/header_map.rs | 95 - crates/serde-util/src/lib.rs | 19 - crates/serde-util/src/proto.rs | 43 - crates/service-client/Cargo.toml | 40 - crates/service-client/src/http.rs | 226 - crates/service-client/src/lambda.rs | 531 -- crates/service-client/src/lib.rs | 152 - crates/service-client/src/options.rs | 44 - crates/service-client/src/proxy.rs | 121 - crates/service-client/src/utils.rs | 49 - crates/service-protocol/Cargo.toml | 56 - crates/service-protocol/README.md | 7 - crates/service-protocol/build.rs | 44 - .../service-protocol/.gitignore | 2 - .../service-protocol/service-protocol/LICENSE | 21 - .../service-protocol/README.md | 13 - .../deployment_manifest_schema.json | 59 - crates/service-protocol/src/awakeable_id.rs | 123 - crates/service-protocol/src/codec.rs | 458 - crates/service-protocol/src/discovery.rs | 219 - crates/service-protocol/src/lib.rs | 218 - .../service-protocol/src/message/encoding.rs | 462 - crates/service-protocol/src/message/header.rs | 493 -- crates/service-protocol/src/message/mod.rs | 133 - crates/storage-api/Cargo.toml | 22 - .../src/deduplication_table/mod.rs | 44 - crates/storage-api/src/fsm_table/mod.rs | 43 - crates/storage-api/src/inbox_table/mod.rs | 121 - .../src/invocation_status_table/mod.rs | 229 - crates/storage-api/src/journal_table/mod.rs | 52 - crates/storage-api/src/lib.rs | 59 - crates/storage-api/src/outbox_table/mod.rs | 56 - .../src/service_status_table/mod.rs | 40 - crates/storage-api/src/state_table/mod.rs | 48 - crates/storage-api/src/timer_table/mod.rs | 79 - crates/storage-proto/Cargo.toml | 27 - crates/storage-proto/build.rs | 17 - .../proto/dev/restate/storage/v1/domain.proto | 405 - crates/storage-proto/src/lib.rs | 1637 ---- crates/storage-query-datafusion/Cargo.toml | 39 - .../storage-query-datafusion/src/analyzer.rs | 86 - .../src/component/mod.rs | 15 - .../src/component/row.rs | 31 - .../src/component/schema.rs | 25 - .../src/component/table.rs | 92 - .../storage-query-datafusion/src/context.rs | 92 - .../src/deployment/mod.rs | 15 - .../src/deployment/row.rs | 35 - .../src/deployment/schema.rs | 22 - .../src/deployment/table.rs | 92 - .../src/generic_table.rs | 161 - .../storage-query-datafusion/src/inbox/mod.rs | 15 - .../storage-query-datafusion/src/inbox/row.rs | 81 - .../src/inbox/schema.rs | 35 - .../src/inbox/table.rs | 93 - .../src/invocation_state/mod.rs | 15 - .../src/invocation_state/row.rs | 54 - .../src/invocation_state/schema.rs | 32 - .../src/invocation_state/table.rs | 93 - .../src/invocation_status/mod.rs | 15 - .../src/invocation_status/row.rs | 120 - .../src/invocation_status/schema.rs | 32 - .../src/invocation_status/table.rs | 93 - .../src/journal/mod.rs | 15 - .../src/journal/row.rs | 125 - .../src/journal/schema.rs | 28 - .../src/journal/table.rs | 91 - crates/storage-query-datafusion/src/lib.rs | 27 - .../storage-query-datafusion/src/options.rs | 83 - .../src/physical_optimizer.rs | 72 - .../storage-query-datafusion/src/state/mod.rs | 15 - .../storage-query-datafusion/src/state/row.rs | 39 - .../src/state/schema.rs | 24 - .../src/state/table.rs | 89 - .../src/table_macro.rs | 443 - .../src/table_util.rs | 30 - .../src/virtual_object_status/mod.rs | 15 - .../src/virtual_object_status/row.rs | 34 - .../src/virtual_object_status/schema.rs | 22 - .../src/virtual_object_status/table.rs | 93 - crates/storage-query-postgres/Cargo.toml | 43 - .../src/extended_query.rs | 76 - crates/storage-query-postgres/src/lib.rs | 17 - crates/storage-query-postgres/src/options.rs | 47 - .../src/pgwire_server.rs | 325 - crates/storage-query-postgres/src/service.rs | 78 - crates/storage-rocksdb/Cargo.toml | 53 - .../benches/basic_benchmark.rs | 63 - crates/storage-rocksdb/src/codec.rs | 273 - .../src/deduplication_table/mod.rs | 134 - crates/storage-rocksdb/src/fsm_table/mod.rs | 121 - crates/storage-rocksdb/src/inbox_table/mod.rs | 268 - .../src/invocation_status_table/mod.rs | 215 - .../storage-rocksdb/src/journal_table/mod.rs | 256 - crates/storage-rocksdb/src/keys.rs | 163 - crates/storage-rocksdb/src/lib.rs | 921 -- .../storage-rocksdb/src/outbox_table/mod.rs | 180 - crates/storage-rocksdb/src/owned_iter.rs | 46 - crates/storage-rocksdb/src/scan.rs | 200 - .../src/service_status_table/mod.rs | 157 - crates/storage-rocksdb/src/state_table/mod.rs | 265 - crates/storage-rocksdb/src/timer_table/mod.rs | 308 - crates/storage-rocksdb/src/writer.rs | 213 - .../tests/inbox_table_test/mod.rs | 168 - .../storage-rocksdb/tests/integration_test.rs | 125 - .../tests/invocation_status_table_test/mod.rs | 112 - .../tests/journal_table_test/mod.rs | 105 - .../tests/outbox_table_test/mod.rs | 60 - .../tests/state_table_test/mod.rs | 148 - .../tests/timer_table_test/mod.rs | 161 - .../virtual_object_status_table_test/mod.rs | 49 - crates/test-util/Cargo.toml | 17 - crates/test-util/src/lib.rs | 34 - crates/test-util/src/matchers.rs | 85 - crates/timer-queue/Cargo.toml | 12 - crates/timer-queue/src/lib.rs | 150 - crates/timer/Cargo.toml | 36 - crates/timer/src/lib.rs | 37 - crates/timer/src/options.rs | 47 - crates/timer/src/service/clock.rs | 171 - crates/timer/src/service/mod.rs | 529 -- crates/timer/src/service/tests.rs | 473 - crates/tracing-instrumentation/Cargo.toml | 38 - crates/tracing-instrumentation/src/lib.rs | 405 - crates/tracing-instrumentation/src/pretty.rs | 377 - .../tracing-instrumentation/src/processor.rs | 62 - crates/tracing-instrumentation/src/tracer.rs | 123 - crates/types/Cargo.toml | 60 - crates/types/src/base62_util.rs | 101 - crates/types/src/dedup.rs | 105 - crates/types/src/deployment.rs | 106 - crates/types/src/errors.rs | 402 - crates/types/src/id_util.rs | 230 - crates/types/src/identifiers.rs | 810 -- crates/types/src/ingress.rs | 21 - crates/types/src/invocation.rs | 542 -- crates/types/src/journal/enriched.rs | 44 - crates/types/src/journal/entries.rs | 333 - crates/types/src/journal/mod.rs | 24 - crates/types/src/journal/raw.rs | 262 - crates/types/src/lib.rs | 38 - crates/types/src/logs.rs | 121 - crates/types/src/macros.rs | 71 - crates/types/src/message.rs | 31 - crates/types/src/node_id.rs | 227 - crates/types/src/nodes_config.rs | 312 - crates/types/src/partition_table.rs | 219 - crates/types/src/retries.rs | 351 - crates/types/src/state_mut.rs | 112 - crates/types/src/subscription.rs | 99 - crates/types/src/time.rs | 83 - crates/types/src/timer.rs | 26 - crates/types/src/version.rs | 51 - crates/wal-protocol/Cargo.toml | 52 - crates/wal-protocol/src/control.rs | 23 - crates/wal-protocol/src/effects.rs | 67 - crates/wal-protocol/src/lib.rs | 181 - crates/wal-protocol/src/timer.rs | 165 - crates/worker-api/Cargo.toml | 14 - crates/worker-api/src/lib.rs | 55 - crates/worker/Cargo.toml | 85 - crates/worker/src/invoker_integration.rs | 193 - crates/worker/src/lib.rs | 403 - crates/worker/src/metric_definitions.rs | 47 - .../src/partition/action_effect_handler.rs | 122 - .../partition/leadership/action_collector.rs | 80 - crates/worker/src/partition/leadership/mod.rs | 537 -- crates/worker/src/partition/mod.rs | 357 - .../services/deterministic/awakeables.rs | 50 - .../partition/services/deterministic/mod.rs | 97 - .../partition/services/deterministic/proxy.rs | 41 - crates/worker/src/partition/services/mod.rs | 198 - .../non_deterministic/idempotent_invoker.rs | 408 - .../services/non_deterministic/mod.rs | 345 - crates/worker/src/partition/shuffle.rs | 472 - .../src/partition/state_machine/actions.rs | 56 - .../state_machine/command_interpreter/mod.rs | 1405 --- .../command_interpreter/tests.rs | 742 -- .../state_machine/effect_interpreter.rs | 602 -- .../src/partition/state_machine/effects.rs | 867 -- .../worker/src/partition/state_machine/mod.rs | 565 -- .../worker/src/partition/storage/invoker.rs | 108 - crates/worker/src/partition/storage/mod.rs | 688 -- crates/worker/src/partition/types.rs | 93 - crates/worker/src/subscription_integration.rs | 66 - deny.toml | 187 - deployment_manifest_schema.json | 135 + .../restate/service/protocol.proto | 26 +- docker/Dockerfile | 53 - docs/dev/README.md | 15 - docs/dev/debug.md | 20 - docs/dev/development-guidelines.md | 33 - docs/dev/local-development.md | 170 - docs/dev/release.md | 59 - docs/dev/rust-guidelines.md | 84 - justfile | 154 - npm/.gitignore | 3 - npm/package.json.tmpl | 21 - npm/restate-server/package.json | 37 - npm/restate-server/src/index.ts | 25 - npm/restate-server/tsconfig.json | 12 - npm/restate/package.json | 37 - npm/restate/src/index.ts | 25 - npm/restate/tsconfig.json | 12 - rust-toolchain.toml | 4 - server/Cargo.toml | 66 - server/build.rs | 29 - server/src/build_info.rs | 42 - server/src/config.rs | 187 - server/src/future_util.rs | 72 - server/src/lib.rs | 16 - server/src/main.rs | 216 - server/src/rt.rs | 58 - server/src/signal.rs | 29 - ...tocol.md => service-invocation-protocol.md | 0 tools/scripts/check-license-headers | 10 - .../.cargo/config | 11 - .../Cargo.toml | 30 - .../README.md | 50 - .../dissector.lua | 72 - .../src/lib.rs | 109 - tools/xtask/Cargo.toml | 28 - tools/xtask/src/main.rs | 166 - 519 files changed, 176 insertions(+), 75605 deletions(-) delete mode 100644 .cargo/config.toml delete mode 100644 .dockerignore delete mode 100644 .github/actions/clean-runner/action.yml delete mode 100644 .github/actions/install-protoc/action.yml delete mode 100644 .github/workflows/binaries.yml delete mode 100644 .github/workflows/ci.yml delete mode 100644 .github/workflows/deps.yml delete mode 100644 .github/workflows/docker.yml delete mode 100644 .github/workflows/helm.yml rename {crates/service-protocol/service-protocol/.github => .github}/workflows/lint.yaml (100%) delete mode 100644 .github/workflows/npm.yml delete mode 100644 .github/workflows/postrelease.yml delete mode 100644 .github/workflows/release.yml delete mode 120000 .ignore rename crates/service-protocol/service-protocol/.prettierrc.toml => .prettierrc.toml (100%) rename crates/service-protocol/service-protocol/.protolint.yaml => .protolint.yaml (100%) delete mode 100644 Cargo.lock delete mode 100644 Cargo.toml delete mode 100644 charts/restate-helm/.helmignore delete mode 100644 charts/restate-helm/Chart.yaml delete mode 100644 charts/restate-helm/README.md delete mode 100644 charts/restate-helm/templates/_helpers.tpl delete mode 100644 charts/restate-helm/templates/service.yaml delete mode 100644 charts/restate-helm/templates/serviceaccount.yaml delete mode 100644 charts/restate-helm/templates/servicemonitor.yaml delete mode 100644 charts/restate-helm/templates/statefulset.yaml delete mode 100644 charts/restate-helm/values.yaml delete mode 100644 cli/Cargo.toml delete mode 100644 cli/build.rs delete mode 100644 cli/src/app.rs delete mode 100644 cli/src/art.rs delete mode 100644 cli/src/build_info.rs delete mode 100644 cli/src/cli_env.rs delete mode 100644 cli/src/clients/datafusion_helpers.rs delete mode 100644 cli/src/clients/datafusion_http_client.rs delete mode 100644 cli/src/clients/errors.rs delete mode 100644 cli/src/clients/metas_client.rs delete mode 100644 cli/src/clients/metas_interface.rs delete mode 100644 cli/src/clients/mod.rs delete mode 100644 cli/src/commands/components/describe.rs delete mode 100644 cli/src/commands/components/list.rs delete mode 100644 cli/src/commands/components/mod.rs delete mode 100644 cli/src/commands/components/status/agg_status.rs delete mode 100644 cli/src/commands/components/status/detailed_status.rs delete mode 100644 cli/src/commands/components/status/mod.rs delete mode 100644 cli/src/commands/deployments/describe.rs delete mode 100644 cli/src/commands/deployments/list.rs delete mode 100644 cli/src/commands/deployments/mod.rs delete mode 100644 cli/src/commands/deployments/register.rs delete mode 100644 cli/src/commands/deployments/remove.rs delete mode 100644 cli/src/commands/examples.rs delete mode 100644 cli/src/commands/invocations/cancel.rs delete mode 100644 cli/src/commands/invocations/describe.rs delete mode 100644 cli/src/commands/invocations/list.rs delete mode 100644 cli/src/commands/invocations/mod.rs delete mode 100644 cli/src/commands/mod.rs delete mode 100644 cli/src/commands/sql.rs delete mode 100644 cli/src/commands/state/edit.rs delete mode 100644 cli/src/commands/state/get.rs delete mode 100644 cli/src/commands/state/mod.rs delete mode 100644 cli/src/commands/state/util.rs delete mode 100644 cli/src/commands/whoami.rs delete mode 100644 cli/src/lib.rs delete mode 100644 cli/src/main.rs delete mode 100644 cli/src/ui/component_methods.rs delete mode 100644 cli/src/ui/console.rs delete mode 100644 cli/src/ui/deployments.rs delete mode 100644 cli/src/ui/invocations.rs delete mode 100644 cli/src/ui/mod.rs delete mode 100644 cli/src/ui/output.rs delete mode 100644 cli/src/ui/stylesheet.rs delete mode 100644 cli/src/ui/watcher.rs delete mode 100644 clippy.toml delete mode 100644 crates/admin/Cargo.toml delete mode 100644 crates/admin/src/error.rs delete mode 100644 crates/admin/src/lib.rs delete mode 100644 crates/admin/src/options.rs delete mode 100644 crates/admin/src/rest_api/components.rs delete mode 100644 crates/admin/src/rest_api/deployments.rs delete mode 100644 crates/admin/src/rest_api/error.rs delete mode 100644 crates/admin/src/rest_api/handlers.rs delete mode 100644 crates/admin/src/rest_api/health.rs delete mode 100644 crates/admin/src/rest_api/invocations.rs delete mode 100644 crates/admin/src/rest_api/mod.rs delete mode 100644 crates/admin/src/rest_api/subscriptions.rs delete mode 100644 crates/admin/src/service.rs delete mode 100644 crates/admin/src/state.rs delete mode 100644 crates/admin/src/storage_query/error.rs delete mode 100644 crates/admin/src/storage_query/mod.rs delete mode 100644 crates/admin/src/storage_query/query.rs delete mode 100644 crates/base64-util/Cargo.toml delete mode 100644 crates/base64-util/src/lib.rs delete mode 100644 crates/benchmarks/Cargo.toml delete mode 100644 crates/benchmarks/README.md delete mode 100644 crates/benchmarks/benches/throughput_parallel.rs delete mode 100644 crates/benchmarks/benches/throughput_sequential.rs delete mode 100644 crates/benchmarks/build.rs delete mode 100644 crates/benchmarks/proto/counter.proto delete mode 100644 crates/benchmarks/src/lib.rs delete mode 100644 crates/bifrost/Cargo.toml delete mode 100644 crates/bifrost/src/bifrost.rs delete mode 100644 crates/bifrost/src/error.rs delete mode 100644 crates/bifrost/src/lib.rs delete mode 100644 crates/bifrost/src/loglet.rs delete mode 100644 crates/bifrost/src/loglets/file_loglet.rs delete mode 100644 crates/bifrost/src/loglets/memory_loglet.rs delete mode 100644 crates/bifrost/src/loglets/mod.rs delete mode 100644 crates/bifrost/src/metadata.rs delete mode 100644 crates/bifrost/src/options.rs delete mode 100644 crates/bifrost/src/read_stream.rs delete mode 100644 crates/bifrost/src/service.rs delete mode 100644 crates/bifrost/src/types.rs delete mode 100644 crates/bifrost/src/watchdog.rs delete mode 100644 crates/cluster-controller/Cargo.toml delete mode 100644 crates/cluster-controller/src/lib.rs delete mode 100644 crates/cluster-controller/src/options.rs delete mode 100644 crates/cluster-controller/src/service.rs delete mode 100644 crates/codederror/.gitignore delete mode 100644 crates/codederror/Cargo.toml delete mode 100644 crates/codederror/README.md delete mode 100644 crates/codederror/derive/Cargo.toml delete mode 100644 crates/codederror/derive/src/ast.rs delete mode 100644 crates/codederror/derive/src/attr.rs delete mode 100644 crates/codederror/derive/src/expand.rs delete mode 100644 crates/codederror/derive/src/generics.rs delete mode 100644 crates/codederror/derive/src/lib.rs delete mode 100644 crates/codederror/derive/src/prop.rs delete mode 100644 crates/codederror/derive/src/valid.rs delete mode 100644 crates/codederror/src/lib.rs delete mode 100644 crates/codederror/tests/test.rs delete mode 100644 crates/core/Cargo.toml delete mode 100644 crates/core/src/lib.rs delete mode 100644 crates/core/src/metadata/manager.rs delete mode 100644 crates/core/src/metadata/mod.rs delete mode 100644 crates/core/src/metric_definitions.rs delete mode 100644 crates/core/src/network/error.rs delete mode 100644 crates/core/src/network/message_router.rs delete mode 100644 crates/core/src/network/mod.rs delete mode 100644 crates/core/src/network/network_sender.rs delete mode 100644 crates/core/src/task_center.rs delete mode 100644 crates/core/src/task_center_types.rs delete mode 100644 crates/core/src/test_env.rs delete mode 100644 crates/errors/Cargo.toml delete mode 100644 crates/errors/src/error_codes/META0001.md delete mode 100644 crates/errors/src/error_codes/META0002.md delete mode 100644 crates/errors/src/error_codes/META0003.md delete mode 100644 crates/errors/src/error_codes/META0004.md delete mode 100644 crates/errors/src/error_codes/META0005.md delete mode 100644 crates/errors/src/error_codes/META0006.md delete mode 100644 crates/errors/src/error_codes/META0007.md delete mode 100644 crates/errors/src/error_codes/META0008.md delete mode 100644 crates/errors/src/error_codes/META0009.md delete mode 100644 crates/errors/src/error_codes/META0010.md delete mode 100644 crates/errors/src/error_codes/META0011.md delete mode 100644 crates/errors/src/error_codes/RT0001.md delete mode 100644 crates/errors/src/error_codes/RT0002.md delete mode 100644 crates/errors/src/error_codes/RT0003.md delete mode 100644 crates/errors/src/error_codes/RT0004.md delete mode 100644 crates/errors/src/error_codes/RT0005.md delete mode 100644 crates/errors/src/error_codes/RT0006.md delete mode 100644 crates/errors/src/error_codes/RT0007.md delete mode 100644 crates/errors/src/error_codes/RT0008.md delete mode 100644 crates/errors/src/error_codes/RT0009.md delete mode 100644 crates/errors/src/fmt.rs delete mode 100644 crates/errors/src/helper.rs delete mode 100644 crates/errors/src/lib.rs delete mode 100644 crates/fs-util/Cargo.toml delete mode 100644 crates/fs-util/src/lib.rs delete mode 100644 crates/futures-util/Cargo.toml delete mode 100644 crates/futures-util/src/command.rs delete mode 100644 crates/futures-util/src/lib.rs delete mode 100644 crates/futures-util/src/pipe.rs delete mode 100644 crates/ingress-dispatcher/Cargo.toml delete mode 100644 crates/ingress-dispatcher/src/dispatcher.rs delete mode 100644 crates/ingress-dispatcher/src/error.rs delete mode 100644 crates/ingress-dispatcher/src/lib.rs delete mode 100644 crates/ingress-http/Cargo.toml delete mode 100644 crates/ingress-http/src/handler/awakeables.rs delete mode 100644 crates/ingress-http/src/handler/component_handler.rs delete mode 100644 crates/ingress-http/src/handler/error.rs delete mode 100644 crates/ingress-http/src/handler/health.rs delete mode 100644 crates/ingress-http/src/handler/mod.rs delete mode 100644 crates/ingress-http/src/handler/path_parsing.rs delete mode 100644 crates/ingress-http/src/handler/tests.rs delete mode 100644 crates/ingress-http/src/handler/tracing.rs delete mode 100644 crates/ingress-http/src/layers/load_shed.rs delete mode 100644 crates/ingress-http/src/layers/mod.rs delete mode 100644 crates/ingress-http/src/layers/tracing_context_extractor.rs delete mode 100644 crates/ingress-http/src/lib.rs delete mode 100644 crates/ingress-http/src/metric_definitions.rs delete mode 100644 crates/ingress-http/src/options.rs delete mode 100644 crates/ingress-http/src/server.rs delete mode 100644 crates/ingress-kafka/Cargo.toml delete mode 100644 crates/ingress-kafka/src/consumer_task.rs delete mode 100644 crates/ingress-kafka/src/lib.rs delete mode 100644 crates/ingress-kafka/src/options.rs delete mode 100644 crates/ingress-kafka/src/subscription_controller.rs delete mode 100644 crates/invoker-api/Cargo.toml delete mode 100644 crates/invoker-api/src/effects.rs delete mode 100644 crates/invoker-api/src/entry_enricher.rs delete mode 100644 crates/invoker-api/src/handle.rs delete mode 100644 crates/invoker-api/src/journal_reader.rs delete mode 100644 crates/invoker-api/src/lib.rs delete mode 100644 crates/invoker-api/src/state_reader.rs delete mode 100644 crates/invoker-api/src/status_handle.rs delete mode 100644 crates/invoker-impl/Cargo.toml delete mode 100644 crates/invoker-impl/src/input_command.rs delete mode 100644 crates/invoker-impl/src/invocation_state_machine.rs delete mode 100644 crates/invoker-impl/src/invocation_task.rs delete mode 100644 crates/invoker-impl/src/lib.rs delete mode 100644 crates/invoker-impl/src/metric_definitions.rs delete mode 100644 crates/invoker-impl/src/options.rs delete mode 100644 crates/invoker-impl/src/quota.rs delete mode 100644 crates/invoker-impl/src/state_machine_manager.rs delete mode 100644 crates/invoker-impl/src/status_store.rs delete mode 100644 crates/meta-rest-model/Cargo.toml delete mode 100644 crates/meta-rest-model/src/components.rs delete mode 100644 crates/meta-rest-model/src/deployments.rs delete mode 100644 crates/meta-rest-model/src/handlers.rs delete mode 100644 crates/meta-rest-model/src/lib.rs delete mode 100644 crates/meta-rest-model/src/subscriptions.rs delete mode 100644 crates/meta/Cargo.toml delete mode 100644 crates/meta/src/error.rs delete mode 100644 crates/meta/src/lib.rs delete mode 100644 crates/meta/src/service.rs delete mode 100644 crates/meta/src/storage.rs delete mode 100644 crates/network/Cargo.toml delete mode 100644 crates/network/src/connection.rs delete mode 100644 crates/network/src/connection_manager.rs delete mode 100644 crates/network/src/error.rs delete mode 100644 crates/network/src/handshake.rs delete mode 100644 crates/network/src/lib.rs delete mode 100644 crates/network/src/metric_definitions.rs delete mode 100644 crates/network/src/networking.rs delete mode 100644 crates/network/src/utils.rs delete mode 100644 crates/node-protocol/Cargo.toml delete mode 100644 crates/node-protocol/build.rs delete mode 100644 crates/node-protocol/proto/common.proto delete mode 100644 crates/node-protocol/proto/node.proto delete mode 100644 crates/node-protocol/src/codec.rs delete mode 100644 crates/node-protocol/src/common.rs delete mode 100644 crates/node-protocol/src/error.rs delete mode 100644 crates/node-protocol/src/ingress.rs delete mode 100644 crates/node-protocol/src/lib.rs delete mode 100644 crates/node-protocol/src/metadata.rs delete mode 100644 crates/node-protocol/src/node.rs delete mode 100644 crates/node-protocol/src/status.rs delete mode 100644 crates/node-services/Cargo.toml delete mode 100644 crates/node-services/build.rs delete mode 100644 crates/node-services/proto/cluster_ctrl_svc.proto delete mode 100644 crates/node-services/proto/node_svc.proto delete mode 100644 crates/node-services/src/lib.rs delete mode 100644 crates/node/Cargo.toml delete mode 100644 crates/node/src/lib.rs delete mode 100644 crates/node/src/network_server/handler/cluster_ctrl.rs delete mode 100644 crates/node/src/network_server/handler/metadata.rs delete mode 100644 crates/node/src/network_server/handler/mod.rs delete mode 100644 crates/node/src/network_server/handler/node.rs delete mode 100644 crates/node/src/network_server/metrics.rs delete mode 100644 crates/node/src/network_server/mod.rs delete mode 100644 crates/node/src/network_server/multiplex.rs delete mode 100644 crates/node/src/network_server/options.rs delete mode 100644 crates/node/src/network_server/prometheus_helpers.rs delete mode 100644 crates/node/src/network_server/service.rs delete mode 100644 crates/node/src/network_server/state.rs delete mode 100644 crates/node/src/options.rs delete mode 100644 crates/node/src/roles/admin.rs delete mode 100644 crates/node/src/roles/mod.rs delete mode 100644 crates/node/src/roles/worker.rs delete mode 100644 crates/pb/Cargo.toml delete mode 100644 crates/pb/build.rs delete mode 100644 crates/pb/proto/dev/restate/internal/events.proto delete mode 100644 crates/pb/proto/dev/restate/internal/messages.proto delete mode 100644 crates/pb/proto/dev/restate/internal/services.proto delete mode 100644 crates/pb/src/lib.rs delete mode 100644 crates/queue/Cargo.toml delete mode 100644 crates/queue/benches/queue_benchmark.rs delete mode 100644 crates/queue/src/io.rs delete mode 100644 crates/queue/src/lib.rs delete mode 100644 crates/queue/src/segmented_queue.rs delete mode 100644 crates/schema-api/Cargo.toml delete mode 100644 crates/schema-api/src/lib.rs delete mode 100644 crates/schema-impl/Cargo.toml delete mode 100644 crates/schema-impl/src/component.rs delete mode 100644 crates/schema-impl/src/deployment.rs delete mode 100644 crates/schema-impl/src/lib.rs delete mode 100644 crates/schema-impl/src/schemas_impl/component.rs delete mode 100644 crates/schema-impl/src/schemas_impl/deployment.rs delete mode 100644 crates/schema-impl/src/schemas_impl/mod.rs delete mode 100644 crates/schema-impl/src/schemas_impl/subscription.rs delete mode 100644 crates/schema-impl/src/subscriptions.rs delete mode 100644 crates/serde-util/Cargo.toml delete mode 100644 crates/serde-util/src/default.rs delete mode 100644 crates/serde-util/src/header_map.rs delete mode 100644 crates/serde-util/src/lib.rs delete mode 100644 crates/serde-util/src/proto.rs delete mode 100644 crates/service-client/Cargo.toml delete mode 100644 crates/service-client/src/http.rs delete mode 100644 crates/service-client/src/lambda.rs delete mode 100644 crates/service-client/src/lib.rs delete mode 100644 crates/service-client/src/options.rs delete mode 100644 crates/service-client/src/proxy.rs delete mode 100644 crates/service-client/src/utils.rs delete mode 100644 crates/service-protocol/Cargo.toml delete mode 100644 crates/service-protocol/README.md delete mode 100644 crates/service-protocol/build.rs delete mode 100644 crates/service-protocol/service-protocol/.gitignore delete mode 100644 crates/service-protocol/service-protocol/LICENSE delete mode 100644 crates/service-protocol/service-protocol/README.md delete mode 100644 crates/service-protocol/service-protocol/deployment_manifest_schema.json delete mode 100644 crates/service-protocol/src/awakeable_id.rs delete mode 100644 crates/service-protocol/src/codec.rs delete mode 100644 crates/service-protocol/src/discovery.rs delete mode 100644 crates/service-protocol/src/lib.rs delete mode 100644 crates/service-protocol/src/message/encoding.rs delete mode 100644 crates/service-protocol/src/message/header.rs delete mode 100644 crates/service-protocol/src/message/mod.rs delete mode 100644 crates/storage-api/Cargo.toml delete mode 100644 crates/storage-api/src/deduplication_table/mod.rs delete mode 100644 crates/storage-api/src/fsm_table/mod.rs delete mode 100644 crates/storage-api/src/inbox_table/mod.rs delete mode 100644 crates/storage-api/src/invocation_status_table/mod.rs delete mode 100644 crates/storage-api/src/journal_table/mod.rs delete mode 100644 crates/storage-api/src/lib.rs delete mode 100644 crates/storage-api/src/outbox_table/mod.rs delete mode 100644 crates/storage-api/src/service_status_table/mod.rs delete mode 100644 crates/storage-api/src/state_table/mod.rs delete mode 100644 crates/storage-api/src/timer_table/mod.rs delete mode 100644 crates/storage-proto/Cargo.toml delete mode 100644 crates/storage-proto/build.rs delete mode 100644 crates/storage-proto/proto/dev/restate/storage/v1/domain.proto delete mode 100644 crates/storage-proto/src/lib.rs delete mode 100644 crates/storage-query-datafusion/Cargo.toml delete mode 100644 crates/storage-query-datafusion/src/analyzer.rs delete mode 100644 crates/storage-query-datafusion/src/component/mod.rs delete mode 100644 crates/storage-query-datafusion/src/component/row.rs delete mode 100644 crates/storage-query-datafusion/src/component/schema.rs delete mode 100644 crates/storage-query-datafusion/src/component/table.rs delete mode 100644 crates/storage-query-datafusion/src/context.rs delete mode 100644 crates/storage-query-datafusion/src/deployment/mod.rs delete mode 100644 crates/storage-query-datafusion/src/deployment/row.rs delete mode 100644 crates/storage-query-datafusion/src/deployment/schema.rs delete mode 100644 crates/storage-query-datafusion/src/deployment/table.rs delete mode 100644 crates/storage-query-datafusion/src/generic_table.rs delete mode 100644 crates/storage-query-datafusion/src/inbox/mod.rs delete mode 100644 crates/storage-query-datafusion/src/inbox/row.rs delete mode 100644 crates/storage-query-datafusion/src/inbox/schema.rs delete mode 100644 crates/storage-query-datafusion/src/inbox/table.rs delete mode 100644 crates/storage-query-datafusion/src/invocation_state/mod.rs delete mode 100644 crates/storage-query-datafusion/src/invocation_state/row.rs delete mode 100644 crates/storage-query-datafusion/src/invocation_state/schema.rs delete mode 100644 crates/storage-query-datafusion/src/invocation_state/table.rs delete mode 100644 crates/storage-query-datafusion/src/invocation_status/mod.rs delete mode 100644 crates/storage-query-datafusion/src/invocation_status/row.rs delete mode 100644 crates/storage-query-datafusion/src/invocation_status/schema.rs delete mode 100644 crates/storage-query-datafusion/src/invocation_status/table.rs delete mode 100644 crates/storage-query-datafusion/src/journal/mod.rs delete mode 100644 crates/storage-query-datafusion/src/journal/row.rs delete mode 100644 crates/storage-query-datafusion/src/journal/schema.rs delete mode 100644 crates/storage-query-datafusion/src/journal/table.rs delete mode 100644 crates/storage-query-datafusion/src/lib.rs delete mode 100644 crates/storage-query-datafusion/src/options.rs delete mode 100644 crates/storage-query-datafusion/src/physical_optimizer.rs delete mode 100644 crates/storage-query-datafusion/src/state/mod.rs delete mode 100644 crates/storage-query-datafusion/src/state/row.rs delete mode 100644 crates/storage-query-datafusion/src/state/schema.rs delete mode 100644 crates/storage-query-datafusion/src/state/table.rs delete mode 100644 crates/storage-query-datafusion/src/table_macro.rs delete mode 100644 crates/storage-query-datafusion/src/table_util.rs delete mode 100644 crates/storage-query-datafusion/src/virtual_object_status/mod.rs delete mode 100644 crates/storage-query-datafusion/src/virtual_object_status/row.rs delete mode 100644 crates/storage-query-datafusion/src/virtual_object_status/schema.rs delete mode 100644 crates/storage-query-datafusion/src/virtual_object_status/table.rs delete mode 100644 crates/storage-query-postgres/Cargo.toml delete mode 100644 crates/storage-query-postgres/src/extended_query.rs delete mode 100644 crates/storage-query-postgres/src/lib.rs delete mode 100644 crates/storage-query-postgres/src/options.rs delete mode 100644 crates/storage-query-postgres/src/pgwire_server.rs delete mode 100644 crates/storage-query-postgres/src/service.rs delete mode 100644 crates/storage-rocksdb/Cargo.toml delete mode 100644 crates/storage-rocksdb/benches/basic_benchmark.rs delete mode 100644 crates/storage-rocksdb/src/codec.rs delete mode 100644 crates/storage-rocksdb/src/deduplication_table/mod.rs delete mode 100644 crates/storage-rocksdb/src/fsm_table/mod.rs delete mode 100644 crates/storage-rocksdb/src/inbox_table/mod.rs delete mode 100644 crates/storage-rocksdb/src/invocation_status_table/mod.rs delete mode 100644 crates/storage-rocksdb/src/journal_table/mod.rs delete mode 100644 crates/storage-rocksdb/src/keys.rs delete mode 100644 crates/storage-rocksdb/src/lib.rs delete mode 100644 crates/storage-rocksdb/src/outbox_table/mod.rs delete mode 100644 crates/storage-rocksdb/src/owned_iter.rs delete mode 100644 crates/storage-rocksdb/src/scan.rs delete mode 100644 crates/storage-rocksdb/src/service_status_table/mod.rs delete mode 100644 crates/storage-rocksdb/src/state_table/mod.rs delete mode 100644 crates/storage-rocksdb/src/timer_table/mod.rs delete mode 100644 crates/storage-rocksdb/src/writer.rs delete mode 100644 crates/storage-rocksdb/tests/inbox_table_test/mod.rs delete mode 100644 crates/storage-rocksdb/tests/integration_test.rs delete mode 100644 crates/storage-rocksdb/tests/invocation_status_table_test/mod.rs delete mode 100644 crates/storage-rocksdb/tests/journal_table_test/mod.rs delete mode 100644 crates/storage-rocksdb/tests/outbox_table_test/mod.rs delete mode 100644 crates/storage-rocksdb/tests/state_table_test/mod.rs delete mode 100644 crates/storage-rocksdb/tests/timer_table_test/mod.rs delete mode 100644 crates/storage-rocksdb/tests/virtual_object_status_table_test/mod.rs delete mode 100644 crates/test-util/Cargo.toml delete mode 100644 crates/test-util/src/lib.rs delete mode 100644 crates/test-util/src/matchers.rs delete mode 100644 crates/timer-queue/Cargo.toml delete mode 100644 crates/timer-queue/src/lib.rs delete mode 100644 crates/timer/Cargo.toml delete mode 100644 crates/timer/src/lib.rs delete mode 100644 crates/timer/src/options.rs delete mode 100644 crates/timer/src/service/clock.rs delete mode 100644 crates/timer/src/service/mod.rs delete mode 100644 crates/timer/src/service/tests.rs delete mode 100644 crates/tracing-instrumentation/Cargo.toml delete mode 100644 crates/tracing-instrumentation/src/lib.rs delete mode 100644 crates/tracing-instrumentation/src/pretty.rs delete mode 100644 crates/tracing-instrumentation/src/processor.rs delete mode 100644 crates/tracing-instrumentation/src/tracer.rs delete mode 100644 crates/types/Cargo.toml delete mode 100644 crates/types/src/base62_util.rs delete mode 100644 crates/types/src/dedup.rs delete mode 100644 crates/types/src/deployment.rs delete mode 100644 crates/types/src/errors.rs delete mode 100644 crates/types/src/id_util.rs delete mode 100644 crates/types/src/identifiers.rs delete mode 100644 crates/types/src/ingress.rs delete mode 100644 crates/types/src/invocation.rs delete mode 100644 crates/types/src/journal/enriched.rs delete mode 100644 crates/types/src/journal/entries.rs delete mode 100644 crates/types/src/journal/mod.rs delete mode 100644 crates/types/src/journal/raw.rs delete mode 100644 crates/types/src/lib.rs delete mode 100644 crates/types/src/logs.rs delete mode 100644 crates/types/src/macros.rs delete mode 100644 crates/types/src/message.rs delete mode 100644 crates/types/src/node_id.rs delete mode 100644 crates/types/src/nodes_config.rs delete mode 100644 crates/types/src/partition_table.rs delete mode 100644 crates/types/src/retries.rs delete mode 100644 crates/types/src/state_mut.rs delete mode 100644 crates/types/src/subscription.rs delete mode 100644 crates/types/src/time.rs delete mode 100644 crates/types/src/timer.rs delete mode 100644 crates/types/src/version.rs delete mode 100644 crates/wal-protocol/Cargo.toml delete mode 100644 crates/wal-protocol/src/control.rs delete mode 100644 crates/wal-protocol/src/effects.rs delete mode 100644 crates/wal-protocol/src/lib.rs delete mode 100644 crates/wal-protocol/src/timer.rs delete mode 100644 crates/worker-api/Cargo.toml delete mode 100644 crates/worker-api/src/lib.rs delete mode 100644 crates/worker/Cargo.toml delete mode 100644 crates/worker/src/invoker_integration.rs delete mode 100644 crates/worker/src/lib.rs delete mode 100644 crates/worker/src/metric_definitions.rs delete mode 100644 crates/worker/src/partition/action_effect_handler.rs delete mode 100644 crates/worker/src/partition/leadership/action_collector.rs delete mode 100644 crates/worker/src/partition/leadership/mod.rs delete mode 100644 crates/worker/src/partition/mod.rs delete mode 100644 crates/worker/src/partition/services/deterministic/awakeables.rs delete mode 100644 crates/worker/src/partition/services/deterministic/mod.rs delete mode 100644 crates/worker/src/partition/services/deterministic/proxy.rs delete mode 100644 crates/worker/src/partition/services/mod.rs delete mode 100644 crates/worker/src/partition/services/non_deterministic/idempotent_invoker.rs delete mode 100644 crates/worker/src/partition/services/non_deterministic/mod.rs delete mode 100644 crates/worker/src/partition/shuffle.rs delete mode 100644 crates/worker/src/partition/state_machine/actions.rs delete mode 100644 crates/worker/src/partition/state_machine/command_interpreter/mod.rs delete mode 100644 crates/worker/src/partition/state_machine/command_interpreter/tests.rs delete mode 100644 crates/worker/src/partition/state_machine/effect_interpreter.rs delete mode 100644 crates/worker/src/partition/state_machine/effects.rs delete mode 100644 crates/worker/src/partition/state_machine/mod.rs delete mode 100644 crates/worker/src/partition/storage/invoker.rs delete mode 100644 crates/worker/src/partition/storage/mod.rs delete mode 100644 crates/worker/src/partition/types.rs delete mode 100644 crates/worker/src/subscription_integration.rs delete mode 100644 deny.toml create mode 100644 deployment_manifest_schema.json rename {crates/service-protocol/service-protocol/dev => dev}/restate/service/protocol.proto (88%) delete mode 100644 docker/Dockerfile delete mode 100644 docs/dev/README.md delete mode 100644 docs/dev/debug.md delete mode 100644 docs/dev/development-guidelines.md delete mode 100644 docs/dev/local-development.md delete mode 100644 docs/dev/release.md delete mode 100644 docs/dev/rust-guidelines.md delete mode 100644 justfile delete mode 100644 npm/.gitignore delete mode 100644 npm/package.json.tmpl delete mode 100644 npm/restate-server/package.json delete mode 100644 npm/restate-server/src/index.ts delete mode 100644 npm/restate-server/tsconfig.json delete mode 100644 npm/restate/package.json delete mode 100644 npm/restate/src/index.ts delete mode 100644 npm/restate/tsconfig.json delete mode 100644 rust-toolchain.toml delete mode 100644 server/Cargo.toml delete mode 100644 server/build.rs delete mode 100644 server/src/build_info.rs delete mode 100644 server/src/config.rs delete mode 100644 server/src/future_util.rs delete mode 100644 server/src/lib.rs delete mode 100644 server/src/main.rs delete mode 100644 server/src/rt.rs delete mode 100644 server/src/signal.rs rename crates/service-protocol/service-protocol/service-invocation-protocol.md => service-invocation-protocol.md (100%) delete mode 100755 tools/scripts/check-license-headers delete mode 100644 tools/service-protocol-wireshark-dissector/.cargo/config delete mode 100644 tools/service-protocol-wireshark-dissector/Cargo.toml delete mode 100644 tools/service-protocol-wireshark-dissector/README.md delete mode 100644 tools/service-protocol-wireshark-dissector/dissector.lua delete mode 100644 tools/service-protocol-wireshark-dissector/src/lib.rs delete mode 100644 tools/xtask/Cargo.toml delete mode 100644 tools/xtask/src/main.rs diff --git a/.cargo/config.toml b/.cargo/config.toml deleted file mode 100644 index 9e05e77c2..000000000 --- a/.cargo/config.toml +++ /dev/null @@ -1,38 +0,0 @@ -[alias] -xtask = "run --package xtask --" - -[build] -rustflags = [ - "-C", "force-unwind-tables", # Include full unwind tables when aborting on panic - "-C" , "debug-assertions", # Enable debug assertions in release builds to have more safeguards in place - "--cfg", "uuid_unstable", # Enable unstable Uuid - "--cfg", "tokio_unstable", # Enable unstable tokio -] - -[target.aarch64-unknown-linux-gnu] -rustflags = [ - "-C", "force-unwind-tables", # Include full unwind tables when aborting on panic - "-C" , "debug-assertions", # Enable debug assertions in release builds to have more safeguards in place - "--cfg", "uuid_unstable", # Enable unstable Uuid - "--cfg", "tokio_unstable", # Enable unstable tokio - "-C" , "force-frame-pointers=yes", # Enable frame pointers to support Parca (https://github.com/parca-dev/parca-agent/pull/1805) -] - -[target.x86_64-unknown-linux-musl] -rustflags = [ - "-C", "force-unwind-tables", # Include full unwind tables when aborting on panic - "-C" , "debug-assertions", # Enable debug assertions in release builds to have more safeguards in place - "--cfg", "uuid_unstable", # Enable unstable Uuid - "--cfg", "tokio_unstable", # Enable unstable tokio - "-C", "link-self-contained=yes", # Link statically -] - -[target.aarch64-unknown-linux-musl] -rustflags = [ - "-C", "force-unwind-tables", # Include full unwind tables when aborting on panic - "-C" , "debug-assertions", # Enable debug assertions in release builds to have more safeguards in place - "--cfg", "uuid_unstable", # Enable unstable Uuid - "--cfg", "tokio_unstable", # Enable unstable tokio - "-C", "force-frame-pointers=yes", # Enable frame pointers to support Parca (https://github.com/parca-dev/parca-agent/pull/1805) - "-C", "link-self-contained=yes", # Link statically -] diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 5b4525011..000000000 --- a/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -**/.idea -docker/Dockerfile -**/target -target -restate.tar -charts diff --git a/.github/actions/clean-runner/action.yml b/.github/actions/clean-runner/action.yml deleted file mode 100644 index d82965474..000000000 --- a/.github/actions/clean-runner/action.yml +++ /dev/null @@ -1,14 +0,0 @@ -name: "Clean runner" -description: "Cleans the GA runner by removing unnecessary software" -runs: - using: "composite" - steps: - - name: Remove unnecessary software - run: | - # .Net - sudo rm -rf /usr/share/dotnet - # Android - sudo rm -rf /usr/local/lib/android - # Haskell - sudo rm -rf /usr/local/.ghcup - shell: bash diff --git a/.github/actions/install-protoc/action.yml b/.github/actions/install-protoc/action.yml deleted file mode 100644 index f3ae9a9a5..000000000 --- a/.github/actions/install-protoc/action.yml +++ /dev/null @@ -1,32 +0,0 @@ -name: "Install protoc" -description: "Installs protoc for the given os" -inputs: - protoc-version: - description: "protoc version" - required: false - default: "21.12" -runs: - using: "composite" - steps: - - name: Install protoc for ${{ runner.os }} - env: - LINK: https://github.com/protocolbuffers/protobuf/releases/download - PROTOC_VERSION: ${{ inputs.protoc-version }} - run: | - if [ "$RUNNER_OS" == "Linux" ]; then - PROTOC_ZIP=protoc-$PROTOC_VERSION-linux-x86_64.zip - elif [ "$RUNNER_OS" == "macOS" ]; then - PROTOC_ZIP=protoc-$PROTOC_VERSION-osx-x86_64.zip - else - echo "$RUNNER_OS not supported" - exit 1 - fi - curl -OL $LINK/v$PROTOC_VERSION/$PROTOC_ZIP - unzip -o $PROTOC_ZIP -d $HOME/.local bin/protoc - unzip -o $PROTOC_ZIP -d $HOME/.local 'include/*' - rm -f $PROTOC_ZIP - echo "$HOME/.local" >> $GITHUB_PATH - chmod +x $HOME/.local/bin/protoc - echo "PROTOC=$HOME/.local/bin/protoc" >> $GITHUB_ENV - echo "PROTOC_INCLUDE=$HOME/.local/include" >> $GITHUB_ENV - shell: bash diff --git a/.github/workflows/binaries.yml b/.github/workflows/binaries.yml deleted file mode 100644 index f87117420..000000000 --- a/.github/workflows/binaries.yml +++ /dev/null @@ -1,129 +0,0 @@ -name: Build binaries - -on: - workflow_call: - inputs: - ref: - description: 'ref to build eg v0.5.1' - required: false - type: string - npmVersion: - description: 'if provided, also push npm packages with this version' - default: '' - required: false - type: string - workflow_dispatch: - inputs: - ref: - description: 'ref to build eg v0.5.1' - required: false - type: string - npmVersion: - description: 'if provided, also push npm packages with this version' - default: '' - required: false - type: string - -jobs: - build: - permissions: - contents: read - packages: read - runs-on: ${{ matrix.build.os }} - strategy: - matrix: - build: - - target: aarch64-apple-darwin - os: macos-latest - - target: x86_64-apple-darwin - os: macos-latest - - target: x86_64-unknown-linux-musl - os: ubuntu-latest - - target: aarch64-unknown-linux-musl - os: ubuntu-latest - env: - RUST_BACKTRACE: full - RUSTC_WRAPPER: "sccache" - SCCACHE_GHA_ENABLED: "true" - steps: - - uses: actions/checkout@v3 - with: - ref: ${{ inputs.ref }} - - - uses: ./.github/actions/clean-runner - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - # need to provide a toolchain version because this action cannot read rust-toolchain.toml. See https://github.com/actions-rs/toolchain/issues/126 - # note, however, that this does not just install stable but also whatever is in rust-toolchain.toml, which is what we will use - toolchain: stable - - # necessary because the toolchain@v1 action would install this target for stable only, whereas this command respects rust-toolchain.toml - - name: Install aarch64-apple-darwin Rust toolchain - if: ${{ matrix.build.target == 'aarch64-apple-darwin' }} - run: rustup target add aarch64-apple-darwin - - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.3 - - - name: Cache Rust - uses: Swatinem/rust-cache@v2 - - - name: Install cargo-license - run: cargo install cargo-license - - - name: Install protoc - if: ${{ matrix.build.os == 'macos-latest' }} # installed in cross docker image in linux builds - uses: ./.github/actions/install-protoc - - - name: Setup just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Generate notice - run: just notice-file - - - name: Compile Mac binaries - if: ${{ matrix.build.os == 'macos-latest' }} - env: - MACOSX_DEPLOYMENT_TARGET: 10.14.0 - run: cargo build --release --bins --target ${{ matrix.build.target }} - - - name: Compile Linux binaries - if: ${{ matrix.build.os == 'ubuntu-latest' }} - uses: addnab/docker-run-action@v3 - with: - image: ghcr.io/restatedev/dev-tools:latest - options: -v ${{ github.workspace }}:/workspace -w /workspace -e ACTIONS_CACHE_URL -e ACTIONS_RUNTIME_TOKEN -e SCCACHE_GHA_ENABLED - run: | - cargo build --release --bins --target ${{ matrix.build.target }} - - - name: Sign binaries - if: ${{ matrix.build.os == 'macos-latest' }} - run: | - codesign -s - target/${{ matrix.build.target }}/release/restate-server - codesign -s - target/${{ matrix.build.target }}/release/restate - - - name: Move binary - run: cp target/${{ matrix.build.target }}/release/restate-server target/${{ matrix.build.target }}/release/restate . - - - name: Create tar - run: tar -cvzf restate.${{ matrix.build.target }}.tar.gz LICENSE NOTICE restate-server restate - - - uses: actions/upload-artifact@v3 - with: - name: restate.${{ matrix.build.target }}.tar.gz - path: restate.${{ matrix.build.target }}.tar.gz - retention-days: 1 - if-no-files-found: error - - publish-npm: - name: Publish to NPM - if: ${{ inputs.npmVersion != '' }} - needs: [ build ] - uses: ./.github/workflows/npm.yml - secrets: inherit - with: - version: ${{ inputs.npmVersion }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml deleted file mode 100644 index 423c706d5..000000000 --- a/.github/workflows/ci.yml +++ /dev/null @@ -1,85 +0,0 @@ -name: CI - -on: - pull_request: - workflow_call: - workflow_dispatch: - push: - branches: - - main - -jobs: - lint-build-and-test: - name: Lint, build and test (${{ matrix.os }}) - runs-on: ${{ matrix.os }} - permissions: - contents: read - packages: read - timeout-minutes: 45 - strategy: - fail-fast: false - matrix: - #os: [ubuntu-22.04, macos-latest] # 1 macos-latest minute counts as 10 minutes --> quite expensive :-( - os: [ubuntu-22.04] - env: - RUST_BACKTRACE: full - SCCACHE_GHA_ENABLED: "true" - RUSTC_WRAPPER: "sccache" - steps: - - uses: actions/checkout@v3 - - - uses: ./.github/actions/clean-runner - - - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 - with: - # need to provide a toolchain version because this action cannot read rust-toolchain.toml. See https://github.com/actions-rs/toolchain/issues/126 - toolchain: stable - - - name: Install protoc - uses: ./.github/actions/install-protoc - - - name: Setup just - uses: extractions/setup-just@v1 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.3 - - - name: Cache Rust - uses: Swatinem/rust-cache@v2 - - - name: Check license headers - run: just check-license-headers - - - name: Run fmt - run: just check-fmt - - - name: Run clippy - run: just clippy - - - name: Run tests - run: just test - - docker: - name: Create docker image - uses: ./.github/workflows/docker.yml - with: - uploadImageAsTarball: true - platforms: linux/amd64 - - e2e: - name: Run e2e tests - permissions: - contents: read - issues: read - checks: write - pull-requests: write - actions: read - secrets: inherit - needs: docker - uses: restatedev/e2e/.github/workflows/e2e.yaml@main - with: - restateCommit: ${{ github.event.pull_request.head.sha || github.sha }} - e2eRef: main diff --git a/.github/workflows/deps.yml b/.github/workflows/deps.yml deleted file mode 100644 index a6a0ea0cb..000000000 --- a/.github/workflows/deps.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Check dependencies - -permissions: - contents: read - -on: - workflow_dispatch: - pull_request: - paths: - - justfile - - Cargo.lock - - Cargo.toml - - deny.toml - - .github/workflows/deps.yml - -jobs: - advisories: - timeout-minutes: 10 - runs-on: ubuntu-latest - continue-on-error: true - steps: - - uses: actions/checkout@v3 - - uses: EmbarkStudios/cargo-deny-action@v1 - with: - command: check advisories - - bans: - timeout-minutes: 10 - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: EmbarkStudios/cargo-deny-action@v1 - with: - command: check bans licenses sources \ No newline at end of file diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml deleted file mode 100644 index 96126edab..000000000 --- a/.github/workflows/docker.yml +++ /dev/null @@ -1,152 +0,0 @@ -name: Build Docker image - -on: - workflow_call: - inputs: - uploadImageAsTarball: - description: 'uploads the Docker image additionally as a tarball' - required: false - default: false - type: boolean - platforms: - description: 'platforms for docker build step' - required: false - default: '' - type: string - debug: - description: 'include debug symbols in built image' - required: false - default: false - type: boolean - pushToDockerHub: - description: 'push image to DockerHub' - required: false - default: false - type: boolean - - workflow_dispatch: - inputs: - debug: - description: 'include debug symbols in built image' - required: false - default: false - type: boolean - pushToDockerHub: - description: 'push image to DockerHub' - required: false - default: false - type: boolean - -env: - REPOSITORY_OWNER: ${{ github.repository_owner }} - GHCR_REGISTRY: 'ghcr.io' - GHCR_REGISTRY_USERNAME: ${{ github.actor }} - GHCR_REGISTRY_TOKEN: ${{ secrets.GITHUB_TOKEN }} - -jobs: - build-and-push-image: - runs-on: ubuntu-latest - timeout-minutes: ${{ inputs.debug && 140 || 70 }} - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - # Setup caching - - name: Set up QEMU dependency - uses: docker/setup-qemu-action@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v2 - - - name: Run sccache-cache - uses: mozilla-actions/sccache-action@v0.0.3 - - - name: Log into GitHub container registry - uses: docker/login-action@v2 - with: - registry: ${{ env.GHCR_REGISTRY }} - username: ${{ env.GHCR_REGISTRY_USERNAME }} - password: ${{ env.GHCR_REGISTRY_TOKEN }} - - - name: Log into DockerHub - if: ${{ inputs.pushToDockerHub }} - uses: docker/login-action@v2 - with: - username: ${{ secrets.DOCKER_USERNAME }} - password: ${{ secrets.DOCKER_PASSWORD }} - - - name: Extract image name - # Set repository name as image name - run: | - echo "IMAGE_NAME=${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}" >> $GITHUB_ENV - - - name: Extract metadata (tags, labels) for Docker - id: meta - uses: docker/metadata-action@v5 - with: - images: | - ${{ env.GHCR_REGISTRY }}/${{ env.REPOSITORY_OWNER }}/${{ env.IMAGE_NAME }} - ${{ inputs.pushToDockerHub && format('docker.io/{0}/{1}', env.REPOSITORY_OWNER, env.IMAGE_NAME) || '' }} - - flavor: | - ${{ inputs.debug && 'prefix=debug-,onlatest=true' || '' }} - tags: | - type=ref,event=branch - type=semver,pattern={{version}} - type=semver,pattern={{major}}.{{minor}} - - - name: Build${{inputs.uploadImageAsTarball != true && ' and push ' || ' '}}Docker image - id: build - uses: docker/build-push-action@v3 - with: - context: . - file: "docker/Dockerfile" - push: ${{ inputs.uploadImageAsTarball != true }} - tags: ${{ steps.meta.outputs.tags }} - load: ${{ inputs.uploadImageAsTarball == true }} - labels: ${{ steps.meta.outputs.labels }} - platforms: ${{ inputs.platforms || 'linux/arm64,linux/amd64' }} - build-args: | - CARGO_PROFILE_RELEASE_DEBUG=${{ inputs.debug }} - ACTIONS_CACHE_URL - ACTIONS_RUNTIME_TOKEN - SCCACHE_GHA_ENABLED=true - cache-from: type=gha,scope=${{ github.workflow }} - cache-to: type=gha,mode=max,scope=${{ github.workflow }} - - - name: Save docker image as tar - if: ${{ inputs.uploadImageAsTarball }} - run: | - docker save -o restate.tar ${{ steps.build.outputs.imageid }} - - - name: Upload docker image tar as artifact - if: ${{ inputs.uploadImageAsTarball }} - uses: actions/upload-artifact@v3 - with: - name: restate.tar - path: restate.tar - retention-days: 1 - if-no-files-found: error - - # Even if uploadImageAsTarball, push main images - # This won't actually build again, it'll just use cache - - name: Push Docker image - if: ${{ inputs.uploadImageAsTarball && github.ref == 'refs/heads/main' }} - uses: docker/build-push-action@v3 - with: - context: . - file: "docker/Dockerfile" - push: true - tags: ${{ steps.meta.outputs.tags }} - load: false - labels: ${{ steps.meta.outputs.labels }} - # ignore inputs.platforms as we always need to push both arm64 and amd64 docker images - platforms: 'linux/arm64,linux/amd64' - build-args: | - CARGO_PROFILE_RELEASE_DEBUG=${{ inputs.debug }} - ACTIONS_CACHE_URL - ACTIONS_RUNTIME_TOKEN - SCCACHE_GHA_ENABLED=true - cache-from: type=gha,scope=${{ github.workflow }} - cache-to: type=gha,mode=max,scope=${{ github.workflow }} diff --git a/.github/workflows/helm.yml b/.github/workflows/helm.yml deleted file mode 100644 index ff4c4c337..000000000 --- a/.github/workflows/helm.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Release helm chart - -on: - workflow_call: - inputs: - ref: - description: 'ref to build eg v0.8.0' - required: false - type: string - version: - description: 'push helm chart with this version, eg v0.8.0' - type: string - workflow_dispatch: - inputs: - ref: - description: 'ref to build eg v0.8.0' - required: false - type: string - version: - description: 'push helm chart with this version, eg v0.8.0' - type: string - -jobs: - release-helm-chart: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - ref: ${{ inputs.ref }} - - name: Write release version - id: version - run: | - VERSION=${{ inputs.version }} - echo Version: ${VERSION#v} - echo "VERSION=${VERSION#v}" >> "$GITHUB_OUTPUT" - - name: Check helm versions - run: | - grep -qF 'version: "${{ steps.version.outputs.VERSION }}"' charts/restate-helm/Chart.yaml - - name: Push helm chart - uses: appany/helm-oci-chart-releaser@v0.3.0 - with: - name: restate-helm - repository: restatedev - tag: ${{ steps.version.outputs.VERSION }} - registry: ghcr.io - registry_username: ${{ github.actor }} - registry_password: ${{ secrets.GITHUB_TOKEN }} diff --git a/crates/service-protocol/service-protocol/.github/workflows/lint.yaml b/.github/workflows/lint.yaml similarity index 100% rename from crates/service-protocol/service-protocol/.github/workflows/lint.yaml rename to .github/workflows/lint.yaml diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml deleted file mode 100644 index ab7ca9a9b..000000000 --- a/.github/workflows/npm.yml +++ /dev/null @@ -1,126 +0,0 @@ -name: Publish npm binary packages - -on: - workflow_call: - inputs: - version: - description: 'version to label npm packages' - required: true - type: string - -jobs: - publish-npm-binaries: - permissions: - contents: read - packages: read - runs-on: ubuntu-latest - strategy: - matrix: - build: - - target: aarch64-apple-darwin - node_arch: arm64 - node_os: darwin - - target: x86_64-apple-darwin - node_arch: x64 - node_os: darwin - - target: x86_64-unknown-linux-musl - node_arch: x64 - node_os: linux - - target: aarch64-unknown-linux-musl - node_arch: arm64 - node_os: linux - steps: - - name: Checkout - uses: actions/checkout@v3 - - - uses: actions/setup-node@v3 - with: - node-version: "18.x" - registry-url: 'https://registry.npmjs.org' - - - name: Download binary build from in-progress workflow - uses: actions/download-artifact@v3 - with: - name: restate.${{ matrix.build.target }}.tar.gz - - - name: Extract binaries - run: tar -xvzf restate.${{ matrix.build.target }}.tar.gz - - - name: Publish to NPM - shell: bash - run: | - cd npm - for bin in restate restate-server - do - export node_os="${{ matrix.build.node_os }}" - export node_os - node_arch="${{ matrix.build.node_arch }}" - export node_arch - # set the version - node_version="${{ inputs.version }}" - node_version="${node_version#v}" - export node_version - # set the package name - export node_pkg="${bin}-${node_os}-${node_arch}" - if npm view "@restatedev/${node_pkg}@${node_version}" - then - continue - fi - # create the package directory - mkdir -p "${node_pkg}/bin" - # generate package.json from the template - envsubst < package.json.tmpl > "${node_pkg}/package.json" - # copy the binary into the package - cp "../${bin}" "${node_pkg}/bin" - cp ../NOTICE "${node_pkg}" - cp ../LICENSE "${node_pkg}" - cp ../README.md "${node_pkg}" - # publish the package - pushd "${node_pkg}" - npm publish --access public - popd - done - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} - - publish-npm-base: - needs: publish-npm-binaries - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - uses: actions/setup-node@v3 - with: - node-version: "18.x" - registry-url: 'https://registry.npmjs.org' - - - name: Publish to npm - shell: bash - run: | - node_version="${{ inputs.version }}" - node_version="${node_version#v}" - cd npm - for bin in restate restate-server - do - if npm view "@restatedev/${bin}@${node_version}" - then - continue - fi - pushd "${bin}" - sed -i "s/\"version\": \".*\",/\"version\": \"${node_version}\",/" package.json - for os in linux darwin - do - for arch in x64 arm64 - do - sed -i "s|\"@restatedev/${bin}-${os}-${arch}\": \".*\"|\"@restatedev/${bin}-${os}-${arch}\": \"${node_version}\"|" package.json - done - done - curl https://raw.githubusercontent.com/restatedev/restate/main/README.md -o README.md - npm install - npm run build - npm publish --access public - popd - done - env: - NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }} diff --git a/.github/workflows/postrelease.yml b/.github/workflows/postrelease.yml deleted file mode 100644 index 1cdd5d16c..000000000 --- a/.github/workflows/postrelease.yml +++ /dev/null @@ -1,12 +0,0 @@ -name: Process new release - -on: - release: - types: [released] # don't run on draft releases or pre-releases - -jobs: - update-tap: - permissions: - contents: write - secrets: inherit - uses: restatedev/homebrew-tap/.github/workflows/update.yml@main diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml deleted file mode 100644 index f34d7422f..000000000 --- a/.github/workflows/release.yml +++ /dev/null @@ -1,101 +0,0 @@ -name: Create new release - -on: - push: - tags: - - v** - -jobs: - verify-version: - name: Verify version - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Install dasel - run: | - wget -q https://github.com/TomWright/dasel/releases/download/v2.3.1/dasel_linux_amd64 && \ - mv dasel_linux_amd64 dasel && \ - chmod +x dasel && \ - ./dasel --version - - - name: Verify version - run: | - # write yaml to remove quotes - version=$(./dasel --file Cargo.toml --read toml 'workspace.package.version' --write yaml) - tag_version=${{ github.ref_name }} - tag_version=${tag_version#v} - if [ ${tag_version} != ${version} ]; then - echo "::error file=release.yml,line=28::Cargo.toml version '${version}' is not equal to tag version '${tag_version}'. Please align them." - exit 1; - fi - - run-tests: - name: Test release - needs: [ verify-version ] - uses: ./.github/workflows/ci.yml - secrets: inherit - - build-docker-image: - name: Build release Docker image - needs: [ run-tests ] - uses: ./.github/workflows/docker.yml - secrets: inherit - with: - pushToDockerHub: true - - release-helm: - name: Release helm chart - needs: [ build-docker-image ] - uses: ./.github/workflows/helm.yml - secrets: inherit - with: - version: ${{ github.ref_name }} - - build-binaries: - name: Build binaries - needs: [ run-tests ] - uses: ./.github/workflows/binaries.yml - secrets: inherit - with: - npmVersion: ${{ github.ref_name }} - - create-release: - name: Create release - runs-on: ubuntu-latest - needs: [ build-docker-image, build-binaries ] - - steps: - - name: Download aarch64-apple-darwin binaries - uses: actions/download-artifact@v3 - with: - name: restate.aarch64-apple-darwin.tar.gz - - - name: Download x86_64-apple-darwin binaries - uses: actions/download-artifact@v3 - with: - name: restate.x86_64-apple-darwin.tar.gz - - - name: Download x86_64-unknown-linux-musl binaries - uses: actions/download-artifact@v3 - with: - name: restate.x86_64-unknown-linux-musl.tar.gz - - - name: Download aarch64-unknown-linux-musl binaries - uses: actions/download-artifact@v3 - with: - name: restate.aarch64-unknown-linux-musl.tar.gz - - - name: Create release - uses: softprops/action-gh-release@v1 - with: - # create a draft release which needs manual approval - draft: true - files: | - restate.aarch64-apple-darwin.tar.gz - restate.x86_64-apple-darwin.tar.gz - restate.x86_64-unknown-linux-musl.tar.gz - restate.aarch64-unknown-linux-musl.tar.gz - diff --git a/.gitignore b/.gitignore index d65bf57ae..29b636a48 100644 --- a/.gitignore +++ b/.gitignore @@ -1,16 +1,2 @@ -# Generated by Cargo -# will have compiled files and executables -/target/ - -# These are backup files generated by rustfmt -**/*.rs.bk - -# Added by cargo - -**/target - -**/.idea - -# Tracing files -**/*.trace -**/flamegraph.svg +.idea +*.iml \ No newline at end of file diff --git a/.ignore b/.ignore deleted file mode 120000 index 3e4e48b0b..000000000 --- a/.ignore +++ /dev/null @@ -1 +0,0 @@ -.gitignore \ No newline at end of file diff --git a/crates/service-protocol/service-protocol/.prettierrc.toml b/.prettierrc.toml similarity index 100% rename from crates/service-protocol/service-protocol/.prettierrc.toml rename to .prettierrc.toml diff --git a/crates/service-protocol/service-protocol/.protolint.yaml b/.protolint.yaml similarity index 100% rename from crates/service-protocol/service-protocol/.protolint.yaml rename to .protolint.yaml diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index dae73b0df..000000000 --- a/Cargo.lock +++ /dev/null @@ -1,7881 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "addr2line" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" -dependencies = [ - "gimli", -] - -[[package]] -name = "adler" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" - -[[package]] -name = "aes" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b169f7a6d4742236a0a00c541b845991d0ac43e546831af1249753ab4c3aa3a0" -dependencies = [ - "cfg-if", - "cipher", - "cpufeatures", -] - -[[package]] -name = "ahash" -version = "0.8.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77c3a9648d43b9cd48db467b3f87fdd6e146bcc88ab0180006cef2179fe11d01" -dependencies = [ - "cfg-if", - "const-random", - "getrandom", - "once_cell", - "version_check", - "zerocopy", -] - -[[package]] -name = "aho-corasick" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b2969dcb958b36655471fc61f7e416fa76033bdd4bfed0678d8fee1e2d07a1f0" -dependencies = [ - "memchr", -] - -[[package]] -name = "alloc-no-stdlib" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cc7bb162ec39d46ab1ca8c77bf72e890535becd1751bb45f64c597edb4c8c6b3" - -[[package]] -name = "alloc-stdlib" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94fb8275041c72129eb51b7d0322c29b8387a0386127718b096429201a5d6ece" -dependencies = [ - "alloc-no-stdlib", -] - -[[package]] -name = "allocator-api2" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" - -[[package]] -name = "android-tzdata" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" - -[[package]] -name = "android_system_properties" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" -dependencies = [ - "libc", -] - -[[package]] -name = "anes" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299" - -[[package]] -name = "anstream" -version = "0.6.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" -dependencies = [ - "anstyle", - "anstyle-parse", - "anstyle-query", - "anstyle-wincon", - "colorchoice", - "utf8parse", -] - -[[package]] -name = "anstyle" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" - -[[package]] -name = "anstyle-parse" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" -dependencies = [ - "utf8parse", -] - -[[package]] -name = "anstyle-query" -version = "1.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "anstyle-wincon" -version = "3.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" -dependencies = [ - "anstyle", - "windows-sys 0.52.0", -] - -[[package]] -name = "anyhow" -version = "1.0.80" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ad32ce52e4161730f7098c077cd2ed6229b5804ccf99e5366be1ab72a98b4e1" - -[[package]] -name = "arc-swap" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b3d0060af21e8d11a926981cc00c6c1541aa91dd64b9f881985c3da1094425f" - -[[package]] -name = "arrayref" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b4930d2cb77ce62f89ee5d5289b4ac049559b1c45539271f5ed4fdc7db34545" - -[[package]] -name = "arrayvec" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" - -[[package]] -name = "arrow" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "aa285343fba4d829d49985bdc541e3789cf6000ed0e84be7c039438df4a4e78c" -dependencies = [ - "arrow-arith", - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-csv", - "arrow-data", - "arrow-ipc", - "arrow-json", - "arrow-ord", - "arrow-row", - "arrow-schema", - "arrow-select", - "arrow-string", -] - -[[package]] -name = "arrow-arith" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "753abd0a5290c1bcade7c6623a556f7d1659c5f4148b140b5b63ce7bd1a45705" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "half", - "num", -] - -[[package]] -name = "arrow-array" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d390feeb7f21b78ec997a4081a025baef1e2e0d6069e181939b61864c9779609" -dependencies = [ - "ahash", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "chrono", - "chrono-tz", - "half", - "hashbrown 0.14.3", - "num", -] - -[[package]] -name = "arrow-buffer" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "69615b061701bcdffbc62756bc7e85c827d5290b472b580c972ebbbf690f5aa4" -dependencies = [ - "bytes", - "half", - "num", -] - -[[package]] -name = "arrow-cast" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e448e5dd2f4113bf5b74a1f26531708f5edcacc77335b7066f9398f4bcf4cdef" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", - "base64 0.21.7", - "chrono", - "comfy-table", - "half", - "lexical-core", - "num", -] - -[[package]] -name = "arrow-csv" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46af72211f0712612f5b18325530b9ad1bfbdc87290d5fbfd32a7da128983781" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-data", - "arrow-schema", - "chrono", - "csv", - "csv-core", - "lazy_static", - "lexical-core", - "regex", -] - -[[package]] -name = "arrow-data" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67d644b91a162f3ad3135ce1184d0a31c28b816a581e08f29e8e9277a574c64e" -dependencies = [ - "arrow-buffer", - "arrow-schema", - "half", - "num", -] - -[[package]] -name = "arrow-flight" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d7f215461ad6346f2e4cc853e377d4e076d533e1ed78d327debe83023e3601f" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-ipc", - "arrow-schema", - "base64 0.21.7", - "bytes", - "futures", - "paste", - "prost 0.12.3", - "tokio", - "tonic 0.10.2", -] - -[[package]] -name = "arrow-ipc" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "03dea5e79b48de6c2e04f03f62b0afea7105be7b77d134f6c5414868feefb80d" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-data", - "arrow-schema", - "flatbuffers", - "lz4_flex", -] - -[[package]] -name = "arrow-json" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8950719280397a47d37ac01492e3506a8a724b3fb81001900b866637a829ee0f" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-data", - "arrow-schema", - "chrono", - "half", - "indexmap 2.2.5", - "lexical-core", - "num", - "serde", - "serde_json", -] - -[[package]] -name = "arrow-ord" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ed9630979034077982d8e74a942b7ac228f33dd93a93b615b4d02ad60c260be" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", - "half", - "num", -] - -[[package]] -name = "arrow-row" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "007035e17ae09c4e8993e4cb8b5b96edf0afb927cd38e2dff27189b274d83dcf" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "half", - "hashbrown 0.14.3", -] - -[[package]] -name = "arrow-schema" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ff3e9c01f7cd169379d269f926892d0e622a704960350d09d331be3ec9e0029" - -[[package]] -name = "arrow-select" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1ce20973c1912de6514348e064829e50947e35977bb9d7fb637dc99ea9ffd78c" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "num", -] - -[[package]] -name = "arrow-string" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "00f3b37f2aeece31a2636d1b037dabb69ef590e03bdc7eb68519b51ec86932a7" -dependencies = [ - "arrow-array", - "arrow-buffer", - "arrow-data", - "arrow-schema", - "arrow-select", - "num", - "regex", - "regex-syntax 0.8.2", -] - -[[package]] -name = "assert2" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "844ca3172d927ddd9d01f63b6c80f4ebd3e01c3f787c204626635450dfe3edba" -dependencies = [ - "assert2-macros", - "diff", - "is-terminal", - "yansi 0.5.1", -] - -[[package]] -name = "assert2-macros" -version = "0.3.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ec0e42bd0fe1c8d72c7bde53ac8686764cea0fd86f412b92fcad20fea08b489" -dependencies = [ - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "async-channel" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f28243a43d821d11341ab73c80bed182dc015c514b951616cf79bd4af39af0c3" -dependencies = [ - "concurrent-queue", - "event-listener", - "event-listener-strategy", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-compression" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a116f46a969224200a0a97f29cfd4c50e7534e4b4826bd23ea2c3c533039c82c" -dependencies = [ - "bzip2", - "flate2", - "futures-core", - "futures-io", - "memchr", - "pin-project-lite", - "tokio", - "xz2", - "zstd 0.13.0", - "zstd-safe 7.0.0", -] - -[[package]] -name = "async-stream" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" -dependencies = [ - "async-stream-impl", - "futures-core", - "pin-project-lite", -] - -[[package]] -name = "async-stream-impl" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "async-trait" -version = "0.1.77" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c980ee35e870bd1a4d2c8294d4c04d0499e67bca1e4b5cefcc693c2fa00caea9" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "atomic" -version = "0.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59bdb34bc650a32731b31bd8f0829cc15d24a708ee31559e0bb34f2bc320cba" - -[[package]] -name = "atomic" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d818003e740b63afc82337e3160717f4f63078720a810b7b903e70a5d1d2994" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "autocfg" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d468802bab17cbc0cc575e9b053f41e72aa36bfa6b7f55e3529ffa43161b97fa" - -[[package]] -name = "aws-config" -version = "1.1.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-sdk-sso", - "aws-sdk-ssooidc", - "aws-sdk-sts", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "hex", - "http 0.2.12", - "hyper 0.14.28", - "ring 0.17.8", - "time", - "tokio", - "tracing", - "zeroize", -] - -[[package]] -name = "aws-credential-types" -version = "1.1.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "zeroize", -] - -[[package]] -name = "aws-runtime" -version = "1.1.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-credential-types", - "aws-sigv4", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "fastrand", - "http 0.2.12", - "http-body 0.4.6", - "percent-encoding", - "pin-project-lite", - "tracing", - "uuid", -] - -[[package]] -name = "aws-sdk-lambda" -version = "1.13.0" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "http 0.2.12", - "once_cell", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sdk-sso" -version = "1.13.0" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "http 0.2.12", - "once_cell", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sdk-ssooidc" -version = "1.13.0" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-types", - "bytes", - "http 0.2.12", - "once_cell", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sdk-sts" -version = "1.13.0" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-credential-types", - "aws-runtime", - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-json", - "aws-smithy-query", - "aws-smithy-runtime", - "aws-smithy-runtime-api", - "aws-smithy-types", - "aws-smithy-xml", - "aws-types", - "http 0.2.12", - "once_cell", - "regex-lite", - "tracing", -] - -[[package]] -name = "aws-sigv4" -version = "1.1.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-credential-types", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "form_urlencoded", - "hex", - "hmac", - "http 0.2.12", - "http 1.1.0", - "once_cell", - "percent-encoding", - "sha2", - "time", - "tracing", -] - -[[package]] -name = "aws-smithy-async" -version = "1.1.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "futures-util", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "aws-smithy-http" -version = "0.60.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "bytes-utils", - "futures-core", - "http 0.2.12", - "http-body 0.4.6", - "once_cell", - "percent-encoding", - "pin-project-lite", - "pin-utils", - "tracing", -] - -[[package]] -name = "aws-smithy-json" -version = "0.60.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-smithy-types", -] - -[[package]] -name = "aws-smithy-query" -version = "0.60.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-smithy-types", - "urlencoding", -] - -[[package]] -name = "aws-smithy-runtime" -version = "1.1.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-smithy-async", - "aws-smithy-http", - "aws-smithy-runtime-api", - "aws-smithy-types", - "bytes", - "fastrand", - "h2 0.3.24", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-rustls", - "once_cell", - "pin-project-lite", - "pin-utils", - "rustls", - "tokio", - "tracing", -] - -[[package]] -name = "aws-smithy-runtime-api" -version = "1.1.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-smithy-async", - "aws-smithy-types", - "bytes", - "http 0.2.12", - "pin-project-lite", - "tokio", - "tracing", - "zeroize", -] - -[[package]] -name = "aws-smithy-types" -version = "1.1.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "base64-simd", - "bytes", - "bytes-utils", - "futures-core", - "http 0.2.12", - "http-body 0.4.6", - "itoa", - "num-integer", - "pin-project-lite", - "pin-utils", - "ryu", - "serde", - "time", - "tokio", - "tokio-util", -] - -[[package]] -name = "aws-smithy-xml" -version = "0.60.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "xmlparser", -] - -[[package]] -name = "aws-types" -version = "1.1.5" -source = "git+https://github.com/restatedev/aws-sdk-rust#0880d3e87e41a1b22ba6bb9851f98f781bd56766" -dependencies = [ - "aws-credential-types", - "aws-smithy-async", - "aws-smithy-runtime-api", - "aws-smithy-types", - "http 0.2.12", - "rustc_version", - "tracing", -] - -[[package]] -name = "axum" -version = "0.6.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3b829e4e32b91e643de6eafe82b1d90675f5874230191a4ffbc1b336dec4d6bf" -dependencies = [ - "async-trait", - "axum-core", - "bitflags 1.3.2", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "itoa", - "matchit", - "memchr", - "mime", - "percent-encoding", - "pin-project-lite", - "rustversion", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "sync_wrapper", - "tokio", - "tower", - "tower-layer", - "tower-service", -] - -[[package]] -name = "axum-core" -version = "0.3.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "759fa577a247914fd3f7f76d62972792636412fbfd634cd452f6a385a74d2d2c" -dependencies = [ - "async-trait", - "bytes", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "mime", - "rustversion", - "tower-layer", - "tower-service", -] - -[[package]] -name = "backtrace" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2089b7e3f35b9dd2d0ed921ead4f6d318c27680d4a5bd167b3ee120edb105837" -dependencies = [ - "addr2line", - "cc", - "cfg-if", - "libc", - "miniz_oxide", - "object", - "rustc-demangle", -] - -[[package]] -name = "base62" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f879ef8fc74665ed7f0e6127cb106315888fc2744f68e14b74f83edbb2a08992" - -[[package]] -name = "base64" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" - -[[package]] -name = "base64" -version = "0.21.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" - -[[package]] -name = "base64-simd" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "339abbe78e73178762e23bea9dfd08e697eb3f3301cd4be981c0f78ba5859195" -dependencies = [ - "outref", - "vsimd", -] - -[[package]] -name = "base64ct" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" - -[[package]] -name = "bcder" -version = "0.7.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c627747a6774aab38beb35990d88309481378558875a41da1a4b2e373c906ef0" -dependencies = [ - "bytes", - "smallvec", -] - -[[package]] -name = "bincode" -version = "2.0.0-rc.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" -dependencies = [ - "serde", -] - -[[package]] -name = "bindgen" -version = "0.69.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a00dc851838a2120612785d195287475a3ac45514741da670b735818822129a0" -dependencies = [ - "bitflags 2.4.2", - "cexpr", - "clang-sys", - "itertools 0.12.1", - "lazy_static", - "lazycell", - "proc-macro2", - "quote", - "regex", - "rustc-hash", - "shlex", - "syn 2.0.52", -] - -[[package]] -name = "bitflags" -version = "1.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" - -[[package]] -name = "bitflags" -version = "2.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed570934406eb16438a4e976b1b4500774099c13b8cb96eec99f620f05090ddf" - -[[package]] -name = "blake2" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46502ad458c9a52b69d4d4d32775c788b7a1b85e8bc9d482d92250fc0e3f8efe" -dependencies = [ - "digest", -] - -[[package]] -name = "blake3" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0231f06152bf547e9c2b5194f247cd97aacf6dcd8b15d8e5ec0663f64580da87" -dependencies = [ - "arrayref", - "arrayvec", - "cc", - "cfg-if", - "constant_time_eq 0.3.0", -] - -[[package]] -name = "block-buffer" -version = "0.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" -dependencies = [ - "generic-array", -] - -[[package]] -name = "brotli" -version = "3.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "516074a47ef4bce09577a3b379392300159ce5b1ba2e501ff1c819950066100f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", - "brotli-decompressor", -] - -[[package]] -name = "brotli-decompressor" -version = "2.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4e2e4afe60d7dd600fdd3de8d0f08c2b7ec039712e3b6137ff98b7004e82de4f" -dependencies = [ - "alloc-no-stdlib", - "alloc-stdlib", -] - -[[package]] -name = "bstr" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3569f383e8f1598449f1a423e72e99569137b47740b1da11ef19af3d5c3223" -dependencies = [ - "memchr", -] - -[[package]] -name = "bumpalo" -version = "3.15.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ea184aa71bb362a1157c896979544cc23974e08fd265f29ea96b59f0b4a555b" - -[[package]] -name = "bytemuck" -version = "1.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2ef034f05691a48569bd920a96c81b9d91bbad1ab5ac7c4616c1f6ef36cb79f" - -[[package]] -name = "byteorder" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" - -[[package]] -name = "bytes" -version = "1.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" -dependencies = [ - "serde", -] - -[[package]] -name = "bytes-utils" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dafe3a8757b027e2be6e4e5601ed563c55989fcf1546e933c66c8eb3a058d35" -dependencies = [ - "bytes", - "either", -] - -[[package]] -name = "bytestring" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d80203ea6b29df88012294f62733de21cfeab47f17b41af3a38bc30a03ee72" -dependencies = [ - "bytes", - "serde", -] - -[[package]] -name = "bzip2" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bdb116a6ef3f6c3698828873ad02c3014b3c85cadb88496095628e3ef1e347f8" -dependencies = [ - "bzip2-sys", - "libc", -] - -[[package]] -name = "bzip2-sys" -version = "0.1.11+1.0.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "736a955f3fa7875102d57c82b8cac37ec45224a07fd32d58f9f7a186b6cd4cdc" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "camino" -version = "1.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c59e92b5a388f549b863a7bea62612c09f24c8393560709a54558a9abdfb3b9c" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo-platform" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "694c8807f2ae16faecc43dc17d74b3eb042482789fd0eb64b39a2e04e087053f" -dependencies = [ - "serde", -] - -[[package]] -name = "cargo_metadata" -version = "0.18.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d886547e41f740c616ae73108f6eb70afe6d940c7bc697cb30f13daec073037" -dependencies = [ - "camino", - "cargo-platform", - "semver", - "serde", - "serde_json", - "thiserror", -] - -[[package]] -name = "cast" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5" - -[[package]] -name = "cc" -version = "1.0.89" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0ba8f7aaa012f30d5b2861462f6708eccd49c3c39863fe083a308035f63d723" -dependencies = [ - "jobserver", - "libc", -] - -[[package]] -name = "cexpr" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6fac387a98bb7c37292057cffc56d62ecb629900026402633ae9160df93a8766" -dependencies = [ - "nom", -] - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "cfg_eval" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45565fc9416b9896014f5732ac776f810ee53a66730c17e4020c3ec064a8f88f" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "chrono" -version = "0.4.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5bc015644b92d5890fab7489e49d21f879d5c990186827d42ec511919404f38b" -dependencies = [ - "android-tzdata", - "iana-time-zone", - "js-sys", - "num-traits", - "serde", - "wasm-bindgen", - "windows-targets 0.52.4", -] - -[[package]] -name = "chrono-humanize" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "799627e6b4d27827a814e837b9d8a504832086081806d45b1afa34dc982b023b" -dependencies = [ - "chrono", -] - -[[package]] -name = "chrono-tz" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d59ae0466b83e838b81a54256c39d5d7c20b9d7daa10510a242d9b75abd5936e" -dependencies = [ - "chrono", - "chrono-tz-build", - "phf", -] - -[[package]] -name = "chrono-tz-build" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "433e39f13c9a060046954e0592a8d0a4bcb1040125cbf91cb8ee58964cfb350f" -dependencies = [ - "parse-zoneinfo", - "phf", - "phf_codegen", -] - -[[package]] -name = "ciborium" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e" -dependencies = [ - "ciborium-io", - "ciborium-ll", - "serde", -] - -[[package]] -name = "ciborium-io" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757" - -[[package]] -name = "ciborium-ll" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9" -dependencies = [ - "ciborium-io", - "half", -] - -[[package]] -name = "cipher" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "773f3b9af64447d2ce9850330c473515014aa235e6a783b02db81ff39e4a3dad" -dependencies = [ - "crypto-common", - "inout", -] - -[[package]] -name = "clang-sys" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "67523a3b4be3ce1989d607a828d036249522dd9c1c8de7f4dd2dae43a37369d1" -dependencies = [ - "glob", - "libc", - "libloading", -] - -[[package]] -name = "clap" -version = "4.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c918d541ef2913577a0f9566e9ce27cb35b6df072075769e0b26cb5a554520da" -dependencies = [ - "clap_builder", - "clap_derive", -] - -[[package]] -name = "clap-verbosity-flag" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb9b20c0dd58e4c2e991c8d203bbeb76c11304d1011659686b5b644bc29aa478" -dependencies = [ - "clap", - "log", -] - -[[package]] -name = "clap_builder" -version = "4.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9f3e7391dad68afb0c2ede1bf619f579a3dc9c2ec67f089baa397123a2f3d1eb" -dependencies = [ - "anstream", - "anstyle", - "clap_lex", - "strsim 0.11.0", - "terminal_size", -] - -[[package]] -name = "clap_derive" -version = "4.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "307bc0538d5f0f83b8248db3087aa92fe504e4691294d0c96c0eabc33f47ba47" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "clap_lex" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "98cc8fbded0c607b7ba9dd60cd98df59af97e84d24e49c8557331cfc26d301ce" - -[[package]] -name = "cling" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b88744564bfd5d79ddaa9229ca8fc2cca4275b255e8ff2e797db702d43d02f63" -dependencies = [ - "anyhow", - "async-trait", - "clap", - "cling-derive", - "indoc", - "rustc_version", - "rustversion", - "static_assertions", - "termcolor", - "tracing", -] - -[[package]] -name = "cling-derive" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f3e4ed7569e1ca05aacf00701393267944971e284a0f9cca0014e7326ce3fa4" -dependencies = [ - "darling 0.20.8", - "indoc", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "cmake" -version = "0.1.50" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a31c789563b815f77f4250caee12365734369f942439b7defd71e18a48197130" -dependencies = [ - "cc", -] - -[[package]] -name = "codederror" -version = "0.9.0" -dependencies = [ - "codederror-derive", - "thiserror", -] - -[[package]] -name = "codederror-derive" -version = "0.1.0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "colorchoice" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" - -[[package]] -name = "comfy-table" -version = "7.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c64043d6c7b7a4c58e39e7efccfdea7b93d885a795d0c054a69dbbf4dd52686" -dependencies = [ - "crossterm 0.27.0", - "strum 0.25.0", - "strum_macros 0.25.3", - "unicode-width", -] - -[[package]] -name = "concurrent-queue" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d16048cd947b08fa32c24458a22f5dc5e835264f689f4f5653210c69fd107363" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "console" -version = "0.15.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e1f83fc076bd6dd27517eacdf25fef6c4dfe5f1d7448bafaaf3a26f13b5e4eb" -dependencies = [ - "encode_unicode", - "lazy_static", - "libc", - "unicode-width", - "windows-sys 0.52.0", -] - -[[package]] -name = "console-api" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fd326812b3fd01da5bb1af7d340d0d555fd3d4b641e7f1dfcf5962a902952787" -dependencies = [ - "futures-core", - "prost 0.12.3", - "prost-types", - "tonic 0.10.2", - "tracing-core", -] - -[[package]] -name = "console-subscriber" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7481d4c57092cd1c19dd541b92bdce883de840df30aa5d03fd48a3935c01842e" -dependencies = [ - "console-api", - "crossbeam-channel", - "crossbeam-utils", - "futures-task", - "hdrhistogram", - "humantime", - "prost-types", - "serde", - "serde_json", - "thread_local", - "tokio", - "tokio-stream", - "tonic 0.10.2", - "tracing", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "const-oid" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c2459377285ad874054d797f3ccebf984978aa39129f6eafde5cdc8315b612f8" - -[[package]] -name = "const-random" -version = "0.1.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87e00182fe74b066627d63b85fd550ac2998d4b0bd86bfed477a0ae4c7c71359" -dependencies = [ - "const-random-macro", -] - -[[package]] -name = "const-random-macro" -version = "0.1.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d839f2a20b0aee515dc581a6172f2321f96cab76c1a38a4c584a194955390e" -dependencies = [ - "getrandom", - "once_cell", - "tiny-keccak", -] - -[[package]] -name = "constant_time_eq" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" - -[[package]] -name = "constant_time_eq" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" - -[[package]] -name = "convert_case" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" - -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "coolor" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af4d7a805ca0d92f8c61a31c809d4323fdaa939b0b440e544d21db7797c5aaad" -dependencies = [ - "crossterm 0.23.2", -] - -[[package]] -name = "core-foundation" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "core-foundation-sys" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" - -[[package]] -name = "cpp_demangle" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e8227005286ec39567949b33df9896bcadfa6051bccca2488129f108ca23119" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "cpufeatures" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" -dependencies = [ - "libc", -] - -[[package]] -name = "crc32fast" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "criterion" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f" -dependencies = [ - "anes", - "cast", - "ciborium", - "clap", - "criterion-plot", - "futures", - "is-terminal", - "itertools 0.10.5", - "num-traits", - "once_cell", - "oorandom", - "plotters", - "rayon", - "regex", - "serde", - "serde_derive", - "serde_json", - "tinytemplate", - "tokio", - "walkdir", -] - -[[package]] -name = "criterion-plot" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1" -dependencies = [ - "cast", - "itertools 0.10.5", -] - -[[package]] -name = "crossbeam" -version = "0.8.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1137cd7e7fc0fb5d3c5a8678be38ec56e819125d8d7907411fe24ccb943faca8" -dependencies = [ - "crossbeam-channel", - "crossbeam-deque", - "crossbeam-epoch", - "crossbeam-queue", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-channel" -version = "0.5.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab3db02a9c5b5121e1e42fbdb1aeb65f5e02624cc58c43f2884c6ccac0b82f95" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-deque" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "613f8cc01fe9cf1a3eb3d7f488fd2fa8388403e97039e2f73692932e291a770d" -dependencies = [ - "crossbeam-epoch", - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-epoch" -version = "0.9.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-queue" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35" -dependencies = [ - "crossbeam-utils", -] - -[[package]] -name = "crossbeam-utils" -version = "0.8.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248e3bacc7dc6baa3b21e405ee045c3047101a49145e7e9eca583ab4c2ca5345" - -[[package]] -name = "crossterm" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2102ea4f781910f8a5b98dd061f4c2023f479ce7bb1236330099ceb5a93cf17" -dependencies = [ - "bitflags 1.3.2", - "crossterm_winapi", - "libc", - "mio", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm" -version = "0.27.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f476fe445d41c9e991fd07515a6f463074b782242ccf4a5b7b1d1012e70824df" -dependencies = [ - "bitflags 2.4.2", - "crossterm_winapi", - "libc", - "mio", - "parking_lot", - "signal-hook", - "signal-hook-mio", - "winapi", -] - -[[package]] -name = "crossterm_winapi" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "acdd7c62a3665c7f6830a51635d9ac9b23ed385797f70a83bb8bafe9c572ab2b" -dependencies = [ - "winapi", -] - -[[package]] -name = "crunchy" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" - -[[package]] -name = "crypto-common" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" -dependencies = [ - "generic-array", - "typenum", -] - -[[package]] -name = "csv" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac574ff4d437a7b5ad237ef331c17ccca63c46479e5b5453eb8e10bb99a759fe" -dependencies = [ - "csv-core", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "csv-core" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5efa2b3d7902f4b634a20cae3c9c4e6209dc4779feb6863329607560143efa70" -dependencies = [ - "memchr", -] - -[[package]] -name = "ctrlc" -version = "3.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b467862cc8610ca6fc9a1532d7777cee0804e678ab45410897b9396495994a0b" -dependencies = [ - "nix 0.27.1", - "windows-sys 0.52.0", -] - -[[package]] -name = "darling" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b750cb3417fd1b327431a470f388520309479ab0bf5e323505daf0290cd3850" -dependencies = [ - "darling_core 0.14.4", - "darling_macro 0.14.4", -] - -[[package]] -name = "darling" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54e36fcd13ed84ffdfda6f5be89b31287cbb80c439841fe69e04841435464391" -dependencies = [ - "darling_core 0.20.8", - "darling_macro 0.20.8", -] - -[[package]] -name = "darling_core" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109c1ca6e6b7f82cc233a97004ea8ed7ca123a9af07a8230878fcfda9b158bf0" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 1.0.109", -] - -[[package]] -name = "darling_core" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c2cf1c23a687a1feeb728783b993c4e1ad83d99f351801977dd809b48d0a70f" -dependencies = [ - "fnv", - "ident_case", - "proc-macro2", - "quote", - "strsim 0.10.0", - "syn 2.0.52", -] - -[[package]] -name = "darling_macro" -version = "0.14.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4aab4dbc9f7611d8b55048a3a16d2d010c2c8334e46304b40ac1cc14bf3b48e" -dependencies = [ - "darling_core 0.14.4", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "darling_macro" -version = "0.20.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a668eda54683121533a393014d8692171709ff57a7d61f187b6e782719f8933f" -dependencies = [ - "darling_core 0.20.8", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "dashmap" -version = "5.5.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" -dependencies = [ - "cfg-if", - "hashbrown 0.14.3", - "lock_api", - "once_cell", - "parking_lot_core", -] - -[[package]] -name = "datafusion" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4328f5467f76d890fe3f924362dbc3a838c6a733f762b32d87f9e0b7bef5fb49" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-ipc", - "arrow-schema", - "async-compression", - "async-trait", - "bytes", - "bzip2", - "chrono", - "dashmap", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-optimizer", - "datafusion-physical-expr", - "datafusion-physical-plan", - "datafusion-sql", - "flate2", - "futures", - "glob", - "half", - "hashbrown 0.14.3", - "indexmap 2.2.5", - "itertools 0.12.1", - "log", - "num_cpus", - "object_store", - "parking_lot", - "parquet", - "pin-project-lite", - "rand", - "sqlparser", - "tempfile", - "tokio", - "tokio-util", - "url", - "uuid", - "xz2", - "zstd 0.13.0", -] - -[[package]] -name = "datafusion-common" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d29a7752143b446db4a2cccd9a6517293c6b97e8c39e520ca43ccd07135a4f7e" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-buffer", - "arrow-schema", - "chrono", - "half", - "libc", - "num_cpus", - "object_store", - "parquet", - "sqlparser", -] - -[[package]] -name = "datafusion-execution" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d447650af16e138c31237f53ddaef6dd4f92f0e2d3f2f35d190e16c214ca496" -dependencies = [ - "arrow", - "chrono", - "dashmap", - "datafusion-common", - "datafusion-expr", - "futures", - "hashbrown 0.14.3", - "log", - "object_store", - "parking_lot", - "rand", - "tempfile", - "url", -] - -[[package]] -name = "datafusion-expr" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8d19598e48a498850fb79f97a9719b1f95e7deb64a7a06f93f313e8fa1d524b" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "datafusion-common", - "paste", - "sqlparser", - "strum 0.25.0", - "strum_macros 0.25.3", -] - -[[package]] -name = "datafusion-optimizer" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b7feb0391f1fc75575acb95b74bfd276903dc37a5409fcebe160bc7ddff2010" -dependencies = [ - "arrow", - "async-trait", - "chrono", - "datafusion-common", - "datafusion-expr", - "datafusion-physical-expr", - "hashbrown 0.14.3", - "itertools 0.12.1", - "log", - "regex-syntax 0.8.2", -] - -[[package]] -name = "datafusion-physical-expr" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e911bca609c89a54e8f014777449d8290327414d3e10c57a3e3c2122e38878d0" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-buffer", - "arrow-ord", - "arrow-schema", - "base64 0.21.7", - "blake2", - "blake3", - "chrono", - "datafusion-common", - "datafusion-expr", - "half", - "hashbrown 0.14.3", - "hex", - "indexmap 2.2.5", - "itertools 0.12.1", - "log", - "md-5", - "paste", - "petgraph", - "rand", - "regex", - "sha2", - "unicode-segmentation", - "uuid", -] - -[[package]] -name = "datafusion-physical-plan" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e96b546b8a02e9c2ab35ac6420d511f12a4701950c1eb2e568c122b4fefb0be3" -dependencies = [ - "ahash", - "arrow", - "arrow-array", - "arrow-buffer", - "arrow-schema", - "async-trait", - "chrono", - "datafusion-common", - "datafusion-execution", - "datafusion-expr", - "datafusion-physical-expr", - "futures", - "half", - "hashbrown 0.14.3", - "indexmap 2.2.5", - "itertools 0.12.1", - "log", - "once_cell", - "parking_lot", - "pin-project-lite", - "rand", - "tokio", - "uuid", -] - -[[package]] -name = "datafusion-sql" -version = "35.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2d18d36f260bbbd63aafdb55339213a23d540d3419810575850ef0a798a6b768" -dependencies = [ - "arrow", - "arrow-schema", - "datafusion-common", - "datafusion-expr", - "log", - "sqlparser", -] - -[[package]] -name = "debugid" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bef552e6f588e446098f6ba40d89ac146c8c7b64aade83c051ee00bb5d2bc18d" -dependencies = [ - "uuid", -] - -[[package]] -name = "der" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fffa369a668c8af7dbf8b5e56c9f744fbd399949ed171606040001947de40b1c" -dependencies = [ - "const-oid", - "zeroize", -] - -[[package]] -name = "deranged" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b42b6fa04a440b495c8b04d0e71b707c585f83cb9cb28cf8cd0d976c315e31b4" -dependencies = [ - "powerfmt", - "serde", -] - -[[package]] -name = "derive-new" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3418329ca0ad70234b9735dc4ceed10af4df60eff9c8e7b06cb5e520d92c3535" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d67778784b508018359cbc8696edb3db78160bab2c2a28ba7f56ef6932997f8" -dependencies = [ - "derive_builder_macro", -] - -[[package]] -name = "derive_builder_core" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c11bdc11a0c47bc7d37d582b5285da6849c96681023680b906673c5707af7b0f" -dependencies = [ - "darling 0.14.4", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "derive_builder_macro" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebcda35c7a396850a55ffeac740804b40ffec779b98fffbb1738f4033f0ee79e" -dependencies = [ - "derive_builder_core", - "syn 1.0.109", -] - -[[package]] -name = "derive_more" -version = "0.99.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" -dependencies = [ - "convert_case 0.4.0", - "proc-macro2", - "quote", - "rustc_version", - "syn 1.0.109", -] - -[[package]] -name = "dialoguer" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "658bce805d770f407bc62102fca7c2c64ceef2fbcb2b8bd19d2765ce093980de" -dependencies = [ - "console", - "shell-words", - "tempfile", - "thiserror", - "zeroize", -] - -[[package]] -name = "diff" -version = "0.1.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "56254986775e3233ffa9c4d7d3faaf6d36a2c09d30b20687e9f88bc8bafc16c8" - -[[package]] -name = "digest" -version = "0.10.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" -dependencies = [ - "block-buffer", - "crypto-common", - "subtle", -] - -[[package]] -name = "dirs" -version = "5.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "44c45a9d03d6676652bcb5e724c7e988de1acad23a711b5217ab9cbecbec2225" -dependencies = [ - "dirs-sys", -] - -[[package]] -name = "dirs-sys" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "520f05a5cbd335fae5a99ff7a6ab8627577660ee5cfd6a94a6a929b52ff0321c" -dependencies = [ - "libc", - "option-ext", - "redox_users", - "windows-sys 0.48.0", -] - -[[package]] -name = "doc-comment" -version = "0.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10" - -[[package]] -name = "dotenvy" -version = "0.15.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1aaf95b3e5c8f23aa320147307562d361db0ae0d51242340f558153b4eb2439b" - -[[package]] -name = "drain" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f1a0abf3fcefad9b4dd0e414207a7408e12b68414a01e6bb19b897d5bd7632d" -dependencies = [ - "tokio", -] - -[[package]] -name = "dyn-clone" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" - -[[package]] -name = "either" -version = "1.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11157ac094ffbdde99aa67b23417ebdd801842852b500e395a45a9c0aac03e4a" - -[[package]] -name = "encode_unicode" -version = "0.3.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a357d28ed41a50f9c765dbfe56cbc04a64e53e5fc58ba79fbc34c10ef3df831f" - -[[package]] -name = "encoding_rs" -version = "0.8.33" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7268b386296a025e474d5140678f75d6de9493ae55a5d709eeb9dd08149945e1" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "endian-type" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c34f04666d835ff5d62e058c3995147c06f42fe86ff053337632bca83e42702d" - -[[package]] -name = "enum-map" -version = "2.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6866f3bfdf8207509a033af1a75a7b08abda06bbaaeae6669323fd5a097df2e9" -dependencies = [ - "enum-map-derive", - "serde", -] - -[[package]] -name = "enum-map-derive" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f282cfdfe92516eb26c2af8589c274c7c17681f5ecc03c18255fe741c6aa64eb" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "enumset" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "226c0da7462c13fb57e5cc9e0dc8f0635e7d27f276a3a7fd30054647f669007d" -dependencies = [ - "enumset_derive", - "serde", -] - -[[package]] -name = "enumset_derive" -version = "0.8.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e08b6c6ab82d70f08844964ba10c7babb716de2ecaeab9be5717918a5177d3af" -dependencies = [ - "darling 0.20.8", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "equivalent" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" - -[[package]] -name = "errno" -version = "0.3.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "event-listener" -version = "5.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b5fb89194fa3cad959b833185b3063ba881dbfc7030680b314250779fb4cc91" -dependencies = [ - "concurrent-queue", - "parking", - "pin-project-lite", -] - -[[package]] -name = "event-listener-strategy" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "feedafcaa9b749175d5ac357452a9d41ea2911da598fde46ce1fe02c37751291" -dependencies = [ - "event-listener", - "pin-project-lite", -] - -[[package]] -name = "fallible-iterator" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4443176a9f2c162692bd3d352d745ef9413eec5782a80d8fd6f8a1ac692a07f7" - -[[package]] -name = "fastrand" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25cbce373ec4653f1a01a31e8a5e5ec0c622dc27ff9c4e6606eefef5cbbed4a5" - -[[package]] -name = "figment" -version = "0.10.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b6e5bc7bd59d60d0d45a6ccab6cf0f4ce28698fb4e81e750ddf229c9b824026" -dependencies = [ - "atomic 0.6.0", - "pear", - "serde", - "serde_yaml", - "uncased", - "version_check", -] - -[[package]] -name = "findshlibs" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "40b9e59cd0f7e0806cca4be089683ecb6434e602038df21fe6bf6711b2f07f64" -dependencies = [ - "cc", - "lazy_static", - "libc", - "winapi", -] - -[[package]] -name = "finl_unicode" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" - -[[package]] -name = "fixedbitset" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" - -[[package]] -name = "flatbuffers" -version = "23.5.26" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4dac53e22462d78c16d64a1cd22371b54cc3fe94aa15e7886a2fa6e5d1ab8640" -dependencies = [ - "bitflags 1.3.2", - "rustc_version", -] - -[[package]] -name = "flate2" -version = "1.0.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" -dependencies = [ - "crc32fast", - "miniz_oxide", -] - -[[package]] -name = "fnv" -version = "1.0.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" - -[[package]] -name = "form_urlencoded" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" -dependencies = [ - "percent-encoding", -] - -[[package]] -name = "futures" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" -dependencies = [ - "futures-channel", - "futures-core", - "futures-executor", - "futures-io", - "futures-sink", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-channel" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" -dependencies = [ - "futures-core", - "futures-sink", -] - -[[package]] -name = "futures-core" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" - -[[package]] -name = "futures-executor" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" -dependencies = [ - "futures-core", - "futures-task", - "futures-util", -] - -[[package]] -name = "futures-io" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" - -[[package]] -name = "futures-macro" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "futures-sink" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" - -[[package]] -name = "futures-task" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" - -[[package]] -name = "futures-util" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" -dependencies = [ - "futures-channel", - "futures-core", - "futures-io", - "futures-macro", - "futures-sink", - "futures-task", - "memchr", - "pin-project-lite", - "pin-utils", - "slab", -] - -[[package]] -name = "generic-array" -version = "0.14.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" -dependencies = [ - "typenum", - "version_check", -] - -[[package]] -name = "getrandom" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "190092ea657667030ac6a35e305e62fc4dd69fd98ac98631e5d3a2b1575a12b5" -dependencies = [ - "cfg-if", - "js-sys", - "libc", - "wasi", - "wasm-bindgen", -] - -[[package]] -name = "getset" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e45727250e75cc04ff2846a66397da8ef2b3db8e40e0cef4df67950a07621eb9" -dependencies = [ - "proc-macro-error", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "gimli" -version = "0.28.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" - -[[package]] -name = "glob" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2fabcfbdc87f4758337ca535fb41a6d701b65693ce38287d856d1674551ec9b" - -[[package]] -name = "googletest" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09213705c85aa0e4b4fff44a3a826a556979a34a266df6bcda703a49c69fb61e" -dependencies = [ - "googletest_macro", - "num-traits", - "regex", - "rustversion", -] - -[[package]] -name = "googletest_macro" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "005e4cb962c56efd249bdeeb4ac232b11e1c45a2e49793bba2b2982dcc3f2e9d" -dependencies = [ - "quote", - "syn 2.0.52", -] - -[[package]] -name = "h2" -version = "0.3.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb2c4422095b67ee78da96fbb51a4cc413b3b25883c7717ff7ca1ab31022c9c9" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 0.2.12", - "indexmap 2.2.5", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "h2" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31d030e59af851932b72ceebadf4a2b5986dba4c3b99dd2493f8273a0f151943" -dependencies = [ - "bytes", - "fnv", - "futures-core", - "futures-sink", - "futures-util", - "http 1.1.0", - "indexmap 2.2.5", - "slab", - "tokio", - "tokio-util", - "tracing", -] - -[[package]] -name = "half" -version = "2.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5eceaaeec696539ddaf7b333340f1af35a5aa87ae3e4f3ead0532f72affab2e" -dependencies = [ - "cfg-if", - "crunchy", - "num-traits", -] - -[[package]] -name = "hashbrown" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" - -[[package]] -name = "hashbrown" -version = "0.13.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43a3c133739dddd0d2990f9a4bdf8eb4b21ef50e4851ca85ab661199821d510e" -dependencies = [ - "ahash", -] - -[[package]] -name = "hashbrown" -version = "0.14.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -dependencies = [ - "ahash", - "allocator-api2", -] - -[[package]] -name = "hdrhistogram" -version = "7.5.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "765c9198f173dd59ce26ff9f95ef0aafd0a0fe01fb9d72841bc5066a4c06511d" -dependencies = [ - "base64 0.21.7", - "byteorder", - "flate2", - "nom", - "num-traits", -] - -[[package]] -name = "heck" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" - -[[package]] -name = "hermit-abi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" - -[[package]] -name = "hex" -version = "0.4.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" - -[[package]] -name = "hmac" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c49c37c09c17a53d937dfbb742eb3a961d65a994e6bcdcf37e7399d0cc8ab5e" -dependencies = [ - "digest", -] - -[[package]] -name = "home" -version = "0.5.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3d1354bf6b7235cb4a0576c2619fd4ed18183f689b12b006a0ee7329eeff9a5" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "hostname" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c731c3e10504cc8ed35cfe2f1db4c9274c3d35fa486e3b31df46f068ef3e867" -dependencies = [ - "libc", - "match_cfg", - "winapi", -] - -[[package]] -name = "http" -version = "0.2.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21b9ddb458710bc376481b842f5da65cdf31522de232c1ca8146abce2a358258" -dependencies = [ - "bytes", - "fnv", - "itoa", -] - -[[package]] -name = "http-body" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" -dependencies = [ - "bytes", - "http 0.2.12", - "pin-project-lite", -] - -[[package]] -name = "http-body" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cac85db508abc24a2e48553ba12a996e87244a0395ce011e62b37158745d643" -dependencies = [ - "bytes", - "http 1.1.0", -] - -[[package]] -name = "http-body-util" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41cb79eb393015dadd30fc252023adb0b2400a0caee0fa2a077e6e21a551e840" -dependencies = [ - "bytes", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "pin-project-lite", -] - -[[package]] -name = "http-range-header" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "add0ab9360ddbd88cfeb3bd9574a1d85cfdfa14db10b3e21d3700dbc4328758f" - -[[package]] -name = "http-serde" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6f560b665ad9f1572cfcaf034f7fb84338a7ce945216d64a90fd81f046a3caee" -dependencies = [ - "http 0.2.12", - "serde", -] - -[[package]] -name = "httparse" -version = "1.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" - -[[package]] -name = "httpdate" -version = "1.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" - -[[package]] -name = "humantime" -version = "2.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" - -[[package]] -name = "hyper" -version = "0.14.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" -dependencies = [ - "bytes", - "futures-channel", - "futures-core", - "futures-util", - "h2 0.3.24", - "http 0.2.12", - "http-body 0.4.6", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "socket2", - "tokio", - "tower-service", - "tracing", - "want", -] - -[[package]] -name = "hyper" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "186548d73ac615b32a73aafe38fb4f56c0d340e110e5a200bcadbaf2e199263a" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "h2 0.4.2", - "http 1.1.0", - "http-body 1.0.0", - "httparse", - "httpdate", - "itoa", - "pin-project-lite", - "smallvec", - "tokio", - "want", -] - -[[package]] -name = "hyper-rustls" -version = "0.24.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" -dependencies = [ - "futures-util", - "http 0.2.12", - "hyper 0.14.28", - "log", - "rustls", - "rustls-native-certs", - "tokio", - "tokio-rustls", -] - -[[package]] -name = "hyper-timeout" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" -dependencies = [ - "hyper 0.14.28", - "pin-project-lite", - "tokio", - "tokio-io-timeout", -] - -[[package]] -name = "hyper-util" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca38ef113da30126bbff9cd1705f9273e15d45498615d138b0c20279ac7a76aa" -dependencies = [ - "bytes", - "futures-channel", - "futures-util", - "http 1.1.0", - "http-body 1.0.0", - "hyper 1.2.0", - "pin-project-lite", - "socket2", - "tokio", - "tower", - "tower-service", - "tracing", -] - -[[package]] -name = "iana-time-zone" -version = "0.1.60" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e7ffbb5a1b541ea2561f8c41c087286cc091e21e556a4f09a8f6cbf17b69b141" -dependencies = [ - "android_system_properties", - "core-foundation-sys", - "iana-time-zone-haiku", - "js-sys", - "wasm-bindgen", - "windows-core", -] - -[[package]] -name = "iana-time-zone-haiku" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" -dependencies = [ - "cc", -] - -[[package]] -name = "ident_case" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9e0384b61958566e926dc50660321d12159025e767c18e043daf26b70104c39" - -[[package]] -name = "idna" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" -dependencies = [ - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "indexmap" -version = "1.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" -dependencies = [ - "autocfg", - "hashbrown 0.12.3", - "serde", -] - -[[package]] -name = "indexmap" -version = "2.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b0b929d511467233429c45a44ac1dcaa21ba0f5ba11e4879e6ed28ddb4f9df4" -dependencies = [ - "equivalent", - "hashbrown 0.14.3", -] - -[[package]] -name = "indicatif" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "763a5a8f45087d6bcea4222e7b72c291a054edf80e4ef6efd2a4979878c7bea3" -dependencies = [ - "console", - "instant", - "number_prefix", - "portable-atomic", - "unicode-width", -] - -[[package]] -name = "indoc" -version = "2.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e186cfbae8084e513daff4240b4797e342f988cecda4fb6c939150f96315fd8" - -[[package]] -name = "inferno" -version = "0.11.19" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "321f0f839cd44a4686e9504b0a62b4d69a50b62072144c71c68f5873c167b8d9" -dependencies = [ - "ahash", - "indexmap 2.2.5", - "is-terminal", - "itoa", - "log", - "num-format", - "once_cell", - "quick-xml", - "rgb", - "str_stack", -] - -[[package]] -name = "inlinable_string" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8fae54786f62fb2918dcfae3d568594e50eb9b5c25bf04371af6fe7516452fb" - -[[package]] -name = "inout" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0c10553d664a4d0bcff9f4215d0aac67a639cc68ef660840afe309b807bc9f5" -dependencies = [ - "generic-array", -] - -[[package]] -name = "instant" -version = "0.1.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a5bbe824c507c5da5956355e86a746d82e0e1464f65d862cc5e71da70e94b2c" -dependencies = [ - "cfg-if", -] - -[[package]] -name = "integer-encoding" -version = "3.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8bb03732005da905c88227371639bf1ad885cc712789c011c31c5fb3ab3ccf02" - -[[package]] -name = "ipnet" -version = "2.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" - -[[package]] -name = "iri-string" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21859b667d66a4c1dacd9df0863b3efb65785474255face87f5bca39dd8407c0" -dependencies = [ - "memchr", - "serde", -] - -[[package]] -name = "is-terminal" -version = "0.4.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f23ff5ef2b80d608d61efee834934d862cd92461afc0560dedf493e4c033738b" -dependencies = [ - "hermit-abi", - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "itertools" -version = "0.10.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" -dependencies = [ - "either", -] - -[[package]] -name = "itertools" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" -dependencies = [ - "either", -] - -[[package]] -name = "itoa" -version = "1.0.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1a46d1a171d865aa5f83f92695765caa047a9b4cbae2cbf37dbd613a793fd4c" - -[[package]] -name = "jobserver" -version = "0.1.28" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab46a6e9526ddef3ae7f787c06f0f2600639ba80ea3eade3d8e670a2230f51d6" -dependencies = [ - "libc", -] - -[[package]] -name = "js-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" -dependencies = [ - "wasm-bindgen", -] - -[[package]] -name = "jsonwebtoken" -version = "9.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7ea04a7c5c055c175f189b6dc6ba036fd62306b58c66c9f6389036c503a3f4" -dependencies = [ - "base64 0.21.7", - "js-sys", - "pem 3.0.3", - "ring 0.17.8", - "serde", - "serde_json", - "simple_asn1", -] - -[[package]] -name = "lazy_static" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" - -[[package]] -name = "lazycell" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" - -[[package]] -name = "lexical-core" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" -dependencies = [ - "lexical-parse-float", - "lexical-parse-integer", - "lexical-util", - "lexical-write-float", - "lexical-write-integer", -] - -[[package]] -name = "lexical-parse-float" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" -dependencies = [ - "lexical-parse-integer", - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-parse-integer" -version = "0.8.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" -dependencies = [ - "lexical-util", - "static_assertions", -] - -[[package]] -name = "lexical-util" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" -dependencies = [ - "static_assertions", -] - -[[package]] -name = "lexical-write-float" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" -dependencies = [ - "lexical-util", - "lexical-write-integer", - "static_assertions", -] - -[[package]] -name = "lexical-write-integer" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" -dependencies = [ - "lexical-util", - "static_assertions", -] - -[[package]] -name = "libc" -version = "0.2.153" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" - -[[package]] -name = "libloading" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2caa5afb8bf9f3a2652760ce7d4f62d21c4d5a423e68466fca30df82f2330164" -dependencies = [ - "cfg-if", - "windows-targets 0.52.4", -] - -[[package]] -name = "libm" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" - -[[package]] -name = "libredox" -version = "0.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85c833ca1e66078851dba29046874e38f08b2c883700aa29a03ddd3b23814ee8" -dependencies = [ - "bitflags 2.4.2", - "libc", - "redox_syscall", -] - -[[package]] -name = "librocksdb-sys" -version = "0.16.0+8.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce3d60bc059831dc1c83903fb45c103f75db65c5a7bf22272764d9cc683e348c" -dependencies = [ - "bindgen", - "bzip2-sys", - "cc", - "glob", - "libc", - "libz-sys", - "lz4-sys", - "zstd-sys", -] - -[[package]] -name = "libz-sys" -version = "1.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "037731f5d3aaa87a5675e895b63ddff1a87624bc29f77004ea829809654e48f6" -dependencies = [ - "cc", - "libc", - "pkg-config", - "vcpkg", -] - -[[package]] -name = "linux-raw-sys" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" - -[[package]] -name = "lock_api" -version = "0.4.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" -dependencies = [ - "autocfg", - "scopeguard", -] - -[[package]] -name = "lockfree-object-pool" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a69c0481fc2424cb55795de7da41add33372ea75a94f9b6588ab6a2826dfebc" - -[[package]] -name = "log" -version = "0.4.21" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" - -[[package]] -name = "lua-src" -version = "546.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da0daa7eee611a4c30c8f5ee31af55266e26e573971ba9336d2993e2da129b2" -dependencies = [ - "cc", -] - -[[package]] -name = "luajit-src" -version = "210.4.8+resty107baaf" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e05167e8b2a2185758d83ed23541e5bd8bce37072e4204e0ef2c9b322bc87c4e" -dependencies = [ - "cc", - "which", -] - -[[package]] -name = "lz4-sys" -version = "1.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "lz4_flex" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "912b45c753ff5f7f5208307e8ace7d2a2e30d024e26d3509f3dce546c044ce15" -dependencies = [ - "twox-hash", -] - -[[package]] -name = "lzma-sys" -version = "0.1.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5fda04ab3764e6cde78b9974eec4f779acaba7c4e84b36eca3cf77c581b85d27" -dependencies = [ - "cc", - "libc", - "pkg-config", -] - -[[package]] -name = "match_cfg" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ffbee8634e0d45d258acb448e7eaab3fce7a0a467395d4d9f228e3c1f01fb2e4" - -[[package]] -name = "matchers" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" -dependencies = [ - "regex-automata 0.1.10", -] - -[[package]] -name = "matchit" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" - -[[package]] -name = "md-5" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d89e7ee0cfbedfc4da3340218492196241d89eefb6dab27de5df917a6d2e78cf" -dependencies = [ - "cfg-if", - "digest", -] - -[[package]] -name = "md5" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "490cc448043f947bae3cbee9c203358d62dbee0db12107a74be5c30ccfd09771" - -[[package]] -name = "memchr" -version = "2.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "523dc4f511e55ab87b694dc30d0f820d60906ef06413f93d4d7a1385599cc149" - -[[package]] -name = "memmap2" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fe751422e4a8caa417e13c3ea66452215d7d63e19e604f4980461212f3ae1322" -dependencies = [ - "libc", -] - -[[package]] -name = "metrics" -version = "0.22.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cd71d9db2e4287c3407fa04378b8c2ee570aebe0854431562cdd89ca091854f4" -dependencies = [ - "ahash", - "portable-atomic", -] - -[[package]] -name = "metrics-exporter-prometheus" -version = "0.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bf4e7146e30ad172c42c39b3246864bd2d3c6396780711a1baf749cfe423e21" -dependencies = [ - "base64 0.21.7", - "hyper 0.14.28", - "indexmap 2.2.5", - "metrics", - "metrics-util", - "quanta", - "thiserror", - "tokio", -] - -[[package]] -name = "metrics-tracing-context" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb791d015f8947acf5a7f62bd28d00f289bb7ea98cfbe3ffec1d061eee12df12" -dependencies = [ - "indexmap 2.2.5", - "itoa", - "lockfree-object-pool", - "metrics", - "metrics-util", - "once_cell", - "tracing", - "tracing-core", - "tracing-subscriber", -] - -[[package]] -name = "metrics-util" -version = "0.16.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ece71ab046dcf45604e573329966ec1db5ff4b81cfa170a924ff4c959ab5451a" -dependencies = [ - "aho-corasick", - "crossbeam-epoch", - "crossbeam-utils", - "hashbrown 0.14.3", - "indexmap 2.2.5", - "metrics", - "num_cpus", - "ordered-float 4.2.0", - "quanta", - "radix_trie", - "sketches-ddsketch", -] - -[[package]] -name = "mime" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" - -[[package]] -name = "minimad" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b136454924e4d020e55c4992e07c105b40d5c41b84662862f0e15bc0a2efef" -dependencies = [ - "once_cell", -] - -[[package]] -name = "minimal-lexical" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" - -[[package]] -name = "miniz_oxide" -version = "0.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" -dependencies = [ - "adler", -] - -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.48.0", -] - -[[package]] -name = "mlua" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb37b0ba91f017aa7ca2b98ef99496827770cd635b4a932a6047c5b4bbe678e" -dependencies = [ - "bstr", - "cc", - "lua-src", - "luajit-src", - "mlua_derive", - "num-traits", - "once_cell", - "pkg-config", - "rustc-hash", -] - -[[package]] -name = "mlua_derive" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b9214e60d3cf1643013b107330fcd374ccec1e4ba1eef76e7e5da5e8202e71c0" -dependencies = [ - "itertools 0.10.5", - "once_cell", - "proc-macro-error", - "proc-macro2", - "quote", - "regex", - "syn 1.0.109", -] - -[[package]] -name = "multimap" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ce46fe64a9d73be07dcbe690a38ce1b293be448fd8ce1e6c1b8062c9f72c6a" - -[[package]] -name = "nibble_vec" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a5d83df9f36fe23f0c3648c6bbb8b0298bb5f1939c8f2704431371f4b84d43" -dependencies = [ - "smallvec", -] - -[[package]] -name = "nix" -version = "0.26.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" -dependencies = [ - "bitflags 1.3.2", - "cfg-if", - "libc", -] - -[[package]] -name = "nix" -version = "0.27.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2eb04e9c688eff1c89d72b407f168cf79bb9e867a9d3323ed6c01519eb9cc053" -dependencies = [ - "bitflags 2.4.2", - "cfg-if", - "libc", -] - -[[package]] -name = "nom" -version = "7.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d273983c5a657a70a3e8f2a01329822f3b8c8172b73826411a55751e404a0a4a" -dependencies = [ - "memchr", - "minimal-lexical", -] - -[[package]] -name = "nu-ansi-term" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" -dependencies = [ - "overload", - "winapi", -] - -[[package]] -name = "num" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b05180d69e3da0e530ba2a1dae5110317e49e3b7f3d41be227dc5f92e49ee7af" -dependencies = [ - "num-bigint", - "num-complex", - "num-integer", - "num-iter", - "num-rational", - "num-traits", -] - -[[package]] -name = "num-bigint" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-complex" -version = "0.4.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23c6602fda94a57c990fe0df199a035d83576b496aa29f4e634a8ac6004e68a6" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-conv" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51d515d32fb182ee37cda2ccdcb92950d6a3c2893aa280e540671c2cd0f3b1d9" - -[[package]] -name = "num-format" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" -dependencies = [ - "arrayvec", - "itoa", -] - -[[package]] -name = "num-integer" -version = "0.1.46" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" -dependencies = [ - "num-traits", -] - -[[package]] -name = "num-iter" -version = "0.1.44" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d869c01cc0c455284163fd0092f1f93835385ccab5a98a0dcc497b2f8bf055a9" -dependencies = [ - "autocfg", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-rational" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0" -dependencies = [ - "autocfg", - "num-bigint", - "num-integer", - "num-traits", -] - -[[package]] -name = "num-traits" -version = "0.2.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" -dependencies = [ - "autocfg", - "libm", -] - -[[package]] -name = "num_cpus" -version = "1.16.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" -dependencies = [ - "hermit-abi", - "libc", -] - -[[package]] -name = "num_enum" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f646caf906c20226733ed5b1374287eb97e3c2a5c227ce668c1f2ce20ae57c9" -dependencies = [ - "num_enum_derive", -] - -[[package]] -name = "num_enum_derive" -version = "0.5.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dcbff9bc912032c62bf65ef1d5aea88983b420f4f839db1e9b0c281a25c9c799" -dependencies = [ - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "num_threads" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c7398b9c8b70908f6371f47ed36737907c87c52af34c268fed0bf0ceb92ead9" -dependencies = [ - "libc", -] - -[[package]] -name = "number_prefix" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b246a0e5f20af87141b25c173cd1b609bd7779a4617d6ec582abaf90870f3" - -[[package]] -name = "object" -version = "0.32.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" -dependencies = [ - "memchr", -] - -[[package]] -name = "object_store" -version = "0.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8718f8b65fdf67a45108d1548347d4af7d71fb81ce727bbf9e3b2535e079db3" -dependencies = [ - "async-trait", - "bytes", - "chrono", - "futures", - "humantime", - "itertools 0.12.1", - "parking_lot", - "percent-encoding", - "snafu", - "tokio", - "tracing", - "url", - "walkdir", -] - -[[package]] -name = "octocrab" -version = "0.32.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "abfeeafb5fa0da7046229ec3c7b3bd2981aae05c549871192c408d59fc0fffd5" -dependencies = [ - "arc-swap", - "async-trait", - "base64 0.21.7", - "bytes", - "cfg-if", - "chrono", - "either", - "futures", - "futures-core", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-rustls", - "hyper-timeout", - "jsonwebtoken", - "once_cell", - "percent-encoding", - "pin-project", - "secrecy", - "serde", - "serde_json", - "serde_path_to_error", - "serde_urlencoded", - "snafu", - "tokio", - "tower", - "tower-http 0.4.4", - "tracing", - "url", -] - -[[package]] -name = "okapi" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a64853d7ab065474e87696f7601cee817d200e86c42e04004e005cb3e20c3c5" -dependencies = [ - "log", - "schemars", - "serde", - "serde_json", -] - -[[package]] -name = "okapi-operation" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cdb9f8592e696267af3f08ae9b3072b04c1f8a38d69d9c09fe70a30a6044c46c" -dependencies = [ - "anyhow", - "axum", - "bytes", - "http 0.2.12", - "okapi", - "okapi-operation-macro", - "paste", - "serde", - "serde_json", - "tower", -] - -[[package]] -name = "okapi-operation-macro" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b7fc75b1ba2419b31744563a45b5ad98100eaf2c9311cae1819891159025381" -dependencies = [ - "darling 0.14.4", - "lazy_static", - "proc-macro2", - "quote", - "syn 1.0.109", - "thiserror", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "oorandom" -version = "11.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ab1bc2a289d34bd04a330323ac98a1b4bc82c9d9fcb1e66b63caa84da26b575" - -[[package]] -name = "openssl-probe" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" - -[[package]] -name = "opentelemetry" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9591d937bc0e6d2feb6f71a559540ab300ea49955229c347a517a28d27784c54" -dependencies = [ - "opentelemetry_api", - "opentelemetry_sdk", -] - -[[package]] -name = "opentelemetry-contrib" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4717e7a7b45ef1c0664715a85a8e91ff966b58ffaaccb4d4cc7ff8f15cffd98a" -dependencies = [ - "async-trait", - "futures-core", - "futures-util", - "once_cell", - "opentelemetry", - "opentelemetry-semantic-conventions", - "opentelemetry_api", - "serde_json", - "tokio", -] - -[[package]] -name = "opentelemetry-http" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c7594ec0e11d8e33faf03530a4c49af7064ebba81c1480e01be67d90b356508b" -dependencies = [ - "async-trait", - "bytes", - "http 0.2.12", - "opentelemetry_api", -] - -[[package]] -name = "opentelemetry-otlp" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e5e5a5c4135864099f3faafbe939eb4d7f9b80ebf68a8448da961b32a7c1275" -dependencies = [ - "async-trait", - "futures-core", - "http 0.2.12", - "opentelemetry-proto", - "opentelemetry-semantic-conventions", - "opentelemetry_api", - "opentelemetry_sdk", - "prost 0.11.9", - "thiserror", - "tokio", - "tonic 0.9.2", -] - -[[package]] -name = "opentelemetry-proto" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b1e3f814aa9f8c905d0ee4bde026afd3b2577a97c10e1699912e3e44f0c4cbeb" -dependencies = [ - "opentelemetry_api", - "opentelemetry_sdk", - "prost 0.11.9", - "tonic 0.9.2", -] - -[[package]] -name = "opentelemetry-semantic-conventions" -version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73c9f9340ad135068800e7f1b24e9e09ed9e7143f5bf8518ded3d3ec69789269" -dependencies = [ - "opentelemetry", -] - -[[package]] -name = "opentelemetry_api" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a81f725323db1b1206ca3da8bb19874bbd3f57c3bcd59471bfb04525b265b9b" -dependencies = [ - "futures-channel", - "futures-util", - "indexmap 1.9.3", - "js-sys", - "once_cell", - "pin-project-lite", - "thiserror", - "urlencoding", -] - -[[package]] -name = "opentelemetry_sdk" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa8e705a0612d48139799fcbaba0d4a90f06277153e43dd2bdc16c6f0edd8026" -dependencies = [ - "async-trait", - "crossbeam-channel", - "futures-channel", - "futures-executor", - "futures-util", - "once_cell", - "opentelemetry_api", - "ordered-float 3.9.2", - "percent-encoding", - "rand", - "regex", - "serde_json", - "thiserror", - "tokio", - "tokio-stream", -] - -[[package]] -name = "option-ext" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d" - -[[package]] -name = "ordered-float" -version = "2.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68f19d67e5a2795c94e73e0bb1cc1a7edeb2e28efd39e2e1c9b7a40c1108b11c" -dependencies = [ - "num-traits", -] - -[[package]] -name = "ordered-float" -version = "3.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1e1c390732d15f1d48471625cd92d154e66db2c56645e29a9cd26f4699f72dc" -dependencies = [ - "num-traits", -] - -[[package]] -name = "ordered-float" -version = "4.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a76df7075c7d4d01fdcb46c912dd17fba5b60c78ea480b475f2b6ab6f666584e" -dependencies = [ - "num-traits", -] - -[[package]] -name = "outref" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4030760ffd992bef45b0ae3f10ce1aba99e33464c90d14dd7c039884963ddc7a" - -[[package]] -name = "overload" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" - -[[package]] -name = "parking" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb813b8af86854136c6922af0598d719255ecb2179515e6e7730d468f05c9cae" - -[[package]] -name = "parking_lot" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" -dependencies = [ - "lock_api", - "parking_lot_core", -] - -[[package]] -name = "parking_lot_core" -version = "0.9.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" -dependencies = [ - "cfg-if", - "libc", - "redox_syscall", - "smallvec", - "windows-targets 0.48.5", -] - -[[package]] -name = "parquet" -version = "50.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "547b92ebf0c1177e3892f44c8f79757ee62e678d564a9834189725f2c5b7a750" -dependencies = [ - "ahash", - "arrow-array", - "arrow-buffer", - "arrow-cast", - "arrow-data", - "arrow-ipc", - "arrow-schema", - "arrow-select", - "base64 0.21.7", - "brotli", - "bytes", - "chrono", - "flate2", - "futures", - "half", - "hashbrown 0.14.3", - "lz4_flex", - "num", - "num-bigint", - "object_store", - "paste", - "seq-macro", - "snap", - "thrift", - "tokio", - "twox-hash", - "zstd 0.13.0", -] - -[[package]] -name = "parse-zoneinfo" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c705f256449c60da65e11ff6626e0c16a0a0b96aaa348de61376b249bc340f41" -dependencies = [ - "regex", -] - -[[package]] -name = "password-hash" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7676374caaee8a325c9e7a2ae557f216c5563a171d6997b0ef8a65af35147700" -dependencies = [ - "base64ct", - "rand_core", - "subtle", -] - -[[package]] -name = "paste" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" - -[[package]] -name = "pbkdf2" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "83a0692ec44e4cf1ef28ca317f14f8f07da2d95ec3fa01f86e4467b725e60917" -dependencies = [ - "digest", - "hmac", - "password-hash", - "sha2", -] - -[[package]] -name = "pear" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ccca0f6c17acc81df8e242ed473ec144cbf5c98037e69aa6d144780aad103c8" -dependencies = [ - "inlinable_string", - "pear_codegen", - "yansi 1.0.0-rc.1", -] - -[[package]] -name = "pear_codegen" -version = "0.2.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e22670e8eb757cff11d6c199ca7b987f352f0346e0be4dd23869ec72cb53c77" -dependencies = [ - "proc-macro2", - "proc-macro2-diagnostics", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "pem" -version = "2.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b13fe415cdf3c8e44518e18a7c95a13431d9bdf6d15367d82b23c377fdd441a" -dependencies = [ - "base64 0.21.7", - "serde", -] - -[[package]] -name = "pem" -version = "3.0.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b8fcc794035347fb64beda2d3b462595dd2753e3f268d89c5aae77e8cf2c310" -dependencies = [ - "base64 0.21.7", - "serde", -] - -[[package]] -name = "percent-encoding" -version = "2.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" - -[[package]] -name = "petgraph" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1d3afd2628e69da2be385eb6f2fd57c8ac7977ceeff6dc166ff1657b0e386a9" -dependencies = [ - "fixedbitset", - "indexmap 2.2.5", -] - -[[package]] -name = "pgwire" -version = "0.15.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2de42ee35f9694def25c37c15f564555411d9904b48e33680618ee7359080dc" -dependencies = [ - "async-trait", - "base64 0.21.7", - "bytes", - "chrono", - "derive-new", - "futures", - "getset", - "hex", - "log", - "md5", - "postgres-types", - "rand", - "ring 0.16.20", - "stringprep", - "thiserror", - "time", - "tokio", - "tokio-rustls", - "tokio-util", - "x509-certificate", -] - -[[package]] -name = "phf" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ade2d8b8f33c7333b51bcf0428d37e217e9f32192ae4772156f65063b8ce03dc" -dependencies = [ - "phf_shared", -] - -[[package]] -name = "phf_codegen" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8d39688d359e6b34654d328e262234662d16cc0f60ec8dcbe5e718709342a5a" -dependencies = [ - "phf_generator", - "phf_shared", -] - -[[package]] -name = "phf_generator" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "48e4cc64c2ad9ebe670cb8fd69dd50ae301650392e81c05f9bfcb2d5bdbc24b0" -dependencies = [ - "phf_shared", - "rand", -] - -[[package]] -name = "phf_shared" -version = "0.11.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "90fcb95eef784c2ac79119d1dd819e162b5da872ce6f3c3abe1e8ca1c082f72b" -dependencies = [ - "siphasher", -] - -[[package]] -name = "pin-project" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0302c4a0442c456bd56f841aee5c3bfd17967563f6fadc9ceb9f9c23cf3807e0" -dependencies = [ - "pin-project-internal", -] - -[[package]] -name = "pin-project-internal" -version = "1.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "266c042b60c9c76b8d53061e52b2e0d1116abc57cefc8c5cd671619a56ac3690" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "pin-project-lite" -version = "0.2.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" - -[[package]] -name = "pin-utils" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" - -[[package]] -name = "pkg-config" -version = "0.3.30" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" - -[[package]] -name = "plotters" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d2c224ba00d7cadd4d5c660deaf2098e5e80e07846537c51f9cfa4be50c1fd45" -dependencies = [ - "num-traits", - "plotters-backend", - "plotters-svg", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "plotters-backend" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e76628b4d3a7581389a35d5b6e2139607ad7c75b17aed325f210aa91f4a9609" - -[[package]] -name = "plotters-svg" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38f6d39893cca0701371e3c27294f09797214b86f1fb951b89ade8ec04e2abab" -dependencies = [ - "plotters-backend", -] - -[[package]] -name = "portable-atomic" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" - -[[package]] -name = "postgres-protocol" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49b6c5ef183cd3ab4ba005f1ca64c21e8bd97ce4699cfea9e8d9a2c4958ca520" -dependencies = [ - "base64 0.21.7", - "byteorder", - "bytes", - "fallible-iterator", - "hmac", - "md-5", - "memchr", - "rand", - "sha2", - "stringprep", -] - -[[package]] -name = "postgres-types" -version = "0.2.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d2234cdee9408b523530a9b6d2d6b373d1db34f6a8e51dc03ded1828d7fb67c" -dependencies = [ - "bytes", - "chrono", - "fallible-iterator", - "postgres-protocol", -] - -[[package]] -name = "powerfmt" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "439ee305def115ba05938db6eb1644ff94165c5ab5e9420d1c1bcedbba909391" - -[[package]] -name = "pprof" -version = "0.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "978385d59daf9269189d052ca8a84c1acfd0715c0599a5d5188d4acc078ca46a" -dependencies = [ - "backtrace", - "cfg-if", - "criterion", - "findshlibs", - "inferno", - "libc", - "log", - "nix 0.26.4", - "once_cell", - "parking_lot", - "smallvec", - "symbolic-demangle", - "tempfile", - "thiserror", -] - -[[package]] -name = "ppv-lite86" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" - -[[package]] -name = "pretty_assertions" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af7cee1a6c8a5b9208b3cb1061f10c0cb689087b3d8ce85fb9d2dd7a29b6ba66" -dependencies = [ - "diff", - "yansi 0.5.1", -] - -[[package]] -name = "prettyplease" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a41cf62165e97c7f814d2221421dbb9afcbcdb0a88068e5ea206e19951c2cbb5" -dependencies = [ - "proc-macro2", - "syn 2.0.52", -] - -[[package]] -name = "priority-queue" -version = "1.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a0bda9164fe05bc9225752d54aae413343c36f684380005398a6a8fde95fe785" -dependencies = [ - "autocfg", - "indexmap 1.9.3", -] - -[[package]] -name = "proc-macro-crate" -version = "1.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f4c021e1093a56626774e81216a4ce732a735e5bad4868a03f3ed65ca0c3919" -dependencies = [ - "once_cell", - "toml_edit", -] - -[[package]] -name = "proc-macro-error" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" -dependencies = [ - "proc-macro-error-attr", - "proc-macro2", - "quote", - "syn 1.0.109", - "version_check", -] - -[[package]] -name = "proc-macro-error-attr" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" -dependencies = [ - "proc-macro2", - "quote", - "version_check", -] - -[[package]] -name = "proc-macro2" -version = "1.0.78" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2422ad645d89c99f8f3e6b88a9fdeca7fabeac836b1002371c4367c8f984aae" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "proc-macro2-diagnostics" -version = "0.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af066a9c399a26e020ada66a034357a868728e72cd426f3adcd35f80d88d88c8" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", - "version_check", - "yansi 1.0.0-rc.1", -] - -[[package]] -name = "prost" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b82eaa1d779e9a4bc1c3217db8ffbeabaae1dca241bf70183242128d48681cd" -dependencies = [ - "bytes", - "prost-derive 0.11.9", -] - -[[package]] -name = "prost" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "146c289cda302b98a28d40c8b3b90498d6e526dd24ac2ecea73e4e491685b94a" -dependencies = [ - "bytes", - "prost-derive 0.12.3", -] - -[[package]] -name = "prost-build" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c55e02e35260070b6f716a2423c2ff1c3bb1642ddca6f99e1f26d06268a0e2d2" -dependencies = [ - "bytes", - "heck", - "itertools 0.11.0", - "log", - "multimap", - "once_cell", - "petgraph", - "prettyplease", - "prost 0.12.3", - "prost-types", - "regex", - "syn 2.0.52", - "tempfile", - "which", -] - -[[package]] -name = "prost-derive" -version = "0.11.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5d2d8d10f3c6ded6da8b05b5fb3b8a5082514344d56c9f871412d29b4e075b4" -dependencies = [ - "anyhow", - "itertools 0.10.5", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "prost-derive" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "efb6c9a1dd1def8e2124d17e83a20af56f1570d6c2d2bd9e266ccb768df3840e" -dependencies = [ - "anyhow", - "itertools 0.11.0", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "prost-types" -version = "0.12.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "193898f59edcf43c26227dcd4c8427f00d99d61e95dcde58dabd49fa291d470e" -dependencies = [ - "prost 0.12.3", -] - -[[package]] -name = "quanta" -version = "0.12.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ca0b7bac0b97248c40bb77288fc52029cf1459c0461ea1b05ee32ccf011de2c" -dependencies = [ - "crossbeam-utils", - "libc", - "once_cell", - "raw-cpuid", - "wasi", - "web-sys", - "winapi", -] - -[[package]] -name = "quick-xml" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7f50b1c63b38611e7d4d7f68b82d3ad0cc71a2ad2e7f61fc10f1328d917c93cd" -dependencies = [ - "memchr", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "radix_trie" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c069c179fcdc6a2fe24d8d18305cf085fdbd4f922c041943e203685d6a1c58fd" -dependencies = [ - "endian-type", - "nibble_vec", -] - -[[package]] -name = "rand" -version = "0.8.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" -dependencies = [ - "libc", - "rand_chacha", - "rand_core", -] - -[[package]] -name = "rand_chacha" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" -dependencies = [ - "ppv-lite86", - "rand_core", -] - -[[package]] -name = "rand_core" -version = "0.6.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" -dependencies = [ - "getrandom", -] - -[[package]] -name = "raw-cpuid" -version = "11.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9d86a7c4638d42c44551f4791a20e687dbb4c3de1f33c43dd71e355cd429def1" -dependencies = [ - "bitflags 2.4.2", -] - -[[package]] -name = "rayon" -version = "1.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4963ed1bc86e4f3ee217022bd855b297cef07fb9eac5dfa1f788b220b49b3bd" -dependencies = [ - "either", - "rayon-core", -] - -[[package]] -name = "rayon-core" -version = "1.12.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" -dependencies = [ - "crossbeam-deque", - "crossbeam-utils", -] - -[[package]] -name = "rdkafka" -version = "0.34.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "053adfa02fab06e86c01d586cc68aa47ee0ff4489a59469081dc12cbcde578bf" -dependencies = [ - "futures-channel", - "futures-util", - "libc", - "log", - "rdkafka-sys", - "serde", - "serde_derive", - "serde_json", - "slab", - "tokio", -] - -[[package]] -name = "rdkafka-sys" -version = "4.7.0+2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55e0d2f9ba6253f6ec72385e453294f8618e9e15c2c6aba2a5c01ccf9622d615" -dependencies = [ - "cmake", - "libc", - "libz-sys", - "num_enum", - "pkg-config", -] - -[[package]] -name = "redox_syscall" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" -dependencies = [ - "bitflags 1.3.2", -] - -[[package]] -name = "redox_users" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a18479200779601e498ada4e8c1e1f50e3ee19deb0259c25825a98b5603b2cb4" -dependencies = [ - "getrandom", - "libredox", - "thiserror", -] - -[[package]] -name = "regex" -version = "1.10.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b62dbe01f0b06f9d8dc7d49e05a0785f153b00b2c227856282f671e0318c9b15" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata 0.4.6", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-automata" -version = "0.1.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" -dependencies = [ - "regex-syntax 0.6.29", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax 0.8.2", -] - -[[package]] -name = "regex-lite" -version = "0.1.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b661b2f27137bdbc16f00eda72866a92bb28af1753ffbd56744fb6e2e9cd8e" - -[[package]] -name = "regex-syntax" -version = "0.6.29" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" - -[[package]] -name = "regex-syntax" -version = "0.8.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c08c74e62047bb2de4ff487b251e4a92e24f48745648451635cec7d591162d9f" - -[[package]] -name = "regress" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4ed9969cad8051328011596bf549629f1b800cf1731e7964b1eef8dfc480d2c2" -dependencies = [ - "hashbrown 0.13.2", - "memchr", -] - -[[package]] -name = "regress" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d06f9a1f7cd8473611ba1a480cf35f9c5cffc2954336ba90a982fdb7e7d7f51e" -dependencies = [ - "hashbrown 0.14.3", - "memchr", -] - -[[package]] -name = "reqwest" -version = "0.11.24" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6920094eb85afde5e4a138be3f2de8bbdf28000f0029e72c45025a56b042251" -dependencies = [ - "base64 0.21.7", - "bytes", - "encoding_rs", - "futures-core", - "futures-util", - "h2 0.3.24", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-rustls", - "ipnet", - "js-sys", - "log", - "mime", - "once_cell", - "percent-encoding", - "pin-project-lite", - "rustls", - "rustls-pemfile", - "serde", - "serde_json", - "serde_urlencoded", - "sync_wrapper", - "system-configuration", - "tokio", - "tokio-rustls", - "tower-service", - "url", - "wasm-bindgen", - "wasm-bindgen-futures", - "web-sys", - "webpki-roots", - "winreg", -] - -[[package]] -name = "restate-admin" -version = "0.9.0" -dependencies = [ - "anyhow", - "arrow-flight", - "axum", - "bincode", - "bytes", - "bytestring", - "codederror", - "datafusion", - "derive_builder", - "drain", - "futures", - "http 0.2.12", - "hyper 0.14.28", - "okapi-operation", - "restate-bifrost", - "restate-core", - "restate-errors", - "restate-fs-util", - "restate-futures-util", - "restate-meta", - "restate-meta-rest-model", - "restate-node-services", - "restate-pb", - "restate-schema-api", - "restate-schema-impl", - "restate-serde-util", - "restate-service-client", - "restate-service-protocol", - "restate-test-util", - "restate-types", - "restate-wal-protocol", - "restate-worker-api", - "schemars", - "serde", - "serde_json", - "serde_with", - "tempfile", - "test-log", - "thiserror", - "tokio", - "tonic 0.10.2", - "tower", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "restate-base64-util" -version = "0.9.0" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "restate-benchmarks" -version = "0.9.0" -dependencies = [ - "anyhow", - "criterion", - "drain", - "futures", - "futures-util", - "hyper 0.14.28", - "pprof", - "prost 0.12.3", - "prost-build", - "rand", - "restate-core", - "restate-node", - "restate-server", - "restate-types", - "serde_json", - "tempfile", - "tokio", - "tonic 0.10.2", - "tonic-build", -] - -[[package]] -name = "restate-bifrost" -version = "0.9.0" -dependencies = [ - "anyhow", - "async-trait", - "bytes", - "bytestring", - "codederror", - "derive_builder", - "derive_more", - "drain", - "enum-map", - "googletest", - "once_cell", - "restate-core", - "restate-test-util", - "restate-types", - "schemars", - "serde", - "serde_json", - "static_assertions", - "strum 0.26.1", - "strum_macros 0.26.1", - "test-log", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", - "tracing-test", -] - -[[package]] -name = "restate-cli" -version = "0.9.0" -dependencies = [ - "anyhow", - "arrow", - "base64 0.21.7", - "bytes", - "chrono", - "chrono-humanize", - "clap", - "clap-verbosity-flag", - "cling", - "comfy-table", - "convert_case 0.6.0", - "crossterm 0.27.0", - "ctrlc", - "dialoguer", - "dirs", - "dotenvy", - "futures", - "http 0.2.12", - "indicatif", - "indoc", - "is-terminal", - "itertools 0.11.0", - "octocrab", - "once_cell", - "reqwest", - "restate-meta-rest-model", - "restate-serde-util", - "restate-service-protocol", - "restate-types", - "serde", - "serde_json", - "tempfile", - "termcolor", - "thiserror", - "tiny-gradient", - "tokio", - "tracing", - "tracing-log 0.2.0", - "tracing-subscriber", - "unicode-width", - "url", - "vergen", - "zip", - "zip-extensions", -] - -[[package]] -name = "restate-cluster-controller" -version = "0.9.0" -dependencies = [ - "anyhow", - "codederror", - "derive_builder", - "drain", - "futures", - "restate-core", - "restate-errors", - "restate-types", - "schemars", - "serde", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "restate-core" -version = "0.9.0" -dependencies = [ - "anyhow", - "arc-swap", - "async-trait", - "derive_more", - "enum-map", - "futures", - "googletest", - "metrics", - "rand", - "restate-node-protocol", - "restate-test-util", - "restate-types", - "static_assertions", - "strum 0.26.1", - "strum_macros 0.26.1", - "test-log", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-subscriber", - "tracing-test", -] - -[[package]] -name = "restate-errors" -version = "0.9.0" -dependencies = [ - "codederror", - "paste", - "restate-test-util", - "termimad", - "test-log", - "thiserror", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "restate-fs-util" -version = "0.9.0" -dependencies = [ - "tokio", - "tracing", - "uuid", -] - -[[package]] -name = "restate-futures-util" -version = "0.9.0" -dependencies = [ - "anyhow", - "futures", - "pin-project", - "restate-test-util", - "test-log", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "restate-ingress-dispatcher" -version = "0.9.0" -dependencies = [ - "anyhow", - "bytes", - "bytestring", - "dashmap", - "drain", - "googletest", - "prost 0.12.3", - "restate-bifrost", - "restate-core", - "restate-node-protocol", - "restate-pb", - "restate-schema-api", - "restate-test-util", - "restate-types", - "restate-wal-protocol", - "test-log", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "restate-ingress-http" -version = "0.9.0" -dependencies = [ - "anyhow", - "bytes", - "codederror", - "derive_builder", - "futures", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "hyper 1.2.0", - "hyper-util", - "metrics", - "opentelemetry", - "pin-project-lite", - "prost 0.12.3", - "restate-core", - "restate-errors", - "restate-futures-util", - "restate-ingress-dispatcher", - "restate-pb", - "restate-schema-api", - "restate-test-util", - "restate-types", - "schemars", - "serde", - "serde_json", - "serde_with", - "thiserror", - "tokio", - "tower", - "tower-http 0.5.2", - "tracing", - "tracing-opentelemetry", - "tracing-subscriber", - "tracing-test", - "urlencoding", -] - -[[package]] -name = "restate-ingress-kafka" -version = "0.9.0" -dependencies = [ - "anyhow", - "base64 0.21.7", - "bytes", - "derive_builder", - "drain", - "opentelemetry_api", - "prost 0.12.3", - "rdkafka", - "restate-core", - "restate-errors", - "restate-futures-util", - "restate-ingress-dispatcher", - "restate-pb", - "restate-schema-api", - "restate-schema-impl", - "restate-test-util", - "restate-timer-queue", - "restate-types", - "schemars", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", - "tracing-opentelemetry", -] - -[[package]] -name = "restate-invoker-api" -version = "0.9.0" -dependencies = [ - "anyhow", - "bytes", - "bytestring", - "codederror", - "futures", - "restate-errors", - "restate-types", - "serde", - "thiserror", - "tokio", -] - -[[package]] -name = "restate-invoker-impl" -version = "0.9.0" -dependencies = [ - "anyhow", - "bytes", - "codederror", - "derive_builder", - "drain", - "futures", - "googletest", - "h2 0.3.24", - "humantime", - "hyper 0.14.28", - "itertools 0.11.0", - "metrics", - "opentelemetry", - "opentelemetry-http", - "prost 0.12.3", - "restate-core", - "restate-errors", - "restate-fs-util", - "restate-futures-util", - "restate-invoker-api", - "restate-queue", - "restate-schema-api", - "restate-service-client", - "restate-service-protocol", - "restate-test-util", - "restate-timer-queue", - "restate-types", - "schemars", - "serde", - "serde_with", - "tempfile", - "test-log", - "thiserror", - "tokio", - "tokio-util", - "tracing", - "tracing-opentelemetry", - "tracing-subscriber", -] - -[[package]] -name = "restate-meta" -version = "0.9.0" -dependencies = [ - "anyhow", - "bincode", - "bytestring", - "codederror", - "derive_builder", - "drain", - "futures", - "googletest", - "http 0.2.12", - "restate-core", - "restate-errors", - "restate-fs-util", - "restate-futures-util", - "restate-meta-rest-model", - "restate-schema-api", - "restate-schema-impl", - "restate-serde-util", - "restate-service-client", - "restate-service-protocol", - "restate-test-util", - "restate-types", - "schemars", - "serde", - "serde_json", - "serde_with", - "tempfile", - "test-log", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "restate-meta-rest-model" -version = "0.9.0" -dependencies = [ - "bytes", - "http 0.2.12", - "humantime", - "restate-schema-api", - "restate-serde-util", - "restate-types", - "schemars", - "serde", - "serde_json", - "serde_with", -] - -[[package]] -name = "restate-network" -version = "0.9.0" -dependencies = [ - "anyhow", - "async-trait", - "bincode", - "bytes", - "drain", - "enum-map", - "enumset", - "futures", - "googletest", - "http 0.2.12", - "metrics", - "once_cell", - "pin-project", - "rand", - "restate-core", - "restate-errors", - "restate-node-protocol", - "restate-node-services", - "restate-test-util", - "restate-types", - "restate-wal-protocol", - "static_assertions", - "test-log", - "thiserror", - "tokio", - "tokio-stream", - "tonic 0.10.2", - "tower", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "restate-node" -version = "0.9.0" -dependencies = [ - "anyhow", - "arc-swap", - "arrow-flight", - "async-trait", - "axum", - "bincode", - "codederror", - "datafusion", - "derive_builder", - "drain", - "enum-map", - "enumset", - "futures", - "googletest", - "hostname", - "http 0.2.12", - "humantime", - "hyper 0.14.28", - "metrics", - "metrics-exporter-prometheus", - "metrics-tracing-context", - "metrics-util", - "restate-admin", - "restate-bifrost", - "restate-cluster-controller", - "restate-core", - "restate-errors", - "restate-meta", - "restate-network", - "restate-node-protocol", - "restate-node-services", - "restate-schema-api", - "restate-schema-impl", - "restate-storage-query-datafusion", - "restate-storage-rocksdb", - "restate-test-util", - "restate-types", - "restate-worker", - "restate-worker-api", - "rocksdb", - "schemars", - "serde", - "serde_json", - "serde_with", - "strum 0.26.1", - "strum_macros 0.26.1", - "test-log", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util", - "tonic 0.10.2", - "tonic-reflection", - "tower", - "tower-http 0.4.4", - "tracing", - "tracing-subscriber", - "tracing-test", -] - -[[package]] -name = "restate-node-protocol" -version = "0.9.0" -dependencies = [ - "bincode", - "bytes", - "derive_more", - "enum-map", - "prost 0.12.3", - "prost-build", - "prost-types", - "restate-types", - "serde", - "strum 0.26.1", - "strum_macros 0.26.1", - "thiserror", -] - -[[package]] -name = "restate-node-services" -version = "0.9.0" -dependencies = [ - "anyhow", - "bytes", - "prost 0.12.3", - "prost-types", - "restate-node-protocol", - "restate-types", - "thiserror", - "tonic 0.10.2", - "tonic-build", -] - -[[package]] -name = "restate-pb" -version = "0.9.0" -dependencies = [ - "convert_case 0.6.0", - "prost 0.12.3", - "prost-build", - "prost-types", - "restate-types", - "tonic 0.10.2", - "tonic-build", -] - -[[package]] -name = "restate-queue" -version = "0.9.0" -dependencies = [ - "bincode", - "criterion", - "restate-fs-util", - "restate-types", - "serde", - "tempfile", - "tokio", -] - -[[package]] -name = "restate-schema-api" -version = "0.9.0" -dependencies = [ - "anyhow", - "base64 0.21.7", - "bytes", - "bytestring", - "http 0.2.12", - "restate-base64-util", - "restate-serde-util", - "restate-types", - "schemars", - "serde", - "serde_with", -] - -[[package]] -name = "restate-schema-impl" -version = "0.9.0" -dependencies = [ - "anyhow", - "arc-swap", - "bytes", - "codederror", - "googletest", - "http 0.2.12", - "restate-errors", - "restate-pb", - "restate-schema-api", - "restate-serde-util", - "restate-service-protocol", - "restate-test-util", - "restate-types", - "serde", - "serde_json", - "test-log", - "thiserror", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "restate-serde-util" -version = "0.9.0" -dependencies = [ - "base64 0.21.7", - "bytes", - "http 0.2.12", - "prost 0.12.3", - "schemars", - "serde", - "serde_json", - "serde_with", -] - -[[package]] -name = "restate-server" -version = "0.9.0" -dependencies = [ - "clap", - "codederror", - "derive_builder", - "drain", - "enumset", - "figment", - "futures-util", - "humantime", - "pin-project", - "restate-admin", - "restate-bifrost", - "restate-core", - "restate-errors", - "restate-fs-util", - "restate-meta", - "restate-node", - "restate-storage-rocksdb", - "restate-tracing-instrumentation", - "restate-types", - "restate-worker", - "schemars", - "serde", - "serde_with", - "serde_yaml", - "thiserror", - "tikv-jemallocator", - "tokio", - "tokio-util", - "tracing", - "tracing-panic", - "vergen", -] - -[[package]] -name = "restate-service-client" -version = "0.9.0" -dependencies = [ - "arc-swap", - "aws-config", - "aws-credential-types", - "aws-sdk-lambda", - "aws-sdk-sts", - "aws-smithy-runtime", - "base64 0.21.7", - "bytestring", - "derive_builder", - "futures", - "http-serde", - "humantime", - "hyper 0.14.28", - "hyper-rustls", - "once_cell", - "restate-schema-api", - "restate-types", - "rustls", - "schemars", - "serde", - "serde_json", - "serde_with", - "thiserror", -] - -[[package]] -name = "restate-service-protocol" -version = "0.9.0" -dependencies = [ - "base64 0.21.7", - "bytes", - "bytes-utils", - "codederror", - "hyper 0.14.28", - "paste", - "prettyplease", - "prost 0.12.3", - "prost-build", - "regress 0.9.0", - "restate-base64-util", - "restate-errors", - "restate-schema-api", - "restate-service-client", - "restate-test-util", - "restate-types", - "schemars", - "serde", - "serde_json", - "size", - "syn 2.0.52", - "test-log", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", - "typify", - "uuid", -] - -[[package]] -name = "restate-storage-api" -version = "0.9.0" -dependencies = [ - "anyhow", - "bytes", - "bytestring", - "futures-util", - "restate-types", - "serde", - "thiserror", -] - -[[package]] -name = "restate-storage-proto" -version = "0.9.0" -dependencies = [ - "anyhow", - "bytes", - "bytestring", - "opentelemetry_api", - "prost 0.12.3", - "prost-build", - "prost-types", - "restate-storage-api", - "restate-types", - "thiserror", -] - -[[package]] -name = "restate-storage-query-datafusion" -version = "0.9.0" -dependencies = [ - "ahash", - "async-trait", - "bytes", - "bytestring", - "chrono", - "codederror", - "datafusion", - "datafusion-expr", - "derive_builder", - "futures", - "paste", - "prost 0.12.3", - "restate-invoker-api", - "restate-schema-api", - "restate-service-protocol", - "restate-storage-api", - "restate-storage-rocksdb", - "restate-types", - "schemars", - "serde", - "serde_json", - "thiserror", - "tokio", - "tracing", -] - -[[package]] -name = "restate-storage-query-postgres" -version = "0.9.0" -dependencies = [ - "anyhow", - "async-trait", - "bytes", - "bytestring", - "chrono", - "codederror", - "datafusion", - "datafusion-expr", - "derive_builder", - "drain", - "futures", - "paste", - "pgwire", - "prost 0.12.3", - "restate-core", - "restate-errors", - "restate-storage-api", - "restate-storage-proto", - "restate-storage-query-datafusion", - "restate-storage-rocksdb", - "restate-types", - "schemars", - "serde", - "thiserror", - "tokio", - "tracing", - "uuid", -] - -[[package]] -name = "restate-storage-rocksdb" -version = "0.9.0" -dependencies = [ - "anyhow", - "bytes", - "bytestring", - "codederror", - "criterion", - "derive_builder", - "drain", - "futures", - "futures-util", - "googletest", - "log", - "num-bigint", - "once_cell", - "paste", - "prost 0.12.3", - "rand", - "restate-errors", - "restate-storage-api", - "restate-storage-proto", - "restate-test-util", - "restate-types", - "rocksdb", - "schemars", - "serde", - "sync_wrapper", - "tempfile", - "test-log", - "thiserror", - "tokio", - "tokio-stream", -] - -[[package]] -name = "restate-test-util" -version = "0.9.0" -dependencies = [ - "assert2", - "googletest", - "pretty_assertions", - "prost 0.12.3", - "prost-types", -] - -[[package]] -name = "restate-timer" -version = "0.9.0" -dependencies = [ - "ahash", - "derive_builder", - "futures", - "futures-util", - "pin-project", - "priority-queue", - "restate-test-util", - "restate-types", - "schemars", - "serde", - "test-log", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "restate-timer-queue" -version = "0.9.0" -dependencies = [ - "futures", - "tokio", -] - -[[package]] -name = "restate-tracing-instrumentation" -version = "0.9.0" -dependencies = [ - "console-subscriber", - "derive_builder", - "metrics-tracing-context", - "nu-ansi-term", - "once_cell", - "opentelemetry", - "opentelemetry-contrib", - "opentelemetry-otlp", - "opentelemetry-semantic-conventions", - "schemars", - "serde", - "thiserror", - "tokio", - "tonic 0.9.2", - "tracing", - "tracing-opentelemetry", - "tracing-subscriber", -] - -[[package]] -name = "restate-types" -version = "0.9.0" -dependencies = [ - "anyhow", - "arc-swap", - "base62", - "base64 0.21.7", - "bytes", - "bytestring", - "cfg_eval", - "derive_more", - "enum-map", - "enumset", - "http 0.2.12", - "humantime", - "num-traits", - "once_cell", - "opentelemetry_api", - "rand", - "restate-base64-util", - "restate-test-util", - "schemars", - "serde", - "serde_with", - "sha2", - "strum 0.26.1", - "strum_macros 0.26.1", - "sync_wrapper", - "test-log", - "thiserror", - "tokio", - "tonic 0.10.2", - "tracing", - "tracing-opentelemetry", - "ulid", - "uuid", - "xxhash-rust", -] - -[[package]] -name = "restate-wal-protocol" -version = "0.9.0" -dependencies = [ - "anyhow", - "assert2", - "async-trait", - "bincode", - "bytes", - "bytestring", - "codederror", - "derive_builder", - "derive_more", - "drain", - "enum-map", - "googletest", - "once_cell", - "restate-bifrost", - "restate-core", - "restate-invoker-api", - "restate-storage-api", - "restate-test-util", - "restate-types", - "schemars", - "serde", - "serde_json", - "static_assertions", - "strum 0.26.1", - "strum_macros 0.26.1", - "test-log", - "thiserror", - "tokio", - "tracing", - "tracing-subscriber", - "tracing-test", -] - -[[package]] -name = "restate-worker" -version = "0.9.0" -dependencies = [ - "anyhow", - "assert2", - "async-channel", - "bincode", - "bytes", - "bytestring", - "codederror", - "derive_builder", - "drain", - "futures", - "googletest", - "humantime", - "metrics", - "opentelemetry_api", - "pin-project", - "prost 0.12.3", - "restate-bifrost", - "restate-core", - "restate-errors", - "restate-ingress-dispatcher", - "restate-ingress-http", - "restate-ingress-kafka", - "restate-invoker-api", - "restate-invoker-impl", - "restate-network", - "restate-node-protocol", - "restate-pb", - "restate-schema-api", - "restate-schema-impl", - "restate-serde-util", - "restate-service-client", - "restate-service-protocol", - "restate-storage-api", - "restate-storage-query-datafusion", - "restate-storage-query-postgres", - "restate-storage-rocksdb", - "restate-test-util", - "restate-timer", - "restate-types", - "restate-wal-protocol", - "restate-worker-api", - "schemars", - "serde", - "serde_json", - "serde_with", - "tempfile", - "test-log", - "thiserror", - "tokio", - "tokio-stream", - "tokio-util", - "tracing", - "tracing-opentelemetry", - "tracing-subscriber", -] - -[[package]] -name = "restate-worker-api" -version = "0.9.0" -dependencies = [ - "restate-schema-api", - "restate-types", - "thiserror", -] - -[[package]] -name = "rgb" -version = "0.8.37" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05aaa8004b64fd573fc9d002f4e632d51ad4f026c2b5ba95fcb6c2f32c2c47d8" -dependencies = [ - "bytemuck", -] - -[[package]] -name = "ring" -version = "0.16.20" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3053cf52e236a3ed746dfc745aa9cacf1b791d846bdaf412f60a8d7d6e17c8fc" -dependencies = [ - "cc", - "libc", - "once_cell", - "spin 0.5.2", - "untrusted 0.7.1", - "web-sys", - "winapi", -] - -[[package]] -name = "ring" -version = "0.17.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" -dependencies = [ - "cc", - "cfg-if", - "getrandom", - "libc", - "spin 0.9.8", - "untrusted 0.9.0", - "windows-sys 0.52.0", -] - -[[package]] -name = "rocksdb" -version = "0.22.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bd13e55d6d7b8cd0ea569161127567cd587676c99f4472f779a0279aa60a7a7" -dependencies = [ - "libc", - "librocksdb-sys", -] - -[[package]] -name = "rustc-demangle" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" - -[[package]] -name = "rustc-hash" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" - -[[package]] -name = "rustc_version" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" -dependencies = [ - "semver", -] - -[[package]] -name = "rustix" -version = "0.38.31" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ea3e1a662af26cd7a3ba09c0297a31af215563ecf42817c98df621387f4e949" -dependencies = [ - "bitflags 2.4.2", - "errno", - "libc", - "linux-raw-sys", - "windows-sys 0.52.0", -] - -[[package]] -name = "rustls" -version = "0.21.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f9d5a6813c0759e4609cd494e8e725babae6a2ca7b62a5536a13daaec6fcb7ba" -dependencies = [ - "log", - "ring 0.17.8", - "rustls-webpki", - "sct", -] - -[[package]] -name = "rustls-native-certs" -version = "0.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a9aace74cb666635c918e9c12bc0d348266037aa8eb599b5cba565709a8dff00" -dependencies = [ - "openssl-probe", - "rustls-pemfile", - "schannel", - "security-framework", -] - -[[package]] -name = "rustls-pemfile" -version = "1.0.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" -dependencies = [ - "base64 0.21.7", -] - -[[package]] -name = "rustls-webpki" -version = "0.101.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - -[[package]] -name = "rustversion" -version = "1.0.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ffc183a10b4478d04cbbbfc96d0873219d962dd5accaff2ffbd4ceb7df837f4" - -[[package]] -name = "ryu" -version = "1.0.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" - -[[package]] -name = "same-file" -version = "1.0.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "schannel" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" -dependencies = [ - "windows-sys 0.52.0", -] - -[[package]] -name = "schemars" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "45a28f4c49489add4ce10783f7911893516f15afe45d015608d41faca6bc4d29" -dependencies = [ - "bytes", - "dyn-clone", - "indexmap 1.9.3", - "schemars_derive", - "serde", - "serde_json", -] - -[[package]] -name = "schemars_derive" -version = "0.8.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c767fd6fa65d9ccf9cf026122c1b555f2ef9a4f0cea69da4d7dbc3e258d30967" -dependencies = [ - "proc-macro2", - "quote", - "serde_derive_internals", - "syn 1.0.109", -] - -[[package]] -name = "scopeguard" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" - -[[package]] -name = "sct" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" -dependencies = [ - "ring 0.17.8", - "untrusted 0.9.0", -] - -[[package]] -name = "secrecy" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9bd1c54ea06cfd2f6b63219704de0b9b4f72dcc2b8fdef820be6cd799780e91e" -dependencies = [ - "zeroize", -] - -[[package]] -name = "security-framework" -version = "2.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05b64fb303737d99b81884b2c63433e9ae28abebe5eb5045dcdd175dc2ecf4de" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "core-foundation-sys", - "libc", - "security-framework-sys", -] - -[[package]] -name = "security-framework-sys" -version = "2.9.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e932934257d3b408ed8f30db49d85ea163bfe74961f017f405b025af298f0c7a" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "semver" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" -dependencies = [ - "serde", -] - -[[package]] -name = "seq-macro" -version = "0.3.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" - -[[package]] -name = "serde" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fb1c873e1b9b056a4dc4c0c198b24c3ffa059243875552b2bd0933b1aee4ce2" -dependencies = [ - "serde_derive", -] - -[[package]] -name = "serde_derive" -version = "1.0.197" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7eb0b34b42edc17f6b7cac84a52a1c5f0e1bb2227e997ca9011ea3dd34e8610b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "serde_derive_internals" -version = "0.26.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85bf8229e7920a9f636479437026331ce11aa132b4dde37d121944a44d6e5f3c" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "serde_json" -version = "1.0.114" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c5f09b1bd632ef549eaa9f60a1f8de742bdbc698e6cee2095fc84dde5f549ae0" -dependencies = [ - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_path_to_error" -version = "0.1.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebd154a240de39fdebcf5775d2675c204d7c13cf39a4c697be6493c8e734337c" -dependencies = [ - "itoa", - "serde", -] - -[[package]] -name = "serde_tokenstream" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8a00ffd23fd882d096f09fcaae2a9de8329a328628e86027e049ee051dc1621f" -dependencies = [ - "proc-macro2", - "quote", - "serde", - "syn 2.0.52", -] - -[[package]] -name = "serde_urlencoded" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" -dependencies = [ - "form_urlencoded", - "itoa", - "ryu", - "serde", -] - -[[package]] -name = "serde_with" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "07ff71d2c147a7b57362cead5e22f772cd52f6ab31cfcd9edcd7f6aeb2a0afbe" -dependencies = [ - "base64 0.13.1", - "chrono", - "hex", - "indexmap 1.9.3", - "serde", - "serde_json", - "serde_with_macros", - "time", -] - -[[package]] -name = "serde_with_macros" -version = "2.3.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "881b6f881b17d13214e5d494c939ebab463d01264ce1811e9d4ac3a882e7695f" -dependencies = [ - "darling 0.20.8", - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "serde_yaml" -version = "0.9.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8fd075d994154d4a774f95b51fb96bdc2832b0ea48425c92546073816cda1f2f" -dependencies = [ - "indexmap 2.2.5", - "itoa", - "ryu", - "serde", - "unsafe-libyaml", -] - -[[package]] -name = "service-protocol-wireshark-dissector" -version = "0.9.0" -dependencies = [ - "bytes", - "mlua", - "restate-service-protocol", - "thiserror", -] - -[[package]] -name = "sha1" -version = "0.10.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e3bf829a2d51ab4a5ddf1352d8470c140cadc8301b2ae1789db023f01cedd6ba" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sha2" -version = "0.10.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" -dependencies = [ - "cfg-if", - "cpufeatures", - "digest", -] - -[[package]] -name = "sharded-slab" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" -dependencies = [ - "lazy_static", -] - -[[package]] -name = "shell-words" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "24188a676b6ae68c3b2cb3a01be17fbf7240ce009799bb56d5b1409051e78fde" - -[[package]] -name = "shlex" -version = "1.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" - -[[package]] -name = "signal-hook" -version = "0.3.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8621587d4798caf8eb44879d42e56b9a93ea5dcd315a6487c357130095b62801" -dependencies = [ - "libc", - "signal-hook-registry", -] - -[[package]] -name = "signal-hook-mio" -version = "0.2.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29ad2e15f37ec9a6cc544097b78a1ec90001e9f71b81338ca39f430adaca99af" -dependencies = [ - "libc", - "mio", - "signal-hook", -] - -[[package]] -name = "signal-hook-registry" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d8229b473baa5980ac72ef434c4415e70c4b5e71b423043adb4ba059f89c99a1" -dependencies = [ - "libc", -] - -[[package]] -name = "signature" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77549399552de45a898a580c1b41d445bf730df867cc44e6c0233bbc4b8329de" -dependencies = [ - "rand_core", -] - -[[package]] -name = "simple_asn1" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adc4e5204eb1910f40f9cfa375f6f05b68c3abac4b6fd879c8ff5e7ae8a0a085" -dependencies = [ - "num-bigint", - "num-traits", - "thiserror", - "time", -] - -[[package]] -name = "siphasher" -version = "0.3.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "38b58827f4464d87d377d175e90bf58eb00fd8716ff0a62f80356b5e61555d0d" - -[[package]] -name = "size" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9fed904c7fb2856d868b92464fc8fa597fce366edea1a9cbfaa8cb5fe080bd6d" - -[[package]] -name = "sketches-ddsketch" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85636c14b73d81f541e525f585c0a2109e6744e1565b5c1668e31c70c10ed65c" - -[[package]] -name = "slab" -version = "0.4.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" -dependencies = [ - "autocfg", -] - -[[package]] -name = "smallvec" -version = "1.13.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6ecd384b10a64542d77071bd64bd7b231f4ed5940fba55e98c3de13824cf3d7" - -[[package]] -name = "snafu" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e4de37ad025c587a29e8f3f5605c00f70b98715ef90b9061a815b9e59e9042d6" -dependencies = [ - "backtrace", - "doc-comment", - "snafu-derive", -] - -[[package]] -name = "snafu-derive" -version = "0.7.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "990079665f075b699031e9c08fd3ab99be5029b96f3b78dc0709e8f77e4efebf" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "snap" -version = "1.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b6b67fb9a61334225b5b790716f609cd58395f895b3fe8b328786812a40bc3b" - -[[package]] -name = "socket2" -version = "0.5.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" -dependencies = [ - "libc", - "windows-sys 0.52.0", -] - -[[package]] -name = "spin" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6e63cff320ae2c57904679ba7cb63280a3dc4613885beafb148ee7bf9aa9042d" - -[[package]] -name = "spin" -version = "0.9.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" - -[[package]] -name = "spki" -version = "0.7.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d91ed6c858b01f942cd56b37a94b3e0a1798290327d1236e4d9cf4eaca44d29d" -dependencies = [ - "base64ct", - "der", -] - -[[package]] -name = "sqlparser" -version = "0.41.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5cc2c25a6c66789625ef164b4c7d2e548d627902280c13710d33da8222169964" -dependencies = [ - "log", - "sqlparser_derive", -] - -[[package]] -name = "sqlparser_derive" -version = "0.2.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "01b2e185515564f15375f593fb966b5718bc624ba77fe49fa4616ad619690554" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "stable_deref_trait" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3" - -[[package]] -name = "static_assertions" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" - -[[package]] -name = "str_stack" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9091b6114800a5f2141aee1d1b9d6ca3592ac062dc5decb3764ec5895a47b4eb" - -[[package]] -name = "stringprep" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" -dependencies = [ - "finl_unicode", - "unicode-bidi", - "unicode-normalization", -] - -[[package]] -name = "strsim" -version = "0.10.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623" - -[[package]] -name = "strsim" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ee073c9e4cd00e28217186dbe12796d692868f432bf2e97ee73bed0c56dfa01" - -[[package]] -name = "strum" -version = "0.25.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "290d54ea6f91c969195bdbcd7442c8c2a2ba87da8bf60a7ee86a235d4bc1e125" -dependencies = [ - "strum_macros 0.25.3", -] - -[[package]] -name = "strum" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "723b93e8addf9aa965ebe2d11da6d7540fa2283fcea14b3371ff055f7ba13f5f" - -[[package]] -name = "strum_macros" -version = "0.25.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23dc1fa9ac9c169a78ba62f0b841814b7abae11bdd047b9c58f893439e309ea0" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.52", -] - -[[package]] -name = "strum_macros" -version = "0.26.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7a3417fc93d76740d974a01654a09777cb500428cc874ca9f45edfe0c4d4cd18" -dependencies = [ - "heck", - "proc-macro2", - "quote", - "rustversion", - "syn 2.0.52", -] - -[[package]] -name = "subtle" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81cdd64d312baedb58e21336b31bc043b77e01cc99033ce76ef539f78e965ebc" - -[[package]] -name = "symbolic-common" -version = "12.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1cccfffbc6bb3bb2d3a26cd2077f4d055f6808d266f9d4d158797a4c60510dfe" -dependencies = [ - "debugid", - "memmap2", - "stable_deref_trait", - "uuid", -] - -[[package]] -name = "symbolic-demangle" -version = "12.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a99812da4020a67e76c4eb41f08c87364c14170495ff780f30dd519c221a68" -dependencies = [ - "cpp_demangle", - "rustc-demangle", - "symbolic-common", -] - -[[package]] -name = "syn" -version = "1.0.109" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "syn" -version = "2.0.52" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b699d15b36d1f02c3e7c69f8ffef53de37aefae075d8488d4ba1a7788d574a07" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "sync_wrapper" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" - -[[package]] -name = "system-configuration" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" -dependencies = [ - "bitflags 1.3.2", - "core-foundation", - "system-configuration-sys", -] - -[[package]] -name = "system-configuration-sys" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" -dependencies = [ - "core-foundation-sys", - "libc", -] - -[[package]] -name = "tempfile" -version = "3.10.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" -dependencies = [ - "cfg-if", - "fastrand", - "rustix", - "windows-sys 0.52.0", -] - -[[package]] -name = "termcolor" -version = "1.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" -dependencies = [ - "winapi-util", -] - -[[package]] -name = "termimad" -version = "0.23.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2e32883199fc52cda7e431958dee8bc3ec6898afabc152b76959b9e0e74e2202" -dependencies = [ - "coolor", - "crossbeam", - "crossterm 0.23.2", - "minimad", - "thiserror", - "unicode-width", -] - -[[package]] -name = "terminal_size" -version = "0.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" -dependencies = [ - "rustix", - "windows-sys 0.48.0", -] - -[[package]] -name = "test-log" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7b319995299c65d522680decf80f2c108d85b861d81dfe340a10d16cee29d9e6" -dependencies = [ - "test-log-macros", - "tracing-subscriber", -] - -[[package]] -name = "test-log-macros" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8f546451eaa38373f549093fe9fd05e7d2bade739e2ddf834b9968621d60107" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "thiserror" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e45bcbe8ed29775f228095caf2cd67af7a4ccf756ebff23a306bf3e8b47b24b" -dependencies = [ - "thiserror-impl", -] - -[[package]] -name = "thiserror-impl" -version = "1.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a953cb265bef375dae3de6663da4d3804eee9682ea80d8e2542529b73c531c81" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "thread_local" -version = "1.1.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" -dependencies = [ - "cfg-if", - "once_cell", -] - -[[package]] -name = "thrift" -version = "0.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7e54bc85fc7faa8bc175c4bab5b92ba8d9a3ce893d0e9f42cc455c8ab16a9e09" -dependencies = [ - "byteorder", - "integer-encoding", - "ordered-float 2.10.1", -] - -[[package]] -name = "tikv-jemalloc-sys" -version = "0.5.4+5.3.0-patched" -source = "git+https://github.com/restatedev/jemallocator?rev=7c32f6e3d6ad5e4e492cc08d6bdb8307acf9afa0#7c32f6e3d6ad5e4e492cc08d6bdb8307acf9afa0" -dependencies = [ - "cc", - "libc", -] - -[[package]] -name = "tikv-jemallocator" -version = "0.5.4" -source = "git+https://github.com/restatedev/jemallocator?rev=7c32f6e3d6ad5e4e492cc08d6bdb8307acf9afa0#7c32f6e3d6ad5e4e492cc08d6bdb8307acf9afa0" -dependencies = [ - "libc", - "tikv-jemalloc-sys", -] - -[[package]] -name = "time" -version = "0.3.34" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8248b6521bb14bc45b4067159b9b6ad792e2d6d754d6c41fb50e29fefe38749" -dependencies = [ - "deranged", - "itoa", - "libc", - "num-conv", - "num_threads", - "powerfmt", - "serde", - "time-core", - "time-macros", -] - -[[package]] -name = "time-core" -version = "0.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ef927ca75afb808a4d64dd374f00a2adf8d0fcff8e7b184af886c3c87ec4a3f3" - -[[package]] -name = "time-macros" -version = "0.2.17" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7ba3a3ef41e6672a2f0f001392bb5dcd3ff0a9992d618ca761a11c3121547774" -dependencies = [ - "num-conv", - "time-core", -] - -[[package]] -name = "tiny-gradient" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8063c572fcc935676f1e01615f201f355a053e88525ec41c1b0c4884ce104847" -dependencies = [ - "libm", -] - -[[package]] -name = "tiny-keccak" -version = "2.0.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" -dependencies = [ - "crunchy", -] - -[[package]] -name = "tinytemplate" -version = "1.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc" -dependencies = [ - "serde", - "serde_json", -] - -[[package]] -name = "tinyvec" -version = "1.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" -dependencies = [ - "tinyvec_macros", -] - -[[package]] -name = "tinyvec_macros" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" - -[[package]] -name = "tokio" -version = "1.36.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61285f6515fa018fb2d1e46eb21223fff441ee8db5d0f1435e8ab4f5cdb80931" -dependencies = [ - "backtrace", - "bytes", - "libc", - "mio", - "num_cpus", - "parking_lot", - "pin-project-lite", - "signal-hook-registry", - "socket2", - "tokio-macros", - "tracing", - "windows-sys 0.48.0", -] - -[[package]] -name = "tokio-io-timeout" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" -dependencies = [ - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-macros" -version = "2.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "tokio-rustls" -version = "0.24.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" -dependencies = [ - "rustls", - "tokio", -] - -[[package]] -name = "tokio-stream" -version = "0.1.14" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" -dependencies = [ - "futures-core", - "pin-project-lite", - "tokio", -] - -[[package]] -name = "tokio-util" -version = "0.7.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" -dependencies = [ - "bytes", - "futures-core", - "futures-sink", - "pin-project-lite", - "tokio", - "tracing", -] - -[[package]] -name = "toml_datetime" -version = "0.6.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3550f4e9685620ac18a50ed434eb3aec30db8ba93b0287467bca5826ea25baf1" - -[[package]] -name = "toml_edit" -version = "0.19.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" -dependencies = [ - "indexmap 2.2.5", - "toml_datetime", - "winnow", -] - -[[package]] -name = "tonic" -version = "0.9.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3082666a3a6433f7f511c7192923fa1fe07c69332d3c6a2e6bb040b569199d5a" -dependencies = [ - "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "futures-core", - "futures-util", - "h2 0.3.24", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-timeout", - "percent-encoding", - "pin-project", - "prost 0.11.9", - "tokio", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tonic" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d560933a0de61cf715926b9cac824d4c883c2c43142f787595e48280c40a1d0e" -dependencies = [ - "async-stream", - "async-trait", - "axum", - "base64 0.21.7", - "bytes", - "h2 0.3.24", - "http 0.2.12", - "http-body 0.4.6", - "hyper 0.14.28", - "hyper-timeout", - "percent-encoding", - "pin-project", - "prost 0.12.3", - "tokio", - "tokio-stream", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tonic-build" -version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be4ef6dd70a610078cb4e338a0f79d06bc759ff1b22d2120c2ff02ae264ba9c2" -dependencies = [ - "prettyplease", - "proc-macro2", - "prost-build", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "tonic-reflection" -version = "0.10.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fa37c513df1339d197f4ba21d28c918b9ef1ac1768265f11ecb6b7f1cba1b76" -dependencies = [ - "prost 0.12.3", - "prost-types", - "tokio", - "tokio-stream", - "tonic 0.10.2", -] - -[[package]] -name = "tower" -version = "0.4.13" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" -dependencies = [ - "futures-core", - "futures-util", - "indexmap 1.9.3", - "pin-project", - "pin-project-lite", - "rand", - "slab", - "tokio", - "tokio-util", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-http" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61c5bb1d698276a2443e5ecfabc1008bf15a36c12e6a7176e7bf089ea9131140" -dependencies = [ - "bitflags 2.4.2", - "bytes", - "futures-core", - "futures-util", - "http 0.2.12", - "http-body 0.4.6", - "http-range-header", - "iri-string", - "pin-project-lite", - "tower", - "tower-layer", - "tower-service", - "tracing", -] - -[[package]] -name = "tower-http" -version = "0.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1e9cd434a998747dd2c4276bc96ee2e0c7a2eadf3cae88e52be55a05fa9053f5" -dependencies = [ - "bitflags 2.4.2", - "bytes", - "http 1.1.0", - "http-body 1.0.0", - "http-body-util", - "pin-project-lite", - "tower-layer", - "tower-service", -] - -[[package]] -name = "tower-layer" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c20c8dbed6283a09604c3e69b4b7eeb54e298b8a600d4d5ecb5ad39de609f1d0" - -[[package]] -name = "tower-service" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" - -[[package]] -name = "tracing" -version = "0.1.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" -dependencies = [ - "log", - "pin-project-lite", - "tracing-attributes", - "tracing-core", -] - -[[package]] -name = "tracing-attributes" -version = "0.1.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "tracing-core" -version = "0.1.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" -dependencies = [ - "once_cell", - "valuable", -] - -[[package]] -name = "tracing-log" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f751112709b4e791d8ce53e32c4ed2d353565a795ce84da2285393f41557bdf2" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-log" -version = "0.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" -dependencies = [ - "log", - "once_cell", - "tracing-core", -] - -[[package]] -name = "tracing-opentelemetry" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "75327c6b667828ddc28f5e3f169036cb793c3f588d83bf0f262a7f062ffed3c8" -dependencies = [ - "once_cell", - "opentelemetry", - "opentelemetry_sdk", - "smallvec", - "tracing", - "tracing-core", - "tracing-log 0.1.4", - "tracing-subscriber", -] - -[[package]] -name = "tracing-panic" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "eaf80030ce049691c9922d75be63cadf345110a245cd4581833c66f87c02ad25" -dependencies = [ - "tracing", - "tracing-subscriber", -] - -[[package]] -name = "tracing-serde" -version = "0.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bc6b213177105856957181934e4920de57730fc69bf42c37ee5bb664d406d9e1" -dependencies = [ - "serde", - "tracing-core", -] - -[[package]] -name = "tracing-subscriber" -version = "0.3.18" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad0f048c97dbd9faa9b7df56362b8ebcaa52adb06b498c050d2f4e32f90a7a8b" -dependencies = [ - "matchers", - "nu-ansi-term", - "once_cell", - "regex", - "serde", - "serde_json", - "sharded-slab", - "smallvec", - "thread_local", - "tracing", - "tracing-core", - "tracing-log 0.2.0", - "tracing-serde", -] - -[[package]] -name = "tracing-test" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3a2c0ff408fe918a94c428a3f2ad04e4afd5c95bbc08fcf868eff750c15728a4" -dependencies = [ - "lazy_static", - "tracing-core", - "tracing-subscriber", - "tracing-test-macro", -] - -[[package]] -name = "tracing-test-macro" -version = "0.2.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "258bc1c4f8e2e73a977812ab339d503e6feeb92700f6d07a6de4d321522d5c08" -dependencies = [ - "lazy_static", - "quote", - "syn 1.0.109", -] - -[[package]] -name = "try-lock" -version = "0.2.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" - -[[package]] -name = "twox-hash" -version = "1.6.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97fee6b57c6a41524a810daee9286c02d7752c4253064d0b05472833a438f675" -dependencies = [ - "cfg-if", - "static_assertions", -] - -[[package]] -name = "typenum" -version = "1.17.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" - -[[package]] -name = "typify" -version = "0.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "63ed4d717aa95e598e2f9183376b060e95669ef8f444701ea6afb990fde1cf69" -dependencies = [ - "typify-impl", - "typify-macro", -] - -[[package]] -name = "typify-impl" -version = "0.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89057244dfade7c58af9e62beccbcbeb7a7e7701697a33b06dbe0b7331fb79cf" -dependencies = [ - "heck", - "log", - "proc-macro2", - "quote", - "regress 0.7.1", - "schemars", - "serde_json", - "syn 2.0.52", - "thiserror", - "unicode-ident", -] - -[[package]] -name = "typify-macro" -version = "0.0.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2ddade397f5957d2cd7fb27f905a9a569db20e8e1e3ea589edce40be07b92825" -dependencies = [ - "proc-macro2", - "quote", - "schemars", - "serde", - "serde_json", - "serde_tokenstream", - "syn 2.0.52", - "typify-impl", -] - -[[package]] -name = "ulid" -version = "1.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34778c17965aa2a08913b57e1f34db9b4a63f5de31768b55bf20d2795f921259" -dependencies = [ - "getrandom", - "rand", - "web-time", -] - -[[package]] -name = "uncased" -version = "0.9.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e1b88fcfe09e89d3866a5c11019378088af2d24c3fbd4f0543f96b479ec90697" -dependencies = [ - "version_check", -] - -[[package]] -name = "unicode-bidi" -version = "0.3.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-normalization" -version = "0.1.23" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" -dependencies = [ - "tinyvec", -] - -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - -[[package]] -name = "unicode-width" -version = "0.1.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e51733f11c9c4f72aa0c160008246859e340b00807569a0da0e7a1079b27ba85" - -[[package]] -name = "unsafe-libyaml" -version = "0.2.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ab4c90930b95a82d00dc9e9ac071b4991924390d46cbd0dfe566148667605e4b" - -[[package]] -name = "untrusted" -version = "0.7.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" - -[[package]] -name = "untrusted" -version = "0.9.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" - -[[package]] -name = "url" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" -dependencies = [ - "form_urlencoded", - "idna", - "percent-encoding", - "serde", -] - -[[package]] -name = "urlencoding" -version = "2.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "daf8dba3b7eb870caf1ddeed7bc9d2a049f3cfdfae7cb521b087cc33ae4c49da" - -[[package]] -name = "utf8parse" -version = "0.2.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" - -[[package]] -name = "uuid" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f00cc9702ca12d3c81455259621e676d0f7251cec66a21e98fe2e9a37db93b2a" -dependencies = [ - "atomic 0.5.3", - "getrandom", - "serde", -] - -[[package]] -name = "valuable" -version = "0.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" - -[[package]] -name = "vcpkg" -version = "0.2.15" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" - -[[package]] -name = "vergen" -version = "8.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e27d6bdd219887a9eadd19e1c34f32e47fa332301184935c6d9bca26f3cca525" -dependencies = [ - "anyhow", - "cargo_metadata", - "cfg-if", - "regex", - "rustversion", - "time", -] - -[[package]] -name = "version_check" -version = "0.9.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" - -[[package]] -name = "vsimd" -version = "0.8.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c3082ca00d5a5ef149bb8b555a72ae84c9c59f7250f013ac822ac2e49b19c64" - -[[package]] -name = "walkdir" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" -dependencies = [ - "same-file", - "winapi-util", -] - -[[package]] -name = "want" -version = "0.3.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" -dependencies = [ - "try-lock", -] - -[[package]] -name = "wasi" -version = "0.11.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" - -[[package]] -name = "wasm-bindgen" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" -dependencies = [ - "cfg-if", - "wasm-bindgen-macro", -] - -[[package]] -name = "wasm-bindgen-backend" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" -dependencies = [ - "bumpalo", - "log", - "once_cell", - "proc-macro2", - "quote", - "syn 2.0.52", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-futures" -version = "0.4.42" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" -dependencies = [ - "cfg-if", - "js-sys", - "wasm-bindgen", - "web-sys", -] - -[[package]] -name = "wasm-bindgen-macro" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" -dependencies = [ - "quote", - "wasm-bindgen-macro-support", -] - -[[package]] -name = "wasm-bindgen-macro-support" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", - "wasm-bindgen-backend", - "wasm-bindgen-shared", -] - -[[package]] -name = "wasm-bindgen-shared" -version = "0.2.92" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" - -[[package]] -name = "web-sys" -version = "0.3.69" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "web-time" -version = "1.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5a6580f308b1fad9207618087a65c04e7a10bc77e02c8e84e9b00dd4b12fa0bb" -dependencies = [ - "js-sys", - "wasm-bindgen", -] - -[[package]] -name = "webpki-roots" -version = "0.25.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" - -[[package]] -name = "which" -version = "4.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" -dependencies = [ - "either", - "home", - "once_cell", - "rustix", -] - -[[package]] -name = "winapi" -version = "0.3.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" -dependencies = [ - "winapi-i686-pc-windows-gnu", - "winapi-x86_64-pc-windows-gnu", -] - -[[package]] -name = "winapi-i686-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" - -[[package]] -name = "winapi-util" -version = "0.1.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f29e6f9198ba0d26b4c9f07dbe6f9ed633e1f3d5b8b414090084349e46a52596" -dependencies = [ - "winapi", -] - -[[package]] -name = "winapi-x86_64-pc-windows-gnu" -version = "0.4.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" - -[[package]] -name = "windows-core" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "33ab640c8d7e35bf8ba19b884ba838ceb4fba93a4e8c65a9059d08afcfc683d9" -dependencies = [ - "windows-targets 0.52.4", -] - -[[package]] -name = "windows-sys" -version = "0.48.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" -dependencies = [ - "windows-targets 0.48.5", -] - -[[package]] -name = "windows-sys" -version = "0.52.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" -dependencies = [ - "windows-targets 0.52.4", -] - -[[package]] -name = "windows-targets" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" -dependencies = [ - "windows_aarch64_gnullvm 0.48.5", - "windows_aarch64_msvc 0.48.5", - "windows_i686_gnu 0.48.5", - "windows_i686_msvc 0.48.5", - "windows_x86_64_gnu 0.48.5", - "windows_x86_64_gnullvm 0.48.5", - "windows_x86_64_msvc 0.48.5", -] - -[[package]] -name = "windows-targets" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" -dependencies = [ - "windows_aarch64_gnullvm 0.52.4", - "windows_aarch64_msvc 0.52.4", - "windows_i686_gnu 0.52.4", - "windows_i686_msvc 0.52.4", - "windows_x86_64_gnu 0.52.4", - "windows_x86_64_gnullvm 0.52.4", - "windows_x86_64_msvc 0.52.4", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" - -[[package]] -name = "windows_i686_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" - -[[package]] -name = "windows_i686_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.48.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" - -[[package]] -name = "winnow" -version = "0.5.40" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" -dependencies = [ - "memchr", -] - -[[package]] -name = "winreg" -version = "0.50.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" -dependencies = [ - "cfg-if", - "windows-sys 0.48.0", -] - -[[package]] -name = "x509-certificate" -version = "0.20.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2133ce6c08c050a5b368730a67c53a603ffd4a4a6c577c5218675a19f7782c05" -dependencies = [ - "bcder", - "bytes", - "chrono", - "der", - "hex", - "pem 2.0.1", - "ring 0.16.20", - "signature", - "spki", - "thiserror", -] - -[[package]] -name = "xmlparser" -version = "0.13.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "66fee0b777b0f5ac1c69bb06d361268faafa61cd4682ae064a171c16c433e9e4" - -[[package]] -name = "xtask" -version = "0.9.0" -dependencies = [ - "anyhow", - "drain", - "reqwest", - "restate-admin", - "restate-bifrost", - "restate-core", - "restate-meta", - "restate-node-services", - "restate-schema-api", - "restate-server", - "restate-types", - "restate-worker-api", - "schemars", - "serde_json", - "serde_yaml", - "tokio", - "tonic 0.10.2", -] - -[[package]] -name = "xxhash-rust" -version = "0.8.10" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" - -[[package]] -name = "xz2" -version = "0.1.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "388c44dc09d76f1536602ead6d325eb532f5c122f17782bd57fb47baeeb767e2" -dependencies = [ - "lzma-sys", -] - -[[package]] -name = "yansi" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "09041cd90cf85f7f8b2df60c646f853b7f535ce68f85244eb6731cf89fa498ec" - -[[package]] -name = "yansi" -version = "1.0.0-rc.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1367295b8f788d371ce2dbc842c7b709c73ee1364d30351dd300ec2203b12377" - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.52", -] - -[[package]] -name = "zeroize" -version = "1.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" - -[[package]] -name = "zip" -version = "0.6.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "760394e246e4c28189f19d488c058bf16f564016aefac5d32bb1f3b51d5e9261" -dependencies = [ - "aes", - "byteorder", - "bzip2", - "constant_time_eq 0.1.5", - "crc32fast", - "crossbeam-utils", - "flate2", - "hmac", - "pbkdf2", - "sha1", - "time", - "zstd 0.11.2+zstd.1.5.2", -] - -[[package]] -name = "zip-extensions" -version = "0.6.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cecf62554c4ff96bce01a7ef123d160c3ffe9180638820f8b4d545c65b221b8c" -dependencies = [ - "zip", -] - -[[package]] -name = "zstd" -version = "0.11.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20cc960326ece64f010d2d2107537f26dc589a6573a316bd5b1dba685fa5fde4" -dependencies = [ - "zstd-safe 5.0.2+zstd.1.5.2", -] - -[[package]] -name = "zstd" -version = "0.13.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bffb3309596d527cfcba7dfc6ed6052f1d39dfbd7c867aa2e865e4a449c10110" -dependencies = [ - "zstd-safe 7.0.0", -] - -[[package]] -name = "zstd-safe" -version = "5.0.2+zstd.1.5.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1d2a5585e04f9eea4b2a3d1eca508c4dee9592a89ef6f450c11719da0726f4db" -dependencies = [ - "libc", - "zstd-sys", -] - -[[package]] -name = "zstd-safe" -version = "7.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43747c7422e2924c11144d5229878b98180ef8b06cca4ab5af37afc8a8d8ea3e" -dependencies = [ - "zstd-sys", -] - -[[package]] -name = "zstd-sys" -version = "2.0.9+zstd.1.5.5" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9e16efa8a874a0481a574084d34cc26fdb3b99627480f785888deb6386506656" -dependencies = [ - "cc", - "pkg-config", -] diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index f797da03b..000000000 --- a/Cargo.toml +++ /dev/null @@ -1,175 +0,0 @@ -[workspace] -members = [ - "cli", - "crates/*", - "crates/codederror/derive", - "server", - "tools/service-protocol-wireshark-dissector", - "tools/xtask", -] -default-members = [ - "cli", - "crates/*", - "crates/codederror/derive", - "server", - "tools/xtask", -] -resolver = "2" - -[workspace.package] -version = "0.9.0" -authors = ["restate.dev"] -edition = "2021" -rust-version = "1.75" -license = "BUSL-1.1" -repository = "https://github.com/restatedev/restate" -description = "Restate makes distributed applications easy!" - -[workspace.dependencies] -# Own crates -codederror = { path = "crates/codederror" } -restate-admin = { path = "crates/admin" } -restate-base64-util = { path = "crates/base64-util" } -restate-benchmarks = { path = "crates/benchmarks" } -restate-bifrost = { path = "crates/bifrost" } -restate-cluster-controller = { path = "crates/cluster-controller" } -restate-core = { path = "crates/core" } -restate-errors = { path = "crates/errors" } -restate-fs-util = { path = "crates/fs-util" } -restate-futures-util = { path = "crates/futures-util" } -restate-ingress-dispatcher = { path = "crates/ingress-dispatcher" } -restate-ingress-http = { path = "crates/ingress-http" } -restate-ingress-kafka = { path = "crates/ingress-kafka" } -restate-invoker-api = { path = "crates/invoker-api" } -restate-invoker-impl = { path = "crates/invoker-impl" } -restate-meta = { path = "crates/meta" } -restate-meta-rest-model = { path = "crates/meta-rest-model" } -restate-network = { path = "crates/network" } -restate-node = { path = "crates/node" } -restate-node-protocol = { path = "crates/node-protocol" } -restate-node-services = { path = "crates/node-services" } -restate-pb = { path = "crates/pb" } -restate-queue = { path = "crates/queue" } -restate-schema-api = { path = "crates/schema-api" } -restate-schema-impl = { path = "crates/schema-impl" } -restate-serde-util = { path = "crates/serde-util" } -restate-server = { path = "server" } -restate-service-client = { path = "crates/service-client" } -restate-service-protocol = { path = "crates/service-protocol" } -restate-storage-api = { path = "crates/storage-api" } -restate-storage-proto = { path = "crates/storage-proto" } -restate-storage-query-datafusion = { path = "crates/storage-query-datafusion" } -restate-storage-query-postgres = { path = "crates/storage-query-postgres" } -restate-storage-rocksdb = { path = "crates/storage-rocksdb" } -restate-test-util = { path = "crates/test-util" } -restate-timer = { path = "crates/timer" } -restate-timer-queue = { path = "crates/timer-queue" } -restate-tracing-instrumentation = { path = "crates/tracing-instrumentation" } -restate-types = { path = "crates/types" } -restate-wal-protocol = { path = "crates/wal-protocol" } -restate-worker = { path = "crates/worker" } -restate-worker-api = { path = "crates/worker-api" } - -# External crates -ahash = "0.8.5" -anyhow = "1.0.68" -arc-swap = "1.6" -arrow = { version = "50.0.0", default-features = false } -arrow-flight = { version = "50.0.0" } -assert2 = "0.3.11" -async-channel = "2.1.1" -async-trait = "0.1.73" -axum = "0.6.18" -base64 = "0.21" -bincode = { version = "2.0.0-rc", default-features = false, features = ["std", "serde", ] } -bytes = { version = "1.3", features = ["serde"] } -bytes-utils = "0.1.3" -bytestring = { version = "1.2", features = ["serde"] } -chrono = { version = "0.4.31", default-features = false, features = ["clock"] } -criterion = "0.5" -dashmap = { version = "5.5.3" } -datafusion = { version = "35.0.0" } -datafusion-expr = { version = "35.0.0" } -derive_builder = "0.12.0" -derive_more = { version = "0.99.17" } -drain = "0.1.1" -enum-map = { version = "2.7.3" } -enumset = { version = "1.1.3" } -futures = "0.3.25" -futures-sink = "0.3.25" -futures-util = "0.3.25" -googletest = "0.10" -http = "0.2.9" -humantime = "2.1.0" -hyper = { version = "0.14.24", default-features = false } -hyper-rustls = { version = "0.24.1", features = ["http2"] } -itertools = "0.11.0" -metrics = { version = "0.22" } -once_cell = "1.18" -opentelemetry = { version = "0.20.0" } -opentelemetry-http = { version = "0.9.0" } -opentelemetry_api = { version = "0.20.0" } -paste = "1.0" -pin-project = "1.0" -prost = "0.12.1" -prost-build = "0.12.1" -prost-types = "0.12.1" -rand = "0.8.5" -rocksdb = { version = "0.22.0" } -rustls = "0.21.6" -schemars = { version = "0.8", features = ["bytes"] } -serde = { version = "1.0", features = ["derive"] } -serde_json = "1.0" -serde_with = "2.2" -serde_yaml = "0.9" -sha2 = "0.10.8" -static_assertions = { version = "1.1.0" } -strum = { version = "0.26.1" } -strum_macros = { version = "0.26.1" } -sync_wrapper = "0.1.2" -tempfile = "3.6.0" -test-log = { version = "0.2.11", default-features = false, features = ["trace"] } -# tikv-jemallocator has not yet been released with musl target support, so we pin a main commit -tikv-jemallocator = { git = "https://github.com/restatedev/jemallocator", rev = "7c32f6e3d6ad5e4e492cc08d6bdb8307acf9afa0", default-features = false } -thiserror = "1.0" -tokio = { version = "1.29", default-features = false, features = ["rt-multi-thread", "signal", "macros", ] } -tokio-util = { version = "0.7.10" } -tokio-stream = "0.1.14" -tonic = { version = "0.10.2", default-features = false } -tonic-reflection = { version = "0.10.2" } -tonic-build = "0.11.0" -tower = "0.4" -tower-http = { version = "0.4", default-features = false } -tracing = "0.1" -tracing-opentelemetry = { version = "0.21.0" } -tracing-subscriber = { version = "0.3", features = ["env-filter", "fmt"] } -tracing-test = { version = "0.2.4" } -ulid = { version = "1.1.0" } -uuid = { version = "1.3.0", features = ["v7", "serde"] } - -[patch.crates-io] -# Patch these until https://github.com/smithy-lang/smithy-rs/pull/3416 merged and released -aws-config = { git = "https://github.com/restatedev/aws-sdk-rust", commit = "684ccb3c39808a3ad183adbba07a2daa3b9a5dae" } -aws-credential-types = { git = "https://github.com/restatedev/aws-sdk-rust", commit = "684ccb3c39808a3ad183adbba07a2daa3b9a5dae" } -aws-sdk-lambda = { git = "https://github.com/restatedev/aws-sdk-rust", commit = "684ccb3c39808a3ad183adbba07a2daa3b9a5dae" } -aws-sdk-sts = { git = "https://github.com/restatedev/aws-sdk-rust", commit = "684ccb3c39808a3ad183adbba07a2daa3b9a5dae" } -aws-smithy-runtime = { git = "https://github.com/restatedev/aws-sdk-rust", commit = "684ccb3c39808a3ad183adbba07a2daa3b9a5dae" } - -[profile.release] -opt-level = 3 -lto = "thin" -codegen-units = 1 -# Let's be defensive and abort on every panic -panic = "abort" - -[profile.dev] -# Let's be defensive and abort on every panic -panic = "abort" - -[profile.release.package.service-protocol-wireshark-dissector] -opt-level = "z" # Optimize for size. -strip = true # Automatically strip symbols from the binary. - -[profile.bench] -# Should be enabled for benchmarking runs; increases binary size -debug = true diff --git a/LICENSE b/LICENSE index 8a284e21c..b81eecf56 100644 --- a/LICENSE +++ b/LICENSE @@ -1,102 +1,21 @@ -Business Source License 1.1 - -Parameters - -Licensor: Restate Software, Inc., Restate GmbH -Licensed Work: Restate - The Licensed Work is (c) 2023 Restate Software, Inc., Restate GmbH -Additional Use Grant: You may make use of the Licensed Work, provided that - you may not use the Licensed Work for an Application - Platform Service. - - An “Application Platform Service” is a commercial - offering that allows third parties (other than your - employees and contractors) to access the functionality - of the Licensed Work by registering new services - (directly or indirectly) with the Licensed Work for - the purpose of invoking such services through the - Licensed Work. - -Change Date: 4 years after release - -Change License: Apache License, Version 2.0 - -Notice - -The Business Source License (this document, or the “License”) is not an Open -Source license. However, the Licensed Work will eventually be made available -under an Open Source License, as stated in this License. - -License text copyright (c) 2017 MariaDB Corporation Ab, All Rights Reserved. -“Business Source License” is a trademark of MariaDB Corporation Ab. - ------------------------------------------------------------------------------ - -Business Source License 1.1 - -Terms - -The Licensor hereby grants you the right to copy, modify, create derivative -works, redistribute, and make non-production use of the Licensed Work. The -Licensor may make an Additional Use Grant, above, permitting limited -production use. - -Effective on the Change Date, or the fourth anniversary of the first publicly -available distribution of a specific version of the Licensed Work under this -License, whichever comes first, the Licensor hereby grants you rights under -the terms of the Change License, and the rights granted in the paragraph -above terminate. - -If your use of the Licensed Work does not comply with the requirements -currently in effect as described in this License, you must purchase a -commercial license from the Licensor, its affiliated entities, or authorized -resellers, or you must refrain from using the Licensed Work. - -All copies of the original and modified Licensed Work, and derivative works -of the Licensed Work, are subject to this License. This License applies -separately for each version of the Licensed Work and the Change Date may vary -for each version of the Licensed Work released by Licensor. - -You must conspicuously display this License on each original or modified copy -of the Licensed Work. If you receive the Licensed Work in original or -modified form from a third party, the terms and conditions set forth in this -License apply to your use of that work. - -Any use of the Licensed Work in violation of this License will automatically -terminate your rights under this License for the current and all other -versions of the Licensed Work. - -This License does not grant you any right in any trademark or logo of -Licensor or its affiliates (provided that you may use a trademark or logo of -Licensor as expressly required by this License). - -TO THE EXTENT PERMITTED BY APPLICABLE LAW, THE LICENSED WORK IS PROVIDED ON -AN “AS IS” BASIS. LICENSOR HEREBY DISCLAIMS ALL WARRANTIES AND CONDITIONS, -EXPRESS OR IMPLIED, INCLUDING (WITHOUT LIMITATION) WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, NON-INFRINGEMENT, AND -TITLE. - -MariaDB hereby grants you permission to use this License’s text to license -your works, and to refer to it using the trademark “Business Source License”, -as long as you comply with the Covenants of Licensor below. - -Covenants of Licensor - -In consideration of the right to use this License’s text and the “Business -Source License” name and trademark, Licensor covenants to MariaDB, and to all -other recipients of the licensed work to be provided by Licensor: - -1. To specify as the Change License the GPL Version 2.0 or any later version, - or a license that is compatible with GPL Version 2.0 or a later version, - where “compatible” means that software provided under the Change License can - be included in a program with software provided under GPL Version 2.0 or a - later version. Licensor may specify additional Change Licenses without - limitation. - -2. To either: (a) specify an additional grant of rights to use that does not - impose any additional restriction on the right granted in this License, as - the Additional Use Grant; or (b) insert the text “None”. - -3. To specify a Change Date. - -4. Not to modify this License in any other way. \ No newline at end of file +MIT License + +Copyright (c) 2023 - Restate Software, Inc., Restate GmbH + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE +SOFTWARE \ No newline at end of file diff --git a/README.md b/README.md index 3c4f80e1c..9ff013d04 100644 --- a/README.md +++ b/README.md @@ -1,108 +1,13 @@ -[![Documentation](https://img.shields.io/badge/doc-reference-blue)](https://docs.restate.dev) -[![Examples](https://img.shields.io/badge/view-examples-blue)](https://github.com/restatedev/examples) -[![Discord](https://img.shields.io/discord/1128210118216007792?logo=discord)](https://discord.gg/skW3AZ6uGd) -[![Twitter](https://img.shields.io/twitter/follow/restatedev.svg?style=social&label=Follow)](https://twitter.com/intent/follow?screen_name=restatedev) +# Restate Service Protocol -# Restate - Building resilient applications made easy! +This repo contains specification documents and Protobuf schemas of the Restate Service Protocol. -

- - - - Restate overview - -

+* [Service invocation protocol specification](./service-invocation-protocol.md) -Easily build workflows, event-driven applications, and distributed services in a fault-tolerant manner with durable async/await. +## Development -[Restate](https://restate.dev) is great at building: +To format the spec document: -* [Lambda Workflows as Code](https://restate.dev/blog/we-replaced-400-lines-of-stepfunctions-asl-with-40-lines-of-typescript-by-making-lambdas-suspendable/) -* [Transactional RPC Handlers](https://github.com/restatedev/examples/tree/main/end-to-end-applications/typescript/ecommerce-store) -* [Event Processing with Kafka](https://restate.dev/blog/restate--kafka-event-driven-apps-where-event-driven-is-an-implementation-detail/) -* [Much more](https://github.com/restatedev/examples) - -## Get started with Restate - -1. 🏎 [Check out our quickstart](https://docs.restate.dev/quickstart) to get up and running with Restate in 2 minutes! -1. 💡 [The tour of Restate](https://docs.restate.dev/tour) walks you through all features of Restate. - -## SDKs - -Restate supports the following SDKs: - -* [Typescript](https://github.com/restatedev/sdk-typescript) -* [Java and Kotlin](https://github.com/restatedev/sdk-java) - -## Install - -We offer pre-built binaries of the CLI and the server for MacOS and Linux. - -### Install the server - -Install via Homebrew: -```bash -brew install restatedev/tap/restate-server -``` - -Run via npx: -```bash -npx @restatedev/restate-server -``` - -Run via docker: -```bash -docker run --rm -it --network=host docker.io/restatedev/restate:latest -``` - -### Install the CLI - -Install via Homebrew: -```bash -brew install restatedev/tap/restate ``` - -Install via npm: -```bash -npm install --global @restatedev/restate -``` - -Run via npx: -```bash -npx @restatedev/restate -``` - -You can also download the binaries from the [release page](https://github.com/restatedev/restate/releases) or our [download page](https://restate.dev/get-restate/). - -## Community - -* 🤗️ [Join our online community](https://discord.gg/skW3AZ6uGd) for help, sharing feedback and talking to the community. -* 📖 [Check out our documentation](https://docs.restate.dev) to get quickly started! -* 📣 [Follow us on Twitter](https://twitter.com/restatedev) for staying up to date. -* 🙋 [Create a GitHub issue](https://github.com/restatedev/restate/issues) for requesting a new feature or reporting a problem. -* 🏠 [Visit our GitHub org](https://github.com/restatedev) for exploring other repositories. - -## Core primitives - -The basic primitives Restate offers to simplify application development are the following: - -* **Reliable Execution**: user code will always run to completion. Intermediate failures result in re-tries that use the durable execution mechanism to recover partial progress and not duplicate already executed steps. -* **Suspending User Code**: long-running user code suspends when awaiting on a promise and resume when that promise is resolved. -* **Reliable Communication**: user code communicates with exactly-once semantics. Restate reliably delivers messages and anchors both sender and receiver in the durable execution to ensure no losses or duplicates can happen. -* **Durable Timers**: user code can sleep (and suspend) or schedule calls for later. -* **Isolation**: user code can be keyed, which makes Restate scheduled them to obey single-writer-per-key semantics. -* **Consistent State**: keyed user code can attach key/value state, which is eagerly pushed into handlers during invocation, and written back upon completion. This is particularly efficient for FaaS deployments (stateful serverless, yay!). -* **Observability & Introspection**: Restate automatically generates Open Telemetry traces for the interactions between handlers and gives you a SQL shell to query the distributed state of the application. - -## Contributing - -We’re excited if you join the Restate community and start contributing! -Whether it is feature requests, bug reports, ideas & feedback or PRs, we appreciate any and all contributions. -We know that your time is precious and, therefore, deeply value any effort to contribute! - -Check out our [development guidelines](/docs/dev/development-guidelines.md) and [tips for local development](/docs/dev/local-development.md) to get started. - -### Building Restate locally - -In order to build Restate locally [follow the build instructions](https://github.com/restatedev/restate/blob/main/docs/dev/local-development.md#building-restate). - +npx prettier -w service-invocation-protocol.md +``` \ No newline at end of file diff --git a/charts/restate-helm/.helmignore b/charts/restate-helm/.helmignore deleted file mode 100644 index 0e8a0eb36..000000000 --- a/charts/restate-helm/.helmignore +++ /dev/null @@ -1,23 +0,0 @@ -# Patterns to ignore when building packages. -# This supports shell glob matching, relative path matching, and -# negation (prefixed with !). Only one pattern per line. -.DS_Store -# Common VCS dirs -.git/ -.gitignore -.bzr/ -.bzrignore -.hg/ -.hgignore -.svn/ -# Common backup files -*.swp -*.bak -*.tmp -*.orig -*~ -# Various IDEs -.project -.idea/ -*.tmproj -.vscode/ diff --git a/charts/restate-helm/Chart.yaml b/charts/restate-helm/Chart.yaml deleted file mode 100644 index f3f40273e..000000000 --- a/charts/restate-helm/Chart.yaml +++ /dev/null @@ -1,9 +0,0 @@ -apiVersion: v2 -name: restate-helm -description: Deploy a Restate cluster on Kubernetes -type: application -version: "0.8.1" -home: https://restate.dev -sources: - - https://github.com/restatedev/restate -icon: https://restate.dev/restate.png diff --git a/charts/restate-helm/README.md b/charts/restate-helm/README.md deleted file mode 100644 index 1cd8bcbd0..000000000 --- a/charts/restate-helm/README.md +++ /dev/null @@ -1,9 +0,0 @@ -# Restate - -Helm chart for Restate as a single-node StatefulSet. - -## Installing - -```bash -helm install restate oci://ghcr.io/restatedev/restate-helm --namespace restate --create-namespace -``` diff --git a/charts/restate-helm/templates/_helpers.tpl b/charts/restate-helm/templates/_helpers.tpl deleted file mode 100644 index 4a28075ca..000000000 --- a/charts/restate-helm/templates/_helpers.tpl +++ /dev/null @@ -1,22 +0,0 @@ -{{- define "restate.name" -}} -{{- default .Chart.Name .Values.nameOverride | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{- define "restate.fullname" -}} -{{- $name := default .Chart.Name .Values.nameOverride }} -{{- $name | trunc 63 | trimSuffix "-" }} -{{- end }} - -{{- define "restate.labels" -}} -{{- include "restate.selectorLabels" . }} -app.kubernetes.io/name: {{ include "restate.name" . }} -app.kubernetes.io/version: {{ .Values.version | default .Chart.Version | quote }} -{{- end }} - -{{- define "restate.selectorLabels" -}} -app: {{ include "restate.name" . }} -{{- end }} - -{{- define "restate.tag" -}} -{{- .Values.version | default .Chart.Version }} -{{- end }} diff --git a/charts/restate-helm/templates/service.yaml b/charts/restate-helm/templates/service.yaml deleted file mode 100644 index 94afd16db..000000000 --- a/charts/restate-helm/templates/service.yaml +++ /dev/null @@ -1,24 +0,0 @@ ---- -apiVersion: v1 -kind: Service -metadata: - name: {{ include "restate.fullname" . }} - labels: - {{- include "restate.labels" . | nindent 4 }} - {{- with .Values.service.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - type: {{ .Values.service.type }} - ports: - - port: 9070 - name: admin - - port: 8080 - name: ingress - - port: 9071 - name: storage - - port: 5122 - name: metrics - selector: - app: {{ include "restate.fullname" . }} diff --git a/charts/restate-helm/templates/serviceaccount.yaml b/charts/restate-helm/templates/serviceaccount.yaml deleted file mode 100644 index bd997e6a6..000000000 --- a/charts/restate-helm/templates/serviceaccount.yaml +++ /dev/null @@ -1,15 +0,0 @@ -{{- if .Values.serviceAccount.create }} ---- -apiVersion: v1 -kind: ServiceAccount -metadata: - name: {{ include "restate.fullname" . }} - labels: - {{- include "restate.labels" . | nindent 4 }} - {{- with .Values.serviceAccount.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} - namespace: {{ .Release.Namespace }} -automountServiceAccountToken: true -{{- end }} diff --git a/charts/restate-helm/templates/servicemonitor.yaml b/charts/restate-helm/templates/servicemonitor.yaml deleted file mode 100644 index cb7e0f406..000000000 --- a/charts/restate-helm/templates/servicemonitor.yaml +++ /dev/null @@ -1,41 +0,0 @@ -{{- if .Values.serviceMonitor.enabled }} ---- -apiVersion: monitoring.coreos.com/v1 -kind: ServiceMonitor -metadata: - name: {{ include "restate.fullname" . }} - labels: - {{- include "restate.labels" . | nindent 4 }} - {{- with .Values.service.annotations }} - annotations: - {{- toYaml . | nindent 4 }} - {{- end }} -spec: - endpoints: - - port: metrics - {{- with .Values.serviceMonitor.interval }} - interval: {{ . }} - {{- end }} - {{- with .Values.serviceMonitor.scrapeTimeout }} - scrapeTimeout: {{ . }} - {{- end }} - honorLabels: true - path: {{ .Values.serviceMonitor.path }} - scheme: {{ .Values.serviceMonitor.scheme }} - {{- with .Values.serviceMonitor.relabelings }} - relabelings: - {{- toYaml . | nindent 6 }} - {{- end }} - {{- with .Values.serviceMonitor.metricRelabelings }} - metricRelabelings: - {{- toYaml . | nindent 6 }} - {{- end }} - jobLabel: {{ include "restate.fullname" . }} - selector: - matchLabels: - {{- include "restate.selectorLabels" . | nindent 6 }} - {{- with .Values.serviceMonitor.targetLabels }} - targetLabels: - {{- toYaml . | nindent 4 }} - {{- end }} -{{- end }} diff --git a/charts/restate-helm/templates/statefulset.yaml b/charts/restate-helm/templates/statefulset.yaml deleted file mode 100644 index fc68c2ced..000000000 --- a/charts/restate-helm/templates/statefulset.yaml +++ /dev/null @@ -1,82 +0,0 @@ ---- -apiVersion: apps/v1 -kind: StatefulSet -metadata: - name: {{ include "restate.fullname" . }} - labels: - {{- include "restate.labels" . | nindent 4 }} -spec: - serviceName: {{ include "restate.fullname" . }} - replicas: {{ .Values.replicaCount }} - selector: - matchLabels: - {{- include "restate.selectorLabels" . | nindent 6 }} - template: - metadata: - labels: - {{- include "restate.selectorLabels" . | nindent 8 }} - annotations: - kubectl.kubernetes.io/default-container: {{ include "restate.fullname" . }} - {{- if .Values.podAnnotations }} - {{- toYaml .Values.podAnnotations | nindent 8 }} - {{- end }} - spec: - serviceAccountName: {{ include "restate.fullname" . }} - {{- with .Values.imagePullSecrets }} - imagePullSecrets: - {{- toYaml . | nindent 8 }} - {{- end }} - securityContext: - {{- toYaml .Values.podSecurityContext | nindent 8 }} - containers: - - name: {{ include "restate.fullname" . }} - image: {{ .Values.image.repository }}:{{ include "restate.tag" . }} - imagePullPolicy: {{ .Values.image.pullPolicy }} - securityContext: - {{- toYaml .Values.securityContext | nindent 12 }} - resources: - {{- toYaml .Values.resources | nindent 12 }} - ports: - - containerPort: 9070 - name: admin - - containerPort: 8080 - name: ingress - - containerPort: 9071 - name: storage - - containerPort: 5122 - name: metrics - env: - - name: RUST_LOG - value: {{ .Values.logging.env_filter }} - {{- with .Values.env }} - {{- toYaml . | nindent 12 }} - {{- end }} - readinessProbe: - httpGet: - path: /grpc.health.v1.Health/Check - port: ingress - initialDelaySeconds: 5 - periodSeconds: 5 - volumeMounts: - - mountPath: /target - name: storage - - mountPath: /tmp - name: tmp - volumes: - - name: tmp - emptyDir: { } - volumeClaimTemplates: - - metadata: - name: storage - labels: - {{- include "restate.labels" . | nindent 10 }} - spec: - {{- with .Values.storage.storageClassName }} - storageClassName: {{ if (eq "-" .) }}""{{ else }}{{ . }}{{ end }} - {{- end }} - accessModes: - - ReadWriteOnce - resources: - requests: - storage: {{ .Values.storage.size | quote }} - diff --git a/charts/restate-helm/values.yaml b/charts/restate-helm/values.yaml deleted file mode 100644 index d6fb91a9c..000000000 --- a/charts/restate-helm/values.yaml +++ /dev/null @@ -1,60 +0,0 @@ -replicaCount: 1 -nameOverride: "restate" -version: "" # pin a specific version - -image: - repository: docker.io/restatedev/restate - pullPolicy: IfNotPresent - -imagePullSecrets: [ ] - -serviceAccount: - create: true - annotations: { } -podAnnotations: { } - -podSecurityContext: - fsGroup: 2000 - fsGroupChangePolicy: "OnRootMismatch" -securityContext: - capabilities: - drop: - - ALL - readOnlyRootFilesystem: true - allowPrivilegeEscalation: false - runAsNonRoot: true - runAsUser: 1000 - runAsGroup: 3000 - - -logging: - env_filter: info,restate=debug - -env: - - name: RESTATE_TRACING__LOG_FORMAT - value: Json - -service: - type: ClusterIP - annotations: { } - -resources: - limits: - cpu: 1 - memory: 3Gi - requests: - cpu: 500m - memory: 1Gi - -storage: - size: 64Gi - # -- Storage class to be used. - # If defined, storageClassName: . - # If set to "-", storageClassName: "", which disables dynamic provisioning. - # If empty or set to null, no storageClassName spec is set, choosing the default provisioner. - storageClassName: null - -serviceMonitor: - enabled: false - path: /metrics - scheme: http diff --git a/cli/Cargo.toml b/cli/Cargo.toml deleted file mode 100644 index 09a9483f4..000000000 --- a/cli/Cargo.toml +++ /dev/null @@ -1,75 +0,0 @@ -[package] -name = "restate-cli" -version = {workspace = true } -authors = { workspace = true } -description = { workspace = true } -edition = { workspace = true } -license = { workspace = true } -rust-version = { workspace = true } -publish = false -default-run = "restate" -build = "build.rs" - -[features] -default = [] - -[dependencies] -restate-meta-rest-model = { workspace = true } -restate-serde-util = { workspace = true } -restate-service-protocol = { workspace = true } -restate-types = { workspace = true } - -anyhow = { workspace = true } -arrow = { workspace = true, features = ["ipc", "prettyprint"] } -bytes = { workspace = true } -base64 = { workspace = true} -chrono = { workspace = true } -chrono-humanize = { version = "0.2.3" } -clap = { version = "4.1", features = ["derive", "env", "wrap_help", "color"] } -clap-verbosity-flag = { version = "2.0.1" } -cling = { version = "0.1.0", default-features = false, features = ["derive"] } -comfy-table = "7.1" -convert_case = "0.6" -crossterm = { version = "0.27.0" } -ctrlc = { version = "3.4.1" } -dialoguer = { version = "0.11.0" } -dirs = { version = "5.0" } -dotenvy = "0.15" -futures = { workspace = true } -http = { workspace = true } -indicatif = "0.17.7" -indoc = { version = "2.0.4" } -is-terminal = { version = "0.4.9" } -itertools = { workspace = true } -octocrab = { version = "0.32.0", features = ["stream"] } -once_cell = { workspace = true } -reqwest = { version = "0.11.22", default-features = false, features = ["json", "rustls-tls"] } -serde = { workspace = true } -serde_json = { workspace = true } -termcolor = { version = "1.4.0" } -tempfile = { workspace = true } -thiserror = { workspace = true } -tiny-gradient = { version = "0.1.0" } -tokio = { workspace = true, features = ["fs"] } -tracing = { workspace = true } -tracing-log = { version = "0.2.0" } -tracing-subscriber = { workspace = true } -unicode-width = { version = "0.1.11" } -url = { version = "2.4.1" } -zip = "0.6" -zip-extensions = "0.6" - -[build-dependencies] -vergen = { version = "8.0.0", default-features = false, features = [ - "build", - "git", - "gitcl", - "cargo", -] } - -[lib] -bench = false - -[[bin]] -name = "restate" -path = "src/main.rs" diff --git a/cli/build.rs b/cli/build.rs deleted file mode 100644 index 0a35f4157..000000000 --- a/cli/build.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use std::error::Error; -use vergen::EmitBuilder; - -fn main() -> Result<(), Box> { - // Emit the instructions - EmitBuilder::builder() - .build_date() - .build_timestamp() - .cargo_features() - .cargo_opt_level() - .cargo_target_triple() - .cargo_debug() - .git_branch() - .git_commit_date() - .git_commit_timestamp() - .git_sha(true) - .emit()?; - Ok(()) -} diff --git a/cli/src/app.rs b/cli/src/app.rs deleted file mode 100644 index 8daba0c21..000000000 --- a/cli/src/app.rs +++ /dev/null @@ -1,128 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use anyhow::Result; -use clap_verbosity_flag::LogLevel; -use cling::prelude::*; -use tracing::info; -use tracing_log::AsTrace; - -use crate::cli_env::CliEnv; -use crate::commands::*; - -#[derive(Run, Parser, Clone)] -#[command(author, version = crate::build_info::version(), about, infer_subcommands = true)] -#[cling(run = "init")] -pub struct CliApp { - #[clap(flatten)] - #[cling(collect)] - pub verbose: clap_verbosity_flag::Verbosity, - #[clap(flatten)] - pub global_opts: GlobalOpts, - #[clap(subcommand)] - pub cmd: Command, -} - -#[derive(Args, Clone, Default)] -pub struct UiConfig { - /// Which table output style to use - #[arg(long, default_value = "compact", global = true)] - pub table_style: TableStyle, -} - -#[derive(ValueEnum, Clone, Copy, Default, PartialEq, Eq)] -pub enum TableStyle { - #[default] - /// No borders, condensed layout - Compact, - /// UTF8 borders, good for multiline text - Borders, -} - -const DEFAULT_CONNECT_TIMEOUT: u64 = 5_000; - -#[derive(Args, Collect, Clone, Default)] -pub struct GlobalOpts { - /// Auto answer "yes" to confirmation prompts - #[arg(long, short, global = true)] - pub yes: bool, - - /// Connection timeout for service interactions, in milliseconds. - #[arg(long, default_value_t = DEFAULT_CONNECT_TIMEOUT, global = true)] - pub connect_timeout: u64, - - /// Overall request timeout for service interactions, in milliseconds. - #[arg(long, global = true)] - pub request_timeout: Option, - - #[clap(flatten)] - pub ui_config: UiConfig, -} - -#[derive(Run, Subcommand, Clone)] -pub enum Command { - /// Prints general information about the configured environment - #[clap(name = "whoami")] - WhoAmiI(whoami::WhoAmI), - /// Manage Restate's components registry - #[clap(subcommand)] - Components(components::Components), - /// Manages your service deployments - #[clap(subcommand)] - Deployments(deployments::Deployments), - /// Manage active invocations - #[clap(subcommand)] - Invocations(invocations::Invocations), - /// Runs SQL queries against the data fusion service - #[clap(hide = true)] - Sql(sql::Sql), - /// Download one of Restate's examples in this directory. - #[clap(name = "example", alias = "examples")] - Examples(examples::Examples), - - /// Manage service state - #[clap(name = "state", alias = "kv")] - #[clap(subcommand)] - State(state::ServiceState), -} - -fn init( - Collected(verbosity): Collected>, - global_opts: &GlobalOpts, -) -> Result> { - let env = CliEnv::load(global_opts)?; - // Setup logging from env and from -v .. -vvvv - tracing_subscriber::fmt() - .with_writer(std::io::stderr) - .with_env_filter(tracing_subscriber::EnvFilter::from_default_env()) - .with_max_level(verbosity.log_level_filter().as_trace()) - .with_ansi(env.colorful) - .init(); - - // We only log after we've initialized the logger with the desired log - // level. - match &env.loaded_env_file { - Some(path) => { - info!("Loaded environment file from: {}", path.display()) - } - None => info!("Didn't load '.env' file"), - }; - - Ok(State(env)) -} - -/// Silent (no) logging by default in CLI -#[derive(Clone)] -pub struct Quiet; -impl LogLevel for Quiet { - fn default() -> Option { - None - } -} diff --git a/cli/src/art.rs b/cli/src/art.rs deleted file mode 100644 index 1259de502..000000000 --- a/cli/src/art.rs +++ /dev/null @@ -1,38 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use tiny_gradient::{Gradient, GradientStr}; - -pub static LOGO_ART: &str = r###" - →↓→↓ - →↓→↓→↓→→→ →→→→ - ↓→↓→↓→↓↓→↓→→ →↓↓→↓→↓→ - →↓→↓→↓→↓→↓↓→↓→↓ →↓→↓→↓→↓→↓→ - →↓→↓→↓→↓→↓→↓→↓→↓→→ →↓→↓→↓→↓→↓→→ - →↓→↓→↓→ →↓→↓→↓→↓→↓→↓→ →↓→↓→↓→↓↓→↓→↗ - →↓→↓→↓→ →↓→↓→↓→↓→↓→↓→ →→↓→↓→↓→↓↓→↓→ - →↓→↓→↓→ →↓→↓→↓→↓→↓→↓→ →→↓→↓→↓→↓→↓→→ - →↓→↓→↓→ →↓→↓→↓→↓→↓→↓→ →→↓→↓→↓→↓↓→↓→ - →↓→↓→↓→ →↓→↓→↓→↓→↓→ →→↓→↓→↓→↓→↓ - →↓→↓→↓→ →↓→↓→↓→↓→↓→ →→↓→↓→↓→↓→↓→ - →↓→↓→↓→ →↓→↓→↓→↓→↓→↓ →↓→↓→↓→↓→↓→→ - →↓→↓→↓→ →→↓→↓→↓→↓→↓→→ →↓→↓→↓→↓→↓→→ - →↓→↓→↓→ →↓→↓→↓→↓→↓→ →↓→↓→↓→↓→↓→↓ - →↓→↓→↓→ →↓→↓→↓→↓→ →↓→↓→↓→↓→↓→↓→ - →↓→↓→↓→ ↓→↓→→ →↓→↓→↓→↓→↓→→ - →↓→↓→↓→ →↓→↓→↓→↓→↓→ - →↓→↓→↓→ →↓→↓→↓→ - ↓→↓→↓→↓ - →↓→→ -"###; - -pub fn render_logo() -> String { - LOGO_ART.gradient(Gradient::Mind).to_string() -} diff --git a/cli/src/build_info.rs b/cli/src/build_info.rs deleted file mode 100644 index 1cada704a..000000000 --- a/cli/src/build_info.rs +++ /dev/null @@ -1,52 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -//! Build information -#![allow(dead_code)] - -use once_cell::sync::Lazy; - -/// The version of restate CLI. -pub const RESTATE_CLI_VERSION: &str = env!("CARGO_PKG_VERSION"); -pub const RESTATE_CLI_VERSION_MAJOR: &str = env!("CARGO_PKG_VERSION_MAJOR"); -pub const RESTATE_CLI_VERSION_MINOR: &str = env!("CARGO_PKG_VERSION_MINOR"); -pub const RESTATE_CLI_VERSION_PATCH: &str = env!("CARGO_PKG_VERSION_PATCH"); -/// Pre-release version of restate. -pub const RESTATE_CLI_VERSION_PRE: &str = env!("CARGO_PKG_VERSION_PRE"); - -pub const RESTATE_CLI_BUILD_DATE: &str = env!("VERGEN_BUILD_DATE"); -pub const RESTATE_CLI_BUILD_TIME: &str = env!("VERGEN_BUILD_TIMESTAMP"); -pub const RESTATE_CLI_COMMIT_SHA: &str = env!("VERGEN_GIT_SHA"); -pub const RESTATE_CLI_COMMIT_DATE: &str = env!("VERGEN_GIT_COMMIT_DATE"); -pub const RESTATE_CLI_BRANCH: &str = env!("VERGEN_GIT_BRANCH"); -/// The target triple. -pub const RESTATE_CLI_TARGET_TRIPLE: &str = env!("VERGEN_CARGO_TARGET_TRIPLE"); -/// The profile used in build. -pub const RESTATE_CLI_DEBUG: &str = env!("VERGEN_CARGO_DEBUG"); -/// The build features -pub const RESTATE_CLI_BUILD_FEATURES: &str = env!("VERGEN_CARGO_FEATURES"); - -/// Returns build information, e.g: 0.0.1-dev (debug) (2ba1491 aarch64-apple-darwin 2023-11-21) -pub fn build_info() -> String { - format!( - "{RESTATE_CLI_VERSION}{} ({RESTATE_CLI_COMMIT_SHA} {RESTATE_CLI_TARGET_TRIPLE} {RESTATE_CLI_BUILD_DATE})", - if RESTATE_CLI_DEBUG == "true" { - " (debug)" - } else { - "" - } - ) -} - -static VERSION: Lazy = Lazy::new(build_info); - -pub fn version() -> &'static str { - &VERSION -} diff --git a/cli/src/cli_env.rs b/cli/src/cli_env.rs deleted file mode 100644 index 154451877..000000000 --- a/cli/src/cli_env.rs +++ /dev/null @@ -1,371 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -//! Resolves restate's CLI default data/config directory paths - -#[cfg(test)] -use std::collections::HashMap; -use std::io::IsTerminal; -use std::path::{Path, PathBuf}; -use std::time::Duration; - -use anyhow::{anyhow, Result}; -use dotenvy::dotenv; -use url::Url; - -use crate::app::{GlobalOpts, UiConfig}; - -pub const CONFIG_FILENAME: &str = "config.yaml"; - -pub const RESTATE_HOST_ENV: &str = "RESTATE_HOST"; -pub const RESTATE_HOST_SCHEME_ENV: &str = "RESTATE_HOST_SCHEME"; -// The default is localhost unless the CLI configuration states a different default. -pub const RESTATE_HOST_DEFAULT: &str = "localhost"; -pub const RESTATE_HOST_SCHEME_DEFAULT: &str = "http"; - -/// Environment variable to override the default config dir path -pub const CLI_CONFIG_HOME_ENV: &str = "RESTATE_CLI_CONFIG_HOME"; -// This is CONFIG and not CONFIG_FILE to be consistent with RESTATE_CONFIG (server) -pub const CLI_CONFIG_FILE_ENV: &str = "RESTATE_CLI_CONFIG"; - -pub const RESTATE_AUTH_TOKEN_ENV: &str = "RESTATE_AUTH_TOKEN"; -// TODO: Deprecated, will be removed once this is provided by the admin server -pub const INGRESS_URL_ENV: &str = "RESTATE_INGRESS_URL"; -pub const ADMIN_URL_ENV: &str = "RESTATE_ADMIN_URL"; -pub const EDITOR_ENV: &str = "RESTATE_EDITOR"; - -#[derive(Clone, Default)] -pub struct CliConfig {} - -#[derive(Clone)] -pub struct CliEnv { - pub loaded_env_file: Option, - pub config_home: PathBuf, - pub config_file: PathBuf, - pub ingress_base_url: Url, - pub admin_base_url: Url, - pub bearer_token: Option, - /// Should we use colors and emojis or not? - pub colorful: bool, - /// Auto answer yes to prompts that asks for confirmation - pub auto_confirm: bool, - /// Timeout for the connect phase of the request. - pub connect_timeout: Duration, - /// Overall request timeout. - pub request_timeout: Option, - /// UI Configuration - pub ui_config: UiConfig, - - /// Default text editor for state editing - pub editor: Option, -} - -impl CliEnv { - /// Uses GlobalOpts to override some options and to set others that are - /// not accessible through the config/env. - pub fn load(global_opts: &GlobalOpts) -> Result { - let os_env = OsEnv::default(); - Self::load_from_env(&os_env, global_opts) - } - - /// Loading CliEnv with a custom OsEnv. OsEnv can be customised in cfg(test) - pub fn load_from_env(os_env: &OsEnv, global_opts: &GlobalOpts) -> Result { - // Load .env file. Best effort. - let maybe_env = dotenv(); - - let restate_host = os_env - .get(RESTATE_HOST_ENV) - .as_deref() - .unwrap_or(RESTATE_HOST_DEFAULT) - .to_owned(); - - let restate_host_scheme = os_env - .get(RESTATE_HOST_SCHEME_ENV) - .as_deref() - .unwrap_or(RESTATE_HOST_SCHEME_DEFAULT) - .to_owned(); - - let config_home = os_env - .get(CLI_CONFIG_HOME_ENV) - .map(|x| Ok(PathBuf::from(x))) - .unwrap_or_else(default_config_home)?; - - let config_file = os_env - .get(CLI_CONFIG_FILE_ENV) - .map(PathBuf::from) - .unwrap_or_else(|| config_home.join(CONFIG_FILENAME)); - - let bearer_token = os_env.get(RESTATE_AUTH_TOKEN_ENV); - - let ingress_base_url = os_env - .get(INGRESS_URL_ENV) - .as_deref() - .map(Url::parse) - .unwrap_or_else(|| { - Url::parse(&format!("{}://{}:8080/", restate_host_scheme, restate_host)) - })?; - - let admin_base_url = os_env - .get(ADMIN_URL_ENV) - .as_deref() - .map(Url::parse) - .unwrap_or_else(|| { - Url::parse(&format!("{}://{}:9070/", restate_host_scheme, restate_host)) - })?; - - let default_editor = os_env - .get(EDITOR_ENV) - .or_else(|| os_env.get("VISUAL")) - .or_else(|| os_env.get("EDITOR")); - - // color setup - // NO_COLOR=1 with any value other than "0" means user doesn't want colors. - // e.g. - // NO_COLOR=1 (no colors) - // NO_COLOR=true (no colors) - // NO_COLOR=something (no colors) - // NO_COLOR=0 or unset (yes *color* if term supports it) - let should_color = os_env - .get("NO_COLOR") - .map(|x| x == "0") - .unwrap_or_else(|| true); - - // dumb terminal? no colors or fancy stuff - let smart_term = os_env - .get("TERM") - .map(|x| x != "dumb") - .unwrap_or_else(|| true); - - // CLICOLOR_FORCE is set? enforce coloring.. - // Se http://bixense.com/clicolors/ for details. - let force_colorful = os_env - .get("CLICOLOR_FORCE") - .map(|x| x != "0") - .unwrap_or_else(|| false); - - let colorful = if force_colorful { - // CLICOLOR_FORCE is set, we enforce coloring - true - } else { - // We colorize only if it's a smart terminal (not TERM=dumb, nor pipe) - // and NO_COLOR is anything but "0" - let is_terminal = std::io::stdout().is_terminal(); - is_terminal && smart_term && should_color - }; - - // Ensure we follows our colorful setting in our console utilities - // without passing the environment around. - crate::console::set_colors_enabled(colorful); - - Ok(Self { - loaded_env_file: maybe_env.ok(), - config_home, - config_file, - ingress_base_url, - admin_base_url, - bearer_token, - connect_timeout: Duration::from_millis(global_opts.connect_timeout), - request_timeout: global_opts.request_timeout.map(Duration::from_millis), - colorful, - auto_confirm: global_opts.yes, - ui_config: global_opts.ui_config.clone(), - editor: default_editor, - }) - } - - pub fn open_default_editor(&self, path: &Path) -> anyhow::Result<()> { - // if nothing else is defined, we use vim. - let editor = self.editor.as_deref().unwrap_or("vi").to_owned(); - - let mut child = std::process::Command::new(editor.clone()) - .arg(path) - .spawn()?; - - let status = child.wait()?; - - if status.success() { - Ok(()) - } else { - Err(anyhow!( - "editor {editor} exited with a non-successful exit code {:?}, \ - if you would like to use a specific editor, please either use: \ - (1) $VISUAL env variable \ - (2) EDITOR env variable or \ - (3) set the {EDITOR_ENV} env variable to a default editor. ", - status.code() - )) - } - } -} - -#[cfg(not(windows))] -fn default_config_home() -> Result { - use anyhow::Context; - - Ok(dirs::home_dir() - .context("Could not detect the home directory")? - .join(".config") - .join("restate")) -} - -#[cfg(windows)] -fn default_config_home() -> Result { - use anyhow::Context; - Ok(dirs::config_local_dir() - .context("Could not detect the local configuration directory")? - .join("Restate")) -} - -/// Wrapper over the OS environment variables that uses a hashmap in test cfg to -/// enable testing. -#[derive(Default)] -pub struct OsEnv<'a> { - /// Environment variable mocks - #[cfg(test)] - pub env: HashMap<&'a str, String>, - - #[cfg(not(test))] - _marker: std::marker::PhantomData<&'a ()>, -} - -impl<'a> OsEnv<'a> { - // Retrieves a environment variable from the os or from a table if in testing mode - #[cfg(test)] - pub fn get>(&self, key: K) -> Option { - self.env.get(key.as_ref()).map(ToString::to_string) - } - - #[cfg(not(test))] - #[inline] - pub fn get>(&self, key: K) -> Option { - std::env::var(key.as_ref()).ok() - } - - #[cfg(test)] - pub fn insert(&mut self, k: &'a str, v: String) -> Option { - self.env.insert(k, v) - } - - #[cfg(test)] - pub fn clear(&mut self) { - self.env.clear(); - } -} - -#[cfg(test)] -mod tests { - use super::*; - - #[test] - fn test_config_home_order() -> Result<()> { - let mut os_env = OsEnv::default(); - let cli_env = CliEnv::load_from_env(&os_env, &GlobalOpts::default())?; - - let default_home = default_config_home()?; - - // By default, config home is the default - assert_eq!(cli_env.config_home, default_home); - - assert_eq!(cli_env.config_file, default_home.join(CONFIG_FILENAME)); - - // RESTATE_CLI_CONFIG_HOME overrides the default home - let new_home = PathBuf::from("/random/path"); - // Overriding the config home impacts everything - os_env.insert(CLI_CONFIG_HOME_ENV, new_home.display().to_string()); - let cli_env = CliEnv::load_from_env(&os_env, &GlobalOpts::default())?; - assert_eq!(cli_env.config_home, new_home); - assert_eq!(cli_env.config_file, new_home.join(CONFIG_FILENAME)); - - // RESTATE_CLI_CONFIG_FILE overrides the config file only! - os_env.clear(); - let new_config_file = PathBuf::from("/to/infinity/and/beyond.yaml"); - os_env.insert(CLI_CONFIG_FILE_ENV, new_config_file.display().to_string()); - - let cli_env = CliEnv::load_from_env(&os_env, &GlobalOpts::default())?; - // Notice that the config home is the default - assert_eq!(cli_env.config_home, default_home); - assert_eq!(cli_env.config_file, new_config_file); - - Ok(()) - } - - #[test] - fn test_base_url_override() -> Result<()> { - // By default, we use the const value defined in this file. - let mut os_env = OsEnv::default(); - let cli_env = CliEnv::load_from_env(&os_env, &GlobalOpts::default())?; - assert_eq!( - cli_env.ingress_base_url.to_string(), - "http://localhost:8080/".to_string() - ); - assert_eq!( - cli_env.admin_base_url.to_string(), - "http://localhost:9070/".to_string() - ); - - // Defaults are templated over RESTATE_HOST - os_env.clear(); - - os_env.insert(RESTATE_HOST_ENV, "example.com".to_string()); - let cli_env = CliEnv::load_from_env(&os_env, &GlobalOpts::default())?; - - assert_eq!( - cli_env.ingress_base_url.to_string(), - "http://example.com:8080/".to_string() - ); - assert_eq!( - cli_env.admin_base_url.to_string(), - "http://example.com:9070/".to_string() - ); - - // RESTATE_INGRESS_URL/RESTATE_META_URL override the base URLs! - os_env.clear(); - os_env.insert(INGRESS_URL_ENV, "https://api.restate.dev:4567".to_string()); - os_env.insert(ADMIN_URL_ENV, "https://admin.restate.dev:4567".to_string()); - os_env.insert(RESTATE_HOST_SCHEME_ENV, "https".to_string()); - - let cli_env = CliEnv::load_from_env(&os_env, &GlobalOpts::default())?; - // Note that Uri adds a trailing slash to the path as expected - assert_eq!( - cli_env.ingress_base_url.to_string(), - "https://api.restate.dev:4567/".to_string() - ); - assert_eq!( - cli_env.admin_base_url.to_string(), - "https://admin.restate.dev:4567/".to_string() - ); - - Ok(()) - } - - #[test] - fn test_default_timeout_applied() { - let opts = &GlobalOpts { - connect_timeout: 1000, - request_timeout: Some(5000), - ..GlobalOpts::default() - }; - let cli_env = CliEnv::load_from_env(&OsEnv::default(), opts).unwrap(); - assert_eq!(cli_env.connect_timeout, Duration::from_millis(1000)); - assert_eq!(cli_env.request_timeout, Some(Duration::from_millis(5000))); - } - - #[test] - fn test_bearer_token_applied() { - let mut os_env = OsEnv::default(); - let cli_env = CliEnv::load_from_env(&os_env, &GlobalOpts::default()).unwrap(); - assert_eq!(cli_env.bearer_token, None); - - os_env.clear(); - os_env.insert(RESTATE_AUTH_TOKEN_ENV, "token".to_string()); - let cli_env = CliEnv::load_from_env(&os_env, &GlobalOpts::default()).unwrap(); - assert_eq!(cli_env.bearer_token, Some("token".to_string())); - } -} diff --git a/cli/src/clients/datafusion_helpers.rs b/cli/src/clients/datafusion_helpers.rs deleted file mode 100644 index 55d9adf96..000000000 --- a/cli/src/clients/datafusion_helpers.rs +++ /dev/null @@ -1,1036 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -//! A set of common queries needed by the CLI - -use std::collections::HashMap; -use std::fmt::Display; -use std::str::FromStr; - -use super::DataFusionHttpClient; - -use arrow::array::{Array, ArrayAccessor, AsArray, StringArray}; -use arrow::datatypes::ArrowTemporalType; -use arrow::record_batch::RecordBatch; -use clap::ValueEnum; -use restate_meta_rest_model::deployments::DeploymentId; - -use anyhow::Result; -use chrono::{DateTime, Duration, Local, TimeZone}; -use restate_meta_rest_model::components::ComponentType; -use restate_service_protocol::awakeable_id::AwakeableIdentifier; -use restate_types::identifiers::InvocationId; - -static JOURNAL_QUERY_LIMIT: usize = 100; - -trait OptionalArrowLocalDateTime { - fn value_as_local_datetime_opt(&self, index: usize) -> Option>; -} - -impl OptionalArrowLocalDateTime for &arrow::array::PrimitiveArray -where - T: ArrowTemporalType, - i64: From, -{ - fn value_as_local_datetime_opt(&self, index: usize) -> Option> { - if !self.is_null(index) { - self.value_as_datetime(index) - .map(|naive| Local.from_utc_datetime(&naive)) - } else { - None - } - } -} - -trait OptionalArrowValue -where - Self: ArrayAccessor, -{ - fn value_opt(&self, index: usize) -> Option<::Item> { - if !self.is_null(index) { - Some(self.value(index)) - } else { - None - } - } -} - -impl OptionalArrowValue for T where T: ArrayAccessor {} - -trait OptionalArrowOwnedString -where - Self: ArrayAccessor, -{ - fn value_string_opt(&self, index: usize) -> Option; - fn value_string(&self, index: usize) -> String; -} - -impl OptionalArrowOwnedString for &StringArray { - fn value_string_opt(&self, index: usize) -> Option { - if !self.is_null(index) { - Some(self.value(index).to_owned()) - } else { - None - } - } - - fn value_string(&self, index: usize) -> String { - self.value(index).to_owned() - } -} - -fn value_as_string(batch: &RecordBatch, col: usize, row: usize) -> String { - batch.column(col).as_string::().value_string(row) -} - -fn value_as_string_opt(batch: &RecordBatch, col: usize, row: usize) -> Option { - batch.column(col).as_string::().value_string_opt(row) -} - -fn value_as_i64(batch: &RecordBatch, col: usize, row: usize) -> i64 { - batch - .column(col) - .as_primitive::() - .value(row) -} - -fn value_as_u64_opt(batch: &RecordBatch, col: usize, row: usize) -> Option { - batch - .column(col) - .as_primitive::() - .value_opt(row) -} - -fn value_as_dt_opt(batch: &RecordBatch, col: usize, row: usize) -> Option> { - batch - .column(col) - .as_primitive::() - .value_as_local_datetime_opt(row) -} - -#[derive(ValueEnum, Copy, Clone, Eq, Hash, PartialEq, Debug, Default)] -pub enum InvocationState { - #[default] - #[clap(hide = true)] - Unknown, - Pending, - Ready, - Running, - Suspended, - BackingOff, -} - -impl FromStr for InvocationState { - type Err = (); - fn from_str(s: &str) -> Result { - Ok(match s { - "pending" => Self::Pending, - "ready" => Self::Ready, - "running" => Self::Running, - "suspended" => Self::Suspended, - "backing-off" => Self::BackingOff, - _ => Self::Unknown, - }) - } -} - -impl Display for InvocationState { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - InvocationState::Unknown => write!(f, "unknown"), - InvocationState::Pending => write!(f, "pending"), - InvocationState::Ready => write!(f, "ready"), - InvocationState::Running => write!(f, "running"), - InvocationState::Suspended => write!(f, "suspended"), - InvocationState::BackingOff => write!(f, "backing-off"), - } - } -} - -#[derive(Debug, Clone)] -pub struct OutgoingInvoke { - pub invocation_id: Option, - pub invoked_component: Option, - pub invoked_handler: Option, - pub invoked_component_key: Option, -} - -#[derive(Debug, Clone)] -pub struct JournalEntry { - pub seq: u32, - pub entry_type: JournalEntryType, - completed: bool, -} - -impl JournalEntry { - pub fn is_completed(&self) -> bool { - if self.entry_type.is_completable() { - self.completed - } else { - true - } - } - - pub fn should_present(&self) -> bool { - self.entry_type.should_present() - } -} - -#[derive(Debug, Clone)] -pub enum JournalEntryType { - Sleep { - wakeup_at: Option>, - }, - Invoke(OutgoingInvoke), - BackgroundInvoke(OutgoingInvoke), - Awakeable(AwakeableIdentifier), - GetState, - SetState, - ClearState, - Other(String), -} - -impl JournalEntryType { - fn is_completable(&self) -> bool { - matches!( - self, - JournalEntryType::Sleep { .. } - | JournalEntryType::Invoke(_) - | JournalEntryType::Awakeable(_) - | JournalEntryType::GetState - ) - } - - fn should_present(&self) -> bool { - matches!( - self, - JournalEntryType::Sleep { .. } - | JournalEntryType::Invoke(_) - | JournalEntryType::BackgroundInvoke(_) - | JournalEntryType::Awakeable(_) - ) - } -} - -impl Display for JournalEntryType { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - JournalEntryType::Sleep { .. } => write!(f, "Sleep"), - JournalEntryType::Invoke(_) => write!(f, "Invoke"), - JournalEntryType::BackgroundInvoke(_) => write!(f, "BackgroundInvoke"), - JournalEntryType::Awakeable(_) => write!(f, "Awakeable"), - JournalEntryType::GetState => write!(f, "GetState"), - JournalEntryType::SetState => write!(f, "SetState"), - JournalEntryType::ClearState => write!(f, "ClearState"), - JournalEntryType::Other(s) => write!(f, "{}", s), - } - } -} - -#[derive(Debug, Clone, Default)] -pub struct InvocationDetailed { - pub invocation: Invocation, - pub journal: Vec, -} - -#[derive(Debug, Clone, Default)] -pub struct Invocation { - pub id: String, - pub component: String, - pub handler: String, - pub key: Option, // Set only on keyed service - pub created_at: chrono::DateTime, - // None if invoked directly (e.g. ingress) - pub invoked_by_id: Option, - pub invoked_by_component: Option, - pub status: InvocationState, - pub trace_id: Option, - - // If it **requires** this deployment. - pub pinned_deployment_id: Option, - pub pinned_deployment_exists: bool, - pub deployment_id_at_latest_svc_revision: String, - // Last attempted deployment - pub last_attempt_deployment_id: Option, - - // if running, how long has it been running? - pub current_attempt_duration: Option, - // E.g. If suspended, since when? - pub state_modified_at: Option>, - - // If backing-off - pub num_retries: Option, - pub next_retry_at: Option>, - - pub last_attempt_started_at: Option>, - // Last attempt failed? - pub last_failure_message: Option, -} - -pub async fn count_deployment_active_inv( - client: &DataFusionHttpClient, - deployment_id: &DeploymentId, -) -> Result { - Ok(client - .run_count_agg_query(format!( - "SELECT COUNT(id) AS inv_count \ - FROM sys_invocation_status \ - WHERE pinned_deployment_id = '{}' \ - GROUP BY pinned_deployment_id", - deployment_id - )) - .await?) -} - -pub struct ComponentHandlerUsage { - pub component: String, - pub handler: String, - pub inv_count: i64, -} - -/// Key is component name -#[derive(Clone, Default)] -pub struct ComponentStatusMap(HashMap); - -impl ComponentStatusMap { - fn set_handler_stats( - &mut self, - component: &str, - handler: &str, - state: InvocationState, - stats: HandlerStateStats, - ) { - let comp_handlers = self - .0 - .entry(component.to_owned()) - .or_insert_with(|| ComponentStatus { - handlers: HashMap::new(), - }); - - let handler_info = comp_handlers - .handlers - .entry(handler.to_owned()) - .or_insert_with(|| HandlerInfo { - per_state_totals: HashMap::new(), - }); - - handler_info.per_state_totals.insert(state, stats); - } - - pub fn get_component_status(&self, component: &str) -> Option<&ComponentStatus> { - self.0.get(component) - } -} - -#[derive(Default, Clone)] -pub struct ComponentStatus { - handlers: HashMap, -} - -impl ComponentStatus { - pub fn get_handler_stats( - &self, - state: InvocationState, - method: &str, - ) -> Option<&HandlerStateStats> { - self.handlers.get(method).and_then(|x| x.get_stats(state)) - } - - pub fn get_handler(&self, handler: &str) -> Option<&HandlerInfo> { - self.handlers.get(handler) - } -} - -#[derive(Default, Clone)] -pub struct HandlerInfo { - per_state_totals: HashMap, -} - -impl HandlerInfo { - pub fn get_stats(&self, state: InvocationState) -> Option<&HandlerStateStats> { - self.per_state_totals.get(&state) - } - - pub fn oldest_non_suspended_invocation_state( - &self, - ) -> Option<(InvocationState, &HandlerStateStats)> { - let mut oldest: Option<(InvocationState, &HandlerStateStats)> = None; - for (state, stats) in &self.per_state_totals { - if state == &InvocationState::Suspended { - continue; - } - if oldest.is_none() || oldest.is_some_and(|oldest| stats.oldest_at < oldest.1.oldest_at) - { - oldest = Some((*state, stats)); - } - } - oldest - } -} - -#[derive(Clone)] -pub struct HandlerStateStats { - pub num_invocations: i64, - pub oldest_at: chrono::DateTime, - pub oldest_invocation: String, -} - -pub async fn count_deployment_active_inv_by_method( - client: &DataFusionHttpClient, - deployment_id: &DeploymentId, -) -> Result> { - let mut output = vec![]; - - let query = format!( - "SELECT - component, - handler, - COUNT(id) AS inv_count - FROM sys_invocation_status - WHERE pinned_deployment_id = '{}' - GROUP BY pinned_deployment_id, component, handler", - deployment_id - ); - - for batch in client.run_query(query).await?.batches { - for i in 0..batch.num_rows() { - output.push(ComponentHandlerUsage { - component: value_as_string(&batch, 0, i), - handler: value_as_string(&batch, 1, i), - inv_count: value_as_i64(&batch, 2, i), - }); - } - } - Ok(output) -} - -pub async fn get_components_status( - client: &DataFusionHttpClient, - components_filter: impl IntoIterator>, -) -> Result { - let mut status_map = ComponentStatusMap::default(); - - let query_filter = format!( - "({})", - components_filter - .into_iter() - .map(|x| format!("'{}'", x.as_ref())) - .collect::>() - .join(",") - ); - // Inbox analysis (pending invocations).... - { - let query = format!( - "SELECT - component, - handler, - COUNT(id), - MIN(created_at), - FIRST_VALUE(id ORDER BY created_at ASC) - FROM sys_inbox WHERE component IN {} - GROUP BY component, handler", - query_filter - ); - let resp = client.run_query(query).await?; - for batch in resp.batches { - for i in 0..batch.num_rows() { - let component = batch.column(0).as_string::().value_string(i); - let handler = batch.column(1).as_string::().value_string(i); - let num_invocations = batch - .column(2) - .as_primitive::() - .value(i); - let oldest_at = batch - .column(3) - .as_primitive::() - .value_as_local_datetime_opt(i) - .unwrap(); - - let oldest_invocation = batch.column(4).as_string::().value_string(i); - - let stats = HandlerStateStats { - num_invocations, - oldest_at, - oldest_invocation, - }; - status_map.set_handler_stats(&component, &handler, InvocationState::Pending, stats); - } - } - } - - // Active invocations analysis - { - let query = format!( - "WITH enriched_invokes AS - (SELECT - ss.component, - ss.handler, - CASE - WHEN ss.status = 'suspended' THEN 'suspended' - WHEN sis.in_flight THEN 'running' - WHEN ss.status = 'invoked' AND retry_count > 0 THEN 'backing-off' - ELSE 'ready' - END AS combined_status, - ss.id, - ss.created_at - FROM sys_invocation_status ss - LEFT JOIN sys_invocation_state sis ON ss.id = sis.id - WHERE ss.component IN {} - ) - SELECT component, handler, combined_status, COUNT(id), MIN(created_at), FIRST_VALUE(id ORDER BY created_at ASC) - FROM enriched_invokes GROUP BY component, handler, combined_status ORDER BY method", - query_filter - ); - let resp = client.run_query(query).await?; - for batch in resp.batches { - for i in 0..batch.num_rows() { - let component = value_as_string(&batch, 0, i); - let handler = value_as_string(&batch, 1, i); - let status = value_as_string(&batch, 2, i); - - let stats = HandlerStateStats { - num_invocations: value_as_i64(&batch, 3, i), - oldest_at: value_as_dt_opt(&batch, 4, i).unwrap(), - oldest_invocation: value_as_string(&batch, 5, i), - }; - - status_map.set_handler_stats(&component, &handler, status.parse().unwrap(), stats); - } - } - } - - Ok(status_map) -} - -// Component -> Locked Keys -#[derive(Default)] -pub struct ComponentHandlerLockedKeysMap { - components: HashMap>, -} - -#[derive(Clone, Default, Debug)] -pub struct LockedKeyInfo { - pub num_pending: i64, - pub oldest_pending: Option>, - // Who is holding the lock - pub invocation_holding_lock: Option, - pub invocation_method_holding_lock: Option, - pub invocation_status: Option, - pub invocation_created_at: Option>, - // if running, how long has it been running? - pub invocation_attempt_duration: Option, - // E.g. If suspended, how long has it been suspended? - pub invocation_state_duration: Option, - - pub num_retries: Option, - pub next_retry_at: Option>, - pub pinned_deployment_id: Option, - // Last attempt failed? - pub last_failure_message: Option, - pub last_attempt_deployment_id: Option, -} - -impl ComponentHandlerLockedKeysMap { - fn insert(&mut self, component: &str, key: String, info: LockedKeyInfo) { - let locked_keys = self.components.entry(component.to_owned()).or_default(); - locked_keys.insert(key.to_owned(), info); - } - - fn locked_key_info_mut(&mut self, component: &str, key: &str) -> &mut LockedKeyInfo { - let locked_keys = self.components.entry(component.to_owned()).or_default(); - locked_keys.entry(key.to_owned()).or_default() - } - - pub fn into_inner(self) -> HashMap> { - self.components - } - - pub fn is_empty(&self) -> bool { - self.components.is_empty() - } -} - -pub async fn get_locked_keys_status( - client: &DataFusionHttpClient, - components_filter: impl IntoIterator>, -) -> Result { - let mut key_map = ComponentHandlerLockedKeysMap::default(); - let quoted_component_names = components_filter - .into_iter() - .map(|x| format!("'{}'", x.as_ref())) - .collect::>(); - if quoted_component_names.is_empty() { - return Ok(key_map); - } - - let query_filter = format!("({})", quoted_component_names.join(",")); - - // Inbox analysis (pending invocations).... - { - let query = format!( - "SELECT - component, - component_key, - COUNT(id), - MIN(created_at) - FROM sys_inbox - WHERE component IN {} - GROUP BY component, component_key - ORDER BY COUNT(id) DESC", - query_filter - ); - let resp = client.run_query(query).await?; - for batch in resp.batches { - for i in 0..batch.num_rows() { - let component = batch.column(0).as_string::().value(i); - let key = value_as_string(&batch, 1, i); - let num_pending = value_as_i64(&batch, 2, i); - let oldest_pending = value_as_dt_opt(&batch, 3, i); - - let info = LockedKeyInfo { - num_pending, - oldest_pending, - ..LockedKeyInfo::default() - }; - key_map.insert(component, key, info); - } - } - } - - // Active invocations analysis - { - let query = format!( - "WITH enriched_invokes AS - (SELECT - ss.component, - ss.handler, - ss.component_key, - CASE - WHEN ss.status = 'suspended' THEN 'suspended' - WHEN sis.in_flight THEN 'running' - WHEN ss.status = 'invoked' AND retry_count > 0 THEN 'backing-off' - ELSE 'ready' - END AS combined_status, - ss.id, - ss.created_at, - ss.modified_at, - ss.pinned_deployment_id, - sis.retry_count, - sis.last_failure, - sis.last_attempt_deployment_id, - sis.next_retry_at, - sis.last_start_at - FROM sys_invocation_status ss - LEFT JOIN sys_invocation_state sis ON ss.id = sis.id - WHERE ss.service IN {} - ) - SELECT - component, - component_key, - combined_status, - first_value(id), - first_value(handler), - first_value(created_at), - first_value(modified_at), - first_value(pinned_deployment_id), - first_value(last_attempt_deployment_id), - first_value(last_failure), - first_value(next_retry_at), - first_value(last_start_at), - sum(retry_count) - FROM enriched_invokes GROUP BY component, component_key, combined_status", - query_filter - ); - - let resp = client.run_query(query).await?; - for batch in resp.batches { - for i in 0..batch.num_rows() { - let component = value_as_string(&batch, 0, i); - let key = value_as_string(&batch, 1, i); - let status = batch - .column(2) - .as_string::() - .value(i) - .parse() - .expect("Unexpected status"); - let id = value_as_string_opt(&batch, 3, i); - let handler = value_as_string_opt(&batch, 4, i); - let created_at = value_as_dt_opt(&batch, 5, i); - let modified_at = value_as_dt_opt(&batch, 6, i); - let pinned_deployment_id = value_as_string_opt(&batch, 7, i); - let last_attempt_eps = batch.column(8).as_string::(); - let last_failure_message = value_as_string_opt(&batch, 9, i); - let next_retry_at = value_as_dt_opt(&batch, 10, i); - let last_start = value_as_dt_opt(&batch, 11, i); - let num_retries = value_as_u64_opt(&batch, 12, i); - - let info = key_map.locked_key_info_mut(&component, &key); - - info.invocation_status = Some(status); - info.invocation_holding_lock = id; - info.invocation_method_holding_lock = handler; - info.invocation_created_at = created_at; - - // Running duration - if status == InvocationState::Running { - info.invocation_attempt_duration = - last_start.map(|last_start| Local::now().signed_duration_since(last_start)); - } - - // State duration - info.invocation_state_duration = modified_at - .map(|last_modified| Local::now().signed_duration_since(last_modified)); - - // Retries - info.num_retries = num_retries; - info.next_retry_at = next_retry_at; - info.pinned_deployment_id = pinned_deployment_id; - info.last_failure_message = last_failure_message; - info.last_attempt_deployment_id = last_attempt_eps.value_string_opt(i); - } - } - } - - Ok(key_map) -} - -pub async fn find_active_invocations( - client: &DataFusionHttpClient, - filter: &str, - post_filter: &str, - order: &str, - limit: usize, -) -> Result<(Vec, usize)> { - let mut full_count = 0; - let mut active = vec![]; - let query = format!( - "WITH enriched_invocations AS - (SELECT - ss.id, - ss.component, - ss.handler, - ss.component_key, - CASE - WHEN ss.status = 'suspended' THEN 'suspended' - WHEN sis.in_flight THEN 'running' - WHEN ss.status = 'invoked' AND retry_count > 0 THEN 'backing-off' - ELSE 'ready' - END AS combined_status, - ss.created_at, - ss.modified_at, - ss.pinned_deployment_id, - sis.retry_count, - sis.last_failure, - sis.last_attempt_deployment_id, - sis.next_retry_at, - sis.last_start_at, - ss.invoked_by_id, - ss.invoked_by_component, - comp.ty, - comp.deployment_id as comp_latest_deployment, - dp.id as known_deployment_id, - ss.trace_id - FROM sys_invocation_status ss - LEFT JOIN sys_invocation_state sis ON ss.id = sis.id - LEFT JOIN sys_component comp ON comp.name = ss.component - LEFT JOIN sys_deployment dp ON dp.id = ss.pinned_deployment_id - {} - {} - ) - SELECT *, COUNT(*) OVER() AS full_count from enriched_invocations - {} - LIMIT {}", - filter, order, post_filter, limit, - ); - let resp = client.run_query(query).await?; - for batch in resp.batches { - for i in 0..batch.num_rows() { - if full_count == 0 { - full_count = value_as_i64(&batch, batch.num_columns() - 1, i) as usize; - } - let id = value_as_string(&batch, 0, i); - let component = value_as_string(&batch, 1, i); - let handler = value_as_string(&batch, 2, i); - let component_key = value_as_string_opt(&batch, 3, i); - let status: InvocationState = value_as_string(&batch, 4, i) - .parse() - .expect("Unexpected status"); - let created_at = value_as_dt_opt(&batch, 5, i).expect("Missing created_at"); - - let state_modified_at = value_as_dt_opt(&batch, 6, i); - - let pinned_deployment_id = value_as_string_opt(&batch, 7, i); - - let num_retries = value_as_u64_opt(&batch, 8, i); - - let last_failure_message = value_as_string_opt(&batch, 9, i); - let last_attempt_deployment_id = value_as_string_opt(&batch, 10, i); - - let next_retry_at = value_as_dt_opt(&batch, 11, i); - let last_start = value_as_dt_opt(&batch, 12, i); - - let invoked_by_id = value_as_string_opt(&batch, 13, i); - let invoked_by_component = value_as_string_opt(&batch, 14, i); - let component_type = parse_component_type(&value_as_string(&batch, 15, i)); - let deployment_id_at_latest_svc_revision = value_as_string(&batch, 16, i); - - let existing_pinned_deployment_id = value_as_string_opt(&batch, 17, i); - let trace_id = value_as_string_opt(&batch, 18, i); - - let key = if component_type == ComponentType::VirtualObject { - component_key - } else { - None - }; - - let mut invocation = Invocation { - id, - status, - component, - key, - handler, - created_at, - invoked_by_id, - invoked_by_component, - state_modified_at, - num_retries, - next_retry_at, - pinned_deployment_id, - pinned_deployment_exists: existing_pinned_deployment_id.is_some(), - deployment_id_at_latest_svc_revision, - last_failure_message, - last_attempt_deployment_id, - trace_id, - ..Default::default() - }; - - // Running duration - if status == InvocationState::Running { - invocation.current_attempt_duration = - last_start.map(|last_start| Local::now().signed_duration_since(last_start)); - } - - if invocation.status == InvocationState::BackingOff { - invocation.last_attempt_started_at = last_start; - } - - active.push(invocation); - } - } - Ok((active, full_count)) -} - -pub async fn find_inbox_invocations( - client: &DataFusionHttpClient, - filter: &str, - order: &str, - limit: usize, -) -> Result<(Vec, usize)> { - let mut inbox: Vec = Vec::new(); - // Inbox... - let mut full_count = 0; - { - let query = format!( - "WITH inbox_table AS - (SELECT - ss.component, - ss.handler, - ss.id, - ss.created_at, - ss.invoked_by_id, - ss.invoked_by_component, - ss.component_key, - comp.ty, - ss.trace_id - FROM sys_inbox ss - LEFT JOIN sys_component comp ON comp.name = ss.component - {} - {} - ) - SELECT *, COUNT(*) OVER() AS full_count FROM inbox_table - LIMIT {}", - filter, order, limit - ); - let resp = client.run_query(query).await?; - for batch in resp.batches { - for i in 0..batch.num_rows() { - if full_count == 0 { - full_count = value_as_i64(&batch, batch.num_columns() - 1, i) as usize; - } - let component_type = parse_component_type(&value_as_string(&batch, 7, i)); - let key = if component_type == ComponentType::VirtualObject { - value_as_string_opt(&batch, 6, i) - } else { - None - }; - - let invocation = Invocation { - status: InvocationState::Pending, - component: value_as_string(&batch, 0, i), - handler: value_as_string(&batch, 1, i), - id: value_as_string(&batch, 2, i), - created_at: value_as_dt_opt(&batch, 3, i).expect("Missing created_at"), - key, - invoked_by_id: value_as_string_opt(&batch, 4, i), - invoked_by_component: value_as_string_opt(&batch, 5, i), - trace_id: value_as_string_opt(&batch, 8, i), - ..Default::default() - }; - inbox.push(invocation); - } - } - } - Ok((inbox, full_count)) -} - -pub async fn get_component_invocations( - client: &DataFusionHttpClient, - component: &str, - limit_inbox: usize, - limit_active: usize, -) -> Result<(Vec, Vec)> { - // Inbox... - let inbox: Vec = find_inbox_invocations( - client, - &format!("WHERE ss.component = '{}'", component), - "ORDER BY ss.created_at DESC", - limit_inbox, - ) - .await? - .0; - - // Active invocations analysis - let active: Vec = find_active_invocations( - client, - &format!("WHERE ss.component = '{}'", component), - "", - "ORDER BY ss.created_at DESC", - limit_active, - ) - .await? - .0; - - Ok((inbox, active)) -} - -fn parse_component_type(s: &str) -> ComponentType { - match s { - "service" => ComponentType::Service, - "virtual_object" => ComponentType::VirtualObject, - _ => panic!("Unexpected instance type"), - } -} - -pub async fn get_invocation( - client: &DataFusionHttpClient, - invocation_id: &str, -) -> Result> { - // Is it in inbox? - let result = - find_inbox_invocations(client, &format!("WHERE ss.id = '{}'", invocation_id), "", 1) - .await? - .0 - .pop(); - - if result.is_none() { - // Maybe it's active - return Ok(find_active_invocations( - client, - &format!("WHERE ss.id = '{}'", invocation_id), - "", - "", - 1, - ) - .await? - .0 - .pop()); - } - - Ok(result) -} - -pub async fn get_invocation_journal( - client: &DataFusionHttpClient, - invocation_id: &str, -) -> Result> { - // We are only looking for one... - // Let's get journal details. - let query = format!( - "SELECT - sj.index, - sj.entry_type, - sj.completed, - sj.invoked_id, - sj.invoked_component, - sj.invoked_handler, - sj.invoked_component_key, - sj.sleep_wakeup_at - FROM sys_journal sj - WHERE - sj.invocation_id = '{}' - ORDER BY index DESC - LIMIT {}", - invocation_id, JOURNAL_QUERY_LIMIT, - ); - - let my_invocation_id: InvocationId = invocation_id.parse().expect("Invocation ID is not valid"); - let resp = client.run_query(query).await?; - let mut journal = vec![]; - for batch in resp.batches { - for i in 0..batch.num_rows() { - let index = batch - .column(0) - .as_primitive::() - .value(i); - - let entry_type = value_as_string(&batch, 1, i); - let completed = batch.column(2).as_boolean().value(i); - let outgoing_invocation_id = value_as_string_opt(&batch, 3, i); - let invoked_component = value_as_string_opt(&batch, 4, i); - let invoked_handler = value_as_string_opt(&batch, 5, i); - let invoked_component_key = value_as_string_opt(&batch, 6, i); - let wakeup_at = value_as_dt_opt(&batch, 7, i); - - let entry_type = match entry_type.as_str() { - "Sleep" => JournalEntryType::Sleep { wakeup_at }, - "Invoke" => JournalEntryType::Invoke(OutgoingInvoke { - invocation_id: outgoing_invocation_id, - invoked_component, - invoked_handler, - invoked_component_key, - }), - "BackgroundInvoke" => JournalEntryType::BackgroundInvoke(OutgoingInvoke { - invocation_id: outgoing_invocation_id, - invoked_component, - invoked_handler, - invoked_component_key, - }), - "Awakeable" => JournalEntryType::Awakeable(AwakeableIdentifier::new( - my_invocation_id.clone(), - index, - )), - "GetState" => JournalEntryType::GetState, - "SetState" => JournalEntryType::SetState, - "ClearState" => JournalEntryType::ClearState, - t => JournalEntryType::Other(t.to_owned()), - }; - - journal.push(JournalEntry { - seq: index, - entry_type, - completed, - }); - } - } - - // Sort by seq. - journal.reverse(); - Ok(journal) -} diff --git a/cli/src/clients/datafusion_http_client.rs b/cli/src/clients/datafusion_http_client.rs deleted file mode 100644 index 7392ed280..000000000 --- a/cli/src/clients/datafusion_http_client.rs +++ /dev/null @@ -1,166 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -//! A wrapper client for the datafusion HTTP service. - -use super::errors::ApiError; -use crate::build_info; -use crate::cli_env::CliEnv; -use std::time::Duration; - -use arrow::array::AsArray; -use arrow::datatypes::{ArrowPrimitiveType, Int64Type, SchemaRef}; -use arrow::error::ArrowError; -use arrow::ipc::reader::StreamReader; -use arrow::record_batch::RecordBatch; -use bytes::Buf; -use serde::Serialize; -use thiserror::Error; -use tracing::{debug, info}; -use url::Url; - -#[derive(Error, Debug)] -#[error(transparent)] -pub enum Error { - Api(#[from] ApiError), - #[error("(Protocol error) {0}")] - Serialization(#[from] serde_json::Error), - Network(#[from] reqwest::Error), - Arrow(#[from] ArrowError), - UrlParse(#[from] url::ParseError), -} - -/// A handy client for the datafusion HTTP service. -#[derive(Clone)] -pub struct DataFusionHttpClient { - pub(crate) inner: reqwest::Client, - pub(crate) base_url: Url, - pub(crate) bearer_token: Option, - pub(crate) request_timeout: Option, -} - -impl DataFusionHttpClient { - pub fn new(env: &CliEnv) -> reqwest::Result { - let raw_client = reqwest::Client::builder() - .user_agent(format!( - "{}/{} {}-{}", - env!("CARGO_PKG_NAME"), - build_info::RESTATE_CLI_VERSION, - std::env::consts::OS, - std::env::consts::ARCH, - )) - .connect_timeout(env.connect_timeout) - .build()?; - - Ok(Self { - inner: raw_client, - base_url: env.admin_base_url.clone(), - bearer_token: env.bearer_token.clone(), - request_timeout: env.request_timeout, - }) - } - - /// Prepare a request builder for a DataFusion request. - fn prepare(&self, path: Url) -> reqwest::RequestBuilder { - let request_builder = self.inner.request(reqwest::Method::POST, path); - - let request_builder = match self.request_timeout { - Some(timeout) => request_builder.timeout(timeout), - None => request_builder, - }; - - match self.bearer_token.as_deref() { - Some(token) => request_builder.bearer_auth(token), - None => request_builder, - } - } - - pub async fn run_query(&self, query: String) -> Result { - let url = self.base_url.join("/query")?; - - debug!("Sending request sql query '{}'", query); - let resp = self - .prepare(url) - .json(&SqlQueryRequest { query }) - .send() - .await?; - - let http_status_code = resp.status(); - let url = resp.url().clone(); - if !resp.status().is_success() { - let body = resp.text().await?; - info!("Response from {} ({})", url, http_status_code); - info!(" {}", body); - // Wrap the error into ApiError - return Err(Error::Api(ApiError { - http_status_code, - url, - body: serde_json::from_str(&body)?, - })); - } - - // We read the entire payload first in-memory to simplify the logic, however, - // if this ever becomes a problem, we can use bytes_stream() (requires - // reqwest's stream feature) and stitch that with the stream reader. - let payload = resp.bytes().await?.reader(); - let reader = StreamReader::try_new(payload, None)?; - let schema = reader.schema(); - - let mut batches = Vec::new(); - for batch in reader { - batches.push(batch?); - } - - Ok(SqlResponse { schema, batches }) - } - - pub async fn run_count_agg_query(&self, query: String) -> Result { - let resp = self.run_query(query).await?; - - Ok(get_column_as::(&resp.batches, 0) - .first() - .map(|v| **v) - .unwrap_or(0)) - } -} - -fn get_column_as( - batches: &[RecordBatch], - column_index: usize, -) -> Vec<&::Native> -where - T: ArrowPrimitiveType, -{ - let mut output = vec![]; - for batch in batches { - let col = batch.column(column_index); - assert_eq!(col.data_type(), &T::DATA_TYPE); - - let l = col.as_primitive::(); - output.extend(l.values()); - } - output -} - -#[derive(Serialize, Debug, Clone)] -pub struct SqlQueryRequest { - pub query: String, -} - -pub struct SqlResponse { - pub schema: SchemaRef, - pub batches: Vec, -} - -// Ensure that client is Send + Sync. Compiler will fail if it's not. -const _: () = { - const fn assert_send() {} - assert_send::(); -}; diff --git a/cli/src/clients/errors.rs b/cli/src/clients/errors.rs deleted file mode 100644 index b3bba9840..000000000 --- a/cli/src/clients/errors.rs +++ /dev/null @@ -1,51 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use crate::console::Styled; -use crate::ui::stylesheet::Style; - -use serde::Deserialize; -use url::Url; - -#[derive(Deserialize, Debug, Clone)] -pub struct ApiErrorBody { - restate_code: Option, - message: String, -} - -#[derive(Debug, Clone)] -pub struct ApiError { - pub http_status_code: reqwest::StatusCode, - pub url: Url, - pub body: ApiErrorBody, -} - -impl std::fmt::Display for ApiErrorBody { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - let code = self.restate_code.as_deref().unwrap_or(""); - write!(f, "{} {}", Styled(Style::Warn, code), self.message)?; - Ok(()) - } -} - -impl std::fmt::Display for ApiError { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - writeln!(f, "{}", self.body)?; - write!( - f, - " -> Http status code {} at '{}'", - Styled(Style::Warn, &self.http_status_code), - Styled(Style::Info, &self.url), - )?; - Ok(()) - } -} - -impl std::error::Error for ApiError {} diff --git a/cli/src/clients/metas_client.rs b/cli/src/clients/metas_client.rs deleted file mode 100644 index e08fbd355..000000000 --- a/cli/src/clients/metas_client.rs +++ /dev/null @@ -1,193 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -//! A wrapper client for meta HTTP service. - -use http::StatusCode; -use serde::{de::DeserializeOwned, Serialize}; -use std::time::Duration; -use thiserror::Error; -use tracing::{debug, info}; -use url::Url; - -use crate::build_info; -use crate::cli_env::CliEnv; - -use super::errors::ApiError; - -#[derive(Error, Debug)] -#[error(transparent)] -pub enum Error { - // Error is boxed because ApiError can get quite large if the message body is large. - Api(#[from] Box), - #[error("(Protocol error) {0}")] - Serialization(#[from] serde_json::Error), - Network(#[from] reqwest::Error), -} - -/// A lazy wrapper around a reqwest response that deserializes the body on -/// demand and decodes our custom error body on non-2xx responses. -pub struct Envelope { - inner: reqwest::Response, - - _phantom: std::marker::PhantomData, -} - -impl Envelope -where - T: DeserializeOwned, -{ - pub fn status_code(&self) -> StatusCode { - self.inner.status() - } - - pub fn url(&self) -> &Url { - self.inner.url() - } - - pub async fn into_body(self) -> Result { - let http_status_code = self.inner.status(); - let url = self.inner.url().clone(); - if !self.status_code().is_success() { - let body = self.inner.text().await?; - info!("Response from {} ({})", url, http_status_code); - info!(" {}", body); - // Wrap the error into ApiError - return Err(Error::Api(Box::new(ApiError { - http_status_code, - url, - body: serde_json::from_str(&body)?, - }))); - } - - debug!("Response from {} ({})", url, http_status_code); - let body = self.inner.text().await?; - debug!(" {}", body); - Ok(serde_json::from_str(&body)?) - } - - pub async fn into_text(self) -> Result { - Ok(self.inner.text().await?) - } - pub fn success_or_error(self) -> Result { - let http_status_code = self.inner.status(); - let url = self.inner.url().clone(); - info!("Response from {} ({})", url, http_status_code); - match self.inner.error_for_status() { - Ok(_) => Ok(http_status_code), - Err(e) => Err(Error::Network(e)), - } - } -} - -impl From for Envelope { - fn from(value: reqwest::Response) -> Self { - Self { - inner: value, - _phantom: Default::default(), - } - } -} - -/// A handy client for the meta HTTP service. -#[derive(Clone)] -pub struct MetasClient { - pub(crate) inner: reqwest::Client, - pub(crate) base_url: Url, - pub(crate) bearer_token: Option, - pub(crate) request_timeout: Duration, -} - -const DEFAULT_REQUEST_TIMEOUT: Duration = Duration::from_secs(10); - -impl MetasClient { - pub fn new(env: &CliEnv) -> reqwest::Result { - let raw_client = reqwest::Client::builder() - .user_agent(format!( - "{}/{} {}-{}", - env!("CARGO_PKG_NAME"), - build_info::RESTATE_CLI_VERSION, - std::env::consts::OS, - std::env::consts::ARCH, - )) - .connect_timeout(env.connect_timeout) - .build()?; - - Ok(Self { - inner: raw_client, - base_url: env.admin_base_url.clone(), - bearer_token: env.bearer_token.clone(), - request_timeout: env.request_timeout.unwrap_or(DEFAULT_REQUEST_TIMEOUT), - }) - } - - /// Prepare a request builder for the given method and path. - fn prepare(&self, method: reqwest::Method, path: Url) -> reqwest::RequestBuilder { - let request_builder = self - .inner - .request(method, path) - .timeout(self.request_timeout); - - match self.bearer_token.as_deref() { - Some(token) => request_builder.bearer_auth(token), - None => request_builder, - } - } - - /// Prepare a request builder that encodes the body as JSON. - fn prepare_with_body( - &self, - method: reqwest::Method, - path: Url, - body: B, - ) -> reqwest::RequestBuilder - where - B: Serialize, - { - self.prepare(method, path).json(&body) - } - - /// Execute a request and return the response as a lazy Envelope. - pub(crate) async fn run( - &self, - method: reqwest::Method, - path: Url, - ) -> reqwest::Result> - where - T: DeserializeOwned + Send, - { - debug!("Sending request {} ({})", method, path); - let request = self.prepare(method, path); - let resp = request.send().await?; - Ok(resp.into()) - } - - pub(crate) async fn run_with_body( - &self, - method: reqwest::Method, - path: Url, - body: B, - ) -> reqwest::Result> - where - T: DeserializeOwned + Send, - B: Serialize + std::fmt::Debug + Send, - { - debug!("Sending request {} ({}): {:?}", method, path, body); - let request = self.prepare_with_body(method, path, body); - let resp = request.send().await?; - Ok(resp.into()) - } -} - -// Ensure that MetaClient is Send + Sync. Compiler will fail if it's not. -const _: () = { - const fn assert_send() {} - assert_send::(); -}; diff --git a/cli/src/clients/metas_interface.rs b/cli/src/clients/metas_interface.rs deleted file mode 100644 index d25570f78..000000000 --- a/cli/src/clients/metas_interface.rs +++ /dev/null @@ -1,125 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. -use std::fmt::Display; - -use super::metas_client::Envelope; -use super::MetasClient; - -use restate_meta_rest_model::components::*; -use restate_meta_rest_model::deployments::*; - -pub trait MetaClientInterface { - /// Check if the meta service is healthy by invoking /health - async fn health(&self) -> reqwest::Result>; - async fn get_components(&self) -> reqwest::Result>; - async fn get_component(&self, name: &str) -> reqwest::Result>; - async fn get_deployments(&self) -> reqwest::Result>; - async fn get_deployment( - &self, - id: D, - ) -> reqwest::Result>; - async fn remove_deployment(&self, id: &str, force: bool) -> reqwest::Result>; - - async fn discover_deployment( - &self, - body: RegisterDeploymentRequest, - ) -> reqwest::Result>; - - async fn cancel_invocation(&self, id: &str, kill: bool) -> reqwest::Result>; - - async fn patch_state( - &self, - service: &str, - req: ModifyComponentStateRequest, - ) -> reqwest::Result>; -} - -impl MetaClientInterface for MetasClient { - async fn health(&self) -> reqwest::Result> { - let url = self.base_url.join("/health").expect("Bad url!"); - self.run(reqwest::Method::GET, url).await - } - - async fn get_components(&self) -> reqwest::Result> { - let url = self.base_url.join("/components").expect("Bad url!"); - self.run(reqwest::Method::GET, url).await - } - - async fn get_component(&self, name: &str) -> reqwest::Result> { - let url = self - .base_url - .join(&format!("/components/{}", name)) - .expect("Bad url!"); - - self.run(reqwest::Method::GET, url).await - } - - async fn get_deployments(&self) -> reqwest::Result> { - let url = self.base_url.join("/deployments").expect("Bad url!"); - self.run(reqwest::Method::GET, url).await - } - - async fn get_deployment( - &self, - id: D, - ) -> reqwest::Result> { - let url = self - .base_url - .join(&format!("/deployments/{}", id)) - .expect("Bad url!"); - self.run(reqwest::Method::GET, url).await - } - - async fn remove_deployment(&self, id: &str, force: bool) -> reqwest::Result> { - let mut url = self - .base_url - .join(&format!("/deployments/{}", id)) - .expect("Bad url!"); - - url.set_query(Some(&format!("force={}", force))); - - self.run(reqwest::Method::DELETE, url).await - } - - async fn discover_deployment( - &self, - body: RegisterDeploymentRequest, - ) -> reqwest::Result> { - let url = self.base_url.join("/deployments").expect("Bad url!"); - self.run_with_body(reqwest::Method::POST, url, body).await - } - - async fn cancel_invocation(&self, id: &str, kill: bool) -> reqwest::Result> { - let mut url = self - .base_url - .join(&format!("/invocations/{}", id)) - .expect("Bad url!"); - - url.set_query(Some(&format!( - "mode={}", - if kill { "kill" } else { "cancel" } - ))); - - self.run(reqwest::Method::DELETE, url).await - } - - async fn patch_state( - &self, - service: &str, - req: ModifyComponentStateRequest, - ) -> reqwest::Result> { - let url = self - .base_url - .join(&format!("/components/{service}/state")) - .expect("Bad url!"); - - self.run_with_body(reqwest::Method::POST, url, req).await - } -} diff --git a/cli/src/clients/mod.rs b/cli/src/clients/mod.rs deleted file mode 100644 index 90166e6a9..000000000 --- a/cli/src/clients/mod.rs +++ /dev/null @@ -1,20 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -pub mod datafusion_helpers; -mod datafusion_http_client; -mod errors; -mod metas_client; -mod metas_interface; - -pub use self::datafusion_http_client::DataFusionHttpClient; -pub use self::metas_client::Error as MetasClientError; -pub use self::metas_client::MetasClient; -pub use self::metas_interface::MetaClientInterface; diff --git a/cli/src/commands/components/describe.rs b/cli/src/commands/components/describe.rs deleted file mode 100644 index 6993704b3..000000000 --- a/cli/src/commands/components/describe.rs +++ /dev/null @@ -1,151 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use cling::prelude::*; -use comfy_table::{Cell, Table}; -use indicatif::ProgressBar; - -use crate::c_title; -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::count_deployment_active_inv; -use crate::clients::{MetaClientInterface, MetasClient}; -use crate::console::c_println; -use crate::ui::component_methods::create_component_handlers_table; -use crate::ui::console::StyledTable; -use crate::ui::deployments::{ - add_deployment_to_kv_table, render_active_invocations, render_deployment_type, - render_deployment_url, -}; -use crate::ui::watcher::Watch; - -use anyhow::Result; - -#[derive(Run, Parser, Collect, Clone)] -#[cling(run = "run_describe")] -#[clap(visible_alias = "get")] -pub struct Describe { - /// Component name - name: String, - - #[clap(flatten)] - watch: Watch, -} - -pub async fn run_describe(State(env): State, opts: &Describe) -> Result<()> { - opts.watch.run(|| describe(&env, opts)).await -} - -async fn describe(env: &CliEnv, opts: &Describe) -> Result<()> { - let client = MetasClient::new(env)?; - let component = client.get_component(&opts.name).await?.into_body().await?; - - let mut table = Table::new_styled(&env.ui_config); - table.add_kv_row("Name:", &component.name); - table.add_kv_row("Flavor (Instance Type):", &format!("{:?}", component.ty)); - table.add_kv_row("Revision:", component.revision); - table.add_kv_row("Public:", component.public); - table.add_kv_row("Deployment ID:", component.deployment_id); - - let deployment = client - .get_deployment(&component.deployment_id) - .await? - .into_body() - .await?; - add_deployment_to_kv_table(&deployment.deployment, &mut table); - - c_title!("📜", "Component Information"); - c_println!("{}", table); - - // Methods - c_println!(); - c_title!("🔌", "Methods"); - let table = create_component_handlers_table(&env.ui_config, &component.handlers); - c_println!("{}", table); - - // Printing other existing endpoints with previous revisions. We currently don't - // have an API to get endpoints by component name so we get everything and filter - // locally in this case. - let progress = ProgressBar::new_spinner(); - progress - .set_style(indicatif::ProgressStyle::with_template("{spinner} [{elapsed}] {msg}").unwrap()); - progress.enable_steady_tick(std::time::Duration::from_millis(120)); - progress.set_message("Retrieving information about older deployments"); - - let component_name = component.name; - let latest_rev = component.revision; - let mut other_deployments: Vec<_> = client - .get_deployments() - .await? - .into_body() - .await? - .deployments - .into_iter() - .filter_map(|e| { - // endpoints that serve the same component. - let component_match: Vec<_> = e - .components - .iter() - .filter(|s| s.name == component_name && s.revision != latest_rev) - .collect(); - // we should see either one or zero matches, more than one means that an endpoint is - // hosting multiple revisions of the _the same_ component which indicates that something - // is so wrong! - if component_match.len() > 1 { - progress.finish_and_clear(); - panic!( - "Deployment {} is hosting multiple revisions of the same component {}!", - e.id, component_name - ); - } - - component_match - .first() - .map(|component_match| (e.id, e.deployment, component_match.revision)) - }) - .collect(); - - if other_deployments.is_empty() { - return Ok(()); - } - - let sql_client = crate::clients::DataFusionHttpClient::new(env)?; - // We have older deployments for this component, let's grab - let mut table = Table::new_styled(&env.ui_config); - let headers = vec![ - "ADDRESS", - "TYPE", - "COMPONENT REVISION", - "ACTIVE INVOCATIONS", - "DEPLOYMENT ID", - ]; - table.set_styled_header(headers); - // sort other_endpoints by revision in descending order - other_deployments.sort_by(|(_, _, rev1), (_, _, rev2)| rev2.cmp(rev1)); - - for (deployment_id, deployment_metadata, rev) in other_deployments { - let active_inv = count_deployment_active_inv(&sql_client, &deployment_id).await?; - - table.add_row(vec![ - Cell::new(render_deployment_url(&deployment_metadata)), - Cell::new(render_deployment_type(&deployment_metadata)), - Cell::new(rev), - render_active_invocations(active_inv), - Cell::new(deployment_id), - ]); - } - - progress.finish_and_clear(); - - c_println!(); - c_title!("👵", "Older Revisions"); - c_println!("{}", table); - - Ok(()) -} diff --git a/cli/src/commands/components/list.rs b/cli/src/commands/components/list.rs deleted file mode 100644 index ac18ec5b3..000000000 --- a/cli/src/commands/components/list.rs +++ /dev/null @@ -1,124 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use std::collections::HashMap; - -use crate::c_error; -use crate::cli_env::CliEnv; -use crate::clients::MetaClientInterface; -use crate::console::c_println; -use crate::ui::component_methods::{icon_for_component_type, icon_for_is_public}; -use crate::ui::console::StyledTable; -use crate::ui::deployments::{render_deployment_type, render_deployment_url}; -use crate::ui::watcher::Watch; - -use anyhow::{Context, Result}; -use cling::prelude::*; -use comfy_table::Table; -use restate_meta_rest_model::components::HandlerMetadata; -use restate_meta_rest_model::deployments::DeploymentResponse; -use restate_types::identifiers::DeploymentId; - -#[derive(Run, Parser, Collect, Clone)] -#[clap(visible_alias = "ls")] -#[cling(run = "run_list")] -pub struct List { - /// Show only publicly accessible services - #[clap(long)] - public_only: bool, - - //// Show additional columns - #[clap(long)] - extra: bool, - - #[clap(flatten)] - watch: Watch, -} - -pub async fn run_list(State(env): State, opts: &List) -> Result<()> { - opts.watch.run(|| list(&env, opts)).await -} - -async fn list(env: &CliEnv, list_opts: &List) -> Result<()> { - let client = crate::clients::MetasClient::new(env)?; - let defs = client.get_components().await?.into_body().await?; - - if defs.components.is_empty() { - c_error!( - "No components were found! Components are added by registering deployments with 'restate dep register'" - ); - return Ok(()); - } - - let deployments = client.get_deployments().await?.into_body().await?; - - let mut deployment_cache: HashMap = HashMap::new(); - - // Caching endpoints - for deployment in deployments.deployments { - deployment_cache.insert(deployment.id, deployment); - } - - let mut table = Table::new_styled(&env.ui_config); - let mut header = vec![ - "", - "NAME", - "REVISION", - "FLAVOR", - "DEPLOYMENT TYPE", - "DEPLOYMENT ID", - ]; - if list_opts.extra { - header.push("ENDPOINT"); - header.push("METHODS"); - } - table.set_styled_header(header); - - for svc in defs.components { - if list_opts.public_only && !svc.public { - // Skip non-public services if users chooses to. - continue; - } - - let public = icon_for_is_public(svc.public); - let flavor = icon_for_component_type(&svc.ty); - - let deployment = deployment_cache - .get(&svc.deployment_id) - .with_context(|| format!("Deployment {} was not found!", svc.deployment_id))?; - - let mut row = vec![ - public.to_string(), - svc.name, - svc.revision.to_string(), - flavor.to_string(), - render_deployment_type(&deployment.deployment), - deployment.id.to_string(), - ]; - if list_opts.extra { - row.push(render_deployment_url(&deployment.deployment)); - row.push(render_methods(svc.handlers)); - } - - table.add_row(row); - } - c_println!("{}", table); - Ok(()) -} - -fn render_methods(methods: Vec) -> String { - use std::fmt::Write as FmtWrite; - - let mut out = String::new(); - for method in methods { - writeln!(&mut out, "{}", method.name).unwrap(); - } - out -} diff --git a/cli/src/commands/components/mod.rs b/cli/src/commands/components/mod.rs deleted file mode 100644 index 06b60d836..000000000 --- a/cli/src/commands/components/mod.rs +++ /dev/null @@ -1,26 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -mod describe; -mod list; -mod status; - -use cling::prelude::*; - -#[derive(Run, Subcommand, Clone)] -#[clap(visible_alias = "comp", alias = "component")] -pub enum Components { - /// List the registered services - List(list::List), - /// Prints detailed information about a given service - Describe(describe::Describe), - /// Prints activity information about a given service (and method) - Status(status::Status), -} diff --git a/cli/src/commands/components/status/agg_status.rs b/cli/src/commands/components/status/agg_status.rs deleted file mode 100644 index ac8684413..000000000 --- a/cli/src/commands/components/status/agg_status.rs +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use super::{render_components_status, render_locked_keys, Status}; -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::{get_components_status, get_locked_keys_status}; -use crate::clients::{DataFusionHttpClient, MetaClientInterface, MetasClient}; -use crate::{c_error, c_title}; - -use anyhow::Result; -use indicatif::ProgressBar; -use restate_meta_rest_model::components::ComponentType; - -pub async fn run_aggregated_status( - env: &CliEnv, - opts: &Status, - metas_client: MetasClient, - sql_client: DataFusionHttpClient, -) -> Result<()> { - // First, let's get the service metadata - let progress = ProgressBar::new_spinner(); - progress - .set_style(indicatif::ProgressStyle::with_template("{spinner} [{elapsed}] {msg}").unwrap()); - progress.enable_steady_tick(std::time::Duration::from_millis(120)); - - progress.set_message("Fetching components status"); - let components = metas_client - .get_components() - .await? - .into_body() - .await? - .components; - if components.is_empty() { - progress.finish_and_clear(); - c_error!( - "No components were found! Components are added by registering deployments with 'restate dep register'" - ); - return Ok(()); - } - - let all_component_names: Vec<_> = components.iter().map(|x| x.name.clone()).collect(); - - let keyed: Vec<_> = components - .iter() - .filter(|svc| svc.ty == ComponentType::VirtualObject) - .cloned() - .collect(); - - let status_map = get_components_status(&sql_client, all_component_names).await?; - - let locked_keys = get_locked_keys_status(&sql_client, keyed.iter().map(|x| &x.name)).await?; - // Render UI - progress.finish_and_clear(); - // Render Status Table - c_title!("📷", "Summary"); - render_components_status(env, components, status_map).await?; - // Render Locked Keys - if !locked_keys.is_empty() { - c_title!("📨", "Active Keys"); - render_locked_keys(env, locked_keys, opts.locked_keys_limit).await?; - } - Ok(()) -} diff --git a/cli/src/commands/components/status/detailed_status.rs b/cli/src/commands/components/status/detailed_status.rs deleted file mode 100644 index a8d742ccb..000000000 --- a/cli/src/commands/components/status/detailed_status.rs +++ /dev/null @@ -1,85 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use super::{render_components_status, render_locked_keys, Status}; -use crate::c_title; -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::{ - get_component_invocations, get_components_status, get_locked_keys_status, -}; -use crate::clients::{DataFusionHttpClient, MetaClientInterface, MetasClient}; -use crate::ui::invocations::render_invocation_compact; - -use anyhow::Result; -use indicatif::ProgressBar; -use restate_meta_rest_model::components::ComponentType; - -pub async fn run_detailed_status( - env: &CliEnv, - component_name: &str, - opts: &Status, - metas_client: MetasClient, - sql_client: DataFusionHttpClient, -) -> Result<()> { - // First, let's get the component metadata - let progress = ProgressBar::new_spinner(); - progress - .set_style(indicatif::ProgressStyle::with_template("{spinner} [{elapsed}] {msg}").unwrap()); - progress.enable_steady_tick(std::time::Duration::from_millis(120)); - - progress.set_message("Fetching component status"); - let component = metas_client - .get_component(component_name) - .await? - .into_body() - .await?; - - let is_object = component.ty == ComponentType::VirtualObject; - - // Print summary table first. - let status_map = get_components_status(&sql_client, vec![component_name]).await?; - let (inbox, active) = get_component_invocations( - &sql_client, - component_name, - opts.sample_invocations_limit, - opts.sample_invocations_limit, - ) - .await?; - progress.finish_and_clear(); - - // Render Summary - c_title!("📷", "Summary"); - render_components_status(env, vec![component], status_map).await?; - - if is_object { - let locked_keys = get_locked_keys_status(&sql_client, vec![component_name]).await?; - if !locked_keys.is_empty() { - c_title!("📨", "Active Keys"); - render_locked_keys(env, locked_keys, opts.locked_keys_limit).await?; - } - } - - // Sample of active invocations - if !active.is_empty() { - c_title!("🚂", "Recent Active Invocations"); - for inv in active { - render_invocation_compact(env, &inv); - } - } - // Sample of inbox... - if !inbox.is_empty() { - c_title!("🧘", "Recent Pending Invocations"); - for inv in inbox { - render_invocation_compact(env, &inv); - } - } - - Ok(()) -} diff --git a/cli/src/commands/components/status/mod.rs b/cli/src/commands/components/status/mod.rs deleted file mode 100644 index eb81f96e4..000000000 --- a/cli/src/commands/components/status/mod.rs +++ /dev/null @@ -1,338 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -mod agg_status; -mod detailed_status; - -use crate::c_println; -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::{ - ComponentHandlerLockedKeysMap, ComponentStatus, ComponentStatusMap, InvocationState, -}; -use crate::clients::MetasClient; -use crate::ui::component_methods::icon_for_component_type; -use crate::ui::console::{Styled, StyledTable}; -use crate::ui::invocations::invocation_status; -use crate::ui::stylesheet::Style; -use crate::ui::watcher::Watch; -use crate::ui::{duration_to_human_precise, duration_to_human_rough}; - -use anyhow::Result; -use chrono_humanize::Tense; -use cling::prelude::*; -use comfy_table::{Cell, Table}; -use restate_meta_rest_model::components::ComponentMetadata; - -#[derive(Run, Parser, Collect, Clone)] -#[cling(run = "run_status")] -pub struct Status { - #[clap(long, default_value = "5")] - locked_keys_limit: usize, - - #[clap(long, default_value = "5")] - sample_invocations_limit: usize, - - /// Service name, prints all services if omitted - component: Option, - - #[clap(flatten)] - watch: Watch, -} - -pub async fn run_status(State(env): State, opts: &Status) -> Result<()> { - opts.watch.run(|| status(&env, opts)).await -} - -async fn status(env: &CliEnv, opts: &Status) -> Result<()> { - let metas_client = MetasClient::new(env)?; - let sql_client = crate::clients::DataFusionHttpClient::new(env)?; - - if let Some(svc) = &opts.component { - detailed_status::run_detailed_status(env, svc, opts, metas_client, sql_client).await - } else { - agg_status::run_aggregated_status(env, opts, metas_client, sql_client).await - } -} - -async fn render_components_status( - env: &CliEnv, - services: Vec, - status_map: ComponentStatusMap, -) -> Result<()> { - let empty = ComponentStatus::default(); - let mut table = Table::new_styled(&env.ui_config); - table.set_styled_header(vec![ - "", - "PENDING", - "READY", - "RUNNING", - "BACKING-OFF", - "SUSPENDED", - "OLDEST NON-SUSPENDED INVOCATION", - ]); - for svc in services { - let svc_status = status_map.get_component_status(&svc.name).unwrap_or(&empty); - // Service title - let flavor = icon_for_component_type(&svc.ty); - let svc_title = format!("{} {}", svc.name, flavor); - table.add_row(vec![ - Cell::new(svc_title).add_attribute(comfy_table::Attribute::Bold) - ]); - - render_methods_status(&mut table, svc, svc_status).await?; - table.add_row(vec![""]); - } - c_println!("{}", table); - Ok(()) -} - -fn render_handler_state_stats( - svc_status: &ComponentStatus, - method: &str, - state: InvocationState, -) -> Cell { - use comfy_table::Color; - // Pending - if let Some(state_stats) = svc_status.get_handler_stats(state, method) { - let cell = Cell::new(state_stats.num_invocations); - let color = match state { - InvocationState::Unknown => Color::Magenta, - InvocationState::Pending if state_stats.num_invocations > 10 => Color::Yellow, - InvocationState::Running if state_stats.num_invocations > 0 => Color::Green, - InvocationState::BackingOff if state_stats.num_invocations > 5 => Color::Red, - InvocationState::BackingOff if state_stats.num_invocations > 0 => Color::Yellow, - _ => comfy_table::Color::Reset, - }; - cell.fg(color) - } else { - Cell::new("-") - } -} - -async fn render_methods_status( - table: &mut Table, - svc: ComponentMetadata, - svc_status: &ComponentStatus, -) -> Result<()> { - for handler in svc.handlers { - let mut row = vec![]; - row.push(Cell::new(format!(" {}", &handler.name))); - // Pending - row.push(render_handler_state_stats( - svc_status, - &handler.name, - InvocationState::Pending, - )); - - // Ready - row.push(render_handler_state_stats( - svc_status, - &handler.name, - InvocationState::Ready, - )); - - // Running - row.push(render_handler_state_stats( - svc_status, - &handler.name, - InvocationState::Running, - )); - - // Backing-off - row.push(render_handler_state_stats( - svc_status, - &handler.name, - InvocationState::BackingOff, - )); - - row.push(render_handler_state_stats( - svc_status, - &handler.name, - InvocationState::Suspended, - )); - - let oldest_cell = if let Some(current_handler) = svc_status.get_handler(&handler.name) { - if let Some((oldest_state, oldest_stats)) = - current_handler.oldest_non_suspended_invocation_state() - { - let dur = chrono::Local::now().signed_duration_since(oldest_stats.oldest_at); - let style = if dur.num_seconds() < 60 { - Style::Info - } else if dur.num_seconds() < 120 { - Style::Warn - } else { - Style::Danger - }; - - let oldest_at_human = duration_to_human_rough(dur, Tense::Past); - Cell::new(format!( - "{} {} (invoked {})", - oldest_stats.oldest_invocation, - invocation_status(oldest_state), - Styled(style, oldest_at_human) - )) - } else { - Cell::new("-") - } - } else { - Cell::new("-") - }; - - row.push(oldest_cell); - - table.add_row(row); - } - - Ok(()) -} -async fn render_locked_keys( - env: &CliEnv, - locked_keys: ComponentHandlerLockedKeysMap, - limit_per_service: usize, -) -> Result<()> { - let locked_keys = locked_keys.into_inner(); - if locked_keys.is_empty() { - return Ok(()); - } - - let mut table = Table::new_styled(&env.ui_config); - table.set_styled_header(vec!["", "QUEUE", "LOCKED BY", "HANDLER", "NOTES"]); - for (svc_name, locked_keys) in locked_keys { - let mut keys: Vec<_> = locked_keys.into_iter().collect(); - keys.sort_by(|(_, a), (_, b)| b.num_pending.cmp(&a.num_pending)); - - let svc_title = format!("{} ({} active keys)", svc_name, keys.len()); - table.add_row(vec![ - Cell::new(svc_title).add_attribute(comfy_table::Attribute::Bold) - ]); - - // Truncate to fit the limit - keys.truncate(limit_per_service); - - for (key, key_info) in keys { - let mut row = vec![]; - // Key - row.push(Cell::new(format!(" {}", &key))); - - // Queue - let queue_color = if key_info.num_pending > 10 { - comfy_table::Color::Red - } else if key_info.num_pending > 0 { - comfy_table::Color::Yellow - } else { - comfy_table::Color::Reset - }; - - row.push(Cell::new(key_info.num_pending).fg(queue_color)); - - // Holding invocation - if let Some(invocation) = &key_info.invocation_holding_lock { - row.push(Cell::new(format!( - "{} ({})", - invocation, - invocation_status( - key_info - .invocation_status - .unwrap_or(InvocationState::Unknown) - ) - ))); - } else { - row.push(Cell::new("-")); - } - - // Holding method - if let Some(method) = &key_info.invocation_method_holding_lock { - row.push(Cell::new(method)); - } else { - row.push(Cell::new("-")); - } - - let mut notes = Cell::new(""); - // Notes - if let Some(invocation_status) = key_info.invocation_status { - match invocation_status { - // Heuristic for issues, it's not accurate since we don't have the full picture - // in the CLI. Ideally, we should get metrics like "total flight duration" and - // "total suspension duration", "time_of_first_attempt", etc. - InvocationState::Running => { - // Check for duration..., - if let Some(run_duration) = key_info.invocation_attempt_duration { - let lock_held_period_msg = if let Some(state_duration) = - key_info.invocation_state_duration - { - format!( - "It's been holding the lock for {}", - Styled( - Style::Danger, - duration_to_human_precise(state_duration, Tense::Present) - ) - ) - } else { - String::new() - }; - // TODO: Make this a configurable threshold - if run_duration.num_seconds() > 5 { - // too long... - notes = Cell::new(format!( - "Current attempt has been in-flight for {}. {}", - Styled( - Style::Danger, - duration_to_human_precise(run_duration, Tense::Present) - ), - lock_held_period_msg, - )); - } - } - } - InvocationState::Suspended => { - if let Some(suspend_duration) = key_info.invocation_state_duration { - if suspend_duration.num_seconds() > 5 { - // too long... - notes = Cell::new(format!( - "Suspended for {}. The lock will not be \ - released until this invocation is complete", - Styled( - Style::Danger, - duration_to_human_precise(suspend_duration, Tense::Present) - ) - )); - } - } - } - InvocationState::BackingOff => { - // Important to note, - let next_retry = key_info.next_retry_at.expect("No scheduled retry!"); - let next_retry = next_retry.signed_duration_since(chrono::Local::now()); - let next_retry = duration_to_human_precise(next_retry, Tense::Future); - - let num_retries = key_info.num_retries.expect("No retries"); - let num_retries = if num_retries > 10 { - Styled(Style::Danger, num_retries) - } else { - Styled(Style::Notice, num_retries) - }; - notes = Cell::new(format!( - "Retried {} time(s). Next retry {}.", - num_retries, next_retry, - )); - } - _ => {} - } - } - - row.push(notes); - - table.add_row(row); - } - table.add_row(vec![""]); - } - c_println!("{}", table); - Ok(()) -} diff --git a/cli/src/commands/deployments/describe.rs b/cli/src/commands/deployments/describe.rs deleted file mode 100644 index cb3fe9198..000000000 --- a/cli/src/commands/deployments/describe.rs +++ /dev/null @@ -1,165 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use std::collections::HashMap; - -use anyhow::Result; -use cling::prelude::*; -use comfy_table::{Cell, Table}; -use restate_meta_rest_model::components::ComponentMetadata; -use restate_meta_rest_model::deployments::ComponentNameRevPair; - -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::count_deployment_active_inv_by_method; -use crate::clients::{MetaClientInterface, MetasClient}; -use crate::ui::component_methods::icon_for_component_type; -use crate::ui::console::{Styled, StyledTable}; -use crate::ui::deployments::{ - add_deployment_to_kv_table, calculate_deployment_status, render_active_invocations, - render_deployment_status, -}; -use crate::ui::stylesheet::Style; -use crate::ui::watcher::Watch; -use crate::{c_eprintln, c_indent_table, c_indentln, c_println, c_title}; - -#[derive(Run, Parser, Collect, Clone)] -#[cling(run = "run_describe")] -#[clap(visible_alias = "get")] -pub struct Describe { - // TODO: Support inference of endpoint or ID, but this require the deployment - // ID to follow a more constrained format - /// Deployment ID - deployment_id: String, - - #[clap(flatten)] - watch: Watch, -} - -pub async fn run_describe(State(env): State, opts: &Describe) -> Result<()> { - opts.watch.run(|| describe(&env, opts)).await -} - -async fn describe(env: &CliEnv, opts: &Describe) -> Result<()> { - let client = MetasClient::new(env)?; - - let mut latest_components: HashMap = HashMap::new(); - // To know the latest version of every component. - let components = client.get_components().await?.into_body().await?.components; - for component in components { - latest_components.insert(component.name.clone(), component); - } - - let deployment = client - .get_deployment(&opts.deployment_id) - .await? - .into_body() - .await?; - - let sql_client = crate::clients::DataFusionHttpClient::new(env)?; - let active_inv = count_deployment_active_inv_by_method(&sql_client, &deployment.id).await?; - let total_active_inv = active_inv.iter().map(|x| x.inv_count).sum(); - - let component_rev_pairs: Vec<_> = deployment - .components - .iter() - .map(|s| ComponentNameRevPair { - name: s.name.clone(), - revision: s.revision, - }) - .collect(); - - let status = calculate_deployment_status( - &deployment.id, - &component_rev_pairs, - total_active_inv, - &latest_components, - ); - - let mut table = Table::new_styled(&env.ui_config); - table.add_kv_row("ID:", deployment.id); - - add_deployment_to_kv_table(&deployment.deployment, &mut table); - table.add_kv_row("Status:", render_deployment_status(status)); - table.add_kv_row("Invocations:", render_active_invocations(total_active_inv)); - - c_title!("📜", "Deployment Information"); - c_println!("{}", table); - - // Services and methods. - c_println!(); - - c_title!("🤖", "Components"); - for component in deployment.components { - let Some(latest_component) = latest_components.get(&component.name) else { - // if we can't find this component in the latest set of components, something is off. A - // deployment cannot remove components defined by other deployment, so we should warn that - // this is happening. - c_eprintln!( - "Component {} is not found in the latest set of components. This is unexpected.", - component.name - ); - continue; - }; - - c_indentln!(1, "- {}", Styled(Style::Info, &component.name)); - c_indentln!( - 2, - "Type: {:?} {}", - component.ty, - icon_for_component_type(&component.ty), - ); - - let latest_revision_message = if component.revision == latest_component.revision { - // We are latest. - format!("[{}]", Styled(Style::Success, "Latest")) - } else { - // Not latest - format!( - "[Latest {} is in deployment ID {}]", - Styled(Style::Success, latest_component.revision), - latest_component.deployment_id - ) - }; - c_indentln!( - 2, - "Revision: {} {}", - component.revision, - latest_revision_message - ); - let mut methods_table = Table::new_styled(&env.ui_config); - methods_table.set_styled_header(vec![ - "METHOD", - "INPUT TYPE", - "OUTPUT TYPE", - "ACTIVE INVOCATIONS", - ]); - - for handler in &component.handlers { - // how many inv pinned on this deployment+component+method. - let active_inv = active_inv - .iter() - .filter(|x| x.component == component.name && x.handler == handler.name) - .map(|x| x.inv_count) - .next() - .unwrap_or(0); - - methods_table.add_row(vec![ - Cell::new(&handler.name), - Cell::new(handler.input_description.as_deref().unwrap_or("any")), - Cell::new(handler.output_description.as_deref().unwrap_or("any")), - render_active_invocations(active_inv), - ]); - } - c_indent_table!(2, methods_table); - c_println!(); - } - - Ok(()) -} diff --git a/cli/src/commands/deployments/list.rs b/cli/src/commands/deployments/list.rs deleted file mode 100644 index 71e1e1fc0..000000000 --- a/cli/src/commands/deployments/list.rs +++ /dev/null @@ -1,174 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use std::collections::HashMap; - -use crate::c_error; -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::count_deployment_active_inv; -use crate::clients::MetaClientInterface; -use crate::console::c_println; -use crate::ui::console::{Styled, StyledTable}; -use crate::ui::deployments::{ - calculate_deployment_status, render_active_invocations, render_deployment_status, - render_deployment_type, render_deployment_url, DeploymentStatus, -}; -use crate::ui::stylesheet::Style; -use crate::ui::watcher::Watch; - -use restate_meta_rest_model::deployments::{ComponentNameRevPair, Deployment, DeploymentResponse}; - -use anyhow::Result; -use cling::prelude::*; -use comfy_table::{Cell, Table}; -use restate_meta_rest_model::components::ComponentMetadata; -use restate_types::identifiers::DeploymentId; - -#[derive(Run, Parser, Collect, Clone)] -#[clap(visible_alias = "ls")] -#[cling(run = "run_list")] -pub struct List { - //// Show additional columns - #[clap(long)] - extra: bool, - - #[clap(flatten)] - watch: Watch, -} - -pub async fn run_list(State(env): State, opts: &List) -> Result<()> { - opts.watch.run(|| list(&env, opts)).await -} - -async fn list(env: &CliEnv, list_opts: &List) -> Result<()> { - let client = crate::clients::MetasClient::new(env)?; - let sql_client = crate::clients::DataFusionHttpClient::new(env)?; - // To know the latest version of every service. - let components = client.get_components().await?.into_body().await?.components; - - let deployments = client - .get_deployments() - .await? - .into_body() - .await? - .deployments; - - if deployments.is_empty() { - c_error!( - "No deployments were found! Did you forget to register your deployment with 'restate dep register'?" - ); - return Ok(()); - } - // For each deployment, we need to calculate the status and # of invocations. - let mut latest_components: HashMap = HashMap::new(); - for component in components { - latest_components.insert(component.name.clone(), component); - } - // - let mut table = Table::new_styled(&env.ui_config); - let mut header = vec![ - "DEPLOYMENT", - "TYPE", - "STATUS", - "ACTIVE INVOCATIONS", - "ID", - "CREATED AT", - ]; - if list_opts.extra { - header.push("COMPONENTS"); - } - table.set_styled_header(header); - - let mut enriched_deployments: Vec<(DeploymentResponse, DeploymentStatus, i64)> = - Vec::with_capacity(deployments.len()); - - for deployment in deployments { - // calculate status and counters. - let active_inv = count_deployment_active_inv(&sql_client, &deployment.id).await?; - let status = calculate_deployment_status( - &deployment.id, - &deployment.components, - active_inv, - &latest_components, - ); - enriched_deployments.push((deployment, status, active_inv)); - } - // Sort by active, draining, then drained. - enriched_deployments.sort_unstable_by_key(|(_, status, _)| match status { - DeploymentStatus::Active => 0, - DeploymentStatus::Draining => 1, - DeploymentStatus::Drained => 2, - }); - - for (deployment, status, active_inv) in enriched_deployments { - let mut row = vec![ - Cell::new(render_deployment_url(&deployment.deployment)), - Cell::new(render_deployment_type(&deployment.deployment)), - render_deployment_status(status), - render_active_invocations(active_inv), - Cell::new(deployment.id), - Cell::new(match &deployment.deployment { - Deployment::Http { created_at, .. } => created_at, - Deployment::Lambda { created_at, .. } => created_at, - }), - ]; - if list_opts.extra { - row.push(render_components( - &deployment.id, - &deployment.components, - &latest_components, - )); - } - - table.add_row(row); - } - - c_println!("{}", table); - - Ok(()) -} - -fn render_components( - deployment_id: &DeploymentId, - components: &[ComponentNameRevPair], - latest_components: &HashMap, -) -> Cell { - use std::fmt::Write as FmtWrite; - - let mut out = String::new(); - for component in components { - if let Some(latest_component) = latest_components.get(&component.name) { - let style = if &latest_component.deployment_id == deployment_id { - // We are hosting the latest revision of this service. - Style::Success - } else { - Style::Normal - }; - writeln!( - &mut out, - "- {} [{}]", - &component.name, - Styled(style, component.revision) - ) - .unwrap(); - } else { - // We couldn't find that service in latest_services? that's odd. We - // highlight this with bright red to highlight the issue. - writeln!( - &mut out, - "- {} [{}]", - Styled(Style::Danger, &component.name), - component.revision - ) - .unwrap(); - } - } - Cell::new(out) -} diff --git a/cli/src/commands/deployments/mod.rs b/cli/src/commands/deployments/mod.rs deleted file mode 100644 index 9b390dc6b..000000000 --- a/cli/src/commands/deployments/mod.rs +++ /dev/null @@ -1,29 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -mod describe; -mod list; -mod register; -mod remove; - -use cling::prelude::*; - -#[derive(Run, Subcommand, Clone)] -#[clap(visible_alias = "dp", alias = "deployment")] -pub enum Deployments { - /// List the registered deployments - List(list::List), - /// Add or update deployments through deployment discovery - Register(register::Register), - /// Prints detailed information about a given deployment - Describe(describe::Describe), - /// Remove a drained deployment - Remove(remove::Remove), -} diff --git a/cli/src/commands/deployments/register.rs b/cli/src/commands/deployments/register.rs deleted file mode 100644 index 481e37049..000000000 --- a/cli/src/commands/deployments/register.rs +++ /dev/null @@ -1,433 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use std::collections::{HashMap, HashSet}; -use std::fmt::Display; -use std::str::FromStr; - -use crate::cli_env::CliEnv; -use crate::clients::{MetaClientInterface, MetasClient, MetasClientError}; -use crate::console::c_println; -use crate::ui::component_methods::{ - create_component_handlers_table, create_component_handlers_table_diff, icon_for_component_type, -}; -use crate::ui::console::{confirm_or_exit, Styled, StyledTable}; -use crate::ui::deployments::render_deployment_url; -use crate::ui::stylesheet::Style; -use crate::{c_eprintln, c_error, c_indent_table, c_indentln, c_success, c_warn}; - -use http::{HeaderName, HeaderValue, StatusCode, Uri}; -use restate_meta_rest_model::deployments::{Deployment, LambdaARN, RegisterDeploymentRequest}; - -use anyhow::Result; -use cling::prelude::*; -use comfy_table::Table; -use indicatif::ProgressBar; -use restate_meta_rest_model::components::ComponentMetadata; - -#[derive(Run, Parser, Collect, Clone)] -#[clap(visible_alias = "discover", visible_alias = "add")] -#[cling(run = "run_register")] -pub struct Register { - /// Force overwriting the deployment if it already exists or if incompatible changes were - /// detected during discovery. - #[clap(long)] - force: bool, - - #[clap(long)] - /// The role ARN that Restate server will assume when invoking any service on the Lambda being - /// discovered. - assume_role_arn: Option, - - /// Additional header that will be sent to the endpoint during the discovery request. - /// - /// Use `-e name=value` format and repeat -e for each additional header. - #[clap(long="extra-header", short, value_parser = parse_header, action = clap::ArgAction::Append)] - extra_headers: Option>, - - /// The URL or ARN that Restate server needs to fetch service information from. - /// - /// The URL must be network-accessible from Restate server. In case of using - /// Lambda ARN, the ARN should include the function version. - #[clap(value_parser = parse_deployment)] - deployment: DeploymentEndpoint, -} - -#[derive(Clone)] -struct HeaderKeyValue { - key: HeaderName, - value: HeaderValue, -} - -#[derive(Clone, Debug)] -enum DeploymentEndpoint { - Uri(Uri), - Lambda(LambdaARN), -} - -impl Display for DeploymentEndpoint { - fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { - match self { - DeploymentEndpoint::Uri(uri) => write!(f, "URL {}", uri), - DeploymentEndpoint::Lambda(arn) => write!(f, "AWS Lambda ARN {}", arn), - } - } -} - -fn parse_header( - raw: &str, -) -> Result> { - // key=value - let pos = raw - .find('=') - .ok_or_else(|| format!("invalid name=value: no `=` found in `{raw}`"))?; - let key = &raw[..pos]; - let value = &raw[pos + 1..]; - - Ok(HeaderKeyValue { - key: HeaderName::from_str(key)?, - value: HeaderValue::from_str(value)?, - }) -} - -// Needed as a function to allow clap to parse to [`Deployment`] -fn parse_deployment( - raw: &str, -) -> Result> { - let deployment = if raw.starts_with("arn:") { - DeploymentEndpoint::Lambda(LambdaARN::from_str(raw)?) - } else { - let mut uri = Uri::from_str(raw).map_err(|e| format!("invalid URL({e})"))?; - let mut parts = uri.into_parts(); - if parts.scheme.is_none() { - parts.scheme = Some(http::uri::Scheme::HTTP); - } - if parts.path_and_query.is_none() { - parts.path_and_query = Some(http::uri::PathAndQuery::from_str("/")?); - } - uri = Uri::from_parts(parts)?; - DeploymentEndpoint::Uri(uri) - }; - Ok(deployment) -} - -// NOTE: Without parsing the proto descriptor, we can't detect the details of the -// schema changes. We can only mention additions or removals of services or functions -// and that's probably good enough for now! -pub async fn run_register(State(env): State, discover_opts: &Register) -> Result<()> { - let headers = discover_opts.extra_headers.as_ref().map(|headers| { - HashMap::from_iter(headers.iter().map(|kv| (kv.key.clone(), kv.value.clone()))) - }); - - // Preparing the discovery request - let client = crate::clients::MetasClient::new(&env)?; - - let mk_request_body = |force, dry_run| match &discover_opts.deployment { - DeploymentEndpoint::Uri(uri) => RegisterDeploymentRequest::Http { - uri: uri.clone(), - additional_headers: headers.clone().map(Into::into), - force, - dry_run, - }, - DeploymentEndpoint::Lambda(arn) => RegisterDeploymentRequest::Lambda { - arn: arn.to_string(), - assume_role_arn: discover_opts.assume_role_arn.clone(), - additional_headers: headers.clone().map(Into::into), - force, - dry_run, - }, - }; - - let progress = ProgressBar::new_spinner(); - progress - .set_style(indicatif::ProgressStyle::with_template("{spinner} [{elapsed}] {msg}").unwrap()); - progress.enable_steady_tick(std::time::Duration::from_millis(120)); - - progress.set_message(format!( - "Asking restate server at {} for a dry-run discovery of {}", - env.admin_base_url, discover_opts.deployment - )); - - // This fails if the endpoint exists and --force is not set. - let dry_run_result = client - // We use force in the dry-run to make sure we get the result of the discovery - // even if there is it's an existing endpoint - .discover_deployment(mk_request_body( - /* force = */ true, /* dry_run = */ true, - )) - .await? - .into_body() - .await?; - - progress.finish_and_clear(); - - // Is this an existing deployment? - let existing_deployment = match client - .get_deployment(&dry_run_result.id) - .await? - .into_body() - .await - { - Ok(existing_deployment) => { - // Appears to be an existing endpoint. - Some(existing_deployment) - } - Err(MetasClientError::Api(err)) if err.http_status_code == StatusCode::NOT_FOUND => None, - // We cannot get existing deployment details. This is a problem. - Err(err) => return Err(err.into()), - }; - - if let Some(ref existing_deployment) = existing_deployment { - if !discover_opts.force { - c_error!( - "A deployment already exists that uses this endpoint (ID: {}). Use --force to overwrite it.", - existing_deployment.id, - ); - return Ok(()); - } else { - c_eprintln!(); - c_warn!( - "This deployment is already known to the server under the ID \"{}\". \ - Confirming this operation will overwrite components defined by the existing \ - deployment. Inflight invocations to this deployment might move to an unrecoverable \ - failure state afterwards!.\ - \n\nThis is a DANGEROUS operation! \n - In production, we recommend creating a new deployment with a unique endpoint while \ - keeping the old one active until the old deployment is drained.", - existing_deployment.id - ); - c_eprintln!(); - } - } - - let discovered_component_names = dry_run_result - .components - .iter() - .map(|component| component.name.clone()) - .collect::>(); - - // Services found in this discovery - let (added, updated): (Vec<_>, Vec<_>) = dry_run_result - .components - .iter() - .partition(|svc| svc.revision == 1); - - c_println!( - "Deployment ID: {}", - Styled(Style::Info, &dry_run_result.id) - ); - // The following services will be added: - if !added.is_empty() { - c_println!(); - c_println!( - "❯ COMPONENTS THAT WILL BE {}:", - Styled(Style::Success, "ADDED") - ); - for component in added { - c_indentln!(1, "- {}", Styled(Style::Success, &component.name),); - c_indentln!( - 2, - "Type: {:?} {}", - component.ty, - icon_for_component_type(&component.ty), - ); - - c_indent_table!( - 2, - create_component_handlers_table(&env.ui_config, &component.handlers) - ); - c_println!(); - } - c_println!(); - } - - // The following services will be updated: - if !updated.is_empty() { - c_println!(); - // used to resolving old deployments. - let mut deployment_cache: HashMap = HashMap::new(); - // A single spinner spans all requests. - let progress = ProgressBar::new_spinner(); - progress.set_style( - indicatif::ProgressStyle::with_template("{spinner} [{elapsed}] {msg}").unwrap(), - ); - progress.enable_steady_tick(std::time::Duration::from_millis(120)); - - let mut existing_components: HashMap = HashMap::new(); - for component in &updated { - // Get the current service information by querying the server. - progress.set_message(format!( - "Fetching information about component '{}'", - component.name, - )); - match client - .get_component(&component.name) - .await? - .into_body() - .await - { - Ok(component_metadata) => { - existing_components.insert(component.name.clone(), component_metadata); - } - Err(e) => { - // Let the spinner pause to print the error. - progress.suspend(|| { - c_eprintln!( - "Warning: Couldn't fetch information about component {} from Restate server. \ - We will not be able to show the detailed changes for this component.", - component.name, - ); - c_error!("{}", e); - }); - } - }; - } - progress.finish_and_clear(); - - c_println!( - "❯ COMPONENTS THAT WILL BE {}:", - Styled(Style::Warn, "UPDATED") - ); - for svc in updated { - c_indentln!(1, "- {}", Styled(Style::Info, &svc.name),); - c_indentln!(2, "Type: {:?} {}", svc.ty, icon_for_component_type(&svc.ty),); - - if let Some(existing_svc) = existing_components.get(&svc.name) { - c_indentln!( - 2, - "Revision: {} -> {}", - &existing_svc.revision, - Styled(Style::Success, &svc.revision), - ); - if existing_svc.deployment_id != dry_run_result.id { - let maybe_old_deployment = resolve_deployment( - &client, - &mut deployment_cache, - &existing_svc.deployment_id.to_string(), - ) - .await; - let old_deployment_message = maybe_old_deployment - .map(|old_endpoint| render_deployment_url(&old_endpoint)); - c_indentln!( - 2, - "Old Deployment: {} (at {})", - old_deployment_message.as_deref().unwrap_or(""), - &existing_svc.deployment_id, - ); - } - - let tt = create_component_handlers_table_diff( - &env.ui_config, - &existing_svc.handlers, - &svc.handlers, - ); - c_indent_table!(2, tt); - } else { - c_indentln!( - 2, - "{}", - create_component_handlers_table(&env.ui_config, &svc.handlers) - ); - } - c_println!(); - } - c_println!(); - } - - // The following components will be removed/forgotten: - if let Some(existing_endpoint) = existing_deployment { - // The following components will be removed/forgotten: - let components_removed = existing_endpoint - .components - .iter() - .filter(|component| !discovered_component_names.contains(&component.name)) - .collect::>(); - if !components_removed.is_empty() { - c_println!(); - c_println!( - "❯ COMPONENTS THAT WILL BE {}:", - Styled(Style::Danger, "REMOVED") - ); - for svc in components_removed { - c_indentln!(2, "- {}", Styled(Style::Danger, &svc.name)); - } - c_println!(); - } - } - - confirm_or_exit(&env, "Are you sure you want to apply those changes?")?; - - let progress = ProgressBar::new_spinner(); - progress - .set_style(indicatif::ProgressStyle::with_template("{spinner} [{elapsed}] {msg}").unwrap()); - progress.enable_steady_tick(std::time::Duration::from_millis(120)); - - progress.set_message(format!( - "Asking restate server {} to confirm this deployment (at {})", - env.admin_base_url, discover_opts.deployment - )); - - let dry_run_result = client - .discover_deployment(mk_request_body( - /* force = */ discover_opts.force, - /* dry_run = */ false, - )) - .await? - .into_body() - .await?; - - progress.finish_and_clear(); - // print the result of the discovery - c_success!("DEPLOYMENT:"); - let mut table = Table::new_styled(&env.ui_config); - table.set_styled_header(vec!["COMPONENT", "REV"]); - for svc in dry_run_result.components { - table.add_row(vec![svc.name, svc.revision.to_string()]); - } - c_println!("{}", table); - - Ok(()) -} - -async fn resolve_deployment( - client: &MetasClient, - cache: &mut HashMap, - deployment_id: &str, -) -> Option { - if cache.contains_key(deployment_id) { - return cache.get(deployment_id).cloned(); - } - - let progress = ProgressBar::new_spinner(); - progress - .set_style(indicatif::ProgressStyle::with_template("{spinner} [{elapsed}] {msg}").unwrap()); - progress.enable_steady_tick(std::time::Duration::from_millis(120)); - - progress.set_message(format!( - "Fetching information about existing deployments at {}", - deployment_id, - )); - - let deployment = client - .get_deployment(deployment_id) - .await - .ok()? - .into_body() - .await - .ok() - .map(|endpoint| { - let component_endpoint = endpoint.deployment; - cache.insert(deployment_id.to_string(), component_endpoint.clone()); - Some(component_endpoint) - })?; - progress.finish_and_clear(); - - deployment -} diff --git a/cli/src/commands/deployments/remove.rs b/cli/src/commands/deployments/remove.rs deleted file mode 100644 index 23c71bd73..000000000 --- a/cli/src/commands/deployments/remove.rs +++ /dev/null @@ -1,190 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use anyhow::{bail, Result}; -use cling::prelude::*; -use comfy_table::Table; -use indoc::indoc; -use restate_meta_rest_model::components::ComponentMetadata; -use restate_meta_rest_model::deployments::ComponentNameRevPair; -use std::collections::HashMap; - -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::count_deployment_active_inv_by_method; -use crate::clients::{MetaClientInterface, MetasClient}; -use crate::console::c_println; -use crate::ui::component_methods::icon_for_component_type; -use crate::ui::console::{confirm_or_exit, Styled, StyledTable}; -use crate::ui::deployments::{ - add_deployment_to_kv_table, calculate_deployment_status, render_active_invocations, - render_deployment_status, -}; -use crate::ui::stylesheet::Style; -use crate::{c_eprintln, c_error, c_indentln, c_success}; - -#[derive(Run, Parser, Collect, Clone)] -#[clap(visible_alias = "rm")] -#[cling(run = "run_remove")] -pub struct Remove { - /// Force removal of a deployment if it's not drained. This is dangeous and will - /// break in-flight invocations pinned to this deployment. - #[clap(long)] - force: bool, - // TODO: Support inference of endpoint or ID, but this require the deployment - // ID to follow a more constrained format - /// Deployment ID - deployment_id: String, -} - -pub async fn run_remove(State(env): State, opts: &Remove) -> Result<()> { - // First get information about this deployment and inspect if it's drained or not. - let client = MetasClient::new(&env)?; - let sql_client = crate::clients::DataFusionHttpClient::new(&env)?; - - let deployment = client - .get_deployment(&opts.deployment_id) - .await? - .into_body() - .await?; - - let active_inv = count_deployment_active_inv_by_method(&sql_client, &deployment.id).await?; - - let mut latest_components: HashMap = HashMap::new(); - // To know the latest version of every component. - let components = client.get_components().await?.into_body().await?.components; - for component in components { - latest_components.insert(component.name.clone(), component); - } - - // sum inv_count in active_inv - let total_active_inv = active_inv.iter().fold(0, |acc, x| acc + x.inv_count); - - let component_rev_pairs: Vec<_> = deployment - .components - .iter() - .map(|s| ComponentNameRevPair { - name: s.name.clone(), - revision: s.revision, - }) - .collect(); - - let status = calculate_deployment_status( - &deployment.id, - &component_rev_pairs, - total_active_inv, - &latest_components, - ); - - let mut table = Table::new_styled(&env.ui_config); - table.add_kv_row("ID:", deployment.id); - - add_deployment_to_kv_table(&deployment.deployment, &mut table); - table.add_kv_row("Status:", render_deployment_status(status)); - table.add_kv_row("Invocations:", render_active_invocations(total_active_inv)); - c_println!("{}", table); - c_println!("{}", Styled(Style::Info, "Components:")); - for component in deployment.components { - let Some(latest_component) = latest_components.get(&component.name) else { - // if we can't find this component in the latest set of component, something is off. A - // deployment cannot remove components defined by other deployment, so we should warn that - // this is happening. - c_eprintln!( - "Component {} is not found in the latest set of components. This is unexpected.", - component.name - ); - continue; - }; - c_indentln!(1, "- {}", Styled(Style::Info, &component.name)); - c_indentln!( - 2, - "Type: {:?} {}", - component.ty, - icon_for_component_type(&component.ty), - ); - let latest_revision_message = if component.revision == latest_component.revision { - // We are latest. - format!("[{}]", Styled(Style::Success, "Latest")) - } else { - // Not latest - format!( - "[Latest {} is in deployment ID {}]", - Styled(Style::Success, latest_component.revision), - latest_component.deployment_id - ) - }; - c_indentln!( - 2, - "Revision: {} {}", - component.revision, - latest_revision_message - ); - } - c_println!(); - - // Now, if this is a drained deployment, it's safe to remove. If not, we ask the user to use - // --force. - let safe = match status { - crate::ui::deployments::DeploymentStatus::Active => { - // unsafe to remove, use --force - c_error!( - indoc! { - "Deployment is still {}. This means that it hosts the latest revision of some of - your components as indicated above. Removing this deployment will cause those - components to be unavailable and current or future invocations on them WILL fail. - " - }, - Styled(Style::Success, "Active"), - ); - false - } - crate::ui::deployments::DeploymentStatus::Draining => { - // unsafe to remove, use --force - c_error!( - indoc! { - "Deployment is still {}. There are {} invocations that will break if you proceed - with this operation. Please make sure in-flight invocations are completed (deployment is Drained) - or killed/cancelled before continuing. - " - }, - Styled(Style::Warn, "Draining"), - Styled(Style::Warn, total_active_inv) - ); - false - } - crate::ui::deployments::DeploymentStatus::Drained => { - // safe to remove - c_success!("The deployment is fully drained and is safe to remove"); - true - } - }; - - if !safe && !opts.force { - bail!( - "If you accept the risk of breaking in-flight invocations, you can use {} to \ - forcefully remove this deployment.", - Styled(Style::Notice, "--force"), - ); - } - - confirm_or_exit(&env, "Are you sure you want to remove this deployment?")?; - - let result = client - .remove_deployment( - &opts.deployment_id, - //TODO: Use opts.force when the server implements the false + validation case! - true, - ) - .await?; - let _ = result.success_or_error()?; - - c_println!(); - c_success!("Deployment {} removed successfully", &opts.deployment_id); - Ok(()) -} diff --git a/cli/src/commands/examples.rs b/cli/src/commands/examples.rs deleted file mode 100644 index e6bc4fa3b..000000000 --- a/cli/src/commands/examples.rs +++ /dev/null @@ -1,248 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use crate::console::{c_println, Styled}; -use crate::ui::stylesheet::Style; -use anyhow::{anyhow, bail, Context, Result}; -use cling::prelude::*; -use convert_case::{Case, Casing}; -use dialoguer::theme::ColorfulTheme; -use dialoguer::Select; -use futures::StreamExt; -use octocrab::models::repos::Asset; -use octocrab::repos::RepoHandler; -use std::collections::HashMap; -use std::fmt; -use std::path::{Path, PathBuf}; -use tokio::fs::File; -use tokio::io::AsyncWriteExt; - -#[derive(Run, Parser, Collect, Clone)] -#[cling(run = "run_examples")] -pub struct Examples { - /// Example name. - /// - /// If omitted, an interactive prompt will ask you which example to download. - name: Option, -} - -pub async fn run_examples(example_opts: &Examples) -> Result<()> { - // Get latest release of the examples repo - let octocrab = octocrab::instance(); - let examples_repo = octocrab.repos("restatedev", "examples"); - let latest_release = examples_repo - .releases() - .get_latest() - .await - .context("Can't access the examples releases. Check if your machine can access the Github repository https://github.com/restatedev/examples")?; - - let example_asset = if let Some(example) = &example_opts.name { - // Check if the example exists - let example_lowercase = example.to_lowercase(); - latest_release - .assets - .into_iter() - .find(|a| a.name.trim_end_matches(".zip") == example_lowercase) - .ok_or(anyhow!( - "Unknown example {}. Use `restate example` to navigate the list of examples.", - example_lowercase - ))? - } else { - // Ask the example to download among the available examples - let mut languages = parse_available_examples(latest_release.assets); - let language_selection = Select::with_theme(&ColorfulTheme::default()) - .with_prompt("Choose the programming language") - .items(&languages) - .interact() - .unwrap(); - let example_selection = Select::with_theme(&ColorfulTheme::default()) - .with_prompt("Choose the example") - .items(&languages[language_selection].examples) - .interact() - .unwrap(); - - languages - .remove(language_selection) - .examples - .remove(example_selection) - .asset - }; - - download_example(examples_repo, example_asset).await -} - -struct Language { - display_name: String, - examples: Vec, -} - -impl fmt::Display for Language { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.display_name) - } -} - -struct Example { - display_name: String, - asset: Asset, -} - -impl fmt::Display for Example { - fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { - write!(f, "{}", self.display_name) - } -} - -fn parse_available_examples(assets: Vec) -> Vec { - let mut languages_map = HashMap::new(); - - for asset in assets { - // Zip names have the format [language]-[example_name].zip - - let asset_name = asset.name.clone(); - let mut split_asset_name = asset_name.splitn(2, '-'); - - // First part is language - let Some(language) = split_asset_name.next() else { - // Bad name, just ignore it - continue; - }; - let language_display_name = capitalize(language); - - // Second is example name - let example_display_name = if let Some(example) = split_asset_name.next() { - example - .to_string() - .from_case(Case::Kebab) - .to_case(Case::Title) - } else { - // Bad name, just ignore it - continue; - }; - let example_display_name = example_display_name.trim_end_matches(".zip").to_owned(); - - languages_map - .entry(language.to_owned()) - .or_insert_with(|| Language { - display_name: language_display_name, - examples: vec![], - }) - .examples - .push(Example { - display_name: example_display_name, - asset, - }); - } - - languages_map.into_values().collect() -} - -fn capitalize(s: &str) -> String { - let mut c = s.chars(); - match c.next() { - None => String::new(), - Some(f) => f.to_uppercase().collect::() + c.as_str(), - } -} - -async fn download_example(repo_handler: RepoHandler<'_>, asset: Asset) -> Result<()> { - let out_dir_name = PathBuf::from(asset.name.trim_end_matches(".zip").to_owned()); - // This fails if the directory already exists. - tokio::fs::create_dir(&out_dir_name) - .await - .with_context(|| { - format!( - "Cannot create the output directory {} for the example", - out_dir_name.display() - ) - })?; - c_println!("Created directory {}", out_dir_name.display()); - - let mut zip_out_file_path = PathBuf::from(&out_dir_name); - zip_out_file_path.push("temp.zip"); - - // Download zip in the out_dir - match download_asset_to_file(&zip_out_file_path, repo_handler, asset).await { - Ok(f) => f, - Err(e) => { - // Try to remove the directory, to avoid leaving a dirty user directory in case of a retry. - let _ = tokio::fs::remove_dir_all(&out_dir_name).await; - bail!( - "Error when downloading the zip {} for the example: {:#?}", - zip_out_file_path.display(), - e - ); - } - }; - c_println!("Downloaded example zip in {}", zip_out_file_path.display()); - - // Unzip it - if let Err(e) = unzip(&zip_out_file_path, &out_dir_name).await { - // Try to remove the directory, to avoid leaving a dirty user directory in case of a retry. - let _ = tokio::fs::remove_dir_all(&out_dir_name).await; - return Err(e); - } - - // Ready to rock! - c_println!( - "The example is ready in the directory {}", - Styled(Style::Success, out_dir_name.display()) - ); - c_println!( - "Look at the {}/README.md to get started!", - out_dir_name.display() - ); - - Ok(()) -} - -async fn download_asset_to_file( - zip_out_file_path: impl AsRef, - repo_handler: RepoHandler<'_>, - asset: Asset, -) -> Result<()> { - let mut out_file = File::create(zip_out_file_path).await?; - let mut zip_stream = repo_handler.releases().stream_asset(asset.id).await?; - while let Some(res) = zip_stream.next().await { - let mut buf = res?; - out_file.write_buf(&mut buf).await?; - } - out_file.flush().await?; - - Ok(()) -} - -async fn unzip(zip_out_file: &Path, out_name: &Path) -> Result<()> { - let zip_out_file_copy = zip_out_file.to_owned(); - let out_dir_copy = out_name.to_owned(); - tokio::task::spawn_blocking(move || { - let zip_file = std::fs::File::open(zip_out_file_copy)?; - let mut archive = zip::ZipArchive::new(zip_file)?; - archive.extract(out_dir_copy)?; - Ok::<_, anyhow::Error>(()) - }) - .await - .with_context(|| { - format!( - "Panic when trying to unzip {} in {}", - zip_out_file.display(), - out_name.display() - ) - })? - .with_context(|| { - format!( - "Error when trying to unzip {} in {}", - zip_out_file.display(), - out_name.display() - ) - })?; - - Ok(()) -} diff --git a/cli/src/commands/invocations/cancel.rs b/cli/src/commands/invocations/cancel.rs deleted file mode 100644 index 78a7fa6a3..000000000 --- a/cli/src/commands/invocations/cancel.rs +++ /dev/null @@ -1,59 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::get_invocation; -use crate::clients::{self, MetaClientInterface}; -use crate::ui::console::{confirm_or_exit, Styled}; -use crate::ui::invocations::render_invocation_compact; -use crate::ui::stylesheet::Style; -use crate::{c_println, c_success}; - -use anyhow::{bail, Result}; -use cling::prelude::*; - -#[derive(Run, Parser, Collect, Clone)] -#[cling(run = "run_cancel")] -#[clap(visible_alias = "rm")] -pub struct Cancel { - /// The ID of the parent invocation to cancel - invocation_id: String, - /// Ungracefully kill the invocation and its children - #[clap(long)] - kill: bool, -} - -pub async fn run_cancel(State(env): State, opts: &Cancel) -> Result<()> { - let client = crate::clients::MetasClient::new(&env)?; - let sql_client = clients::DataFusionHttpClient::new(&env)?; - let Some(inv) = get_invocation(&sql_client, &opts.invocation_id).await? else { - bail!("Invocation {} not found!", opts.invocation_id); - }; - - render_invocation_compact(&env, &inv); - // Get the invocation and confirm - let prompt = format!( - "Are you sure you want to {} this invocation", - if opts.kill { - Styled(Style::Danger, "kill") - } else { - Styled(Style::Warn, "cancel") - } - ); - confirm_or_exit(&env, &prompt)?; - - let result = client.cancel_invocation(&inv.id, opts.kill).await?; - let _ = result.success_or_error()?; - - c_println!(); - c_success!("Request was sent successfully"); - - Ok(()) -} diff --git a/cli/src/commands/invocations/describe.rs b/cli/src/commands/invocations/describe.rs deleted file mode 100644 index f69fec061..000000000 --- a/cli/src/commands/invocations/describe.rs +++ /dev/null @@ -1,143 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use anyhow::{bail, Result}; -use cling::prelude::*; -use comfy_table::Table; -use dialoguer::console::style; -use indoc::indoc; - -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::{get_invocation, get_invocation_journal, InvocationState}; -use crate::clients::{self}; -use crate::ui::console::StyledTable; -use crate::ui::duration_to_human_rough; -use crate::ui::invocations::{ - add_invocation_to_kv_table, format_journal_entry, invocation_qualified_name, invocation_status, -}; -use crate::ui::watcher::Watch; -use crate::{c_println, c_tip, c_title}; - -#[derive(Run, Parser, Collect, Clone)] -#[cling(run = "run_describe")] -#[clap(visible_alias = "get")] -pub struct Describe { - /// The ID of the invocation - invocation_id: String, - - #[clap(flatten)] - watch: Watch, -} - -pub async fn run_describe(State(env): State, opts: &Describe) -> Result<()> { - opts.watch.run(|| describe(&env, opts)).await -} - -async fn describe(env: &CliEnv, opts: &Describe) -> Result<()> { - let sql_client = clients::DataFusionHttpClient::new(env)?; - - let Some(inv) = get_invocation(&sql_client, &opts.invocation_id).await? else { - bail!("Invocation {} not found!", opts.invocation_id); - }; - - let mut table = Table::new_styled(&env.ui_config); - table.add_kv_row( - "Created at:", - format!( - "{} ({})", - &inv.created_at, - duration_to_human_rough( - chrono::Local::now().signed_duration_since(inv.created_at), - chrono_humanize::Tense::Past - ) - ), - ); - if let Some(key) = &inv.key { - table.add_kv_row( - "Component:", - format!( - "{} {} {}", - inv.component, - style("@").dim(), - style(key).dim(), - ), - ); - } else { - table.add_kv_row("Component:", &inv.component); - } - table.add_kv_row("Method:", &inv.handler); - add_invocation_to_kv_table(&mut table, &inv); - table.add_kv_row_if( - || inv.state_modified_at.is_some(), - "Modified at:", - format!("{}", &inv.state_modified_at.unwrap()), - ); - - c_title!("📜", "Invocation Information"); - c_println!("{}", table); - c_println!(); - - if inv.status != InvocationState::Pending { - // Deployment - if let Some(deployment_id) = &inv.pinned_deployment_id { - c_tip!( - indoc! { - "This invocation is bound to run on deployment '{}'. To guarantee - safety and correctness, invocations that made progress on a deployment - cannot move to newer deployments automatically." - }, - deployment_id, - ); - } - } - - c_title!("🚂", "Invocation Progress"); - if let Some(parent) = &inv.invoked_by_id { - c_println!( - "{} {}", - inv.invoked_by_component - .as_ref() - .map(|x| style(x.to_owned()).italic().blue()) - .unwrap_or_else(|| style("".to_owned()).red()), - style(parent).italic(), - ); - } else { - c_println!("[{}]", style("Ingress").dim().italic()); - } - - // This invocation.. - c_println!(" └──(this)─> {}", invocation_qualified_name(&inv)); - - // filtering journal based on `should_present` - let journal = get_invocation_journal(&sql_client, &opts.invocation_id).await?; - let journal_entries = journal - .iter() - .filter(|entry| entry.should_present()) - .collect::>(); - - // Call graph - if !journal_entries.is_empty() { - c_println!(" {}", style("▸").dim()); - for entry in journal_entries { - let tree_symbol = "├────"; - c_println!( - " {}{}", - style(tree_symbol).dim(), - format_journal_entry(entry) - ); - } - c_println!( - " {} {}", - style("└────>>").dim(), - invocation_status(inv.status) - ); - } - Ok(()) -} diff --git a/cli/src/commands/invocations/list.rs b/cli/src/commands/invocations/list.rs deleted file mode 100644 index 9af3525cd..000000000 --- a/cli/src/commands/invocations/list.rs +++ /dev/null @@ -1,242 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use std::collections::HashSet; -use std::time::Instant; - -use crate::c_eprintln; -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::{ - find_active_invocations, find_inbox_invocations, InvocationState, -}; -use crate::ui::console::Styled; -use crate::ui::invocations::render_invocation_compact; -use crate::ui::stylesheet::Style; -use crate::ui::watcher::Watch; - -use anyhow::Result; -use cling::prelude::*; -use indicatif::ProgressBar; -use itertools::Itertools; - -#[derive(Run, Parser, Collect, Clone, Debug)] -#[clap(visible_alias = "ls")] -#[cling(run = "run_list")] -pub struct List { - /// Component to list invocations for - #[clap(long, visible_alias = "component", value_delimiter = ',')] - component: Vec, - /// Filter by invocation on this handler name - #[clap(long, value_delimiter = ',')] - handler: Vec, - /// Filter by status(es) - #[clap(long, ignore_case = true, value_delimiter = ',')] - status: Vec, - /// Filter by deployment ID - #[clap(long, visible_alias = "dp", value_delimiter = ',')] - deployment: Vec, - /// Only list invocations on keyed components only - #[clap(long)] - virtual_objects_only: bool, - /// Filter by invocations on this component key - #[clap(long, value_delimiter = ',')] - key: Vec, - /// Limit the number of results - #[clap(long, default_value = "100")] - limit: usize, - /// Find zombie invocations (invocations pinned to removed deployments) - #[clap(long)] - zombie: bool, - /// Order the results by older invocations first - #[clap(long)] - oldest_first: bool, - - #[clap(flatten)] - watch: Watch, -} - -pub async fn run_list(State(env): State, opts: &List) -> Result<()> { - opts.watch.run(|| list(&env, opts)).await -} - -async fn list(env: &CliEnv, opts: &List) -> Result<()> { - let sql_client = crate::clients::DataFusionHttpClient::new(env)?; - let mut total: usize = 0; - let statuses: HashSet = HashSet::from_iter(opts.status.clone()); - // Prepare filters - let mut inbox_filters: Vec = vec![]; // "WHERE 1 = 1\n".to_string(); - let mut active_filters: Vec = vec![]; - let mut post_filters: Vec = vec![]; - - let order_by = if opts.oldest_first { - "ORDER BY ss.created_at ASC" - } else { - "ORDER BY ss.created_at DESC" - }; - - // query inbox? - let should_query_inbox = (statuses.is_empty() - || opts.status.contains(&InvocationState::Pending) - || opts.status.contains(&InvocationState::Unknown)) - // Don't query inbox if deployment is set - && (opts.deployment.is_empty()) - && !opts.zombie; - - // query active? - let should_query_active = statuses.is_empty() - || opts.status.contains(&InvocationState::Unknown) - || !(opts.status.contains(&InvocationState::Pending) && statuses.len() == 1); - - if !opts.component.is_empty() { - inbox_filters.push(format!( - "ss.component IN ({})", - opts.component - .iter() - .map(|x| format!("'{}'", x)) - .format(",") - )); - } - - if !opts.handler.is_empty() { - inbox_filters.push(format!( - "ss.handler IN ({})", - opts.handler.iter().map(|x| format!("'{}'", x)).format(",") - )); - } - - if !opts.key.is_empty() { - inbox_filters.push(format!( - "ss.component_key IN ({})", - opts.key.iter().map(|x| format!("'{}'", x)).format(",") - )); - } - - if opts.virtual_objects_only { - inbox_filters.push("comp.ty = 'virtual_object'".to_owned()); - } - - if opts.zombie { - // zombies cannot be in pending, don't query inbox. - active_filters.push("dp.id IS NULL".to_owned()); - } - - // Only makes sense when querying active invocations; - if !opts.deployment.is_empty() { - active_filters.push(format!( - "(ss.pinned_deployment_id IN ({0}) OR sis.last_attempt_deployment_id IN ({0}))", - opts.deployment.iter().map(|x| format!("'{}'", x)).join(",") - )); - } - - // This is a post-filter as we filter by calculated column - if !statuses.is_empty() { - post_filters.push(format!( - "combined_status IN ({})", - statuses.iter().map(|x| format!("'{}'", x)).format(",") - )); - } - - let inbox_filter_str = if !inbox_filters.is_empty() { - format!("WHERE {}", inbox_filters.join(" AND ")) - } else { - String::new() - }; - - let active_filter_str = if !active_filters.is_empty() { - format!( - "WHERE {}", - itertools::chain(inbox_filters, active_filters).join(" AND ") - ) - } else { - inbox_filter_str.clone() - }; - - let post_filter_str = if !post_filters.is_empty() { - format!("WHERE {}", post_filters.join(" AND ")) - } else { - String::new() - }; - - // Perform queries - let start_time = Instant::now(); - let progress = ProgressBar::new_spinner(); - progress - .set_style(indicatif::ProgressStyle::with_template("{spinner} [{elapsed}] {msg}").unwrap()); - progress.enable_steady_tick(std::time::Duration::from_millis(120)); - progress.set_message("Finding invocations..."); - - let mut results = vec![]; - // - Inbox invocations are always newer than active ones. - if opts.oldest_first { - // query active first - if should_query_active { - let (res, full_count) = find_active_invocations( - &sql_client, - &active_filter_str, - &post_filter_str, - order_by, - opts.limit, - ) - .await?; - total += full_count; - results.extend(res); - } - if should_query_inbox { - let (res, full_count) = - find_inbox_invocations(&sql_client, &inbox_filter_str, order_by, opts.limit) - .await?; - total += full_count; - results.extend(res); - } - } else { - // query inbox first - if should_query_inbox { - let (res, full_count) = - find_inbox_invocations(&sql_client, &inbox_filter_str, order_by, opts.limit) - .await?; - total += full_count; - results.extend(res); - } - if should_query_active { - let (res, full_count) = find_active_invocations( - &sql_client, - &active_filter_str, - &post_filter_str, - order_by, - opts.limit, - ) - .await?; - - results.extend(res); - total += full_count; - } - } - - // Render Output UI - progress.finish_and_clear(); - - // Sample of active invocations - if !results.is_empty() { - // Truncate the output to fit the requested limit - results.truncate(opts.limit); - for inv in &results { - render_invocation_compact(env, inv); - } - } - - c_eprintln!( - "Showing {}/{} invocations. Query took {:?}", - results.len(), - total, - Styled(Style::Notice, start_time.elapsed()) - ); - - Ok(()) -} diff --git a/cli/src/commands/invocations/mod.rs b/cli/src/commands/invocations/mod.rs deleted file mode 100644 index 3f6d1a322..000000000 --- a/cli/src/commands/invocations/mod.rs +++ /dev/null @@ -1,25 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -mod cancel; -mod describe; -mod list; - -use cling::prelude::*; - -#[derive(Run, Subcommand, Clone)] -pub enum Invocations { - /// List invocations of a service - List(list::List), - /// Prints detailed information about a given invocation - Describe(describe::Describe), - /// Cancel a given invocation and its children - Cancel(cancel::Cancel), -} diff --git a/cli/src/commands/mod.rs b/cli/src/commands/mod.rs deleted file mode 100644 index d6a033feb..000000000 --- a/cli/src/commands/mod.rs +++ /dev/null @@ -1,17 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -pub mod components; -pub mod deployments; -pub mod examples; -pub mod invocations; -pub mod sql; -pub mod state; -pub mod whoami; diff --git a/cli/src/commands/sql.rs b/cli/src/commands/sql.rs deleted file mode 100644 index ee5052b54..000000000 --- a/cli/src/commands/sql.rs +++ /dev/null @@ -1,93 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. -// - -use std::time::Instant; - -use anyhow::Result; -use arrow::error::ArrowError; -use arrow::util::display::ArrayFormatter; -use arrow::util::display::FormatOptions; -use cling::prelude::*; -use comfy_table::Cell; -use comfy_table::Table; -use serde::Deserialize; -use serde::Serialize; - -use crate::c_eprintln; -use crate::c_println; -use crate::cli_env::CliEnv; -use crate::ui::console::Styled; -use crate::ui::console::StyledTable; -use crate::ui::stylesheet::Style; -use crate::ui::watcher::Watch; - -#[derive(Run, Parser, Collect, Clone)] -#[cling(run = "run_sql")] -pub struct Sql { - /// The SQL query to run. - query: String, - - #[clap(flatten)] - watch: Watch, -} - -#[derive(Serialize, Deserialize, Debug, Clone)] -pub struct SqlQueryRequest { - pub query: String, -} - -pub async fn run_sql(State(env): State, opts: &Sql) -> Result<()> { - opts.watch.run(|| run_query(&env, opts)).await -} - -async fn run_query(env: &CliEnv, sql_opts: &Sql) -> Result<()> { - let client = crate::clients::DataFusionHttpClient::new(env)?; - let start_time = Instant::now(); - let resp = client.run_query(sql_opts.query.clone()).await?; - - let mut table = Table::new_styled(&env.ui_config); - // add headers. - let mut headers = vec![]; - for col in resp.schema.fields() { - headers.push(col.name().clone().to_uppercase()); - } - table.set_styled_header(headers); - - let format_options = FormatOptions::default().with_display_error(true); - for batch in resp.batches { - let formatters = batch - .columns() - .iter() - .map(|c| ArrayFormatter::try_new(c.as_ref(), &format_options)) - .collect::, ArrowError>>()?; - - for row in 0..batch.num_rows() { - let mut cells = Vec::new(); - for formatter in &formatters { - cells.push(Cell::new(formatter.value(row))); - } - table.add_row(cells); - } - } - - // Only print if there are actual results. - if table.row_count() > 0 { - c_println!("{}", table); - c_println!(); - } - - c_eprintln!( - "{} rows. Query took {:?}", - table.row_count(), - Styled(Style::Notice, start_time.elapsed()) - ); - Ok(()) -} diff --git a/cli/src/commands/state/edit.rs b/cli/src/commands/state/edit.rs deleted file mode 100644 index cc3d9e9ad..000000000 --- a/cli/src/commands/state/edit.rs +++ /dev/null @@ -1,106 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use crate::cli_env::CliEnv; -use crate::console::c_println; -use crate::ui::console::{confirm_or_exit, StyledTable}; - -use crate::c_title; -use crate::commands::state::util::{ - as_json, compute_version, from_json, get_current_state, pretty_print_json, read_json_file, - update_state, write_json_file, -}; -use anyhow::{Context, Result}; -use cling::prelude::*; -use comfy_table::{Cell, Table}; -use tempfile::tempdir; - -#[derive(Run, Parser, Collect, Clone)] -#[cling(run = "run_edit")] -pub struct Edit { - /// Don't try to convert the values to a UTF-8 string - #[clap(long, alias = "bin")] - binary: bool, - - /// Force means, ignore the current version - #[clap(long, short)] - force: bool, - - /// Component name - component: String, - - /// Component key - key: String, -} - -pub async fn run_edit(State(env): State, opts: &Edit) -> Result<()> { - edit(&env, opts).await -} - -async fn edit(env: &CliEnv, opts: &Edit) -> Result<()> { - let current_state = get_current_state(env, &opts.component, &opts.key).await?; - let current_version = compute_version(¤t_state); - - let tempdir = tempdir().context("unable to create a temporary directory")?; - let edit_file = tempdir.path().join(".restate_edit"); - let current_state_json = as_json(current_state, opts.binary)?; - write_json_file(&edit_file, current_state_json)?; - env.open_default_editor(&edit_file)?; - let modified_state_json = read_json_file(&edit_file)?; - - // - // confirm change - // - - let mut table = Table::new_styled(&env.ui_config); - table.set_styled_header(vec!["", ""]); - table.add_row(vec![Cell::new("Component"), Cell::new(&opts.component)]); - table.add_row(vec![Cell::new("Key"), Cell::new(&opts.key)]); - table.add_row(vec![Cell::new("Force?"), Cell::new(opts.force)]); - table.add_row(vec![Cell::new("Binary?"), Cell::new(opts.binary)]); - - c_title!("ℹ️ ", "State Update"); - c_println!("{table}"); - c_println!(); - - c_title!("ℹ️ ", "New State"); - c_println!("{}", pretty_print_json(env, &modified_state_json)?); - c_println!(); - - c_println!("About to submit the new state mutation to the system for processing."); - c_println!("If there are currently active invocations, then this mutation will be enqueued to be processed after them."); - c_println!(); - confirm_or_exit(env, "Are you sure?")?; - - c_println!(); - - // - // back to binary - // - let modified_state = from_json(modified_state_json, opts.binary)?; - // - // attach the current version - // - let version = if opts.force { - None - } else { - Some(current_version) - }; - update_state(env, version, &opts.component, &opts.key, modified_state).await?; - - // - // done - // - - c_println!(); - c_println!("Enqueued successfully for processing"); - - Ok(()) -} diff --git a/cli/src/commands/state/get.rs b/cli/src/commands/state/get.rs deleted file mode 100644 index 29af4643f..000000000 --- a/cli/src/commands/state/get.rs +++ /dev/null @@ -1,77 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use crate::c_title; -use crate::cli_env::CliEnv; -use crate::console::c_println; -use crate::ui::console::StyledTable; -use crate::ui::watcher::Watch; - -use crate::commands::state::util::{as_json, get_current_state, pretty_print_json_object}; -use anyhow::Result; -use cling::prelude::*; -use comfy_table::{Cell, Table}; - -#[derive(Run, Parser, Collect, Clone)] -#[cling(run = "run_get")] -pub struct Get { - /// Don't try to convert the values to a UTF-8 string - #[clap(long, alias = "bin")] - binary: bool, - - /// Only print the retrieved state as a JSON - #[clap(long, short)] - plain: bool, - - /// Component name - component: String, - - /// Component key - key: String, - - #[clap(flatten)] - watch: Watch, -} - -pub async fn run_get(State(env): State, opts: &Get) -> Result<()> { - opts.watch.run(|| get(&env, opts)).await -} - -async fn get(env: &CliEnv, opts: &Get) -> Result<()> { - let current_state = get_current_state(env, &opts.component, &opts.key).await?; - let current_state_json = as_json(current_state, opts.binary)?; - - if opts.plain { - c_println!("{current_state_json}"); - return Ok(()); - } - - c_title!("🤖", "State"); - - let mut table = Table::new_styled(&env.ui_config); - table.set_styled_header(vec!["", ""]); - table.add_row(vec![Cell::new("Component"), Cell::new(&opts.component)]); - table.add_row(vec![Cell::new("Key"), Cell::new(&opts.key)]); - - c_println!("{table}"); - c_println!(); - - let pretty_json = pretty_print_json_object(¤t_state_json)?; - let mut table = Table::new_styled(&env.ui_config); - table.set_styled_header(vec!["KEY", "VALUE"]); - for (k, v) in pretty_json { - table.add_row(vec![Cell::new(k), Cell::new(v)]); - } - - c_println!("{table}"); - c_println!(); - - Ok(()) -} diff --git a/cli/src/commands/state/mod.rs b/cli/src/commands/state/mod.rs deleted file mode 100644 index 825836b72..000000000 --- a/cli/src/commands/state/mod.rs +++ /dev/null @@ -1,23 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -mod edit; -mod get; -mod util; - -use cling::prelude::*; - -#[derive(Run, Subcommand, Clone)] -pub enum ServiceState { - /// Get the persisted state stored for a service key - Get(get::Get), - /// Edit the persisted state stored for a service key - Edit(edit::Edit), -} diff --git a/cli/src/commands/state/util.rs b/cli/src/commands/state/util.rs deleted file mode 100644 index 6a704f059..000000000 --- a/cli/src/commands/state/util.rs +++ /dev/null @@ -1,214 +0,0 @@ -use crate::cli_env::CliEnv; -use crate::clients::{MetaClientInterface, MetasClient}; -use crate::ui::console::StyledTable; -use anyhow::{anyhow, bail, Context}; -use arrow::array::{BinaryArray, StringArray}; -use base64::alphabet::URL_SAFE; -use base64::engine::{Engine, GeneralPurpose, GeneralPurposeConfig}; -use bytes::Bytes; -use comfy_table::{Cell, Table}; -use itertools::Itertools; -use restate_meta_rest_model::components::{ComponentType, ModifyComponentStateRequest}; -use restate_types::state_mut::StateMutationVersion; -use serde_json::Value; -use std::collections::HashMap; -use std::fs::File; -use std::io::{Read, Write}; -use std::path::Path; - -pub(crate) async fn get_current_state( - env: &CliEnv, - service: &str, - key: &str, -) -> anyhow::Result> { - // - // 0. require that this is a keyed service - // - let client = MetasClient::new(env)?; - let service_meta = client.get_component(service).await?.into_body().await?; - if service_meta.ty != ComponentType::VirtualObject { - bail!("Only virtual objects support state"); - } - // - // 1. get the key-value pairs - // - let sql_client = crate::clients::DataFusionHttpClient::new(env)?; - let sql = format!( - "select key, value from state where component = '{}' and component_key = '{}' ;", - service, key - ); - let res = sql_client.run_query(sql).await?; - // - // 2. convert the state to a map from str keys -> byte values. - // - let mut user_state = HashMap::new(); - for batch in res.batches { - let n = batch.num_rows(); - if n == 0 { - continue; - } - user_state.reserve(n); - let keys = batch - .column(0) - .as_any() - .downcast_ref::() - .expect("bug: unexpected column type"); - let vals = batch - .column(1) - .as_any() - .downcast_ref::() - .expect("bug: unexpected column type"); - for i in 0..n { - let key = keys.value(i).to_string(); - let val = Bytes::copy_from_slice(vals.value(i)); - user_state.insert(key, val); - } - } - Ok(user_state) -} - -pub(crate) async fn update_state( - env: &CliEnv, - expected_version: Option, - service: &str, - service_key: &str, - new_state: HashMap, -) -> anyhow::Result<()> { - let req = ModifyComponentStateRequest { - version: expected_version, - new_state, - object_key: service_key.to_string(), - }; - - let client = MetasClient::new(env)?; - client.patch_state(service, req).await.unwrap(); - - Ok(()) -} - -pub(crate) fn compute_version(user_state: &HashMap) -> String { - let kvs: Vec<(Bytes, Bytes)> = user_state - .iter() - .map(|(k, v)| (Bytes::from(k.clone()), v.clone())) - .collect(); - StateMutationVersion::from_user_state(&kvs).into_inner() -} - -pub(crate) fn as_json(state: HashMap, binary_values: bool) -> anyhow::Result { - let current_state_json: HashMap = state - .into_iter() - .map(|(k, v)| bytes_as_json(v, binary_values).map(|v| (k, v))) - .try_collect()?; - - serde_json::to_value(current_state_json).context("unable to create a JSON object.") -} - -pub(crate) fn from_json(json: Value, binary_value: bool) -> anyhow::Result> { - let modified_state: HashMap = json - .as_object() - .expect("cli bug this must be an object") - .into_iter() - .map(|(k, v)| { - let binary = json_value_as_bytes(v, binary_value); - - binary.map(|v| (k.clone(), v)) - }) - .try_collect()?; - - Ok(modified_state) -} - -fn bytes_as_json(value: Bytes, binary_values: bool) -> anyhow::Result { - let json: Value = if binary_values { - let b64 = GeneralPurpose::new(&URL_SAFE, GeneralPurposeConfig::default()).encode(value); - serde_json::to_value(b64).context("unable to convert bytes to string")? - } else { - serde_json::from_slice(&value).context("unable to convert a value to json")? - }; - - Ok(json) -} - -/// convert a JSON value to bytes. If the original value was base64 encoded (binary_value = true) -/// then, the value will be a json string of the form " ... base64 encoded ... ", and it would be converted -/// to bytes by decoding the string. -/// if binary_value = false, we use serde json to decode this value. -fn json_value_as_bytes(value: &Value, binary_value: bool) -> anyhow::Result { - let raw = if binary_value { - base64_json_value_str_as_bytes(value)? - } else { - serde_json::to_vec(&value).context("unable to convert a JSON value back to bytes")? - }; - - Ok(Bytes::from(raw)) -} - -/// convert a JSON string value i.e. "abcde121==" that represents a base64 string -/// into a raw bytes (base64 decoded) -fn base64_json_value_str_as_bytes(value: &Value) -> anyhow::Result> { - let str = value - .as_str() - .ok_or_else(|| anyhow!("unexpected non string value with binary mode"))?; - - GeneralPurpose::new(&URL_SAFE, GeneralPurposeConfig::default()) - .decode(str) - .context("unable to decode a base64 value") -} - -pub(crate) fn write_json_file(path: &Path, json: Value) -> anyhow::Result<()> { - let current_json = - serde_json::to_string_pretty(&json).context("Failed to serialize to JSON")?; - - let mut file = File::create(path).context("Failed to create a temp file")?; - file.write_all(current_json.as_bytes()) - .context("Failed to write to file")?; - file.sync_all() - .context("unable to flush the file to disk")?; - - Ok(()) -} - -pub(crate) fn read_json_file(path: &Path) -> anyhow::Result { - let mut file = File::open(path).context("Unable to open the file for reading")?; - let mut json_str = String::new(); - file.read_to_string(&mut json_str) - .context("Unable to read back the content of the file")?; - - let value: Value = serde_json::from_str(&json_str).context("Failed parsing JSON")?; - - if value.is_object() { - Ok(value) - } else { - Err(anyhow!("expected to read back a JSON object")) - } -} - -pub(crate) fn pretty_print_json(env: &CliEnv, value: &Value) -> anyhow::Result { - let mut table = Table::new_styled(&env.ui_config); - table.set_styled_header(vec!["KEY", "VALUE"]); - - let object = pretty_print_json_object(value)?; - - for (k, v) in object { - table.add_row(vec![Cell::new(k), Cell::new(v)]); - } - - Ok(table) -} - -pub(crate) fn pretty_print_json_object(value: &Value) -> anyhow::Result> { - assert!(value.is_object()); - - let value = value - .as_object() - .expect("cli bug, this needs to be an object"); - - value - .into_iter() - .map(|(k, v)| { - let pretty_val = - serde_json::to_string_pretty(v).context("unable convert a value to JSON")?; - Ok((k.clone(), pretty_val)) - }) - .try_collect() -} diff --git a/cli/src/commands/whoami.rs b/cli/src/commands/whoami.rs deleted file mode 100644 index f79c9a62e..000000000 --- a/cli/src/commands/whoami.rs +++ /dev/null @@ -1,121 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use cling::prelude::*; -use comfy_table::Table; - -use crate::build_info; -use crate::cli_env::CliEnv; -use crate::clients::MetaClientInterface; -use crate::{c_eprintln, c_error, c_println, c_success}; - -#[derive(Run, Parser, Clone)] -#[cling(run = "run")] -pub struct WhoAmI {} - -pub async fn run(State(env): State) { - if crate::console::colors_enabled() { - c_println!("{}", crate::art::render_logo()); - c_println!(" Restate"); - c_println!(" https://restate.dev/"); - c_println!(); - } - let mut table = Table::new(); - table.load_preset(comfy_table::presets::NOTHING); - table.add_row(vec!["Ingress base URL", env.ingress_base_url.as_ref()]); - - table.add_row(vec!["Admin base URL", env.admin_base_url.as_ref()]); - - if env.bearer_token.is_some() { - table.add_row(vec!["Authentication Token", "(set)"]); - } - - c_println!("{}", table); - - c_println!(); - c_println!("Local Environment"); - let mut table = Table::new(); - table.load_preset(comfy_table::presets::NOTHING); - table.add_row(vec![ - "Config Dir", - &format!( - "{} {}", - env.config_home.display(), - if env.config_home.exists() { - "(exists)" - } else { - "(does not exist)" - } - ), - ]); - - table.add_row(vec![ - "Config File", - &format!( - "{} {}", - env.config_file.display(), - if env.config_file.exists() { - "(exists)" - } else { - "(does not exist)" - } - ), - ]); - - table.add_row(vec![ - "Loaded .env file", - &env.loaded_env_file - .as_ref() - .map(|x| x.display().to_string()) - .unwrap_or("(NONE)".to_string()), - ]); - c_println!("{}", table); - - c_println!(); - c_println!("Build Information"); - let mut table = Table::new(); - table.load_preset(comfy_table::presets::NOTHING); - table.add_row(vec!["Version", build_info::RESTATE_CLI_VERSION]); - table.add_row(vec!["Target", build_info::RESTATE_CLI_TARGET_TRIPLE]); - table.add_row(vec!["Debug Build?", build_info::RESTATE_CLI_DEBUG]); - table.add_row(vec!["Build Time", build_info::RESTATE_CLI_BUILD_TIME]); - table.add_row(vec![ - "Build Features", - build_info::RESTATE_CLI_BUILD_FEATURES, - ]); - table.add_row(vec!["Git SHA", build_info::RESTATE_CLI_COMMIT_SHA]); - table.add_row(vec!["Git Commit Date", build_info::RESTATE_CLI_COMMIT_DATE]); - table.add_row(vec!["Git Commit Branch", build_info::RESTATE_CLI_BRANCH]); - c_println!("{}", table); - - c_println!(); - // Get admin client, don't fail completely if we can't get one! - if let Ok(client) = crate::clients::MetasClient::new(&env) { - match client.health().await { - Ok(envelope) if envelope.status_code().is_success() => { - c_success!("Admin Service '{}' is healthy!", env.admin_base_url); - } - Ok(envelope) => { - c_error!("Admin Service '{}' is unhealthy:", env.admin_base_url); - let url = envelope.url().clone(); - let status_code = envelope.status_code(); - let body = envelope.into_text().await; - c_eprintln!(" >> [{}] from '{}'", status_code.to_string(), url); - c_eprintln!(" >> {}", body.unwrap_or_default()); - } - Err(e) => { - c_error!("Admin Service '{}' is unhealthy:", env.admin_base_url); - c_eprintln!(" >> {}", e); - } - } - } - - c_println!(); -} diff --git a/cli/src/lib.rs b/cli/src/lib.rs deleted file mode 100644 index 47fff8009..000000000 --- a/cli/src/lib.rs +++ /dev/null @@ -1,21 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -mod build_info; - -mod app; -mod art; -mod cli_env; -mod clients; -mod commands; -mod ui; - -pub use app::CliApp; -pub(crate) use ui::console; diff --git a/cli/src/main.rs b/cli/src/main.rs deleted file mode 100644 index b5af2512a..000000000 --- a/cli/src/main.rs +++ /dev/null @@ -1,37 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use cling::prelude::*; -use std::io::Write; - -use crossterm::execute; -use restate_cli::CliApp; - -#[tokio::main(flavor = "multi_thread")] -async fn main() -> ClingFinished { - let _ = ctrlc::set_handler(move || { - // Showning cursor again if it was hidden by dialoguer. - let mut stdout = std::io::stdout(); - let _ = execute!( - stdout, - crossterm::terminal::LeaveAlternateScreen, - crossterm::cursor::Show, - crossterm::style::ResetColor - ); - - let mut stderr = std::io::stderr().lock(); - let _ = writeln!(stderr); - let _ = writeln!(stderr, "Ctrl-C pressed, aborting..."); - - std::process::exit(1); - }); - - Cling::parse_and_run().await -} diff --git a/cli/src/ui/component_methods.rs b/cli/src/ui/component_methods.rs deleted file mode 100644 index 18f5e2c3d..000000000 --- a/cli/src/ui/component_methods.rs +++ /dev/null @@ -1,94 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use super::console::{Icon, StyledTable}; -use crate::app::UiConfig; - -use comfy_table::{Cell, Color, Table}; -use restate_meta_rest_model::components::ComponentType; -use restate_meta_rest_model::handlers::HandlerMetadata; - -pub fn create_component_handlers_table( - ui_config: &UiConfig, - handlers: &[HandlerMetadata], -) -> Table { - let mut table = Table::new_styled(ui_config); - table.set_styled_header(vec!["METHOD", "INPUT TYPE", "OUTPUT TYPE"]); - - for handler in handlers { - table.add_row(vec![ - Cell::new(&handler.name), - Cell::new(handler.input_description.as_deref().unwrap_or("any")), - Cell::new(handler.output_description.as_deref().unwrap_or("any")), - ]); - } - table -} - -pub fn create_component_handlers_table_diff( - ui_config: &UiConfig, - old_component_handlers: &[HandlerMetadata], - new_component_handlers: &[HandlerMetadata], -) -> Table { - let mut old_component_handlers = old_component_handlers - .iter() - .map(|m| (m.name.clone(), m)) - .collect::>(); - - let mut table = Table::new_styled(ui_config); - table.set_styled_header(vec!["", "HANDLER", "INPUT TYPE", "OUTPUT TYPE"]); - - // Additions and updates - for handler in new_component_handlers { - let mut row = vec![]; - if old_component_handlers.remove(&handler.name).is_some() { - // possibly updated. - row.push(Cell::new("")); - row.push(Cell::new(&handler.name)); - } else { - // new method - row.push(Cell::new("++").fg(Color::Green)); - row.push(Cell::new(&handler.name).fg(Color::Green)); - } - row.extend_from_slice(&[ - Cell::new(handler.input_description.as_deref().unwrap_or("any")), - Cell::new(handler.output_description.as_deref().unwrap_or("any")), - ]); - table.add_row(row); - } - - // Removals - for handler in old_component_handlers.values() { - let row = vec![ - Cell::new("--").fg(Color::Red), - Cell::new(&handler.name).fg(Color::Red), - Cell::new(handler.input_description.as_deref().unwrap_or("any")), - Cell::new(handler.output_description.as_deref().unwrap_or("any")), - ]; - - table.add_row(row); - } - table -} - -pub fn icon_for_component_type(svc_type: &ComponentType) -> Icon { - match svc_type { - ComponentType::Service => Icon("", ""), - ComponentType::VirtualObject => Icon("⬅️ 🚶🚶🚶", "keyed"), - } -} - -pub fn icon_for_is_public(public: bool) -> Icon<'static, 'static> { - if public { - Icon("🌎", "[public]") - } else { - Icon("🔒", "[private]") - } -} diff --git a/cli/src/ui/console.rs b/cli/src/ui/console.rs deleted file mode 100644 index b213ba191..000000000 --- a/cli/src/ui/console.rs +++ /dev/null @@ -1,355 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -//! A set of utilities and macros to control terminal output. -//! Use this instead of println!() -//! -//! I hear you say: "Why not use std's `print*!()` macros?". I'm glad you asked. -//! Because in CLI applications we don't want to panic when stdout/stderr is -//! a broken pipe. We want to ignore the error and continue. -//! -//! An example: -//! `restate whoami | head -n1` would panic if whoami uses print*! macros. This -//! means that the user might see an error like this: -//! -//! thread 'main' panicked at 'failed printing to stdout: Broken pipe (os error 32)', library/std/src/io/stdio.rs:1019:9 -//! note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace - -use std::fmt::{Display, Formatter}; -use std::sync::atomic::{AtomicBool, Ordering}; - -use super::stylesheet::Style; -use crate::app::UiConfig; -use crate::cli_env::CliEnv; - -use dialoguer::console::Style as DStyle; - -static SHOULD_COLORIZE: AtomicBool = AtomicBool::new(true); - -#[inline] -pub fn colors_enabled() -> bool { - SHOULD_COLORIZE.load(Ordering::Relaxed) -} - -#[inline] -pub fn set_colors_enabled(val: bool) { - // Override dialoguer/console to ensure it follows our colorful setting - dialoguer::console::set_colors_enabled(val); - SHOULD_COLORIZE.store(val, Ordering::Relaxed) -} - -/// Emoji that fallback to a string if colors are disabled. -#[derive(Copy, Clone)] -pub struct Icon<'a, 'b>(pub &'a str, pub &'b str); - -/// Text with a style that drops the style if colors are disabled. -#[derive(Copy, Clone)] -pub struct Styled(pub Style, pub T); - -impl std::fmt::Debug for Styled -where - T: std::fmt::Debug, -{ - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - // passthrough debug formatting to the actual wrapped value - if colors_enabled() { - // unpack the style and the string. - let dstyle = DStyle::from(self.0); - write!(f, "{:?}", dstyle.apply_to(&self.1)) - } else { - write!(f, "{:?}", self.1) - } - } -} - -impl Display for Icon<'_, '_> { - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - if colors_enabled() { - write!(f, "{}", self.0) - } else { - write!(f, "{}", self.1) - } - } -} - -impl Display for Styled -where - T: Display, -{ - fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { - if colors_enabled() { - // unpack the style and the string. - let dstyle = DStyle::from(self.0); - write!(f, "{}", dstyle.apply_to(&self.1)) - } else { - write!(f, "{}", self.1) - } - } -} - -/// Factory trait to create styled tables that respect the UI config. -/// Impl is in stylesheets. -pub trait StyledTable { - fn new_styled(ui_config: &UiConfig) -> Self; - fn set_styled_header(&mut self, headers: Vec) -> &mut Self; - fn add_kv_row>(&mut self, key: &str, value: V) -> &mut Self; - fn add_kv_row_if bool, V: Display>( - &mut self, - predicate: P, - key: &str, - value: V, - ) -> &mut Self { - if predicate() { - self.add_kv_row(key, value) - } else { - self - } - } -} - -pub fn confirm_or_exit(env: &CliEnv, prompt: &str) -> anyhow::Result<()> { - if !confirm(env, prompt) { - return Err(anyhow::anyhow!("User aborted")); - } - Ok(()) -} - -pub fn confirm(env: &CliEnv, prompt: &str) -> bool { - let theme = dialoguer::theme::ColorfulTheme::default(); - if env.auto_confirm { - c_println!( - "{} {}", - prompt, - Styled(Style::Warn, "Auto-confirming --yes is set."), - ); - true - } else { - dialoguer::Confirm::with_theme(&theme) - .with_prompt(prompt) - .default(false) - .wait_for_newline(true) - .interact_opt() - .unwrap_or(Some(false)) - .unwrap_or(false) - } -} - -#[macro_export] -/// Internal macro used by c_*print*! macros -macro_rules! _gecho { - // Ignore errors (don't panic on broken pipes, unlike default behaviour) - (@empty_line, $where:tt) => { - { - use std::fmt::Write; - let mut _lock = $crate::ui::output::$where(); - let _ = writeln!(_lock); - } - }; - (@newline, $where:tt, $($arg:tt)*) => { - { - use std::fmt::Write; - let mut _lock = $crate::ui::output::$where(); - let _ = writeln!(_lock, $($arg)*); - } - }; - (@title, ($icon:expr), $where:tt, $($arg:tt)*) => { - { - use std::fmt::Write; - use unicode_width::UnicodeWidthStr; - - let mut _lock = $crate::ui::output::$where(); - let _icon = $crate::ui::console::Icon($icon, ""); - let _ = writeln!(_lock); - let _message = format!("{_icon} {}:", $($arg)*); - let _ = writeln!(_lock, "{_message}"); - let _ = writeln!(_lock, "{:―<1$}", "", _message.width_cjk()); - } - }; - (@indented, ($indent:expr), $where:tt, $($arg:tt)*) => { - { - use std::fmt::Write; - let mut _lock = $crate::ui::output::$where(); - let _padding = $indent * 2; - let _ = write!(_lock, "{:>_padding$}", ""); - let _ = write!(_lock, $($arg)*); - } - }; - (@indented_newline, ($indent:expr), $where:tt, $($arg:tt)*) => { - { - use std::fmt::Write; - - let mut _lock = $crate::ui::output::$where(); - let _padding = $indent * 2; - let _ = write!(_lock, "{:>_padding$}", ""); - let _ = writeln!(_lock, $($arg)*); - } - }; - (@nl_with_prefix, ($prefix:expr), $where:tt, $($arg:tt)*) => { - { - use std::fmt::Write; - let mut _lock = $crate::ui::output::$where(); - let _ = write!(_lock, "{} ", $prefix); - let _ = writeln!(_lock, $($arg)*); - } - }; - (@nl_with_prefix_styled, ($prefix:expr), ($style:expr), $where:tt, $($arg:tt)*) => { - { - use std::fmt::Write; - let mut _lock = $crate::ui::output::$where(); - let _ = write!(_lock, " ❯ {} ", $prefix); - let formatted = format!($($arg)*); - let _ = writeln!(_lock, "{}", $crate::ui::console::Styled($style ,formatted)); - } - }; - (@bare, $where:tt, $($arg:tt)*) => { - { - use std::fmt::Write; - let mut _lock = $crate::ui::output::$where(); - let _ = write!(_lock, $($arg)*); - } - }; -} - -#[macro_export] -macro_rules! c_println { - () => { - $crate::ui::console::_gecho!(@empty_line, stdout); - }; - ($($arg:tt)*) => { - $crate::ui::console::_gecho!(@newline, stdout, $($arg)*); - }; -} - -#[macro_export] -macro_rules! c_print { - ($($arg:tt)*) => { - $crate::ui::console::_gecho!(@bare, stdout, $($arg)*); - }; -} - -#[macro_export] -macro_rules! c_eprintln { - () => { - $crate::ui::console::_gecho!(@empty_line, stderr); - }; - ($($arg:tt)*) => { - $crate::ui::console::_gecho!(@newline, stderr, $($arg)*); - }; -} - -#[macro_export] -macro_rules! c_eprint { - ($($arg:tt)*) => { - $crate::ui::console::_gecho!(@bare, stderr, $($arg)*); - }; -} - -// Helpers with emojis/icons upfront -#[macro_export] -macro_rules! c_success { - ($($arg:tt)*) => { - $crate::ui::console::_gecho!(@nl_with_prefix, ($crate::ui::stylesheet::SUCCESS_ICON), stdout, $($arg)*); - }; -} - -#[macro_export] -macro_rules! c_error { - ($($arg:tt)*) => { - $crate::ui::console::_gecho!(@nl_with_prefix, ($crate::ui::stylesheet::ERR_ICON), stderr, $($arg)*); - }; -} - -/// Warning Sign -#[macro_export] -macro_rules! c_warn { - ($($arg:tt)*) => { - { - let mut table = comfy_table::Table::new(); - table.load_preset(comfy_table::presets::UTF8_BORDERS_ONLY); - table.set_content_arrangement(comfy_table::ContentArrangement::Dynamic); - table.set_width(120); - let formatted = format!($($arg)*); - - table.add_row(vec![ - comfy_table::Cell::new(format!(" {} ", - $crate::ui::stylesheet::WARN_ICON)).set_alignment(comfy_table::CellAlignment::Center), - comfy_table::Cell::new(formatted).add_attribute(comfy_table::Attribute::Bold).fg(comfy_table::Color::Yellow), - ]); - $crate::ui::console::c_eprintln!("{}", table); - } - }; -} - -#[macro_export] -macro_rules! c_tip { - ($($arg:tt)*) => { - { - let mut table = comfy_table::Table::new(); - table.load_preset(comfy_table::presets::NOTHING); - table.set_content_arrangement(comfy_table::ContentArrangement::Dynamic); - table.set_width(120); - let formatted = format!($($arg)*); - - table.add_row(vec![ - comfy_table::Cell::new(format!(" {} ", - $crate::ui::stylesheet::TIP_ICON)).set_alignment(comfy_table::CellAlignment::Center), - comfy_table::Cell::new(formatted).add_attribute(comfy_table::Attribute::Italic).add_attribute(comfy_table::Attribute::Dim), - ]); - $crate::ui::console::c_eprintln!("{}", table); - } - }; -} - -/// Title -#[macro_export] -macro_rules! c_title { - ($icon:expr, $($arg:tt)*) => { - $crate::ui::console::_gecho!(@title, ($icon), stdout, $($arg)*); - }; -} - -/// Padded printing -#[macro_export] -macro_rules! c_indent { - ($indent:expr, $($arg:tt)*) => { - $crate::ui::console::_gecho!(@indented, ($indent), stdout, $($arg)*); - }; -} - -#[macro_export] -macro_rules! c_indentln { - ($indent:expr, $($arg:tt)*) => { - $crate::ui::console::_gecho!(@indented_newline, ($indent), stdout, $($arg)*); - }; -} - -#[macro_export] -macro_rules! c_indent_table { - ($indent:expr, $table:expr) => {{ - use std::fmt::Write; - - let mut _lock = $crate::ui::output::stdout(); - let _padding = $indent * 2; - for _l in $table.lines() { - let _ = write!(_lock, "{:>_padding$}", ""); - let _ = writeln!(_lock, "{}", _l); - } - }}; -} - -// Macros with a "c_" prefix to emits console output with no panics. -#[allow(unused_imports)] // not all macros are used yet -pub use {_gecho, c_eprint, c_eprintln, c_print, c_println}; -// Convenience macros with emojis/icons upfront -#[allow(unused_imports)] // not all macros are used yet -pub use {c_error, c_success, c_tip, c_title, c_warn}; -// padded printing -#[allow(unused_imports)] // not all macros are used yet -pub use {c_indent, c_indent_table, c_indentln}; diff --git a/cli/src/ui/deployments.rs b/cli/src/ui/deployments.rs deleted file mode 100644 index fd9a5b3ab..000000000 --- a/cli/src/ui/deployments.rs +++ /dev/null @@ -1,147 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use std::collections::HashMap; - -use comfy_table::{Cell, Color, Table}; -use restate_meta_rest_model::components::ComponentMetadata; -use restate_meta_rest_model::deployments::{ComponentNameRevPair, Deployment, ProtocolType}; -use restate_types::identifiers::DeploymentId; - -use super::console::StyledTable; - -#[derive(Debug, Clone, Copy, PartialEq, Eq)] -pub enum DeploymentStatus { - /// An active endpoint is an endpoint that has the latest revision of one or more services. - Active, - /// A draining endpoint is an endpoint that has all of its services replaced - /// by higher revisions on other endpoints, but it still has pinned invocations. - Draining, - /// A draining endpoint is an endpoint that has all of its services replaced - /// by higher revisions on other endpoints, and it has NO pinned invocations. - Drained, -} - -pub fn render_deployment_url(deployment: &Deployment) -> String { - match deployment { - Deployment::Http { uri, .. } => uri.to_string(), - Deployment::Lambda { arn, .. } => arn.to_string(), - } -} - -pub fn render_deployment_type(deployment: &Deployment) -> String { - match deployment { - Deployment::Http { protocol_type, .. } => { - format!( - "HTTP {}", - if protocol_type == &ProtocolType::BidiStream { - "2" - } else { - "1" - } - ) - } - Deployment::Lambda { .. } => "AWS Lambda".to_string(), - } -} - -pub fn calculate_deployment_status( - deployment_id: &DeploymentId, - owned_services: &[ComponentNameRevPair], - active_inv: i64, - latest_services: &HashMap, -) -> DeploymentStatus { - let mut status = DeploymentStatus::Draining; - - for svc in owned_services { - if let Some(latest_svc) = latest_services.get(&svc.name) { - if &latest_svc.deployment_id == deployment_id { - status = DeploymentStatus::Active; - break; - } - } else { - // We couldn't find that service in latest_services? that's odd but - // we'll ignore and err on the side of assuming it's an active endpoint. - status = DeploymentStatus::Active; - } - } - - if status == DeploymentStatus::Draining && active_inv == 0 { - status = DeploymentStatus::Drained; - } - - status -} - -pub fn render_deployment_status(status: DeploymentStatus) -> Cell { - let color = match status { - DeploymentStatus::Active => Color::Green, - DeploymentStatus::Draining => Color::Yellow, - DeploymentStatus::Drained => Color::Grey, - }; - Cell::new(format!("{:?}", status)).fg(color) -} - -pub fn render_active_invocations(active_inv: i64) -> Cell { - if active_inv > 0 { - Cell::new(active_inv).fg(comfy_table::Color::Yellow) - } else { - Cell::new(active_inv).fg(comfy_table::Color::Grey) - } -} - -pub fn add_deployment_to_kv_table(deployment: &Deployment, table: &mut Table) { - table.add_kv_row("Deployment Type:", render_deployment_type(deployment)); - let (additional_headers, created_at) = match &deployment { - Deployment::Http { - uri, - protocol_type, - additional_headers, - created_at, - } => { - let protocol_type = match protocol_type { - ProtocolType::RequestResponse => "Request/Response", - ProtocolType::BidiStream => "Streaming", - } - .to_string(); - table.add_kv_row("Protocol Style:", protocol_type); - - table.add_kv_row("Endpoint:", uri); - (additional_headers.clone(), created_at) - } - Deployment::Lambda { - arn, - assume_role_arn, - additional_headers, - created_at, - } => { - table.add_kv_row("Protocol Style:", "Request/Response"); - table.add_kv_row_if( - || assume_role_arn.is_some(), - "Deployment Assume Role ARN:", - assume_role_arn.as_ref().unwrap(), - ); - - table.add_kv_row("Endpoint:", arn); - (additional_headers.clone(), created_at) - } - }; - - let additional_headers: HashMap = - additional_headers.into(); - - table.add_kv_row("Created at:", created_at); - for (header, value) in additional_headers.iter() { - table.add_kv_row( - "Deployment Additional Header:", - &format!("{}: {}", header, value.to_str().unwrap_or("")), - ); - } -} diff --git a/cli/src/ui/invocations.rs b/cli/src/ui/invocations.rs deleted file mode 100644 index 4648bf876..000000000 --- a/cli/src/ui/invocations.rs +++ /dev/null @@ -1,270 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use chrono_humanize::Tense; -use comfy_table::Table; -use dialoguer::console::style; -use dialoguer::console::Style as DStyle; -use dialoguer::console::StyledObject; - -use crate::cli_env::CliEnv; -use crate::clients::datafusion_helpers::JournalEntry; -use crate::clients::datafusion_helpers::JournalEntryType; -use crate::clients::datafusion_helpers::{Invocation, InvocationState}; -use crate::ui::console::Icon; -use crate::ui::console::StyledTable; -use crate::{c_indent_table, c_indentln, c_println}; - -use super::duration_to_human_precise; - -pub fn invocation_status_note(invocation: &Invocation) -> String { - let mut msg = String::new(); - - match invocation.status { - InvocationState::Running => { - // active attempt duration - if let Some(attempt_duration) = invocation.current_attempt_duration { - let dur = duration_to_human_precise(attempt_duration, Tense::Present); - let dur_style = if attempt_duration.num_seconds() > 5 { - // too long... - DStyle::new().red() - } else { - DStyle::new() - }; - msg.push_str(&format!(" ({})", dur_style.apply_to(dur))); - } - } - InvocationState::Suspended => { - if let Some(modified_at) = invocation.state_modified_at { - let suspend_duration = chrono::Local::now().signed_duration_since(modified_at); - // its keyed and in suspension - if suspend_duration.num_seconds() > 5 && invocation.key.is_some() { - let dur = duration_to_human_precise(suspend_duration, Tense::Present); - let dur_style = if suspend_duration.num_seconds() > 5 { - // too long... - DStyle::new().red() - } else { - DStyle::new() - }; - msg.push_str(&format!( - " ({}. The key will not be released until this invocation is complete)", - dur_style.apply_to(dur) - )); - } else { - let dur = duration_to_human_precise(suspend_duration, Tense::Past); - msg.push_str(&format!(" ({})", style(dur).dim())); - } - } - } - InvocationState::BackingOff => { - let num_retries = invocation.num_retries.unwrap_or(0); - let num_retries = if num_retries > 10 { - style(num_retries).red() - } else { - style(num_retries).yellow() - }; - - msg.push_str(" ("); - if let Some(modified_at) = invocation.state_modified_at { - let invoking_since = chrono::Local::now().signed_duration_since(modified_at); - let dur = duration_to_human_precise(invoking_since, Tense::Present); - msg.push_str(&format!("{}.", dur)); - }; - msg.push_str(&format!(" Retried {} time(s).", num_retries,)); - - if let Some(next_retry) = invocation.next_retry_at { - let next_retry = next_retry.signed_duration_since(chrono::Local::now()); - let next_retry = duration_to_human_precise(next_retry, Tense::Future); - msg.push_str(&format!(" Next retry in {})", next_retry)); - } - - msg.push(')'); - } - _ => {} - } - - msg -} - -// [TicketDb @ my-user-200]::trySomethingNew -pub fn invocation_qualified_name(invocation: &Invocation) -> String { - let svc = if let Some(key) = &invocation.key { - format!( - "[{} {} {}]", - invocation.component, - style("@").dim(), - style(key).dim(), - ) - } else { - invocation.component.to_string() - }; - format!("{}{}{}", svc, style("::").dim(), invocation.handler) -} - -// ❯ [2023-12-14 15:38:52.500 +00:00] rIEqK14GCdkAYxo-wzTfrK2e6tJssIrtQ CheckoutProcess::checkout -fn invocation_header(invocation: &Invocation) -> String { - // Unkeyed -> [2023-12-14 15:38:52.500 +00:00] rIEqK14GCdkAYxo-wzTfrK2e6tJssIrtQ CheckoutProcess::checkout - // Keyed -> [2023-12-13 12:04:54.902 +00:00] g4Ej8NLd-aYAYxjEM31dhOLXpCi5azJNA [TicketDb @ my-user-200]::trySomethingNew - let date_style = DStyle::new().dim(); - let created_at = date_style.apply_to(format!("[{}]", invocation.created_at)); - - format!( - "❯ {} {} {}", - created_at, - style(&invocation.id).bold(), - invocation_qualified_name(invocation), - ) -} - -pub fn invocation_status(status: InvocationState) -> StyledObject { - let status_style = match status { - InvocationState::Unknown => DStyle::new().red(), - InvocationState::Pending => DStyle::new().yellow(), - InvocationState::Ready => DStyle::new().blue(), - InvocationState::Running => DStyle::new().green(), - InvocationState::Suspended => DStyle::new().dim(), - InvocationState::BackingOff => DStyle::new().red(), - }; - status_style.apply_to(status) -} - -pub fn add_invocation_to_kv_table(table: &mut Table, invocation: &Invocation) { - // Status: backing-off (Retried 1198 time(s). Next retry in 5 seconds and 78 ms) (if not pending....) - let status_msg = invocation_status_note(invocation); - let status = format!("{} {}", invocation_status(invocation.status), status_msg); - table.add_kv_row("Status:", status); - - // Invoked by: TicketDb p4DGRWa7OTJwAYxelm96fFWSV9woYc0MLQ - if let Some(invoked_by_id) = &invocation.invoked_by_id { - let invoked_by_msg = format!( - "{} {}", - invocation - .invoked_by_component - .as_ref() - .map(|x| style(x.to_owned()).italic().blue()) - .unwrap_or_else(|| style("".to_owned()).red()), - style(invoked_by_id).italic(), - ); - table.add_kv_row("Invoked by:", invoked_by_msg); - } - - // Deployment: "bG9jYWxob3N0OjkwODAv" [required] - let deployment_id = invocation - .pinned_deployment_id - .as_deref() - .or(invocation.last_attempt_deployment_id.as_deref()); - - if let Some(deployment_id) = deployment_id { - let deployment_msg = format!( - "{} {}", - deployment_id, - if invocation.pinned_deployment_id.is_some() { - if invocation.pinned_deployment_exists { - format!("[{}]", style("required").bold()) - } else { - // deployment is missing! - format!("[{}]", style("ZOMBIE").red().bold()) - } - } else { - "".to_string() - }, - ); - table.add_kv_row("Deployment:", deployment_msg); - } - - // Trace Id: "12343345345" - if let Some(trace_id) = &invocation.trace_id { - table.add_kv_row("Trace ID:", trace_id); - } - - // Error: [Internal] other client error: error trying to connect: tcp connect error: Connection refused (os error 61) - if invocation.status == InvocationState::BackingOff { - if let Some(error) = &invocation.last_failure_message { - let when = format!( - "[{}]", - invocation - .last_attempt_started_at - .map(|d| d.to_string()) - .unwrap_or("UNKNOWN".to_owned()) - ); - - table.add_kv_row( - "Error:", - format!("{}\n{}", style(when).dim(), style(error).red()), - ); - } - } -} - -// [2023-12-14 15:38:52.500 +00:00] rIEqK14GCdkAYxo-wzTfrK2e6tJssIrtQ CheckoutProcess::checkout -// Status: backing-off (Retried 67 time(s). Next retry in in 9 seconds and 616 ms)) -// Deployment: bG9jYWxob3N0OjkwODEv -// Error: [Internal] other client error: error trying to connect: tcp connect error: Connection refused (os error 61) -pub fn render_invocation_compact(env: &CliEnv, invocation: &Invocation) { - c_indentln!(1, "{}", invocation_header(invocation)); - let mut table = Table::new_styled(&env.ui_config); - add_invocation_to_kv_table(&mut table, invocation); - c_indent_table!(2, table); - c_println!(); -} - -pub fn format_journal_entry(entry: &JournalEntry) -> String { - let completed_icon = if entry.is_completed() { - Icon("☑️ ", "[DONE]") - } else if matches!(entry.entry_type, JournalEntryType::Sleep { .. }) { - Icon("⏰", "[PENDING]") - } else { - Icon("⏸️ ", "[PENDING]") - }; - - let type_style = if entry.is_completed() { - DStyle::new().dim().italic() - } else { - DStyle::new().green().bold() - }; - - let seq = format!("#{}", entry.seq); - format!( - " {} {} {} {}", - completed_icon, - type_style.apply_to(seq), - type_style.apply_to(entry.entry_type.to_string()), - format_entry_type_details(&entry.entry_type) - ) -} - -pub fn format_entry_type_details(entry_type: &JournalEntryType) -> String { - match entry_type { - JournalEntryType::Sleep { - wakeup_at: Some(wakeup_at), - } => { - let left = wakeup_at.signed_duration_since(chrono::Local::now()); - if left.num_milliseconds() >= 0 { - let left = duration_to_human_precise(left, Tense::Present); - format!("until {} ({} left)", wakeup_at, style(left).cyan()) - } else { - format!("until {}", style(wakeup_at).dim()) - } - } - JournalEntryType::Invoke(inv) | JournalEntryType::BackgroundInvoke(inv) => { - format!( - "{}{}{} {}", - inv.invoked_component.as_ref().unwrap(), - style("::").dim(), - inv.invoked_handler.as_ref().unwrap(), - inv.invocation_id.as_deref().unwrap_or(""), - ) - } - JournalEntryType::Awakeable(awakeable_id) => { - format!("{}", style(awakeable_id.to_string()).cyan()) - } - _ => String::new(), - } -} diff --git a/cli/src/ui/mod.rs b/cli/src/ui/mod.rs deleted file mode 100644 index ac7491c76..000000000 --- a/cli/src/ui/mod.rs +++ /dev/null @@ -1,31 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use chrono::Duration; -use chrono_humanize::{Accuracy, Tense}; - -pub mod component_methods; -pub mod console; -pub mod deployments; -pub mod invocations; -pub mod output; -pub mod stylesheet; -pub mod watcher; - -pub fn duration_to_human_precise(duration: Duration, tense: Tense) -> String { - let duration = - chrono_humanize::HumanTime::from(Duration::milliseconds(duration.num_milliseconds())); - duration.to_text_en(Accuracy::Precise, tense) -} - -pub fn duration_to_human_rough(duration: Duration, tense: Tense) -> String { - let duration = chrono_humanize::HumanTime::from(duration); - duration.to_text_en(Accuracy::Rough, tense) -} diff --git a/cli/src/ui/output.rs b/cli/src/ui/output.rs deleted file mode 100644 index 6dbf9dd6e..000000000 --- a/cli/src/ui/output.rs +++ /dev/null @@ -1,96 +0,0 @@ -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use std::fmt::Write; -use std::sync::{Arc, Mutex}; - -use once_cell::sync::OnceCell; - -const BUF_INITIAL_CAPACITY: usize = 2048; - -static GLOBAL_STDOUT_CONSOLE: OnceCell = OnceCell::new(); -static GLOBAL_STDERR_CONSOLE: OnceCell = OnceCell::new(); - -pub fn set_stdout(out: Console) { - let _ = GLOBAL_STDOUT_CONSOLE.set(out); -} - -pub fn set_stderr(err: Console) { - let _ = GLOBAL_STDERR_CONSOLE.set(err); -} - -pub fn stdout() -> Console { - let out = GLOBAL_STDOUT_CONSOLE.get_or_init(Console::stdout); - out.clone() -} - -pub fn stderr() -> Console { - let err = GLOBAL_STDERR_CONSOLE.get_or_init(Console::stderr); - err.clone() -} - -#[derive(Debug, Clone)] -pub struct Console { - inner: Arc, -} - -#[derive(Debug)] -enum BufferedOutput { - Stdout, - Stderr, - Memory(Mutex), -} - -impl Console { - pub fn stdout() -> Self { - Self { - inner: Arc::new(BufferedOutput::Stdout), - } - } - - pub fn stderr() -> Self { - Self { - inner: Arc::new(BufferedOutput::Stderr), - } - } - - pub fn in_memory() -> Self { - Self { - inner: Arc::new(BufferedOutput::Memory(Mutex::new(String::with_capacity( - BUF_INITIAL_CAPACITY, - )))), - } - } - - pub fn take_buffer(&self) -> Option { - if let BufferedOutput::Memory(ref buffer) = *self.inner { - Some(std::mem::take(&mut buffer.lock().unwrap())) - } else { - None - } - } -} - -impl Write for Console { - fn write_str(&mut self, s: &str) -> std::fmt::Result { - use std::io::Write; - match *self.inner { - BufferedOutput::Stdout => std::io::stdout() - .write_all(s.as_bytes()) - .map_err(|_| std::fmt::Error), - BufferedOutput::Stderr => std::io::stderr() - .write_all(s.as_bytes()) - .map_err(|_| std::fmt::Error), - BufferedOutput::Memory(ref buf) => { - let mut guard = buf.lock().unwrap(); - write!(guard, "{}", s) - } - } - } -} diff --git a/cli/src/ui/stylesheet.rs b/cli/src/ui/stylesheet.rs deleted file mode 100644 index 0bebd7d00..000000000 --- a/cli/src/ui/stylesheet.rs +++ /dev/null @@ -1,82 +0,0 @@ -// Copyright (c) 2023 - Restate Software, Inc., Restate GmbH. -// All rights reserved. -// -// Use of this software is governed by the Business Source License -// included in the LICENSE file. -// -// As of the Change Date specified in that file, in accordance with -// the Business Source License, use of this software will be governed -// by the Apache License, Version 2.0. - -use crate::app::UiConfig; - -use super::console::{Icon, StyledTable}; - -pub const SUCCESS_ICON: Icon = Icon("✅", "[OK]:"); -pub const ERR_ICON: Icon = Icon("❌", "[ERR]:"); -pub const WARN_ICON: Icon = Icon("⚠️", "[WARNING]:"); -pub const TIP_ICON: Icon = Icon("💡", "[TIP]:"); - -#[derive(Copy, Clone)] -pub enum Style { - Danger, - Warn, - Success, - Info, - Notice, - Normal, -} - -impl From