dbos 0.26.0a22__py3-none-any.whl → 0.26.0a24__py3-none-any.whl

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/_dbos.py CHANGED
@@ -33,11 +33,7 @@ from opentelemetry.trace import Span
33
33
  from dbos._conductor.conductor import ConductorWebsocket
34
34
  from dbos._sys_db import WorkflowStatus
35
35
  from dbos._utils import INTERNAL_QUEUE_NAME, GlobalParams
36
- from dbos._workflow_commands import (
37
- fork_workflow,
38
- list_queued_workflows,
39
- list_workflows,
40
- )
36
+ from dbos._workflow_commands import fork_workflow, list_queued_workflows, list_workflows
41
37
 
42
38
  from ._classproperty import classproperty
43
39
  from ._core import (
@@ -351,6 +347,9 @@ class DBOS:
351
347
  # If no config is provided, load it from dbos-config.yaml
352
348
  unvalidated_config = load_config(run_process_config=False)
353
349
  elif is_dbos_configfile(config):
350
+ dbos_logger.warning(
351
+ "ConfigFile config strutcture detected. This will be deprecated in favor of DBOSConfig in an upcoming release."
352
+ )
354
353
  unvalidated_config = cast(ConfigFile, config)
355
354
  if os.environ.get("DBOS__CLOUD") == "true":
356
355
  unvalidated_config = overwrite_config(unvalidated_config)
dbos/_dbos_config.py CHANGED
@@ -1,3 +1,4 @@
1
+ import inspect
1
2
  import json
2
3
  import os
3
4
  import re
@@ -58,19 +59,28 @@ class RuntimeConfig(TypedDict, total=False):
58
59
 
59
60
 
60
61
  class DatabaseConfig(TypedDict, total=False):
61
- hostname: str
62
- port: int
63
- username: str
64
- password: str
65
- connectionTimeoutMillis: Optional[int]
66
- app_db_name: str
62
+ """
63
+ Internal data structure containing the DBOS database configuration.
64
+ Attributes:
65
+ app_db_pool_size (int): Application database pool size
66
+ sys_db_name (str): System database name
67
+ sys_db_pool_size (int): System database pool size
68
+ migrate (List[str]): Migration commands to run on startup
69
+ """
70
+
71
+ hostname: str # Will be removed in a future version
72
+ port: int # Will be removed in a future version
73
+ username: str # Will be removed in a future version
74
+ password: str # Will be removed in a future version
75
+ connectionTimeoutMillis: Optional[int] # Will be removed in a future version
76
+ app_db_name: str # Will be removed in a future version
67
77
  app_db_pool_size: Optional[int]
68
78
  sys_db_name: Optional[str]
69
79
  sys_db_pool_size: Optional[int]
70
- ssl: Optional[bool]
71
- ssl_ca: Optional[str]
80
+ ssl: Optional[bool] # Will be removed in a future version
81
+ ssl_ca: Optional[str] # Will be removed in a future version
72
82
  migrate: Optional[List[str]]
73
- rollback: Optional[List[str]]
83
+ rollback: Optional[List[str]] # Will be removed in a future version
74
84
 
75
85
 
76
86
  def parse_database_url_to_dbconfig(database_url: str) -> DatabaseConfig:
@@ -117,7 +127,7 @@ class ConfigFile(TypedDict, total=False):
117
127
  Attributes:
118
128
  name (str): Application name
119
129
  runtimeConfig (RuntimeConfig): Configuration for request serving
120
- database (DatabaseConfig): Configuration for the application and system databases
130
+ database (DatabaseConfig): Configure pool sizes, migrate commands
121
131
  database_url (str): Database connection string
122
132
  telemetry (TelemetryConfig): Configuration for tracing / logging
123
133
  env (Dict[str,str]): Environment varialbes
@@ -301,6 +311,17 @@ def load_config(
301
311
 
302
312
  """
303
313
 
314
+ # Get the current call stack
315
+ frame_records = inspect.stack()
316
+ called_from_cli = False
317
+ for frame_record in frame_records:
318
+ if "dbos/cli/cli.py" in frame_record.filename:
319
+ called_from_cli = True
320
+ if not called_from_cli and not silent:
321
+ dbos_logger.warning(
322
+ "This function is deprecated and will be removed in a future version. Use `DBOS.config` instead."
323
+ )
324
+
304
325
  with open(config_file_path, "r") as file:
305
326
  content = file.read()
306
327
  substituted_content = _substitute_env_vars(content, silent=silent)
@@ -24,43 +24,51 @@
24
24
  "additionalProperties": false,
25
25
  "properties": {
26
26
  "hostname": {
27
- "type": "string",
28
- "description": "The hostname or IP address of the application database"
27
+ "type": ["string", "null"],
28
+ "description": "The hostname or IP address of the application database. DEPRECATED: Use database_url instead",
29
+ "deprecated": true
29
30
  },
30
31
  "port": {
31
- "type": "number",
32
- "description": "The port number of the application database"
32
+ "type": ["number", "null"],
33
+ "description": "The port number of the application database. DEPRECATED: Use database_url instead",
34
+ "deprecated": true
33
35
  },
34
36
  "username": {
35
- "type": "string",
36
- "description": "The username to use when connecting to the application database",
37
+ "type": ["string", "null"],
38
+ "description": "The username to use when connecting to the application database. DEPRECATED: Use database_url instead",
37
39
  "not": {
38
40
  "enum": ["dbos"]
39
- }
41
+ },
42
+ "deprecated": true
40
43
  },
41
44
  "password": {
42
45
  "type": ["string", "null"],
43
- "description": "The password to use when connecting to the application database. Developers are strongly encouraged to use environment variable substitution (${VAR_NAME}) or Docker secrets (${DOCKER_SECRET:SECRET_NAME}) to avoid storing secrets in source."
46
+ "description": "The password to use when connecting to the application database. Developers are strongly encouraged to use environment variable substitution (${VAR_NAME}) or Docker secrets (${DOCKER_SECRET:SECRET_NAME}) to avoid storing secrets in source. DEPRECATED: Use database_url instead",
47
+ "deprecated": true
44
48
  },
45
49
  "connectionTimeoutMillis": {
46
- "type": "number",
47
- "description": "The number of milliseconds the system waits before timing out when connecting to the application database"
50
+ "type": ["number", "null"],
51
+ "description": "The number of milliseconds the system waits before timing out when connecting to the application database. DEPRECATED: Use database_url instead",
52
+ "deprecated": true
48
53
  },
49
54
  "app_db_name": {
50
- "type": "string",
51
- "description": "The name of the application database"
55
+ "type": ["string", "null"],
56
+ "description": "The name of the application database. DEPRECATED: Use database_url instead",
57
+ "deprecated": true
52
58
  },
53
59
  "sys_db_name": {
54
60
  "type": "string",
55
61
  "description": "The name of the system database"
56
62
  },
57
63
  "ssl": {
58
- "type": "boolean",
59
- "description": "Use SSL/TLS to securely connect to the database (default: true)"
64
+ "type": ["boolean", "null"],
65
+ "description": "Use SSL/TLS to securely connect to the database (default: true). DEPRECATED: Use database_url instead",
66
+ "deprecated": true
60
67
  },
61
68
  "ssl_ca": {
62
- "type": "string",
63
- "description": "If using SSL/TLS to securely connect to a database, path to an SSL root certificate file"
69
+ "type": ["string", "null"],
70
+ "description": "If using SSL/TLS to securely connect to a database, path to an SSL root certificate file. DEPRECATED: Use database_url instead",
71
+ "deprecated": true
64
72
  },
65
73
  "app_db_client": {
66
74
  "type": "string",
@@ -78,7 +86,8 @@
78
86
  },
79
87
  "rollback": {
80
88
  "type": "array",
81
- "description": "Specify a list of user DB rollback commands to run"
89
+ "description": "Specify a list of user DB rollback commands to run. DEPRECATED",
90
+ "deprecated": true
82
91
  }
83
92
  }
84
93
  },
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: dbos
3
- Version: 0.26.0a22
3
+ Version: 0.26.0a24
4
4
  Summary: Ultra-lightweight durable execution in Python
5
5
  Author-Email: "DBOS, Inc." <contact@dbos.dev>
6
6
  License: MIT
@@ -1,7 +1,7 @@
1
- dbos-0.26.0a22.dist-info/METADATA,sha256=Tc4eDxO8J5OnULO6LrEY6mzhVwYZfmFN_okn3ZnSRLc,5554
2
- dbos-0.26.0a22.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
- dbos-0.26.0a22.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
- dbos-0.26.0a22.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
1
+ dbos-0.26.0a24.dist-info/METADATA,sha256=wCAgHzO-rzittv1AnMKmQijAxHI9UMJ8pLiSIOJ-wZo,5554
2
+ dbos-0.26.0a24.dist-info/WHEEL,sha256=tSfRZzRHthuv7vxpI4aehrdN9scLjk-dCJkPLzkHxGg,90
3
+ dbos-0.26.0a24.dist-info/entry_points.txt,sha256=_QOQ3tVfEjtjBlr1jS4sHqHya9lI2aIEIWkz8dqYp14,58
4
+ dbos-0.26.0a24.dist-info/licenses/LICENSE,sha256=VGZit_a5-kdw9WT6fY5jxAWVwGQzgLFyPWrcVVUhVNU,1067
5
5
  dbos/__init__.py,sha256=VoGS7H9GVtNAnD2S4zseIEioS1dNIJXRovQ4oHlg8og,842
6
6
  dbos/__main__.py,sha256=G7Exn-MhGrVJVDbgNlpzhfh8WMX_72t3_oJaFT9Lmt8,653
7
7
  dbos/_admin_server.py,sha256=RrbABfR1D3p9c_QLrCSrgFuYce6FKi0fjMRIYLjO_Y8,9038
@@ -13,8 +13,8 @@ dbos/_conductor/protocol.py,sha256=zEKIuOQdIaSduNqfZKpo8PSD9_1oNpKIPnBNCu3RUyE,6
13
13
  dbos/_context.py,sha256=aHzJxO7LLAz9w3G2dkZnOcFW_GG-Yaxd02AaoLu4Et8,21861
14
14
  dbos/_core.py,sha256=ylTVSv02h2M5SmDgYEJAZmNiKX35zPq0z-9WA-f4byY,47900
15
15
  dbos/_croniter.py,sha256=XHAyUyibs_59sJQfSNWkP7rqQY6_XrlfuuCxk4jYqek,47559
16
- dbos/_dbos.py,sha256=bbio_FjBfU__Zk1BFegfS16IrPPejFxOKm5rUg5nW1o,47185
17
- dbos/_dbos_config.py,sha256=m05IFjM0jSwZBsnFMF_4qP2JkjVFc0gqyM2tnotXq20,20636
16
+ dbos/_dbos.py,sha256=zE-4CcTQo8ICz-6Ng776IUKdur4qOt3bb810fUAhQc0,47343
17
+ dbos/_dbos_config.py,sha256=IEcCU4DdkUfSvNZGoEeJfSSu1c41hYHOo-0WvWkXY08,21745
18
18
  dbos/_debug.py,sha256=MNlQVZ6TscGCRQeEEL0VE8Uignvr6dPeDDDefS3xgIE,1823
19
19
  dbos/_docker_pg_helper.py,sha256=NmcgqmR5rQA_4igfeqh8ugNT2z3YmoOvuep_MEtxTiY,5854
20
20
  dbos/_error.py,sha256=9ITvFsN_Udpx0xXtYQHXXXb6PjPr3TmMondGmprV-L0,7003
@@ -63,7 +63,7 @@ dbos/_workflow_commands.py,sha256=7wyxTfIyh2IVIqlkaTr8CMBq8yxWP3Hhddyv1YJY8zE,35
63
63
  dbos/cli/_github_init.py,sha256=Y_bDF9gfO2jB1id4FV5h1oIxEJRWyqVjhb7bNEa5nQ0,3224
64
64
  dbos/cli/_template_init.py,sha256=-WW3kbq0W_Tq4WbMqb1UGJG3xvJb3woEY5VspG95Srk,2857
65
65
  dbos/cli/cli.py,sha256=1qCTs__A9LOEfU44XZ6TufwmRwe68ZEwbWEPli3vnVM,17873
66
- dbos/dbos-config.schema.json,sha256=i7jcxXqByKq0Jzv3nAUavONtj03vTwj6vWP4ylmBr8o,5694
66
+ dbos/dbos-config.schema.json,sha256=8KcwJb_sQc4-6tQG2TLmjE_nratfrQa0qVLl9XPsvWE,6367
67
67
  dbos/py.typed,sha256=QfzXT1Ktfk3Rj84akygc7_42z0lRpCq0Ilh8OXI6Zas,44
68
68
  version/__init__.py,sha256=L4sNxecRuqdtSFdpUGX3TtBi9KL3k7YsZVIvv-fv9-A,1678
69
- dbos-0.26.0a22.dist-info/RECORD,,
69
+ dbos-0.26.0a24.dist-info/RECORD,,