elementary-runtime 0.1.0rc2__tar.gz → 0.1.0rc4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- elementary_runtime-0.1.0rc4/.dockerignore +15 -0
- elementary_runtime-0.1.0rc4/.github/workflows/docker.yml +57 -0
- elementary_runtime-0.1.0rc4/.github/workflows/prepare-release.yml +94 -0
- elementary_runtime-0.1.0rc4/.github/workflows/release.yml +193 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/AGENTS.md +1 -0
- elementary_runtime-0.1.0rc4/Dockerfile +62 -0
- elementary_runtime-0.1.0rc4/PKG-INFO +184 -0
- elementary_runtime-0.1.0rc4/README.md +146 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/pyproject.toml +10 -1
- elementary_runtime-0.1.0rc4/src/elementary_runtime/__main__.py +6 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/cli/errors.py +19 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/cli/exit_codes.py +8 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/cli/instance_id.py +81 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/cli/logging.py +45 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/cli/main.py +177 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/cli/run.py +88 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/common/timeouts.py +5 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/config/sections.py +1 -1
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/api.py +131 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/backoff.py +102 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/coordinator/consumer/event_consumer.py +27 -30
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/errors.py +66 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/coordinator/http.py +11 -1
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/__init__.py +4 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/config.py +39 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/connections.py +133 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/dispatcher.py +60 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/executor.py +97 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/lifecycle.py +92 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/loops/__init__.py +7 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/loops/heartbeat.py +65 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/loops/result_submission.py +105 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/loops/task_stream.py +108 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/orchestrator.py +96 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/outbox.py +49 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/registration.py +24 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/task_service.py +102 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/tracker.py +85 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/orchestrator/worker_pool.py +70 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/telemetry/__init__.py +11 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/telemetry/client.py +89 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/telemetry/flush.py +184 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/telemetry/sender.py +326 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/__init__.py +43 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/errors.py +11 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/redaction/__init__.py +4 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/redaction/exceptions.py +99 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/redaction/messages.py +59 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/sql/__init__.py +15 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/sql/validation.py +87 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/sql/wrapping.py +47 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/__init__.py +23 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/errors.py +17 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/handlers/__init__.py +13 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/handlers/base.py +15 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/handlers/custom_sql_test.py +38 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/handlers/run_sql.py +32 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/handlers/sql_query.py +63 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/limits.py +27 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/query_executor.py +159 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/sampling.py +192 -0
- elementary_runtime-0.1.0rc4/src/elementary_runtime/execution/worker/task_worker.py +30 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/__init__.py +2 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/base.py +11 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/enums.py +1 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/errors.py +11 -1
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/limits.py +2 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/tasks/sql_query.py +6 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/telemetry.py +10 -1
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/clients/base.py +12 -4
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/clients/databricks.py +3 -15
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/clients/postgres.py +5 -17
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/clients/redshift.py +5 -17
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/clients/snowflake.py +4 -16
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/clients/sqlalchemy_client.py +4 -4
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/registry.py +3 -0
- elementary_runtime-0.1.0rc4/tests/cli/conftest.py +46 -0
- elementary_runtime-0.1.0rc4/tests/cli/factory.py +84 -0
- elementary_runtime-0.1.0rc4/tests/cli/test_instance_id.py +123 -0
- elementary_runtime-0.1.0rc4/tests/cli/test_logging.py +56 -0
- elementary_runtime-0.1.0rc4/tests/cli/test_main.py +254 -0
- elementary_runtime-0.1.0rc4/tests/cli/test_run.py +147 -0
- elementary_runtime-0.1.0rc4/tests/common/test_timeouts.py +15 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/coordinator/consumer/test_event_consumer.py +19 -1
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/coordinator/factory.py +57 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/_support.py +141 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/loops/test_heartbeat.py +124 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/loops/test_result_submission.py +242 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/loops/test_task_stream.py +152 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_connections.py +90 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_dispatcher.py +110 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_executor.py +143 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_lifecycle.py +79 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_orchestrator.py +135 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_outbox.py +36 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_registration.py +114 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_task_service.py +220 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_tracker.py +76 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/test_worker_pool.py +61 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/telemetry/test_client.py +144 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/telemetry/test_config.py +48 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/telemetry/test_sender.py +430 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/test_api.py +138 -0
- elementary_runtime-0.1.0rc4/tests/coordinator/test_backoff.py +136 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/coordinator/test_http.py +23 -1
- elementary_runtime-0.1.0rc4/tests/execution/factory.py +165 -0
- elementary_runtime-0.1.0rc4/tests/execution/redaction/factory.py +4 -0
- elementary_runtime-0.1.0rc4/tests/execution/redaction/test_exceptions.py +127 -0
- elementary_runtime-0.1.0rc4/tests/execution/redaction/test_messages.py +111 -0
- elementary_runtime-0.1.0rc4/tests/execution/sql/__init__.py +0 -0
- elementary_runtime-0.1.0rc4/tests/execution/sql/test_validation.py +73 -0
- elementary_runtime-0.1.0rc4/tests/execution/sql/test_wrapping.py +95 -0
- elementary_runtime-0.1.0rc4/tests/execution/worker/__init__.py +0 -0
- elementary_runtime-0.1.0rc4/tests/execution/worker/handlers/__init__.py +0 -0
- elementary_runtime-0.1.0rc4/tests/execution/worker/handlers/test_base.py +9 -0
- elementary_runtime-0.1.0rc4/tests/execution/worker/handlers/test_custom_sql_test.py +54 -0
- elementary_runtime-0.1.0rc4/tests/execution/worker/handlers/test_run_sql.py +84 -0
- elementary_runtime-0.1.0rc4/tests/execution/worker/test_limits.py +41 -0
- elementary_runtime-0.1.0rc4/tests/execution/worker/test_query_executor.py +264 -0
- elementary_runtime-0.1.0rc4/tests/execution/worker/test_sampling.py +133 -0
- elementary_runtime-0.1.0rc4/tests/execution/worker/test_task_worker.py +39 -0
- elementary_runtime-0.1.0rc4/tests/protocol/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/contract_v1.json +64 -14
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_errors.py +8 -2
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_run_sql.py +23 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_telemetry.py +46 -0
- elementary_runtime-0.1.0rc4/tests/warehouses/__init__.py +0 -0
- elementary_runtime-0.1.0rc4/tests/warehouses/clients/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/test_registry.py +18 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/uv.lock +48 -1
- elementary_runtime-0.1.0rc2/.github/workflows/release.yml +0 -27
- elementary_runtime-0.1.0rc2/PKG-INFO +0 -114
- elementary_runtime-0.1.0rc2/README.md +0 -77
- elementary_runtime-0.1.0rc2/src/elementary_runtime/coordinator/errors.py +0 -25
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/.cursor/worktrees.json +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/.github/workflows/dependency-review.yml +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/.github/workflows/lint.yml +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/.github/workflows/test.yml +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/.gitignore +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/.pre-commit-config.yaml +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/.python-version +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/script/setup.sh +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2/src/elementary_runtime/common → elementary_runtime-0.1.0rc4/src/elementary_runtime/cli}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2/src/elementary_runtime/coordinator → elementary_runtime-0.1.0rc4/src/elementary_runtime/common}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/common/validators.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/config/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/config/base.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/config/connections.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/config/env.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/config/errors.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/config/runtime.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/config/secrets.py +0 -0
- {elementary_runtime-0.1.0rc2/src/elementary_runtime/coordinator/consumer → elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2/src/elementary_runtime/execution → elementary_runtime-0.1.0rc4/src/elementary_runtime/coordinator/consumer}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/coordinator/consumer/event_reader.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/http.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/instances.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/tasks/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/tasks/custom_sql_test.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/tasks/envelope.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/tasks/heartbeat.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/tasks/registry.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/tasks/results.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/tasks/run_sql.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/protocol/tasks/stream.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/py.typed +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/classification.py +0 -0
- {elementary_runtime-0.1.0rc2/src/elementary_runtime/execution/redaction → elementary_runtime-0.1.0rc4/src/elementary_runtime/warehouses/clients}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/exceptions.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/factory.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/query_execution.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/query_utils.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/src/elementary_runtime/warehouses/types.py +0 -0
- {elementary_runtime-0.1.0rc2/src/elementary_runtime/execution/sql → elementary_runtime-0.1.0rc4/tests/cli}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2/src/elementary_runtime/execution/worker → elementary_runtime-0.1.0rc4/tests/common}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/common/test_validators.py +0 -0
- {elementary_runtime-0.1.0rc2/src/elementary_runtime/warehouses/clients → elementary_runtime-0.1.0rc4/tests/config}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/config/factory.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/config/test_connections.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/config/test_env.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/config/test_runtime.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/config/test_secrets.py +0 -0
- {elementary_runtime-0.1.0rc2/tests/common → elementary_runtime-0.1.0rc4/tests/coordinator}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2/tests/config → elementary_runtime-0.1.0rc4/tests/coordinator/consumer}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/coordinator/consumer/test_event_reader.py +0 -0
- {elementary_runtime-0.1.0rc2/tests/coordinator → elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2/tests/coordinator/consumer → elementary_runtime-0.1.0rc4/tests/coordinator/orchestrator/loops}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2/tests/protocol → elementary_runtime-0.1.0rc4/tests/coordinator/telemetry}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2/tests/warehouses → elementary_runtime-0.1.0rc4/tests/execution}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2/tests/warehouses/clients → elementary_runtime-0.1.0rc4/tests/execution/redaction}/__init__.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/factory.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_contract_snapshot.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_custom_sql_test.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_heartbeat.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_http.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_instances.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_results.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/protocol/test_stream.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/test_package.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/clients/_support.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/clients/test_databricks.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/clients/test_postgres.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/clients/test_redshift.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/clients/test_snowflake.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/factory.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/test_classification.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/test_client_contract.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/test_exceptions.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/test_factory.py +0 -0
- {elementary_runtime-0.1.0rc2 → elementary_runtime-0.1.0rc4}/tests/warehouses/test_sqlalchemy_client.py +0 -0
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
name: Docker
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
pull_request:
|
|
5
|
+
paths:
|
|
6
|
+
- Dockerfile
|
|
7
|
+
- .dockerignore
|
|
8
|
+
- pyproject.toml
|
|
9
|
+
- uv.lock
|
|
10
|
+
- src/**
|
|
11
|
+
- .github/workflows/docker.yml
|
|
12
|
+
workflow_dispatch:
|
|
13
|
+
|
|
14
|
+
permissions: {}
|
|
15
|
+
|
|
16
|
+
concurrency:
|
|
17
|
+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
|
|
18
|
+
cancel-in-progress: true
|
|
19
|
+
|
|
20
|
+
jobs:
|
|
21
|
+
build:
|
|
22
|
+
runs-on: ubuntu-latest
|
|
23
|
+
permissions:
|
|
24
|
+
contents: read
|
|
25
|
+
strategy:
|
|
26
|
+
fail-fast: false
|
|
27
|
+
matrix:
|
|
28
|
+
include:
|
|
29
|
+
- variant: core
|
|
30
|
+
extras: ""
|
|
31
|
+
- variant: all
|
|
32
|
+
extras: all
|
|
33
|
+
steps:
|
|
34
|
+
- name: Checkout
|
|
35
|
+
uses: actions/checkout@v6
|
|
36
|
+
with:
|
|
37
|
+
persist-credentials: false
|
|
38
|
+
|
|
39
|
+
- name: Set up Docker Buildx
|
|
40
|
+
uses: docker/setup-buildx-action@v4
|
|
41
|
+
|
|
42
|
+
- name: Build
|
|
43
|
+
uses: docker/build-push-action@v7
|
|
44
|
+
with:
|
|
45
|
+
context: .
|
|
46
|
+
load: true
|
|
47
|
+
push: false
|
|
48
|
+
provenance: false
|
|
49
|
+
platforms: linux/amd64
|
|
50
|
+
tags: elementary-runtime:${{ matrix.variant }}
|
|
51
|
+
build-args: |
|
|
52
|
+
EXTRAS=${{ matrix.extras }}
|
|
53
|
+
cache-from: type=gha,scope=${{ matrix.variant }}
|
|
54
|
+
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
|
55
|
+
|
|
56
|
+
- name: Check version
|
|
57
|
+
run: docker run --rm elementary-runtime:${{ matrix.variant }} --version
|
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
name: Prepare release
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
workflow_dispatch:
|
|
5
|
+
inputs:
|
|
6
|
+
bump:
|
|
7
|
+
description: Version bump, ignored when version is set
|
|
8
|
+
required: true
|
|
9
|
+
default: patch
|
|
10
|
+
type: choice
|
|
11
|
+
options:
|
|
12
|
+
- patch
|
|
13
|
+
- minor
|
|
14
|
+
- major
|
|
15
|
+
- rc
|
|
16
|
+
- stable
|
|
17
|
+
- patch-rc
|
|
18
|
+
- minor-rc
|
|
19
|
+
- major-rc
|
|
20
|
+
version:
|
|
21
|
+
description: Explicit version (overrides bump)
|
|
22
|
+
required: false
|
|
23
|
+
type: string
|
|
24
|
+
|
|
25
|
+
permissions: {}
|
|
26
|
+
|
|
27
|
+
jobs:
|
|
28
|
+
prepare:
|
|
29
|
+
runs-on: ubuntu-latest
|
|
30
|
+
permissions:
|
|
31
|
+
contents: write
|
|
32
|
+
pull-requests: write
|
|
33
|
+
actions: write
|
|
34
|
+
steps:
|
|
35
|
+
- name: Checkout
|
|
36
|
+
uses: actions/checkout@v6
|
|
37
|
+
with:
|
|
38
|
+
ref: main
|
|
39
|
+
|
|
40
|
+
- name: Install uv
|
|
41
|
+
uses: astral-sh/setup-uv@v6
|
|
42
|
+
|
|
43
|
+
- name: Set version
|
|
44
|
+
id: version
|
|
45
|
+
env:
|
|
46
|
+
VERSION_INPUT: ${{ inputs.version }}
|
|
47
|
+
BUMP: ${{ inputs.bump }}
|
|
48
|
+
run: |
|
|
49
|
+
set -euo pipefail
|
|
50
|
+
if [ -n "$VERSION_INPUT" ]; then
|
|
51
|
+
uv version --no-sync "$VERSION_INPUT"
|
|
52
|
+
else
|
|
53
|
+
case "$BUMP" in
|
|
54
|
+
patch-rc) uv version --no-sync --bump patch --bump rc ;;
|
|
55
|
+
minor-rc) uv version --no-sync --bump minor --bump rc ;;
|
|
56
|
+
major-rc) uv version --no-sync --bump major --bump rc ;;
|
|
57
|
+
*) uv version --no-sync --bump "$BUMP" ;;
|
|
58
|
+
esac
|
|
59
|
+
fi
|
|
60
|
+
echo "version=$(uv version --short)" >> "$GITHUB_OUTPUT"
|
|
61
|
+
|
|
62
|
+
- name: Open release pull request
|
|
63
|
+
env:
|
|
64
|
+
VERSION: ${{ steps.version.outputs.version }}
|
|
65
|
+
GH_TOKEN: ${{ github.token }}
|
|
66
|
+
run: |
|
|
67
|
+
set -euo pipefail
|
|
68
|
+
branch="release/${VERSION}"
|
|
69
|
+
# github-actions[bot] author from the actions/checkout docs:
|
|
70
|
+
# https://github.com/actions/checkout/blob/main/README.md
|
|
71
|
+
git config user.name "github-actions[bot]"
|
|
72
|
+
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
|
73
|
+
git checkout -b "$branch"
|
|
74
|
+
git add pyproject.toml uv.lock
|
|
75
|
+
git commit -m "${VERSION} release"
|
|
76
|
+
git push --set-upstream origin "$branch"
|
|
77
|
+
body=$(printf '%s\n\n%s\n' \
|
|
78
|
+
"Bumps the package version to \`${VERSION}\`." \
|
|
79
|
+
"Merging this pull request publishes the package to PyPI and the container images, then tags \`v${VERSION}\`.")
|
|
80
|
+
gh pr create \
|
|
81
|
+
--base main \
|
|
82
|
+
--head "$branch" \
|
|
83
|
+
--title "${VERSION} release" \
|
|
84
|
+
--body "$body"
|
|
85
|
+
|
|
86
|
+
- name: Run checks
|
|
87
|
+
env:
|
|
88
|
+
VERSION: ${{ steps.version.outputs.version }}
|
|
89
|
+
GH_TOKEN: ${{ github.token }}
|
|
90
|
+
run: |
|
|
91
|
+
set -euo pipefail
|
|
92
|
+
ref="release/${VERSION}"
|
|
93
|
+
gh workflow run test.yml --ref "$ref"
|
|
94
|
+
gh workflow run lint.yml --ref "$ref"
|
|
@@ -0,0 +1,193 @@
|
|
|
1
|
+
name: Release package
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches:
|
|
6
|
+
- main
|
|
7
|
+
paths:
|
|
8
|
+
- pyproject.toml
|
|
9
|
+
workflow_dispatch:
|
|
10
|
+
|
|
11
|
+
permissions: {}
|
|
12
|
+
|
|
13
|
+
concurrency:
|
|
14
|
+
group: ${{ github.workflow }}
|
|
15
|
+
cancel-in-progress: false
|
|
16
|
+
|
|
17
|
+
jobs:
|
|
18
|
+
prepare:
|
|
19
|
+
runs-on: ubuntu-latest
|
|
20
|
+
permissions:
|
|
21
|
+
contents: read
|
|
22
|
+
outputs:
|
|
23
|
+
version: ${{ steps.version.outputs.version }}
|
|
24
|
+
should_release: ${{ steps.version.outputs.should_release }}
|
|
25
|
+
prerelease: ${{ steps.version.outputs.prerelease }}
|
|
26
|
+
steps:
|
|
27
|
+
- name: Require main
|
|
28
|
+
if: github.event_name == 'workflow_dispatch' && github.ref != 'refs/heads/main'
|
|
29
|
+
run: |
|
|
30
|
+
echo "The release workflow only runs from main." >&2
|
|
31
|
+
exit 1
|
|
32
|
+
|
|
33
|
+
- name: Checkout
|
|
34
|
+
uses: actions/checkout@v6
|
|
35
|
+
|
|
36
|
+
- name: Install uv
|
|
37
|
+
uses: astral-sh/setup-uv@v6
|
|
38
|
+
|
|
39
|
+
- name: Read version
|
|
40
|
+
id: version
|
|
41
|
+
run: |
|
|
42
|
+
set -euo pipefail
|
|
43
|
+
version="$(uv version --short)"
|
|
44
|
+
set +e
|
|
45
|
+
git ls-remote --exit-code --tags origin "refs/tags/v${version}" >/dev/null
|
|
46
|
+
status=$?
|
|
47
|
+
set -e
|
|
48
|
+
if [ "$status" -eq 0 ]; then
|
|
49
|
+
should_release=false
|
|
50
|
+
elif [ "$status" -eq 2 ]; then
|
|
51
|
+
should_release=true
|
|
52
|
+
else
|
|
53
|
+
exit "$status"
|
|
54
|
+
fi
|
|
55
|
+
prerelease="$(
|
|
56
|
+
VERSION="$version" uv run --no-project --with packaging python -c \
|
|
57
|
+
'import os; from packaging.version import Version; print("true" if Version(os.environ["VERSION"]).is_prerelease else "false")'
|
|
58
|
+
)"
|
|
59
|
+
{
|
|
60
|
+
echo "version=${version}"
|
|
61
|
+
echo "should_release=${should_release}"
|
|
62
|
+
echo "prerelease=${prerelease}"
|
|
63
|
+
} >> "$GITHUB_OUTPUT"
|
|
64
|
+
echo "version=${version} should_release=${should_release} prerelease=${prerelease}"
|
|
65
|
+
|
|
66
|
+
publish-pypi:
|
|
67
|
+
needs: prepare
|
|
68
|
+
if: needs.prepare.result == 'success' && needs.prepare.outputs.should_release == 'true'
|
|
69
|
+
runs-on: ubuntu-latest
|
|
70
|
+
permissions:
|
|
71
|
+
id-token: write
|
|
72
|
+
contents: read
|
|
73
|
+
steps:
|
|
74
|
+
- name: Checkout
|
|
75
|
+
uses: actions/checkout@v6
|
|
76
|
+
with:
|
|
77
|
+
persist-credentials: false
|
|
78
|
+
|
|
79
|
+
- name: Install uv
|
|
80
|
+
uses: astral-sh/setup-uv@v6
|
|
81
|
+
|
|
82
|
+
- name: Build
|
|
83
|
+
run: uv build --out-dir dist
|
|
84
|
+
|
|
85
|
+
- name: Publish
|
|
86
|
+
run: uv publish --check-url https://pypi.org/simple/ dist/*
|
|
87
|
+
|
|
88
|
+
docker:
|
|
89
|
+
needs: prepare
|
|
90
|
+
if: needs.prepare.result == 'success' && needs.prepare.outputs.should_release == 'true'
|
|
91
|
+
runs-on: ubuntu-latest
|
|
92
|
+
permissions:
|
|
93
|
+
contents: read
|
|
94
|
+
packages: write
|
|
95
|
+
strategy:
|
|
96
|
+
fail-fast: false
|
|
97
|
+
matrix:
|
|
98
|
+
include:
|
|
99
|
+
- variant: all
|
|
100
|
+
extras: all
|
|
101
|
+
- variant: core
|
|
102
|
+
extras: ""
|
|
103
|
+
- variant: snowflake
|
|
104
|
+
extras: snowflake
|
|
105
|
+
- variant: databricks
|
|
106
|
+
extras: databricks
|
|
107
|
+
- variant: postgres
|
|
108
|
+
extras: postgres
|
|
109
|
+
- variant: redshift
|
|
110
|
+
extras: redshift
|
|
111
|
+
steps:
|
|
112
|
+
- name: Checkout
|
|
113
|
+
uses: actions/checkout@v6
|
|
114
|
+
with:
|
|
115
|
+
persist-credentials: false
|
|
116
|
+
|
|
117
|
+
- name: Set up QEMU
|
|
118
|
+
uses: docker/setup-qemu-action@v4
|
|
119
|
+
|
|
120
|
+
- name: Set up Docker Buildx
|
|
121
|
+
uses: docker/setup-buildx-action@v4
|
|
122
|
+
|
|
123
|
+
- name: Log in to ghcr.io
|
|
124
|
+
uses: docker/login-action@v4
|
|
125
|
+
with:
|
|
126
|
+
registry: ghcr.io
|
|
127
|
+
username: ${{ github.actor }}
|
|
128
|
+
password: ${{ secrets.GITHUB_TOKEN }}
|
|
129
|
+
|
|
130
|
+
- name: Image tags
|
|
131
|
+
id: tags
|
|
132
|
+
env:
|
|
133
|
+
VERSION: ${{ needs.prepare.outputs.version }}
|
|
134
|
+
PRERELEASE: ${{ needs.prepare.outputs.prerelease }}
|
|
135
|
+
VARIANT: ${{ matrix.variant }}
|
|
136
|
+
run: |
|
|
137
|
+
set -euo pipefail
|
|
138
|
+
image="ghcr.io/$(printf '%s' "$GITHUB_REPOSITORY" | tr '[:upper:]' '[:lower:]')"
|
|
139
|
+
if [ "$VARIANT" = "all" ]; then
|
|
140
|
+
versioned="${image}:${VERSION}"
|
|
141
|
+
floating="${image}:latest"
|
|
142
|
+
else
|
|
143
|
+
versioned="${image}:${VARIANT}-${VERSION}"
|
|
144
|
+
floating="${image}:${VARIANT}"
|
|
145
|
+
fi
|
|
146
|
+
{
|
|
147
|
+
echo "tags<<EOF"
|
|
148
|
+
echo "$versioned"
|
|
149
|
+
if [ "$PRERELEASE" != "true" ]; then
|
|
150
|
+
echo "$floating"
|
|
151
|
+
fi
|
|
152
|
+
echo "EOF"
|
|
153
|
+
} >> "$GITHUB_OUTPUT"
|
|
154
|
+
|
|
155
|
+
- name: Build and push
|
|
156
|
+
uses: docker/build-push-action@v7
|
|
157
|
+
with:
|
|
158
|
+
context: .
|
|
159
|
+
push: true
|
|
160
|
+
platforms: linux/amd64,linux/arm64
|
|
161
|
+
build-args: |
|
|
162
|
+
EXTRAS=${{ matrix.extras }}
|
|
163
|
+
tags: ${{ steps.tags.outputs.tags }}
|
|
164
|
+
labels: |
|
|
165
|
+
org.opencontainers.image.version=${{ needs.prepare.outputs.version }}
|
|
166
|
+
org.opencontainers.image.source=${{ github.server_url }}/${{ github.repository }}
|
|
167
|
+
org.opencontainers.image.revision=${{ github.sha }}
|
|
168
|
+
cache-from: type=gha,scope=${{ matrix.variant }}
|
|
169
|
+
cache-to: type=gha,mode=max,scope=${{ matrix.variant }}
|
|
170
|
+
|
|
171
|
+
github-release:
|
|
172
|
+
needs: [prepare, publish-pypi, docker]
|
|
173
|
+
if: >-
|
|
174
|
+
needs.prepare.result == 'success' &&
|
|
175
|
+
needs.prepare.outputs.should_release == 'true' &&
|
|
176
|
+
needs.publish-pypi.result == 'success' &&
|
|
177
|
+
needs.docker.result == 'success'
|
|
178
|
+
runs-on: ubuntu-latest
|
|
179
|
+
permissions:
|
|
180
|
+
contents: write
|
|
181
|
+
steps:
|
|
182
|
+
- name: Create GitHub Release
|
|
183
|
+
env:
|
|
184
|
+
GH_TOKEN: ${{ github.token }}
|
|
185
|
+
VERSION: ${{ needs.prepare.outputs.version }}
|
|
186
|
+
PRERELEASE: ${{ needs.prepare.outputs.prerelease }}
|
|
187
|
+
run: |
|
|
188
|
+
set -euo pipefail
|
|
189
|
+
args=(--target "$GITHUB_SHA" --generate-notes --title "v${VERSION}")
|
|
190
|
+
if [ "$PRERELEASE" = "true" ]; then
|
|
191
|
+
args+=(--prerelease)
|
|
192
|
+
fi
|
|
193
|
+
gh release create "v${VERSION}" "${args[@]}"
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
# syntax=docker/dockerfile:1
|
|
2
|
+
|
|
3
|
+
FROM python:3.12-slim AS build
|
|
4
|
+
|
|
5
|
+
COPY --from=ghcr.io/astral-sh/uv:0.12.11 /uv /usr/local/bin/uv
|
|
6
|
+
|
|
7
|
+
WORKDIR /app
|
|
8
|
+
|
|
9
|
+
ENV UV_COMPILE_BYTECODE=1 \
|
|
10
|
+
UV_LINK_MODE=copy \
|
|
11
|
+
UV_PROJECT_ENVIRONMENT=/app/.venv \
|
|
12
|
+
UV_PYTHON=/usr/local/bin/python3 \
|
|
13
|
+
UV_PYTHON_DOWNLOADS=never \
|
|
14
|
+
UV_PYTHON_PREFERENCE=only-system
|
|
15
|
+
|
|
16
|
+
# all, empty for no drivers, or space-separated extra names.
|
|
17
|
+
ARG EXTRAS=all
|
|
18
|
+
|
|
19
|
+
RUN <<'EOF'
|
|
20
|
+
set -eu
|
|
21
|
+
cat > /usr/local/bin/uv-sync-extras <<'SCRIPT'
|
|
22
|
+
#!/bin/sh
|
|
23
|
+
set -eu
|
|
24
|
+
flags=""
|
|
25
|
+
if [ "$EXTRAS" = "all" ]; then
|
|
26
|
+
flags="--all-extras"
|
|
27
|
+
else
|
|
28
|
+
for extra in $EXTRAS; do
|
|
29
|
+
flags="$flags --extra $extra"
|
|
30
|
+
done
|
|
31
|
+
fi
|
|
32
|
+
exec uv sync --frozen --no-dev $flags "$@"
|
|
33
|
+
SCRIPT
|
|
34
|
+
chmod +x /usr/local/bin/uv-sync-extras
|
|
35
|
+
EOF
|
|
36
|
+
|
|
37
|
+
RUN --mount=type=bind,source=uv.lock,target=uv.lock \
|
|
38
|
+
--mount=type=bind,source=pyproject.toml,target=pyproject.toml \
|
|
39
|
+
--mount=type=cache,target=/root/.cache/uv \
|
|
40
|
+
uv-sync-extras --no-install-project
|
|
41
|
+
|
|
42
|
+
COPY pyproject.toml uv.lock README.md ./
|
|
43
|
+
COPY src src
|
|
44
|
+
|
|
45
|
+
RUN --mount=type=cache,target=/root/.cache/uv \
|
|
46
|
+
uv-sync-extras --no-editable
|
|
47
|
+
|
|
48
|
+
FROM python:3.12-slim
|
|
49
|
+
|
|
50
|
+
RUN groupadd --gid 10001 runtime \
|
|
51
|
+
&& useradd --uid 10001 --gid runtime --create-home --shell /usr/sbin/nologin runtime
|
|
52
|
+
|
|
53
|
+
COPY --from=build --chown=10001:10001 /app/.venv /app/.venv
|
|
54
|
+
|
|
55
|
+
ENV PATH="/app/.venv/bin:${PATH}" \
|
|
56
|
+
PYTHONUNBUFFERED=1
|
|
57
|
+
|
|
58
|
+
USER 10001
|
|
59
|
+
WORKDIR /home/runtime
|
|
60
|
+
|
|
61
|
+
ENTRYPOINT ["elementary-runtime"]
|
|
62
|
+
CMD ["run"]
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: elementary-runtime
|
|
3
|
+
Version: 0.1.0rc4
|
|
4
|
+
Summary: Customer-side runtime that executes Elementary Cloud SQL against a warehouse.
|
|
5
|
+
Project-URL: Homepage, https://www.elementary-data.com
|
|
6
|
+
Project-URL: Repository, https://github.com/elementary-data/elementary-runtime
|
|
7
|
+
Author-email: Elementary Data <team@elementary-data.com>
|
|
8
|
+
Classifier: Development Status :: 2 - Pre-Alpha
|
|
9
|
+
Classifier: Intended Audience :: Developers
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.14
|
|
16
|
+
Requires-Python: <3.15,>=3.10
|
|
17
|
+
Requires-Dist: expandvars<2,>=1.1.2
|
|
18
|
+
Requires-Dist: httpx<1,>=0.28.1
|
|
19
|
+
Requires-Dist: pandas<4,>=2.0
|
|
20
|
+
Requires-Dist: pydantic<3,>=2.11
|
|
21
|
+
Requires-Dist: pyyaml<7,>=6
|
|
22
|
+
Requires-Dist: sqlalchemy~=2.0
|
|
23
|
+
Requires-Dist: sqlglot[c]~=30.4
|
|
24
|
+
Requires-Dist: tenacity<10,>=8.0
|
|
25
|
+
Requires-Dist: typing-extensions<5,>=4.7
|
|
26
|
+
Provides-Extra: databricks
|
|
27
|
+
Requires-Dist: databricks-sdk<1,>=0.30; extra == 'databricks'
|
|
28
|
+
Requires-Dist: databricks-sqlalchemy~=2.0; extra == 'databricks'
|
|
29
|
+
Provides-Extra: postgres
|
|
30
|
+
Requires-Dist: psycopg2-binary<3,>=2.9; extra == 'postgres'
|
|
31
|
+
Provides-Extra: redshift
|
|
32
|
+
Requires-Dist: psycopg2-binary<3,>=2.9; extra == 'redshift'
|
|
33
|
+
Requires-Dist: sqlalchemy-redshift~=1.0; extra == 'redshift'
|
|
34
|
+
Provides-Extra: snowflake
|
|
35
|
+
Requires-Dist: cryptography<51,>=42.0; extra == 'snowflake'
|
|
36
|
+
Requires-Dist: snowflake-sqlalchemy~=1.8; extra == 'snowflake'
|
|
37
|
+
Description-Content-Type: text/markdown
|
|
38
|
+
|
|
39
|
+
# Elementary Runtime
|
|
40
|
+
|
|
41
|
+
> Early development.
|
|
42
|
+
|
|
43
|
+
Elementary Runtime is a small service that customers run in their own
|
|
44
|
+
environment. It uses local warehouse credentials to execute SQL prepared by
|
|
45
|
+
Elementary Cloud, so Cloud never holds credentials that can read customer
|
|
46
|
+
business tables.
|
|
47
|
+
|
|
48
|
+
Warehouse drivers will be optional extras. Installing the base package for
|
|
49
|
+
task models will not pull in every warehouse driver or the full runtime.
|
|
50
|
+
|
|
51
|
+
A license has not been chosen yet.
|
|
52
|
+
|
|
53
|
+
## Security-critical code
|
|
54
|
+
|
|
55
|
+
Local safety controls live under
|
|
56
|
+
[`src/elementary_runtime/execution/`](src/elementary_runtime/execution/).
|
|
57
|
+
That tree is the audited surface: SQL validation, query execution with limits
|
|
58
|
+
applied while rows are fetched and encoded, and redaction of SQL, row values,
|
|
59
|
+
credentials, and unrestricted warehouse errors from logs and telemetry.
|
|
60
|
+
|
|
61
|
+
## Repository layout
|
|
62
|
+
|
|
63
|
+
```text
|
|
64
|
+
src/elementary_runtime/
|
|
65
|
+
protocol/ Task and result wire formats
|
|
66
|
+
config/ Versioned YAML configuration and local limits
|
|
67
|
+
common/ Shared helpers used by protocol and config
|
|
68
|
+
warehouses/ Warehouse clients (drivers behind extras)
|
|
69
|
+
execution/ Audited local safety controls
|
|
70
|
+
sql/ SQL validation
|
|
71
|
+
worker/ Worker pool, query execution, limit enforcement
|
|
72
|
+
redaction/ Error, log, and telemetry scrubbing
|
|
73
|
+
coordinator/ Register, task streams, heartbeat, submit, retries, shutdown
|
|
74
|
+
cli/ Process entrypoint: commands, instance id, logging
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Configuration
|
|
78
|
+
|
|
79
|
+
```yaml
|
|
80
|
+
version: 1
|
|
81
|
+
cloud:
|
|
82
|
+
token_file: /run/secrets/elementary_runtime_token
|
|
83
|
+
connections:
|
|
84
|
+
- warehouse_connection_id: connection-id
|
|
85
|
+
type: snowflake
|
|
86
|
+
account: ab12345.eu-central-1
|
|
87
|
+
user: elementary_runtime
|
|
88
|
+
password_file: /run/secrets/snowflake_password
|
|
89
|
+
role: ELEMENTARY_RUNTIME
|
|
90
|
+
warehouse: ELEMENTARY_WH
|
|
91
|
+
database: ANALYTICS
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
## Running
|
|
95
|
+
|
|
96
|
+
`elementary-runtime` loads the YAML configuration and runs until it is stopped.
|
|
97
|
+
|
|
98
|
+
```bash
|
|
99
|
+
elementary-runtime run --config /etc/elementary-runtime/config.yml
|
|
100
|
+
elementary-runtime validate --config /etc/elementary-runtime/config.yml
|
|
101
|
+
elementary-runtime validate --check-connections --config /etc/elementary-runtime/config.yml
|
|
102
|
+
elementary-runtime --version
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
A container can start with no arguments. Each flag falls back to an environment variable:
|
|
106
|
+
|
|
107
|
+
- `ELEMENTARY_RUNTIME_CONFIG`: configuration file, default `/etc/elementary-runtime/config.yml`
|
|
108
|
+
- `ELEMENTARY_RUNTIME_INSTANCE_ID`: explicit instance id, unset by default
|
|
109
|
+
- `ELEMENTARY_RUNTIME_LOG_LEVEL`: root log level, default `INFO`
|
|
110
|
+
- `ELEMENTARY_RUNTIME_POD_UID`: Helm pod UID from the Downward API
|
|
111
|
+
- `ELEMENTARY_RUNTIME_POD_NAME`: pod name, used as the display name when the config has none
|
|
112
|
+
|
|
113
|
+
The instance id is the first match:
|
|
114
|
+
|
|
115
|
+
1. `--instance-id` or `ELEMENTARY_RUNTIME_INSTANCE_ID`, used as given.
|
|
116
|
+
2. `helm:<pod uid>` when `ELEMENTARY_RUNTIME_POD_UID` is set. `instance.id_prefix` is not applied, because a pod UID is already unique.
|
|
117
|
+
3. `docker:<hostname>` when `/.dockerenv` or `/run/.containerenv` exists, otherwise `host:<hostname>`. `instance.id_prefix` is prepended when set, for example `eu-prod:docker:runtime-1`.
|
|
118
|
+
|
|
119
|
+
Docker assigns a new hostname when a container is recreated. Set one explicitly (`docker run --hostname` or Compose `hostname`) so the instance id stays stable, and keep it unique among replicas.
|
|
120
|
+
|
|
121
|
+
Exit codes:
|
|
122
|
+
|
|
123
|
+
- `0`: stopped gracefully
|
|
124
|
+
- `1`: runtime failure, such as Cloud rejecting the token
|
|
125
|
+
- `2`: usage or configuration error
|
|
126
|
+
- `3`: drain timed out with work still in flight
|
|
127
|
+
|
|
128
|
+
The first SIGTERM or SIGINT drains in-flight work for 30 seconds. A second signal exits immediately. Set the container stop grace period above that drain (`docker stop -t`, or Compose `stop_grace_period`), for example 45 seconds.
|
|
129
|
+
|
|
130
|
+
## Docker images
|
|
131
|
+
|
|
132
|
+
Published images live at `ghcr.io/elementary-data/elementary-runtime` and are built for `linux/amd64` and `linux/arm64`.
|
|
133
|
+
|
|
134
|
+
| Tag | Drivers |
|
|
135
|
+
| --- | --- |
|
|
136
|
+
| `{version}` | All of them |
|
|
137
|
+
| `latest` | All of them, stable releases only |
|
|
138
|
+
| `core-{version}` | None |
|
|
139
|
+
| `core` | None, stable releases only |
|
|
140
|
+
| `{driver}-{version}` | `snowflake`, `databricks`, `postgres`, or `redshift` |
|
|
141
|
+
| `{driver}` | That driver, stable releases only |
|
|
142
|
+
|
|
143
|
+
A pre-release such as `0.1.0rc3` is tagged with its version only. It does not move `latest`, `core`, or the bare driver tags.
|
|
144
|
+
|
|
145
|
+
```bash
|
|
146
|
+
docker run --rm \
|
|
147
|
+
--hostname runtime-1 \
|
|
148
|
+
--stop-timeout 45 \
|
|
149
|
+
-v /path/to/config.yml:/etc/elementary-runtime/config.yml:ro \
|
|
150
|
+
ghcr.io/elementary-data/elementary-runtime:{version}
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
The image runs `elementary-runtime run`. Mount the configuration where the process expects it, set `--hostname` so the instance id stays stable, and keep the stop timeout above the 30 second drain.
|
|
154
|
+
|
|
155
|
+
## Development
|
|
156
|
+
|
|
157
|
+
Requires [uv](https://docs.astral.sh/uv/) and Python 3.10–3.14. Local
|
|
158
|
+
development uses Python 3.12.
|
|
159
|
+
|
|
160
|
+
After a clone or a new Git worktree, install the environment and hooks:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
./script/setup.sh
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
Then:
|
|
167
|
+
|
|
168
|
+
```bash
|
|
169
|
+
uv run pytest
|
|
170
|
+
uv run mypy src tests
|
|
171
|
+
uvx prek run --all-files
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
The package version lives in `pyproject.toml`. At runtime,
|
|
175
|
+
`elementary_runtime.__version__` is read from the installed distribution
|
|
176
|
+
metadata.
|
|
177
|
+
|
|
178
|
+
## Releasing
|
|
179
|
+
|
|
180
|
+
Run the Prepare release workflow from the Actions tab. Choose a bump (`patch`, `minor`, `major`, `rc`, `stable`, `patch-rc`, `minor-rc`, or `major-rc`) or set an explicit version. `minor-rc` turns `0.1.0` into `0.2.0rc1`. `rc` advances an existing candidate. It opens a pull request that updates `pyproject.toml` and `uv.lock`.
|
|
181
|
+
|
|
182
|
+
Merging that pull request publishes the package to PyPI and the container images, then tags `v{version}` and creates a GitHub Release. Pre-releases do not move floating image tags.
|
|
183
|
+
|
|
184
|
+
If publishing fails before that tag exists, re-run the Release package workflow from `main`. A version that already has a tag is skipped.
|