dbos 0.26.0a6__tar.gz → 0.26.0a7__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.
- {dbos-0.26.0a6 → dbos-0.26.0a7}/PKG-INFO +1 -1
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_dbos.py +6 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/pyproject.toml +1 -1
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_dbos.py +57 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/LICENSE +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/README.md +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/__init__.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/__main__.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_admin_server.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_app_db.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_classproperty.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_client.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_cloudutils/authentication.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_cloudutils/cloudutils.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_cloudutils/databases.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_conductor/conductor.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_conductor/protocol.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_context.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_core.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_croniter.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_db_wizard.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_dbos_config.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_debug.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_error.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_fastapi.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_flask.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_kafka.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_kafka_message.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_logger.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/env.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/script.py.mako +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/versions/04ca4f231047_workflow_queues_executor_id.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/versions/50f3227f0b4b_fix_job_queue.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/versions/5c361fc04708_added_system_tables.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/versions/a3b18ad34abe_added_triggers.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/versions/d76646551a6b_job_queue_limiter.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/versions/d76646551a6c_workflow_queue.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/versions/eab0cc1d9a14_job_queue.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_migrations/versions/f4b9b32ba814_functionname_childid_op_outputs.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_outcome.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_queue.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_recovery.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_registrations.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_request.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_roles.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_scheduler.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_schemas/__init__.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_schemas/application_database.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_schemas/system_database.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_serialization.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_sys_db.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/README.md +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/__package/__init__.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/__package/main.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/__package/schema.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/alembic.ini +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/dbos-config.yaml.dbos +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/migrations/env.py.dbos +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/migrations/script.py.mako +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/migrations/versions/2024_07_31_180642_init.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_templates/dbos-db-starter/start_postgres_docker.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_tracer.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_utils.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/_workflow_commands.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/cli/_github_init.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/cli/_template_init.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/cli/cli.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/dbos-config.schema.json +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/dbos/py.typed +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/__init__.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/atexit_no_ctor.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/atexit_no_launch.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/classdefs.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/client_collateral.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/client_worker.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/conftest.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/more_classdefs.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/queuedworkflow.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_admin_server.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_async.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_classdecorators.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_client.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_concurrency.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_config.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_croniter.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_dbwizard.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_debug.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_docker_secrets.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_failures.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_fastapi.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_fastapi_roles.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_flask.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_kafka.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_outcome.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_package.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_queue.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_scheduler.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_schema_migration.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_singleton.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_spans.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_sqlalchemy.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_workflow_introspection.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/tests/test_workflow_management.py +0 -0
- {dbos-0.26.0a6 → dbos-0.26.0a7}/version/__init__.py +0 -0
@@ -172,6 +172,12 @@ class DBOSRegistry:
|
|
172
172
|
if name in self.function_type_map:
|
173
173
|
if self.function_type_map[name] != functype:
|
174
174
|
raise DBOSConflictingRegistrationError(name)
|
175
|
+
if name != TEMP_SEND_WF_NAME:
|
176
|
+
# Remove the `<temp>` prefix from the function name to avoid confusion
|
177
|
+
truncated_name = name.replace("<temp>.", "")
|
178
|
+
dbos_logger.warning(
|
179
|
+
f"Duplicate registration of function '{truncated_name}'. A function named '{truncated_name}' has already been registered with DBOS. All functions registered with DBOS must have unique names."
|
180
|
+
)
|
175
181
|
self.function_type_map[name] = functype
|
176
182
|
self.workflow_info_map[name] = wrapped_func
|
177
183
|
|
@@ -1257,6 +1257,63 @@ def test_double_decoration(dbos: DBOS) -> None:
|
|
1257
1257
|
my_function()
|
1258
1258
|
|
1259
1259
|
|
1260
|
+
def test_duplicate_registration(
|
1261
|
+
dbos: DBOS, caplog: pytest.LogCaptureFixture, config: ConfigFile
|
1262
|
+
) -> None:
|
1263
|
+
original_propagate = logging.getLogger("dbos").propagate
|
1264
|
+
caplog.set_level(logging.WARNING, "dbos")
|
1265
|
+
logging.getLogger("dbos").propagate = True
|
1266
|
+
|
1267
|
+
@DBOS.transaction()
|
1268
|
+
def my_transaction() -> None:
|
1269
|
+
pass
|
1270
|
+
|
1271
|
+
@DBOS.transaction()
|
1272
|
+
def my_transaction() -> None:
|
1273
|
+
pass
|
1274
|
+
|
1275
|
+
assert (
|
1276
|
+
"Duplicate registration of function 'test_duplicate_registration.<locals>.my_transaction'"
|
1277
|
+
in caplog.text
|
1278
|
+
)
|
1279
|
+
|
1280
|
+
@DBOS.step()
|
1281
|
+
def my_step() -> None:
|
1282
|
+
pass
|
1283
|
+
|
1284
|
+
@DBOS.step()
|
1285
|
+
def my_step() -> None:
|
1286
|
+
pass
|
1287
|
+
|
1288
|
+
assert (
|
1289
|
+
"Duplicate registration of function 'test_duplicate_registration.<locals>.my_step'"
|
1290
|
+
in caplog.text
|
1291
|
+
)
|
1292
|
+
|
1293
|
+
@DBOS.workflow()
|
1294
|
+
def my_workflow() -> None:
|
1295
|
+
my_step()
|
1296
|
+
my_transaction()
|
1297
|
+
|
1298
|
+
@DBOS.workflow()
|
1299
|
+
def my_workflow() -> None:
|
1300
|
+
my_step()
|
1301
|
+
my_transaction()
|
1302
|
+
|
1303
|
+
assert (
|
1304
|
+
"Duplicate registration of function 'test_duplicate_registration.<locals>.my_workflow'"
|
1305
|
+
in caplog.text
|
1306
|
+
)
|
1307
|
+
|
1308
|
+
DBOS.destroy()
|
1309
|
+
DBOS(config=config)
|
1310
|
+
DBOS.launch()
|
1311
|
+
assert "Duplicate registration of function 'temp_send_workflow'" not in caplog.text
|
1312
|
+
|
1313
|
+
# Reset logging
|
1314
|
+
logging.getLogger("dbos").propagate = original_propagate
|
1315
|
+
|
1316
|
+
|
1260
1317
|
def test_app_version(config: ConfigFile) -> None:
|
1261
1318
|
def is_hex(s: str) -> bool:
|
1262
1319
|
return all(c in "0123456789abcdefABCDEF" for c in s)
|
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
|
{dbos-0.26.0a6 → dbos-0.26.0a7}/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
|