Skip to content

Commit fc2da2d

Browse files
authored
Fork Doesn't Set Version By Default (#512)
This better supports the common case of using fork interactively to test code changes. A version can still be set if desired.
1 parent 4fd58bb commit fc2da2d

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

dbos/_sys_db.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -700,11 +700,7 @@ def fork_workflow(
700700
name=status["name"],
701701
class_name=status["class_name"],
702702
config_name=status["config_name"],
703-
application_version=(
704-
application_version
705-
if application_version is not None
706-
else status["app_version"]
707-
),
703+
application_version=application_version,
708704
application_id=status["app_id"],
709705
authenticated_user=status["authenticated_user"],
710706
authenticated_roles=status["authenticated_roles"],

tests/test_workflow_management.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,8 @@ def stepFive(x: int) -> int:
228228
with SetWorkflowID(fork_id):
229229
forked_handle = DBOS.fork_workflow(wfid, 3)
230230
assert forked_handle.workflow_id == fork_id
231-
assert forked_handle.get_status().app_version == DBOS.application_version
231+
app_version = forked_handle.get_status().app_version
232+
assert app_version is None or app_version == DBOS.application_version
232233
assert forked_handle.get_status().forked_from == wfid
233234
assert forked_handle.get_result() == output
234235

0 commit comments

Comments
 (0)