Skip to content

Commit e89d18d

Browse files
authored
SG-40476 Restore linux2 for Advanced Project Setup wizard (#1057)
* Add retro-compat for tk-framework-adminui * Add retro-compat with tk-nuke
1 parent 4f1b31f commit e89d18d

File tree

3 files changed

+19
-3
lines changed

3 files changed

+19
-3
lines changed

python/tank/commands/setup_project_wizard.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -347,6 +347,8 @@ def preview_project_paths(self, project_disk_name):
347347
return_data[s]["linux"] = self._params.preview_project_path(
348348
s, project_disk_name, "linux"
349349
)
350+
# Compat with tk-framework-adminui prior to TODO
351+
return_data[s]["linux2"] = return_data[s]["linux"]
350352

351353
return return_data
352354

@@ -502,6 +504,9 @@ def get_default_configuration_location(self):
502504
old_project_disk_name_win, new_proj_disk_name_win
503505
)
504506

507+
# Compat with tk-framework-adminui prior to TODO
508+
suggested_defaults["linux2"] = suggested_defaults["linux"]
509+
505510
return suggested_defaults
506511

507512
def validate_configuration_location(self, linux_path, windows_path, macosx_path):

python/tank/template.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -624,6 +624,10 @@ def _apply_fields(
624624

625625
platform_root_path = self._per_platform_roots.get(platform)
626626

627+
if platform == "linux2" and platform not in self._per_platform_roots:
628+
# Compat with tk-nuke prior to TODO
629+
platform = "linux"
630+
627631
if platform_root_path is None:
628632
# either the platform is undefined or unknown
629633
raise TankError(

tests/commands_tests/test_project_wizard.py

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,12 +103,18 @@ def test_preview_project_paths(self):
103103
"""
104104
Ensure all project paths get returned properly.
105105
"""
106+
107+
expected_paths = self._storage_locations.join(
108+
self.short_test_name
109+
).as_system_dict()
110+
111+
# TODO remove ....
112+
expected_paths["linux2"] = expected_paths["linux"]
113+
106114
self.assertEqual(
107115
self._wizard.preview_project_paths(self.short_test_name),
108116
{
109-
"primary": self._storage_locations.join(
110-
self.short_test_name
111-
).as_system_dict()
117+
"primary": expected_paths,
112118
},
113119
)
114120

@@ -157,6 +163,7 @@ def test_default_configuration_location_with_existing_pipeline_configuration(sel
157163
{
158164
"darwin": "/Volumes/configs/{0}".format(self.short_test_name),
159165
"linux": "/mnt/configs/{0}".format(self.short_test_name),
166+
"linux2": "/mnt/configs/{0}".format(self.short_test_name), # TODO remove that when drop retro-compat with TODO
160167
"win32": "Z:\\configs\\{0}".format(self.short_test_name),
161168
},
162169
)

0 commit comments

Comments
 (0)