Skip to content

Commit bc2ae06

Browse files
committed
Fix LEGACY_REPO_DIR_DISABLED feature flag
RunSpec.repo_dir = None is valid if there are no repos in the configuration
1 parent c9caba5 commit bc2ae06

File tree

1 file changed

+6
-1
lines changed
  • src/dstack/_internal/server/services/runs

1 file changed

+6
-1
lines changed

src/dstack/_internal/server/services/runs/spec.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,12 @@ def validate_run_spec_and_set_defaults(
114114
raise ServerClientError("ssh_key_pub must be set if the user has no ssh_public_key")
115115
if run_spec.configuration.working_dir is None and legacy_repo_dir:
116116
run_spec.configuration.working_dir = LEGACY_REPO_DIR
117-
if run_spec.repo_dir is None and FeatureFlags.LEGACY_REPO_DIR_DISABLED and not legacy_repo_dir:
117+
if (
118+
run_spec.configuration.repos
119+
and run_spec.repo_dir is None
120+
and FeatureFlags.LEGACY_REPO_DIR_DISABLED
121+
and not legacy_repo_dir
122+
):
118123
raise ServerClientError("Repo path is not set")
119124

120125

0 commit comments

Comments
 (0)