From c12e8553fcd7eba745ca3c84e6dc1d03900be8d4 Mon Sep 17 00:00:00 2001 From: Jacob Truman Date: Fri, 7 Mar 2025 13:48:55 -0700 Subject: [PATCH 1/2] XENG-8914 include last element in run_config_file in network name, if it exists --- buildrunner/__init__.py | 1 + buildrunner/steprunner/__init__.py | 2 ++ 2 files changed, 3 insertions(+) diff --git a/buildrunner/__init__.py b/buildrunner/__init__.py index cecc714..cebd1d3 100644 --- a/buildrunner/__init__.py +++ b/buildrunner/__init__.py @@ -89,6 +89,7 @@ def __init__( ): # pylint: disable=too-many-statements,too-many-branches,too-many-locals,too-many-arguments self.build_dir = build_dir self.build_results_dir = build_results_dir + self.run_config_file = run_config_file self.build_time = build_time self.build_number = build_number self.push = push diff --git a/buildrunner/steprunner/__init__.py b/buildrunner/steprunner/__init__.py index 8674aa2..68f5ea5 100644 --- a/buildrunner/steprunner/__init__.py +++ b/buildrunner/steprunner/__init__.py @@ -82,6 +82,8 @@ def __init__( self.container_labels = container_labels # network name is used to identify the network that the build step is running in self.network_name = f"{build_runner.build_id}-{step_name}" + if build_runner.run_config_file: + self.network_name += f"-{os.path.basename(os.path.dirname(os.path.abspath(build_runner.run_config_file)))}" def run(self): """ From e686981312e26e9b0634fe081965f70aafac325a Mon Sep 17 00:00:00 2001 From: Jacob Truman Date: Fri, 7 Mar 2025 14:17:30 -0700 Subject: [PATCH 2/2] XENG-8914 Use unique step id instead of cobbled together network name --- buildrunner/__init__.py | 1 - buildrunner/steprunner/__init__.py | 4 +--- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/buildrunner/__init__.py b/buildrunner/__init__.py index cebd1d3..cecc714 100644 --- a/buildrunner/__init__.py +++ b/buildrunner/__init__.py @@ -89,7 +89,6 @@ def __init__( ): # pylint: disable=too-many-statements,too-many-branches,too-many-locals,too-many-arguments self.build_dir = build_dir self.build_results_dir = build_results_dir - self.run_config_file = run_config_file self.build_time = build_time self.build_number = build_number self.push = push diff --git a/buildrunner/steprunner/__init__.py b/buildrunner/steprunner/__init__.py index 68f5ea5..236f30d 100644 --- a/buildrunner/steprunner/__init__.py +++ b/buildrunner/steprunner/__init__.py @@ -81,9 +81,7 @@ def __init__( self.multi_platform = multi_platform self.container_labels = container_labels # network name is used to identify the network that the build step is running in - self.network_name = f"{build_runner.build_id}-{step_name}" - if build_runner.run_config_file: - self.network_name += f"-{os.path.basename(os.path.dirname(os.path.abspath(build_runner.run_config_file)))}" + self.network_name = f"{self.id}-network" def run(self): """