A task being pulled back in because of `if-dependencies` doesn't pull its own dependencies back in if they're also `if-dependencies`
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 3-5 giorni
- Idoneità per principianti
- 38/100
- Tipo di issue
- Bug
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Ferma
- Stack tecnologico
- python
- Ambito
- build-system, devops
Direzione di ricerca
Start in src/taskgraph/optimize/base.py, especially remove_tasks and get_subgraph, and reproduce the YAML example from the issue. Trace how if-dependencies pruning orders prune_candidates and pulls tasks back; done means a task restored because of if-dependencies also restores its own if-dependencies dependencies without an optimization error.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
I'm assuming that fixing #710 would also fix this one but this is where it began
Assuming the following
loader: taskgraph.loader.transform:loader
transforms:
- taskgraph.transforms.task
task-defaults:
worker-type: succeed
tasks:
task-a:
label: task-a
optimization:
skip-unless-changed: ["world"]
description: task-a
task-apush-a:
label: task-apush-a
dependencies:
task-a: task-a
if-dependencies:
- task-a
description: task-push-a
task-b:
label: task-b
description: task-b
final:
label: final
dependencies:
task-push-a: task-apush-a
task-b: task-b
if-dependencies:
- task-push-a
- task-b
description: final
2025-06-23 17:49:11,994 - INFO - Generating optimized task graph
2025-06-23 17:49:11,994 - DEBUG - no files found matching a pattern in `skip-unless-changed` for "task-a"
2025-06-23 17:49:11,994 - DEBUG - optimize: final kept because of never
2025-06-23 17:49:11,994 - DEBUG - optimize: task-apush-a kept because of dependent tasks
2025-06-23 17:49:11,994 - DEBUG - optimize: task-b kept because of never
2025-06-23 17:49:11,994 - DEBUG - optimize: task-a removed because of if-dependencies pruning
2025-06-23 17:49:11,994 - INFO - Removed 1 tasks by if-dependencies pruning during optimization.
...
File "/home/eijemoz/code/taskgraph/src/taskgraph/optimize/base.py", line 110, in optimize_task_graph
get_subgraph(
~~~~~~~~~~~~^
target_task_graph,
^^^^^^^^^^^^^^^^^^
...<3 lines>...
decision_task_id,
^^^^^^^^^^^^^^^^^
),
^
File "/home/eijemoz/code/taskgraph/src/taskgraph/optimize/base.py", line 396, in get_subgraph
raise Exception("Optimization error: " + probs)
Exception: Optimization error: task-apush-a depends on task-a as task-a but it has been removed
If you rename task-apush-a to task-push-a then instead you run into #710 and the whole graph gets pulled in. This optimization error only happens when the label of the task getting optimized gets ordered before the other tasks in the prune_candidates set in remove_tasks.
- Lingua principale
- Python
- Stelle
- 26
- Fork
- 55
- Merge medio
- 2g 6m
- PR unite (30g)
- 15
Guida per i contributori
Apri la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di taskcluster/taskgraph
-
Dependency Dashboard Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 20/100
taskcluster/taskgraph#952 ·
-
Difficoltà 4/5 3-5 giorni Idoneità per principianti 35/100
taskcluster/taskgraph#915 ·
-
feature
Difficoltà 3/5 1-2 giorni Idoneità per principianti 35/100
taskcluster/taskgraph#911 · 1 commento ·
-
Difficoltà 3/5 1-2 giorni Idoneità per principianti 45/100
taskcluster/taskgraph#882 ·
-
Further optimize Git clones Aperta
Difficoltà 5/5 Più di una settimana Idoneità per principianti 35/100
taskcluster/taskgraph#865 · 1 commento ·
Tutte le issue di taskcluster/taskgraph
Issue simili
-
bug confirmed issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
open-webui/open-webui#30750 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
-
enhancement
Difficoltà 2/5 1-3 ore Idoneità per principianti 75/100
OpenwaterHealth/openmotion-bloodflow-app#604 · 1 commento ·
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 70/100
-
good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 90/100