File tree Expand file tree Collapse file tree
cli/services/configurators Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ def apply_configuration(
9797 # is not set (emulate pre-0.19.27 JobConfigutor logic), otherwise fall back to
9898 # `/workflow`.
9999 if isinstance (conf , DevEnvironmentConfiguration ) or conf .commands :
100- conf .working_dir = LEGACY_REPO_DIR
100+ # relative path for compatibility with pre-0.19.27 servers
101+ conf .working_dir = "."
101102 warn (
102103 "[code]working_dir[/code] is not set."
103104 f" Using legacy working directory [code]{ LEGACY_REPO_DIR } [/code]\n \n "
@@ -117,6 +118,12 @@ def apply_configuration(
117118 f"To keep using legacy working directory, set"
118119 f" [code]working_dir[/code] to [code]{ legacy_working_dir } [/code]\n "
119120 )
121+ else :
122+ # relative path for compatibility with pre-0.19.27 servers
123+ try :
124+ conf .working_dir = str (PurePosixPath (working_dir ).relative_to (LEGACY_REPO_DIR ))
125+ except ValueError :
126+ pass
120127
121128 if conf .repos and conf .repos [0 ].path is None :
122129 warn (
Original file line number Diff line number Diff line change @@ -104,6 +104,8 @@ def get_run_spec_excludes(run_spec: RunSpec) -> IncludeExcludeDictType:
104104
105105 if run_spec .repo_dir in [None , LEGACY_REPO_DIR ]:
106106 spec_excludes ["repo_dir" ] = True
107+ elif run_spec .repo_dir == "." and configuration .working_dir in [None , LEGACY_REPO_DIR , "." ]:
108+ spec_excludes ["repo_dir" ] = True
107109
108110 if configuration .fleets is None :
109111 configuration_excludes ["fleets" ] = True
You can’t perform that action at this time.
0 commit comments