Repository navigation
Expand file tree
/
Copy path.taskcluster.yml
More file actions
679 lines (652 loc) · 33 KB
/
Copy path.taskcluster.yml
File metadata and controls
679 lines (652 loc) · 33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
version: 1
reporting: checks-v1
policy:
pullRequests: public_restricted
tasks:
$let:
user: ${event.sender.login}
head_branch:
$if: 'tasks_for[:19] == "github-pull-request"'
then: ${event.pull_request.head.ref}
else:
$if: 'tasks_for == "github-push"'
then: ${event.ref}
else: ${event.release.target_commitish}
head_rev:
$if: 'tasks_for[:19] == "github-pull-request"'
then: ${event.pull_request.head.sha}
else:
$if: 'tasks_for == "github-push"'
then: ${event.after}
else: ${event.release.tag_name}
repository:
$if: 'tasks_for[:19] == "github-pull-request"'
then: ${event.pull_request.head.repo.html_url}
else: ${event.repository.html_url}
pr_description:
$if: 'tasks_for[:19] == "github-pull-request"'
then: ${event.pull_request.body}
taskboot_image: "mozilla/taskboot:0.5.3"
# The files a push adds, changes or removes.
changed_paths:
$if: 'tasks_for == "github-push"'
then:
$flattenDeep:
$map: { $eval: "event.commits" }
each(c):
- { $eval: "c.added" }
- { $eval: "c.modified" }
- { $eval: "c.removed" }
else: []
in:
$let:
# Whether a push changes the bug-fix agent image or what goes into it.
touches_bug_fix_image:
$eval: '" agents/bug-fix/" in (" " + join(changed_paths, " ")) || " libs/agent-tools/" in (" " + join(changed_paths, " ")) || " libs/hackbot-runtime/" in (" " + join(changed_paths, " ")) || " libs/phabricator-client/" in (" " + join(changed_paths, " ")) || " libs/phabricator-proxy/" in (" " + join(changed_paths, " ")) || "uv.lock" in changed_paths || "pyproject.toml" in changed_paths || ".taskcluster.yml" in changed_paths'
default_task_definition:
created: { $fromNow: "" }
deadline: { $fromNow: "1 hour" }
provisionerId: proj-bugbug
workerType: batch
payload:
maxRunTime: 3600
image: astral/uv:python3.14-trixie
metadata:
owner: mcastelluccio@mozilla.com
source: ${repository}/raw/${head_rev}/.taskcluster.yml
in:
$if: '(tasks_for == "github-push" && head_branch[:18] != "refs/heads/deploy/") || (tasks_for[:19] == "github-pull-request" && event["action"] in ["opened", "reopened", "synchronize"])'
then:
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("lint_task") }
payload:
command:
- "/bin/bash"
- "-cx"
- "git clone --quiet ${repository} &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
uv sync --locked --package bugbug --only-group test &&
uv run pre-commit run -a --show-diff-on-failure"
metadata:
name: bugbug lint
description: bugbug lint
- $if: 'tasks_for == "github-push"'
then:
$mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("version_check_task") }
payload:
command:
- "/bin/bash"
- "-cx"
- "git clone --quiet ${repository} &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
python infra/version_check.py"
metadata:
name: bugbug tag version check
description: bugbug tag version check
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("tests_task") }
workerType: compute-smaller
payload:
env:
CODECOV_TOKEN: 66162f89-a4d9-420c-84bd-d10f12a428d9
command:
- "/bin/bash"
- "-cx"
- "apt-get -qq update &&
apt-get -qq install -y libhdf5-dev zstd &&
git clone --quiet ${repository} &&
curl -L https://github.com/mozilla/rust-code-analysis/releases/download/v0.0.23/rust-code-analysis-linux-web-x86_64.tar.gz | tar -C /usr/bin -xzv &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cp infra/hgrc /etc/mercurial/hgrc.d/bugbug.rc &&
uv sync --locked --package bugbug --group test --extra nlp --group spawn-pipeline &&
hg clone -r 7e05eb6de61fd8ecfda678c47dee53c51ef69ffe https://hg.mozilla.org/hgcustom/version-control-tools /version-control-tools/ &&
uv run pytest --cov=./ tests/test_*.py &&
bash <(curl -s https://codecov.io/bash)"
metadata:
name: bugbug tests
description: bugbug tests
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("http_tests_task") }
workerType: compute-smaller
payload:
env:
CODECOV_TOKEN: 66162f89-a4d9-420c-84bd-d10f12a428d9
command:
- "/bin/bash"
- "-cx"
- "apt-get -qq update &&
apt-get -qq install -y zstd &&
git clone --quiet ${repository} &&
curl -L https://github.com/mozilla/rust-code-analysis/releases/download/v0.0.23/rust-code-analysis-linux-web-x86_64.tar.gz | tar -C /usr/bin -xzv &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cp infra/hgrc /etc/mercurial/hgrc.d/bugbug.rc &&
uv sync --locked --package bugbug --package bugbug-http-service --group test &&
hg clone -r 7e05eb6de61fd8ecfda678c47dee53c51ef69ffe https://hg.mozilla.org/hgcustom/version-control-tools /version-control-tools/ &&
uv run pytest --cov=http_service http_service/tests/ -vvv &&
bash <(curl -s https://codecov.io/bash)"
metadata:
name: bugbug http service tests
description: bugbug http service tests
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("libs_tests_task") }
workerType: compute-smaller
payload:
env:
CODECOV_TOKEN: 66162f89-a4d9-420c-84bd-d10f12a428d9
command:
- "/bin/bash"
- "-cx"
- "git clone --quiet ${repository} &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
export COVERAGE_FILE=$(pwd)/.coverage &&
cd libs/agent-tools &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 --extra bugzilla --extra firefox --extra claude-sdk --extra mcp-server pytest --cov=agent_tools --cov-append tests/ &&
cd ../hackbot-runtime &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 --extra claude-sdk --extra codex-sdk --extra phabricator pytest --cov=hackbot_runtime --cov-append tests/ &&
cd ../phabricator-client &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=phabricator_client --cov-append tests/ &&
cd ../phabricator-proxy &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=phabricator_proxy --cov-append tests/ &&
cd ../lando-client &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=lando_client --cov-append tests/ &&
cd ../hackbot-client &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=hackbot_client --cov-append tests/ &&
cd ../testrail-client &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=testrail_client --cov-append tests/ &&
cd ../.. &&
bash <(curl -s https://codecov.io/bash)"
metadata:
name: bugbug libs tests
description: bugbug libs tests
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("services_tests_task") }
workerType: compute-smaller
payload:
env:
CODECOV_TOKEN: 66162f89-a4d9-420c-84bd-d10f12a428d9
command:
- "/bin/bash"
- "-cx"
- "git clone --quiet ${repository} &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
export COVERAGE_FILE=$(pwd)/.coverage &&
cd services/hackbot-api &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=app --cov-append tests/ &&
cd ../hackbot-pulse-listener &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=app --cov-append tests/ &&
cd ../mcp &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 --with pytest-mock==3.15.1 pytest --cov=bugbug_mcp --cov-append tests/ &&
cd ../.. &&
bash <(curl -s https://codecov.io/bash)"
metadata:
name: bugbug services tests
description: bugbug services tests
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("agents_tests_task") }
workerType: compute-smaller
payload:
env:
CODECOV_TOKEN: 66162f89-a4d9-420c-84bd-d10f12a428d9
command:
- "/bin/bash"
- "-cx"
- "git clone --quiet ${repository} &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
export COVERAGE_FILE=$(pwd)/.coverage &&
cd agents/bug-fix &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=hackbot_agents --cov-append tests/ &&
cd ../build-repair &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=hackbot_agents --cov-append tests/ &&
cd ../frontend-triage &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=hackbot_agents --cov-append tests/ &&
cd ../gecko-triage &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=hackbot_agents --cov-append tests/ &&
cd ../perf-triage &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=hackbot_agents --cov-append tests/ &&
cd ../test-repair &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=hackbot_agents --cov-append tests/ &&
cd ../test-repair-fix &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=hackbot_agents --cov-append tests/ &&
cd ../uplift-resolve &&
uv run --locked --with pytest==9.1.0 --with pytest-cov==7.1.0 --with pytest-asyncio==1.4.0 pytest --cov=hackbot_agents --cov-append tests/ &&
cd ../.. &&
bash <(curl -s https://codecov.io/bash)"
metadata:
name: bugbug agents tests
description: bugbug agents tests
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("packaging_test_task") }
payload:
env:
CODECOV_TOKEN: 66162f89-a4d9-420c-84bd-d10f12a428d9
command:
- "/bin/bash"
- "-cx"
- "apt-get -qq update &&
apt-get -qq install -y libhdf5-dev &&
git clone --quiet ${repository} &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
uv build &&
uv venv /tmp/test-venv &&
uv pip install --python /tmp/test-venv/bin/python dist/bugbug-$(cat VERSION).tar.gz &&
uv pip install --python /tmp/test-venv/bin/python dist/bugbug-$(cat VERSION).tar.gz[nlp] &&
bash <(curl -s https://codecov.io/bash)"
metadata:
name: bugbug packaging test
description: bugbug packaging test
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("docker_build") }
deadline: { $fromNow: "3 hours" }
workerType: ci
payload:
capabilities:
privileged: true
maxRunTime: 10800
image: "${taskboot_image}"
env:
REGISTRY: registry.hub.docker.com
VERSION:
$if: 'head_branch[:10] == "refs/tags/"'
then: { $eval: "head_branch[10:]" }
else: "latest"
command:
- "/bin/sh"
- "-cxe"
- "git clone --quiet ${repository} /code &&
cd /code &&
git -c advice.detachedHead=false checkout ${head_rev} &&
taskboot --target /code build-compose --write /images --build-arg CHECK_MODELS=0 --tag $VERSION --tag latest"
artifacts:
public/bugbug:
expires: { $fromNow: "2 weeks" }
path: /images
type: directory
scopes:
- docker-worker:capability:privileged
metadata:
name: bugbug docker build
description: bugbug docker build
- $if: 'tasks_for[:19] == "github-pull-request" && "Train on Taskcluster: " in pr_description'
then:
$mergeDeep:
- { $eval: default_task_definition }
- dependencies:
- { $eval: as_slugid("docker_build") }
taskId: { $eval: as_slugid("train_on_taskcluster") }
deadline: { $fromNow: "1 day" }
workerType: compute-large
payload:
maxRunTime:
$switch:
'"Train on Taskcluster: regression" in pr_description': 2700
$default: 10800
image:
type: task-image
path: public/bugbug/bugbug-base.tar.zst
taskId: { $eval: as_slugid("docker_build") }
env:
PR_DESCRIPTION: "${pr_description}"
command:
- "/bin/sh"
- "-cx"
- "uv run python -m scripts.trainer $(uv run python -m scripts.trainer_extract_args)"
metadata:
name: bugbug train on TC
description: Train a BugBug model on Taskcluster
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("frontend_build") }
payload:
image: node:lts
command:
- "/bin/sh"
- "-cxe"
- "git clone --quiet ${repository} /bugbug &&
cd /bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cd ui/changes &&
npm install --no-progress &&
npm run release"
artifacts:
public/frontend:
expires: { $fromNow: "2 weeks" }
path: /bugbug/ui/changes/dist
type: directory
metadata:
name: bugbug ui build
description: bugbug ui build
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("hackbot_ui_tests_task") }
payload:
image: node:lts
command:
- "/bin/sh"
- "-cxe"
- "git clone --quiet ${repository} /bugbug &&
cd /bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
cd services/hackbot-ui &&
npm ci --no-progress &&
npm test"
metadata:
name: bugbug hackbot-ui tests
description: bugbug hackbot-ui tests
# Agent images use BuildKit features and a non-final target, which taskboot's
# build commands don't support, so call podman (what taskboot uses) directly.
# Its storage is a cache, so unchanged layers (system packages, mostly) are
# reused; layers left over from older builds are pruned after a week.
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("bug_fix_image_build") }
workerType: ci
payload:
capabilities:
privileged: true
image: "${taskboot_image}"
cache:
bugbug-bug-fix-image-podman: /var/lib/containers
command:
- "/bin/sh"
- "-cxe"
- "git clone --quiet ${repository} /code &&
cd /code &&
git -c advice.detachedHead=false checkout ${head_rev} &&
podman build --target agent -f agents/bug-fix/Dockerfile -t mozilla/bugbug-hackbot-agent-bug-fix:latest . &&
mkdir /images &&
podman save --format docker-archive mozilla/bugbug-hackbot-agent-bug-fix:latest | zstd -q -o /images/bugbug-hackbot-agent-bug-fix.tar.zst &&
podman image prune --force --filter until=168h"
artifacts:
public/bug-fix-agent:
expires: { $fromNow: "2 weeks" }
path: /images
type: directory
scopes:
- docker-worker:capability:privileged
- docker-worker:cache:bugbug-bug-fix-image-podman
- generic-worker:cache:bugbug-bug-fix-image-podman
metadata:
name: bugbug bug-fix agent image build
description: bugbug bug-fix agent image build
# Runs inside the image, where the entrypoint has started the display and
# audio services. The tests download Firefox, minidump-stackwalk and Python
# packages, so failures are retried once to ride out network hiccups.
# TASKCLUSTER_ROOT_URL is unset as it is where the agent runs: mach would
# otherwise look Firefox's toolchains up on this cluster.
- $mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("bug_fix_image_tests") }
dependencies:
- { $eval: as_slugid("bug_fix_image_build") }
payload:
image:
type: task-image
path: public/bug-fix-agent/bugbug-hackbot-agent-bug-fix.tar.zst
taskId: { $eval: as_slugid("bug_fix_image_build") }
command:
- "/bin/bash"
- "-cx"
- "git clone --quiet ${repository} /tmp/bugbug &&
cd /tmp/bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
/usr/local/bin/python3 -m pip install --quiet --disable-pip-version-check --target /tmp/pydeps pytest==9.1.0 pytest-asyncio==1.4.0 &&
cd agents/bug-fix &&
unset TASKCLUSTER_ROOT_URL &&
export PYTHONPATH=/tmp/pydeps BUG_FIX_IMAGE_INSIDE=1 &&
(python -m pytest -v -rs tests/test_image.py -k 'not artifact_build and not android' ||
python -m pytest -v -rs --last-failed tests/test_image.py -k 'not artifact_build and not android')"
metadata:
name: bugbug bug-fix agent image tests
description: bugbug bug-fix agent image tests
# Bootstraps a Firefox checkout, makes an artifact build and runs tests in it.
# Too slow for every pull request, it runs after merges that change the
# image or what goes into it.
- $if: 'tasks_for == "github-push" && head_branch == "refs/heads/master" && touches_bug_fix_image'
then:
$mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("bug_fix_image_slow_tests") }
dependencies:
- { $eval: as_slugid("bug_fix_image_build") }
workerType: compute-large
payload:
image:
type: task-image
path: public/bug-fix-agent/bugbug-hackbot-agent-bug-fix.tar.zst
taskId: { $eval: as_slugid("bug_fix_image_build") }
command:
- "/bin/bash"
- "-cx"
- "git clone --quiet ${repository} /tmp/bugbug &&
cd /tmp/bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
/usr/local/bin/python3 -m pip install --quiet --disable-pip-version-check --target /tmp/pydeps pytest==9.1.0 pytest-asyncio==1.4.0 &&
cd agents/bug-fix &&
unset TASKCLUSTER_ROOT_URL &&
export PYTHONPATH=/tmp/pydeps BUG_FIX_IMAGE_INSIDE=1 &&
(python -m pytest -s -v -rs tests/test_image.py -k artifact_build ||
python -m pytest -s -v -rs --last-failed tests/test_image.py -k artifact_build)"
metadata:
name: bugbug bug-fix agent image slow tests
description: bugbug bug-fix agent image slow tests
# Like the slow tests, but a full build with the agent's own mozconfig, as
# the agent makes. Too slow for every pull request, it runs after merges
# that change the image or what goes into it; a failure is not retried.
- $if: 'tasks_for == "github-push" && head_branch == "refs/heads/master" && touches_bug_fix_image'
then:
$mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("bug_fix_image_full_build_tests") }
dependencies:
- { $eval: as_slugid("bug_fix_image_build") }
deadline: { $fromNow: "8 hours" }
# Its objdir alone takes over 30 GiB, more than other pools' disks hold.
workerType: firefox-build
payload:
maxRunTime: 21600
env:
BUG_FIX_IMAGE_FULL_BUILD: "1"
image:
type: task-image
path: public/bug-fix-agent/bugbug-hackbot-agent-bug-fix.tar.zst
taskId: { $eval: as_slugid("bug_fix_image_build") }
command:
- "/bin/bash"
- "-cx"
- "git clone --quiet ${repository} /tmp/bugbug &&
cd /tmp/bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
/usr/local/bin/python3 -m pip install --quiet --disable-pip-version-check --target /tmp/pydeps pytest==9.1.0 pytest-asyncio==1.4.0 &&
cd agents/bug-fix &&
unset TASKCLUSTER_ROOT_URL &&
export PYTHONPATH=/tmp/pydeps BUG_FIX_IMAGE_INSIDE=1 &&
python -m pytest -s -v -rs tests/test_image.py -k full_build"
metadata:
name: bugbug bug-fix agent image full build tests
description: bugbug bug-fix agent image full build tests
# Bootstraps a Firefox checkout for Android, makes an artifact build and
# runs tests in it.
# Too slow for every pull request, it runs after merges that change the
# image or what goes into it.
- $if: 'tasks_for == "github-push" && head_branch == "refs/heads/master" && touches_bug_fix_image'
then:
$mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("bug_fix_image_android_tests") }
dependencies:
- { $eval: as_slugid("bug_fix_image_build") }
deadline: { $fromNow: "3 hours" }
# The Android SDK and NDK take ~14 GiB, which leaves other pools' disks
# nearly full.
workerType: firefox-build
payload:
maxRunTime: 7200
image:
type: task-image
path: public/bug-fix-agent/bugbug-hackbot-agent-bug-fix.tar.zst
taskId: { $eval: as_slugid("bug_fix_image_build") }
command:
- "/bin/bash"
- "-cx"
- "git clone --quiet ${repository} /tmp/bugbug &&
cd /tmp/bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
/usr/local/bin/python3 -m pip install --quiet --disable-pip-version-check --target /tmp/pydeps pytest==9.1.0 pytest-asyncio==1.4.0 &&
cd agents/bug-fix &&
unset TASKCLUSTER_ROOT_URL &&
export PYTHONPATH=/tmp/pydeps BUG_FIX_IMAGE_INSIDE=1 &&
(python -m pytest -s -v -rs tests/test_image.py -k android ||
python -m pytest -s -v -rs --last-failed tests/test_image.py -k android)"
metadata:
name: bugbug bug-fix agent image Android tests
description: bugbug bug-fix agent image Android tests
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
$mergeDeep:
- { $eval: default_task_definition }
- dependencies:
- { $eval: as_slugid("lint_task") }
- { $eval: as_slugid("tests_task") }
- { $eval: as_slugid("http_tests_task") }
- { $eval: as_slugid("libs_tests_task") }
- { $eval: as_slugid("services_tests_task") }
- { $eval: as_slugid("agents_tests_task") }
- { $eval: as_slugid("frontend_build") }
- { $eval: as_slugid("hackbot_ui_tests_task") }
- { $eval: as_slugid("packaging_test_task") }
- { $eval: as_slugid("version_check_task") }
- { $eval: as_slugid("integration_test") }
scopes:
- secrets:get:project/bugbug/deploy
payload:
features:
taskclusterProxy: true
image: "${taskboot_image}"
command:
- taskboot
- deploy-pypi
env:
TASKCLUSTER_SECRET: project/bugbug/deploy
GIT_REPOSITORY: "${repository}"
GIT_REVISION: "${head_rev}"
metadata:
name: bugbug PyPI release
description: bugbug PyPI release
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
$mergeDeep:
- { $eval: default_task_definition }
- dependencies:
- { $eval: as_slugid("docker_build") }
- { $eval: as_slugid("lint_task") }
- { $eval: as_slugid("version_check_task") }
- { $eval: as_slugid("tests_task") }
- { $eval: as_slugid("http_tests_task") }
- { $eval: as_slugid("libs_tests_task") }
- { $eval: as_slugid("services_tests_task") }
- { $eval: as_slugid("agents_tests_task") }
- { $eval: as_slugid("frontend_build") }
- { $eval: as_slugid("hackbot_ui_tests_task") }
- { $eval: as_slugid("packaging_test_task") }
scopes:
- secrets:get:project/bugbug/deploy
taskId: { $eval: as_slugid("docker_push") }
deadline: { $fromNow: "4 hours" }
payload:
features:
taskclusterProxy: true
image: "${taskboot_image}"
env:
TASKCLUSTER_SECRET: project/bugbug/deploy
command:
- taskboot
- push-artifact
- --exclude-filter
- "*http-service*"
metadata:
name: bugbug docker push
description: bugbug docker push
# It's the same task integration_test as in data-pipeline.yml
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
$mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("integration_test") }
dependencies:
- { $eval: as_slugid("docker_push") }
workerType: compute-large
scopes:
- secrets:get:project/bugbug/integration
- "docker-worker:cache:bugbug-mercurial-repository"
- "generic-worker:cache:bugbug-mercurial-repository"
payload:
features:
taskclusterProxy: true
maxRunTime: 10800
image: mozilla/bugbug-commit-retrieval:${head_branch[10:]}
env:
TC_SECRET_ID: project/bugbug/integration
CACHE_DIR: "/cache"
command:
- "/bin/bash"
- "-cx"
- "apt-get -qq update &&
apt-get -qq install -y redis-server &&
git clone --quiet ${repository} &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
python -c 'import os; print(os.environ.keys())' &&
bash ./scripts/integration_test.sh"
cache:
bugbug-mercurial-repository: /cache
metadata:
name: bugbug integration test
description: bugbug integration test
owner: ${user}@users.noreply.github.com
- $if: 'tasks_for == "github-push" && head_branch[:10] == "refs/tags/"'
then:
$mergeDeep:
- { $eval: default_task_definition }
- taskId: { $eval: as_slugid("update_hook_data_pipeline") }
dependencies:
- { $eval: as_slugid("integration_test") }
scopes:
- hooks:modify-hook:project-bugbug/bugbug
- assume:hook-id:project-bugbug/bugbug
- queue:route:project.bugbug.deploy_ending.*
deadline: { $fromNow: "5 hours" }
payload:
features:
taskclusterProxy: true
image: "${taskboot_image}"
command:
- "/bin/sh"
- "-cxe"
- "git clone --quiet ${repository} &&
cd bugbug &&
git -c advice.detachedHead=false checkout ${head_rev} &&
python infra/set_hook_version.py ${head_branch[10:]} infra/taskcluster-hook-data-pipeline.json &&
taskboot --target . build-hook infra/taskcluster-hook-data-pipeline.json project-bugbug bugbug"
routes:
- project.bugbug.deploy_ending
metadata:
name: bugbug update data hook
description: bugbug update data hook