dbos 1.9.0a4__tar.gz → 1.10.0a1__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.
Potentially problematic release.
This version of dbos might be problematic. Click here for more details.
- {dbos-1.9.0a4 → dbos-1.10.0a1}/PKG-INFO +1 -1
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_dbos.py +11 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_dbos_config.py +2 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/pyproject.toml +1 -1
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_dbos.py +23 -1
- {dbos-1.9.0a4 → dbos-1.10.0a1}/LICENSE +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/README.md +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/__init__.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/__main__.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_admin_server.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_app_db.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_classproperty.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_client.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_conductor/conductor.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_conductor/protocol.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_context.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_core.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_croniter.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_debug.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_docker_pg_helper.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_error.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_event_loop.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_fastapi.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_flask.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_kafka.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_kafka_message.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_logger.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/env.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/script.py.mako +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/04ca4f231047_workflow_queues_executor_id.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/27ac6900c6ad_add_queue_dedup.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/50f3227f0b4b_fix_job_queue.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/5c361fc04708_added_system_tables.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/66478e1b95e5_consolidate_queues.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/83f3732ae8e7_workflow_timeout.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/933e86bdac6a_add_queue_priority.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/a3b18ad34abe_added_triggers.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/d76646551a6b_job_queue_limiter.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/d76646551a6c_workflow_queue.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/d994145b47b6_consolidate_inputs.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/eab0cc1d9a14_job_queue.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/f4b9b32ba814_functionname_childid_op_outputs.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_outcome.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_queue.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_recovery.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_registrations.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_roles.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_scheduler.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_schemas/__init__.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_schemas/application_database.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_schemas/system_database.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_serialization.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_sys_db.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/README.md +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/__package/__init__.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/__package/main.py.dbos +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/__package/schema.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/alembic.ini +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/dbos-config.yaml.dbos +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/migrations/env.py.dbos +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/migrations/script.py.mako +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/migrations/versions/2024_07_31_180642_init.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_templates/dbos-db-starter/start_postgres_docker.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_tracer.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_utils.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_workflow_commands.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/cli/_github_init.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/cli/_template_init.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/cli/cli.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/dbos-config.schema.json +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/py.typed +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/__init__.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/atexit_no_ctor.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/atexit_no_launch.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/classdefs.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/client_collateral.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/client_worker.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/conftest.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/dupname_classdefs1.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/dupname_classdefsa.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/more_classdefs.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/queuedworkflow.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_admin_server.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_async.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_async_workflow_management.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_classdecorators.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_cli.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_client.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_concurrency.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_config.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_croniter.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_debug.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_docker_secrets.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_failures.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_fastapi.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_fastapi_roles.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_flask.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_kafka.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_outcome.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_package.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_queue.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_scheduler.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_schema_migration.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_singleton.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_spans.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_sqlalchemy.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_workflow_introspection.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/tests/test_workflow_management.py +0 -0
- {dbos-1.9.0a4 → dbos-1.10.0a1}/version/__init__.py +0 -0
|
@@ -324,6 +324,17 @@ class DBOS:
|
|
|
324
324
|
self.conductor_websocket: Optional[ConductorWebsocket] = None
|
|
325
325
|
self._background_event_loop: BackgroundEventLoop = BackgroundEventLoop()
|
|
326
326
|
|
|
327
|
+
# Globally set the application version and executor ID.
|
|
328
|
+
# In DBOS Cloud, instead use the values supplied through environment variables.
|
|
329
|
+
if not os.environ.get("DBOS__CLOUD") == "true":
|
|
330
|
+
if (
|
|
331
|
+
"application_version" in config
|
|
332
|
+
and config["application_version"] is not None
|
|
333
|
+
):
|
|
334
|
+
GlobalParams.app_version = config["application_version"]
|
|
335
|
+
if "executor_id" in config and config["executor_id"] is not None:
|
|
336
|
+
GlobalParams.executor_id = config["executor_id"]
|
|
337
|
+
|
|
327
338
|
init_logger()
|
|
328
339
|
|
|
329
340
|
# Translate user provided config to an internal format
|
|
@@ -47,6 +47,8 @@ class DBOSConfig(TypedDict, total=False):
|
|
|
47
47
|
admin_port: Optional[int]
|
|
48
48
|
run_admin_server: Optional[bool]
|
|
49
49
|
otlp_attributes: Optional[dict[str, str]]
|
|
50
|
+
application_version: Optional[str]
|
|
51
|
+
executor_id: Optional[str]
|
|
50
52
|
|
|
51
53
|
|
|
52
54
|
class RuntimeConfig(TypedDict, total=False):
|
|
@@ -1397,7 +1397,7 @@ def test_app_version(config: DBOSConfig) -> None:
|
|
|
1397
1397
|
assert GlobalParams.app_version != app_version
|
|
1398
1398
|
|
|
1399
1399
|
# Verify that version can be overriden with an environment variable
|
|
1400
|
-
app_version =
|
|
1400
|
+
app_version = str(uuid.uuid4())
|
|
1401
1401
|
os.environ["DBOS__APPVERSION"] = app_version
|
|
1402
1402
|
|
|
1403
1403
|
DBOS.destroy(destroy_registry=True)
|
|
@@ -1412,6 +1412,28 @@ def test_app_version(config: DBOSConfig) -> None:
|
|
|
1412
1412
|
|
|
1413
1413
|
del os.environ["DBOS__APPVERSION"]
|
|
1414
1414
|
|
|
1415
|
+
# Verify that version and executor ID can be overriden with a config parameter
|
|
1416
|
+
app_version = str(uuid.uuid4())
|
|
1417
|
+
executor_id = str(uuid.uuid4())
|
|
1418
|
+
|
|
1419
|
+
DBOS.destroy(destroy_registry=True)
|
|
1420
|
+
config["application_version"] = app_version
|
|
1421
|
+
config["executor_id"] = executor_id
|
|
1422
|
+
DBOS(config=config)
|
|
1423
|
+
|
|
1424
|
+
@DBOS.workflow()
|
|
1425
|
+
def test_workflow() -> str:
|
|
1426
|
+
assert DBOS.workflow_id
|
|
1427
|
+
return DBOS.workflow_id
|
|
1428
|
+
|
|
1429
|
+
DBOS.launch()
|
|
1430
|
+
assert GlobalParams.app_version == app_version
|
|
1431
|
+
assert GlobalParams.executor_id == executor_id
|
|
1432
|
+
wfid = test_workflow()
|
|
1433
|
+
handle: WorkflowHandle[str] = DBOS.retrieve_workflow(wfid)
|
|
1434
|
+
assert handle.get_status().app_version == app_version
|
|
1435
|
+
assert handle.get_status().executor_id == executor_id
|
|
1436
|
+
|
|
1415
1437
|
|
|
1416
1438
|
def test_recovery_appversion(config: DBOSConfig) -> None:
|
|
1417
1439
|
input = 5
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/04ca4f231047_workflow_queues_executor_id.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dbos-1.9.0a4 → dbos-1.10.0a1}/dbos/_migrations/versions/5c361fc04708_added_system_tables.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|