Failures when running `taskgraph` generations in parallel
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 38/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 停滞
- 技術スタック
- python
- 領域
- build-system, ci-cd
調査の方向性
Start with taskcluster/ci/test/kind.yml and run taskgraph full -p taskcluster/test/params in parallel to compare it with sequential runs. Trace the KeyError: 'env' through taskgraph/transforms/job/common.py and the related toolchain entry points named in the log. Done means parallel generations complete without the failure and the workaround is no longer needed.
索引モデルが issue の本文から書いたものです。
説明
The VPN repo has a task that ran Taskgraph generations in parallel (via taskgraph full -p taskcluster/test/params). For some reason it has failures when running in parallel, that can't be reproduced when running one at a time (I verified this via interactive task). I also was unable to reproduce the failures when running in parallel on my dev machine.
For now, I've worked around the problem by adjusting the task to run each generation one at a time in a for loop.
Here is a snippet from a failing log:
[task 2023-05-31T20:44:24.167Z] Dumping result with parameters from pull-request-untrusted:
[task 2023-05-31T20:44:24.167Z] See '/builds/worker/.cache/taskgraph/log/vcs' for logs
[task 2023-05-31T20:44:24.167Z] concurrent.futures.process._RemoteTraceback:
[task 2023-05-31T20:44:24.167Z] """
[task 2023-05-31T20:44:24.167Z] Traceback (most recent call last):
[task 2023-05-31T20:44:24.167Z] File "/usr/lib/python3.10/concurrent/futures/process.py", line 246, in _process_worker
[task 2023-05-31T20:44:24.167Z] r = call_item.fn(*call_item.args, **call_item.kwargs)
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/main.py", line 146, in format_taskgraph
[task 2023-05-31T20:44:24.167Z] tg = getattr(tgg, options["graph_attr"])
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/generator.py", line 171, in full_task_graph
[task 2023-05-31T20:44:24.167Z] return self._run_until("full_task_graph")
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/generator.py", line 423, in _run_until
[task 2023-05-31T20:44:24.167Z] k, v = next(self._run)
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/generator.py", line 311, in _run
[task 2023-05-31T20:44:24.167Z] new_tasks = kind.load_tasks(
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/generator.py", line 77, in load_tasks
[task 2023-05-31T20:44:24.167Z] tasks = [
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/generator.py", line 77, in <listcomp>
[task 2023-05-31T20:44:24.167Z] tasks = [
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 1317, in check_run_task_caches
[task 2023-05-31T20:44:24.167Z] for task in tasks:
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 1246, in check_task_dependencies
[task 2023-05-31T20:44:24.167Z] for task in tasks:
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 1232, in check_task_identifiers
[task 2023-05-31T20:44:24.167Z] for task in tasks:
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 1213, in chain_of_trust
[task 2023-05-31T20:44:24.167Z] for task in tasks:
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 1206, in add_github_checks
[task 2023-05-31T20:44:24.167Z] for task in tasks:
[task 2023-05-31T20:44:24.167Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 1040, in build_task
[task 2023-05-31T20:44:24.168Z] for task in tasks:
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 1008, in add_index_routes
[task 2023-05-31T20:44:24.168Z] for task in tasks:
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 936, in process_treeherder_metadata
[task 2023-05-31T20:44:24.168Z] for task in tasks:
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 898, in validate
[task 2023-05-31T20:44:24.168Z] for task in tasks:
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 886, in task_name_from_label
[task 2023-05-31T20:44:24.168Z] for task in tasks:
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 842, in set_defaults
[task 2023-05-31T20:44:24.168Z] for task in tasks:
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/task.py", line 821, in set_implementation
[task 2023-05-31T20:44:24.168Z] for task in tasks:
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/cached_tasks.py", line 64, in cache_task
[task 2023-05-31T20:44:24.168Z] for task in order_tasks(config, tasks):
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/cached_tasks.py", line 22, in order_tasks
[task 2023-05-31T20:44:24.168Z] pending = deque(tasks)
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/job/__init__.py", line 365, in make_task_description
[task 2023-05-31T20:44:24.168Z] configure_taskdesc_for_run(
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/job/__init__.py", line 439, in configure_taskdesc_for_run
[task 2023-05-31T20:44:24.168Z] func(config, job, taskdesc)
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/job/toolchain.py", line 165, in docker_worker_toolchain
[task 2023-05-31T20:44:24.168Z] common_toolchain(config, job, taskdesc, is_docker=True)
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/job/toolchain.py", line 102, in common_toolchain
[task 2023-05-31T20:44:24.168Z] docker_worker_add_artifacts(config, job, taskdesc)
[task 2023-05-31T20:44:24.168Z] File "/builds/worker/.local/lib/python3.10/site-packages/taskgraph/transforms/job/common.py", line 101, in docker_worker_add_artifacts
[task 2023-05-31T20:44:24.168Z] taskdesc["worker"]["env"]["UPLOAD_DIR"] = path
[task 2023-05-31T20:44:24.168Z] KeyError: 'env'
[task 2023-05-31T20:44:24.168Z] """
[task 2023-05-31T20:44:24.168Z]
[task 2023-05-31T20:44:24.168Z] The above exception was the direct cause of the following exception:
[task 2023-05-31T20:44:24.168Z]
[task 2023-05-31T20:44:24.168Z] KeyError: 'env'
- 主要言語
- Python
- スター
- 26
- フォーク
- 55
- 平均マージ
- 2日 6分
- マージ済み PR(30日)
- 15
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
taskcluster/taskgraph のほかの issue
-
Dependency Dashboard オープン
難易度 5/5 1週間以上 初心者へのやさしさ 20/100
taskcluster/taskgraph#952 ·
-
難易度 4/5 3〜5日 初心者へのやさしさ 35/100
taskcluster/taskgraph#915 ·
-
feature
難易度 3/5 1〜2日 初心者へのやさしさ 35/100
taskcluster/taskgraph#911 · コメント 1 件 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
taskcluster/taskgraph#882 ·
-
難易度 5/5 1週間以上 初心者へのやさしさ 35/100
taskcluster/taskgraph#865 · コメント 1 件 ·
taskcluster/taskgraph の issue をすべて見る
似ている issue
-
enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
canonical/paas-charm#368 · コメント 1 件 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
tech debt
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
StevenBlack/hosts#3256 ·
-
難易度 1/5 1時間未満 初心者へのやさしさ 90/100
qualcomm/qai-appbuilder#275 ·