Skip to content

Commit c675b4f

Browse files
committed
Revert "src/trigger.py: add --build-configs optional argument"
This reverts commit 81387ab. Build configurations list will not be known up front when external configuration files are enabled in Maestro. Dropping this filter will allow simplifying Trigger Service logic taking into account only parameters that are still relevant. Signed-off-by: Paweł Wieczorek <[email protected]>
1 parent b8035de commit c675b4f

File tree

1 file changed

+5
-14
lines changed

1 file changed

+5
-14
lines changed

src/trigger.py

Lines changed: 5 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -134,27 +134,23 @@ def _run_trigger(self, build_config, force, timeout, trees):
134134
except Exception as ex:
135135
self.traceback(ex)
136136

137-
def _iterate_build_configs(self, force, build_configs_list,
138-
timeout, trees):
137+
def _iterate_build_configs(self, force, timeout, trees):
139138
for name, config in self._build_configs.items():
140-
if not build_configs_list or name in build_configs_list:
141-
self._run_trigger(config, force, timeout, trees)
139+
self._run_trigger(config, force, timeout, trees)
142140

143141
def _setup(self, args):
144142
return {
145143
'poll_period': int(args.poll_period),
146144
'force': args.force,
147-
'build_configs_list': (args.build_configs or '').split(),
148145
'startup_delay': int(args.startup_delay or 0),
149146
'timeout': args.timeout,
150147
'trees': args.trees,
151148
}
152149

153150
def _run(self, ctx):
154-
poll_period, force, build_configs_list, startup_delay, timeout, trees = (
151+
poll_period, force, startup_delay, timeout, trees = (
155152
ctx[key] for key in (
156-
'poll_period', 'force', 'build_configs_list', 'startup_delay',
157-
'timeout', 'trees'
153+
'poll_period', 'force', 'startup_delay', 'timeout', 'trees'
158154
)
159155
)
160156

@@ -163,8 +159,7 @@ def _run(self, ctx):
163159
time.sleep(startup_delay)
164160

165161
while True:
166-
self._iterate_build_configs(force, build_configs_list,
167-
timeout, trees)
162+
self._iterate_build_configs(force, timeout, trees)
168163
if poll_period:
169164
self.log.info(f"Sleeping for {poll_period}s")
170165
time.sleep(poll_period)
@@ -191,10 +186,6 @@ class cmd_run(Command):
191186
'action': 'store_true',
192187
'help': "Always create a new checkout node",
193188
},
194-
{
195-
'name': '--build-configs',
196-
'help': "List of build configurations to monitor",
197-
},
198189
{
199190
'name': '--name',
200191
'help': "Name of pipeline instance",

0 commit comments

Comments
 (0)