Skip to content

Commit dff81de

Browse files
[CI] chore: remove QNN and python DML from release meta-pipeline (#28077)
### Description Remove QNN EP and python DML pipelines from release packaging pipeline requirements. ### Motivation and Context Both are deprecated.
1 parent 58f99ea commit dff81de

2 files changed

Lines changed: 21 additions & 12 deletions

File tree

tools/ci_build/github/azure-pipelines/main-release-pipeline.yml

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -43,16 +43,6 @@ parameters:
4343
type: boolean
4444
default: true
4545

46-
- name: python_dml_packaging
47-
displayName: 'Run Python DML Packaging Pipeline (1625)'
48-
type: boolean
49-
default: true
50-
51-
- name: qnn_nuget_packaging
52-
displayName: 'Run QNN_Nuget_Windows (1234)'
53-
type: boolean
54-
default: true
55-
5646
- name: dml_nuget_packaging
5747
displayName: 'Run DML Nuget Pipeline (1994)'
5848
type: boolean

tools/python/trigger_and_wait_pipelines.py

Lines changed: 21 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,10 @@ class PipelineStatusRecord:
160160
key="webgpu_python_packaging",
161161
),
162162
]
163+
assert len({cfg.id for cfg in PIPELINE_REGISTRY}) == len(PIPELINE_REGISTRY), "Pipeline IDs must be unique"
163164

164165
_PIPELINE_KEY_TO_ID: dict[str, int] = {cfg.key: cfg.id for cfg in PIPELINE_REGISTRY}
166+
assert len(_PIPELINE_KEY_TO_ID) == len(PIPELINE_REGISTRY), "Pipeline keys must be unique"
165167

166168

167169
def get_token() -> str:
@@ -372,6 +374,8 @@ def _parse_enable_flags(raw: list[str]) -> dict[int, bool]:
372374
key = key.strip()
373375
if key not in _PIPELINE_KEY_TO_ID:
374376
logger.warning("##[warning]Unknown pipeline key: %s", key)
377+
# invalid key -> non-empty set -> ensures that we don't enable all pipelines if we don't recognise one.
378+
result[-1] = False
375379
continue
376380
result[_PIPELINE_KEY_TO_ID[key]] = val.strip().lower() == "true"
377381
return result
@@ -385,6 +389,10 @@ def _read_enable_flags_from_env() -> dict[int, bool]:
385389
continue
386390
pipeline_key = key[len(prefix) :].lower()
387391
if pipeline_key not in _PIPELINE_KEY_TO_ID:
392+
# Given that env vars are a swamp for config, just assume it wasn't meant for us.
393+
# Still warn about it, however.
394+
# n.b. this differs in behaviour from cmd-ln parsing, where we mark unrecognised keys.
395+
logger.warning("##[warning]Unknown pipeline key in env-vars, ignoring: %s", key)
388396
continue
389397
result[_PIPELINE_KEY_TO_ID[pipeline_key]] = value.strip().lower() == "true"
390398
return result
@@ -403,12 +411,15 @@ def main() -> int:
403411

404412
configs = list(PIPELINE_REGISTRY)
405413

406-
# fetch the pipeline enable/disable flags
414+
# No explicit pipeline enable/disable -> use everything.
415+
# Specify any pipeline -> opt-in only.
416+
# We can add partial opt-out in the future if we need it.
417+
# Consequence `argv=['--enable-pipeline', 'A=false']` => nothing enabled.
407418
enable_flags = _parse_enable_flags(args.enable_pipeline)
408419
if not enable_flags:
409420
enable_flags = _read_enable_flags_from_env()
410421
if enable_flags:
411-
configs = [cfg for cfg in configs if enable_flags.get(cfg.id, True)]
422+
configs = [cfg for cfg in configs if enable_flags.get(cfg.id, False)]
412423

413424
if args.pre_release_suffix_string:
414425
for cfg in configs:
@@ -445,12 +456,14 @@ def main() -> int:
445456
kusto_client = _create_kusto_client()
446457

447458
triggered: list[TriggeredRun] = []
459+
trigger_failed: list[PipelineConfig] = []
448460
for cfg in configs:
449461
run = trigger_pipeline(cfg, branch, token)
450462
if run:
451463
triggered.append(run)
452464
publish_run_status(run, branch, kusto_client)
453465
else:
466+
trigger_failed.append(cfg)
454467
logger.error("##[error]Failed to trigger '%s'", cfg.name)
455468

456469
if not triggered:
@@ -474,6 +487,12 @@ def main() -> int:
474487
any_failed = any(run.result != BuildResult.SUCCEEDED for run in triggered)
475488

476489
logger.info("=" * 60)
490+
# re-iterate pipelines that failed to trigger so they're not lost at the top of the log
491+
for cfg in trigger_failed:
492+
logger.error(" [%d] %s (project: %s) - FAILED TO TRIGGER", cfg.id, cfg.name, cfg.project)
493+
if cfg.template_parameters:
494+
logger.error(" Template params: %s", cfg.template_parameters)
495+
477496
for run in triggered:
478497
status = "PASS" if run.result == BuildResult.SUCCEEDED else "FAIL"
479498
if run.result == BuildResult.SUCCEEDED:

0 commit comments

Comments
 (0)