dbos 0.11.0a1__tar.gz → 0.11.0a2__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.11.0a1 → dbos-0.11.0a2}/PKG-INFO +1 -1
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/system_database.py +7 -2
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/migrations/env.py.dbos +8 -1
- {dbos-0.11.0a1 → dbos-0.11.0a2}/pyproject.toml +1 -1
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_schema_migration.py +7 -1
- {dbos-0.11.0a1 → dbos-0.11.0a2}/LICENSE +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/README.md +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/__init__.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/admin_sever.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/application_database.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/cli.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/context.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/core.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/dbos-config.schema.json +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/dbos.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/dbos_config.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/decorators.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/error.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/fastapi.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/flask.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/kafka.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/kafka_message.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/logger.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/migrations/env.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/migrations/script.py.mako +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/migrations/versions/50f3227f0b4b_fix_job_queue.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/migrations/versions/5c361fc04708_added_system_tables.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/migrations/versions/a3b18ad34abe_added_triggers.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/migrations/versions/d76646551a6b_job_queue_limiter.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/migrations/versions/d76646551a6c_workflow_queue.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/migrations/versions/eab0cc1d9a14_job_queue.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/py.typed +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/queue.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/recovery.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/registrations.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/request.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/roles.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/scheduler/croniter.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/scheduler/scheduler.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/schemas/__init__.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/schemas/application_database.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/schemas/system_database.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/README.md +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/__package/__init__.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/__package/main.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/__package/schema.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/alembic.ini +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/dbos-config.yaml.dbos +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/migrations/script.py.mako +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/migrations/versions/2024_07_31_180642_init.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/start_postgres_docker.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/tracer.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/utils.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/__init__.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/atexit_no_ctor.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/atexit_no_launch.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/classdefs.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/conftest.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/more_classdefs.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/scheduler/test_croniter.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/scheduler/test_scheduler.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_admin_server.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_classdecorators.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_concurrency.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_config.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_dbos.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_failures.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_fastapi.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_fastapi_roles.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_flask.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_kafka.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_package.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_queue.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/tests/test_singleton.py +0 -0
- {dbos-0.11.0a1 → dbos-0.11.0a2}/version/__init__.py +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import datetime
|
|
2
2
|
import os
|
|
3
|
+
import re
|
|
3
4
|
import threading
|
|
4
5
|
import time
|
|
5
6
|
from enum import Enum
|
|
@@ -203,9 +204,13 @@ class SystemDatabase:
|
|
|
203
204
|
)
|
|
204
205
|
alembic_cfg = Config()
|
|
205
206
|
alembic_cfg.set_main_option("script_location", migration_dir)
|
|
206
|
-
|
|
207
|
-
|
|
207
|
+
# Alembic requires the % in URL-escaped parameters to itself be escaped to %%.
|
|
208
|
+
escaped_conn_string = re.sub(
|
|
209
|
+
r"%(?=[0-9A-Fa-f]{2})",
|
|
210
|
+
"%%",
|
|
211
|
+
self.engine.url.render_as_string(hide_password=False),
|
|
208
212
|
)
|
|
213
|
+
alembic_cfg.set_main_option("sqlalchemy.url", escaped_conn_string)
|
|
209
214
|
command.upgrade(alembic_cfg, "head")
|
|
210
215
|
|
|
211
216
|
self.notification_conn: Optional[psycopg.connection.Connection] = None
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import re
|
|
1
2
|
from logging.config import fileConfig
|
|
2
3
|
|
|
3
4
|
from alembic import context
|
|
@@ -15,7 +16,13 @@ if config.config_file_name is not None:
|
|
|
15
16
|
fileConfig(config.config_file_name)
|
|
16
17
|
|
|
17
18
|
# programmatically set the sqlalchemy.url field from DBOS Config
|
|
18
|
-
|
|
19
|
+
# Alembic requires the % in URL-escaped parameters to itself be escaped to %%.
|
|
20
|
+
escaped_conn_string = re.sub(
|
|
21
|
+
r"%(?=[0-9A-Fa-f]{2})",
|
|
22
|
+
"%%",
|
|
23
|
+
get_dbos_database_url(),
|
|
24
|
+
)
|
|
25
|
+
config.set_main_option("sqlalchemy.url", escaped_conn_string)
|
|
19
26
|
|
|
20
27
|
# add your model's MetaData object here
|
|
21
28
|
# for 'autogenerate' support
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import os
|
|
2
|
+
import re
|
|
2
3
|
|
|
3
4
|
import pytest
|
|
4
5
|
import sqlalchemy as sa
|
|
@@ -94,5 +95,10 @@ def rollback_system_db(sysdb_url: str) -> None:
|
|
|
94
95
|
)
|
|
95
96
|
alembic_cfg = Config()
|
|
96
97
|
alembic_cfg.set_main_option("script_location", migration_dir)
|
|
97
|
-
|
|
98
|
+
escaped_conn_string = re.sub(
|
|
99
|
+
r"%(?=[0-9A-Fa-f]{2})",
|
|
100
|
+
"%%",
|
|
101
|
+
sysdb_url,
|
|
102
|
+
)
|
|
103
|
+
alembic_cfg.set_main_option("sqlalchemy.url", escaped_conn_string)
|
|
98
104
|
command.downgrade(alembic_cfg, "base") # Rollback all migrations
|
|
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.11.0a1 → dbos-0.11.0a2}/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
|
{dbos-0.11.0a1 → dbos-0.11.0a2}/dbos/templates/hello/migrations/versions/2024_07_31_180642_init.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
|