dbos 0.22.0a4__tar.gz → 0.22.0a5__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-0.22.0a4 → dbos-0.22.0a5}/PKG-INFO +1 -1
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_db_wizard.py +9 -1
- {dbos-0.22.0a4 → dbos-0.22.0a5}/pyproject.toml +1 -1
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_config.py +23 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/LICENSE +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/README.md +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/__init__.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_admin_server.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_app_db.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_classproperty.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_cloudutils/authentication.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_cloudutils/cloudutils.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_cloudutils/databases.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_context.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_core.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_croniter.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_dbos.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_dbos_config.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_error.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_fastapi.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_flask.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_kafka.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_kafka_message.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_logger.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_migrations/env.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_migrations/script.py.mako +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_migrations/versions/04ca4f231047_workflow_queues_executor_id.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_migrations/versions/50f3227f0b4b_fix_job_queue.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_migrations/versions/5c361fc04708_added_system_tables.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_migrations/versions/a3b18ad34abe_added_triggers.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_migrations/versions/d76646551a6b_job_queue_limiter.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_migrations/versions/d76646551a6c_workflow_queue.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_migrations/versions/eab0cc1d9a14_job_queue.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_outcome.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_queue.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_recovery.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_registrations.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_request.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_roles.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_scheduler.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_schemas/__init__.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_schemas/application_database.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_schemas/system_database.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_serialization.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_sys_db.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/README.md +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/__package/__init__.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/__package/main.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/__package/schema.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/alembic.ini +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/dbos-config.yaml.dbos +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/migrations/env.py.dbos +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/migrations/script.py.mako +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/migrations/versions/2024_07_31_180642_init.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_templates/dbos-db-starter/start_postgres_docker.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_tracer.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/_workflow_commands.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/cli/_github_init.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/cli/_template_init.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/cli/cli.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/dbos-config.schema.json +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/dbos/py.typed +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/__init__.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/atexit_no_ctor.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/atexit_no_launch.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/classdefs.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/conftest.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/more_classdefs.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/queuedworkflow.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_admin_server.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_async.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_classdecorators.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_concurrency.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_croniter.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_dbos.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_failures.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_fastapi.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_fastapi_roles.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_flask.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_kafka.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_outcome.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_package.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_queue.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_scheduler.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_schema_migration.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_singleton.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_spans.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_sqlalchemy.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/tests/test_workflow_cmds.py +0 -0
- {dbos-0.22.0a4 → dbos-0.22.0a5}/version/__init__.py +0 -0
|
@@ -45,8 +45,16 @@ def db_wizard(config: "ConfigFile", config_file_path: str) -> "ConfigFile":
|
|
|
45
45
|
f"Could not connect to Postgres: password authentication failed: {db_connection_error}"
|
|
46
46
|
)
|
|
47
47
|
db_config = config["database"]
|
|
48
|
+
|
|
49
|
+
# Read the config file and check if the database hostname/port/username are set. If so, skip the wizard.
|
|
50
|
+
with open(config_file_path, "r") as file:
|
|
51
|
+
content = file.read()
|
|
52
|
+
local_config = yaml.safe_load(content)
|
|
48
53
|
if (
|
|
49
|
-
|
|
54
|
+
local_config["database"]["hostname"]
|
|
55
|
+
or local_config["database"]["port"]
|
|
56
|
+
or local_config["database"]["username"]
|
|
57
|
+
or db_config["hostname"] != "localhost"
|
|
50
58
|
or db_config["port"] != 5432
|
|
51
59
|
or db_config["username"] != "postgres"
|
|
52
60
|
):
|
|
@@ -399,3 +399,26 @@ def test_db_connect_failed(mocker):
|
|
|
399
399
|
load_config(mock_filename)
|
|
400
400
|
|
|
401
401
|
assert "Could not connect to the database" in str(exc_info.value)
|
|
402
|
+
|
|
403
|
+
|
|
404
|
+
def test_no_db_wizard(mocker):
|
|
405
|
+
mock_config = """
|
|
406
|
+
name: "some-app"
|
|
407
|
+
language: "python"
|
|
408
|
+
runtimeConfig:
|
|
409
|
+
start:
|
|
410
|
+
- "python3 main.py"
|
|
411
|
+
database:
|
|
412
|
+
hostname: 'localhost'
|
|
413
|
+
port: 5432
|
|
414
|
+
username: 'postgres'
|
|
415
|
+
password: 'somerandom'
|
|
416
|
+
|
|
417
|
+
"""
|
|
418
|
+
mocker.patch(
|
|
419
|
+
"builtins.open", side_effect=generate_mock_open(mock_filename, mock_config)
|
|
420
|
+
)
|
|
421
|
+
|
|
422
|
+
with pytest.raises(DBOSInitializationError) as exc_info:
|
|
423
|
+
load_config(mock_filename)
|
|
424
|
+
assert "Could not connect" in str(exc_info.value)
|
|
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.22.0a4 → dbos-0.22.0a5}/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
|