Skip to content

Reuse one httpx client in phabricator-client and close it in every caller - #7823

Open
WadekarPrashant wants to merge 3 commits into
mozilla:masterfrom
WadekarPrashant:phabricator-stateful-client
Open

WadekarPrashant wants to merge 3 commits into
mozilla:masterfrom
WadekarPrashant:phabricator-stateful-client

Own the Phabricator clients' lifetime in hackbot-api

f98356e
Select commit
Loading
Failed to load commit list.
Community-TC Integration / bugbug bug-fix agent image tests succeeded Dec 4, 2026 in 2m 57s

Community-TC (pull_request)

bugbug bug-fix agent image tests

Details

View task in Taskcluster | View logs in Taskcluster | View task group in Taskcluster

Task Status

Started: 2026-12-04T20:08:31.787Z
Resolved: 2026-12-04T20:11:28.773Z
Task Execution Time: 2 minutes, 56 seconds, 986 milliseconds
Task Status: completed
Reason Resolved: completed
TaskId: TfC1gNLbRE2FfNXuGW5p1A
RunId: 0

Artifacts

- public/logs/live_backing.log (11.2 KB)
- public/logs/live.log


[taskcluster 2026-12-04T20:08:31.860Z] Worker Type (proj-bugbug/batch) settings:
[taskcluster 2026-12-04T20:08:31.860Z]   {
[taskcluster 2026-12-04T20:08:31.860Z]     "generic-worker": {
[taskcluster 2026-12-04T20:08:31.860Z]       "config": {
[taskcluster 2026-12-04T20:08:31.860Z]         "capacity": 1,
[taskcluster 2026-12-04T20:08:31.860Z]         "headlessTasks": false
[taskcluster 2026-12-04T20:08:31.860Z]       },
[taskcluster 2026-12-04T20:08:31.860Z]       "engine": "multiuser",
[taskcluster 2026-12-04T20:08:31.860Z]       "go-arch": "amd64",
[taskcluster 2026-12-04T20:08:31.860Z]       "go-os": "linux",
[taskcluster 2026-12-04T20:08:31.860Z]       "go-version": "go1.27.4",
[taskcluster 2026-12-04T20:08:31.860Z]       "release": "https://github.com/taskcluster/taskcluster/releases/tag/v117.1.0",
[taskcluster 2026-12-04T20:08:31.860Z]       "revision": "0c7c8924f32ea41a92bdf8e788842b6ae878c9a9",
[taskcluster 2026-12-04T20:08:31.860Z]       "source": "https://github.com/taskcluster/taskcluster/commits/0c7c8924f32ea41a92bdf8e788842b6ae878c9a9",
[taskcluster 2026-12-04T20:08:31.860Z]       "version": "117.1.0"
[taskcluster 2026-12-04T20:08:31.860Z]     },
[taskcluster 2026-12-04T20:08:31.860Z]     "image": "projects/taskcluster-imaging/global/images/generic-worker-ubuntu-24-04-6b7773308dd74c7d9c2e",
[taskcluster 2026-12-04T20:08:31.860Z]     "instance-id": "558635953879425935",
[taskcluster 2026-12-04T20:08:31.860Z]     "instance-type": "projects/757942385826/machineTypes/c3d-highcpu-4",
[taskcluster 2026-12-04T20:08:31.860Z]     "local-ipv4": "10.150.0.116",
[taskcluster 2026-12-04T20:08:31.860Z]     "machine-setup": {
[taskcluster 2026-12-04T20:08:31.860Z]       "maintainer": "taskcluster-notifications+workers@mozilla.com",
[taskcluster 2026-12-04T20:08:31.860Z]       "script": "https://raw.githubusercontent.com/mozilla-platform-ops/worker-images/6d1971adcebe8e72c7d74007c12ce36330cb5ffb/scripts/linux/tceng/generic-worker-ubuntu-24-04.sh"
[taskcluster 2026-12-04T20:08:31.860Z]     },
[taskcluster 2026-12-04T20:08:31.860Z]     "project-id": "community-tc-workers",
[taskcluster 2026-12-04T20:08:31.860Z]     "public-hostname": "proj-bugbug-batch-dytllwkisp6m-ntbsowz3w.c.community-tc-workers.internal",
[taskcluster 2026-12-04T20:08:31.860Z]     "public-ipv4": "34.85.216.47",
[taskcluster 2026-12-04T20:08:31.860Z]     "region": "us-east4",
[taskcluster 2026-12-04T20:08:31.860Z]     "zone": "us-east4-c"
[taskcluster 2026-12-04T20:08:31.860Z]   }
[taskcluster 2026-12-04T20:08:31.860Z] Task ID: TfC1gNLbRE2FfNXuGW5p1A
[taskcluster 2026-12-04T20:08:31.860Z] === Task Starting ===
[taskcluster 2026-12-04T20:08:32.369Z] [mounts] Downloading task X7lm-TIjRfG6H931bMd9Dw artifact public/bug-fix-agent/bugbug-hackbot-agent-bug-fix.tar.zst to downloads/VlCZ88dJSG-OdZn61LTVbw
[taskcluster 2026-12-04T20:08:46.254Z] [mounts] Downloaded 896873674 bytes with SHA256 d6e743f7fb2bd78d367348a177e55ecb1ac094fd26c305b93a8c7b9265c03cba from task X7lm-TIjRfG6H931bMd9Dw artifact public/bug-fix-agent/bugbug-hackbot-agent-bug-fix.tar.zst to downloads/VlCZ88dJSG-OdZn61LTVbw
[taskcluster:warn 2026-12-04T20:08:46.254Z] [mounts] Download downloads/VlCZ88dJSG-OdZn61LTVbw of task X7lm-TIjRfG6H931bMd9Dw artifact public/bug-fix-agent/bugbug-hackbot-agent-bug-fix.tar.zst has SHA256 d6e743f7fb2bd78d367348a177e55ecb1ac094fd26c305b93a8c7b9265c03cba but task payload does not declare a required value, so content authenticity cannot be verified
[taskcluster 2026-12-04T20:08:46.254Z] [mounts] File mount "dockerimage" handled by registered handler (cache: downloads/VlCZ88dJSG-OdZn61LTVbw, SHA256: d6e743f7fb2bd78d367348a177e55ecb1ac094fd26c305b93a8c7b9265c03cba)
[taskcluster 2026-12-04T20:08:46.255Z] [d2g] Loading docker image
[taskcluster 2026-12-04T20:09:22.265Z] [d2g] Loaded docker image "localhost/mozilla/bugbug-hackbot-agent-bug-fix:latest"
[taskcluster 2026-12-04T20:09:22.406Z] Executing command 0: docker run -t --name taskcontainer_eU_gAswuTcu80yqZuIDzTg --memory-swap -1 --pids-limit -1 --pull=never --log-driver=none '--add-host=localhost.localdomain:127.0.0.1' --env-file 'env.list' -- 061eadc269a01dd2f57b0a5f29a5d00e17788532d52f91ccd77927643a9ffb6a /bin/bash -cx 'git clone --quiet https://github.com/WadekarPrashant/ai-dev /tmp/ai-dev && cd /tmp/ai-dev && git -c advice.detachedHead=false checkout f98356e3aeb60bed3e884bd588cc42aa419ce05b && /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'\'')'
+ git clone --quiet https://github.com/WadekarPrashant/ai-dev /tmp/ai-dev
+ cd /tmp/ai-dev
+ git -c advice.detachedHead=false checkout f98356e3aeb60bed3e884bd588cc42aa419ce05b
HEAD is now at f98356e3 Own the Phabricator clients' lifetime in hackbot-api
+ /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
+ PYTHONPATH=/tmp/pydeps
+ BUG_FIX_IMAGE_INSIDE=1
+ python -m pytest -v -rs tests/test_image.py -k 'not artifact_build and not android'
============================= test session starts ==============================
platform linux -- Python 3.14.10, pytest-9.1.0, pluggy-1.7.0 -- /opt/venv/bin/python
cachedir: .pytest_cache
rootdir: /tmp/ai-dev/agents/bug-fix
configfile: pyproject.toml
plugins: asyncio-1.4.0, anyio-4.14.2
asyncio: mode=Mode.AUTO, debug=False, asyncio_default_fixture_loop_scope=None, asyncio_default_test_loop_scope=function
collecting ... 
collecting 41 items                                                            
collected 41 items / 2 deselected / 39 selected                                

tests/test_image.py::test_runs_unprivileged_with_writable_workspace PASSED [  2%]
tests/test_image.py::test_x_display_accepts_clients PASSED               [  5%]
tests/test_image.py::test_session_bus_answers PASSED                     [  7%]
tests/test_image.py::test_audio_plays PASSED                             [ 10%]
tests/test_image.py::test_pipewire_test_audio_source PASSED              [ 12%]
tests/test_image.py::test_fonts[sans-serif-DejaVu Sans] PASSED           [ 15%]
tests/test_image.py::test_fonts[Arial-Liberation Sans] PASSED            [ 17%]
tests/test_image.py::test_fonts[Times New Roman-Liberation Serif] PASSED [ 20%]
tests/test_image.py::test_fonts[:lang=ko-UnDotum] PASSED                 [ 23%]
tests/test_image.py::test_fonts[:lang=ja-VL Gothic] PASSED               [ 25%]
tests/test_image.py::test_fonts[KacstOne-KacstOne] PASSED                [ 28%]
tests/test_image.py::test_fonts[STIX Math-STIX Math] PASSED              [ 30%]
tests/test_image.py::test_developer_tools[hg version -q-Mercurial] PASSED [ 33%]
tests/test_image.py::test_developer_tools[git --version-git version] PASSED [ 35%]
tests/test_image.py::test_developer_tools[curl --version-curl] PASSED    [ 38%]
tests/test_image.py::test_developer_tools[zip -v-Zip] PASSED             [ 41%]
tests/test_image.py::test_developer_tools[unzip -v-UnZip] PASSED         [ 43%]
tests/test_image.py::test_developer_tools[bzip2 --help 2>&1-bzip2] PASSED [ 46%]
tests/test_image.py::test_developer_tools[ffmpeg -version-ffmpeg version] PASSED [ 48%]
tests/test_image.py::test_developer_tools[printf 'hay\\nneedle\\n' | rg -n needle-2:needle] PASSED [ 51%]
tests/test_image.py::test_developer_tools[echo '{"a": [1, 42]}' | jq '.a[1]'-42] PASSED [ 53%]
tests/test_image.py::test_developer_tools[sqlite3 :memory: 'select 6 * 7'-42] PASSED [ 56%]
tests/test_image.py::test_developer_tools[uv run --no-project python -c 'print(6 * 7)'-42] PASSED [ 58%]
tests/test_image.py::test_gdb_backtrace PASSED                           [ 61%]
tests/test_image.py::test_strace PASSED                                  [ 64%]
tests/test_image.py::test_git_commit_and_stash PASSED                    [ 66%]
tests/test_image.py::test_python_script_venv_and_pip PASSED              [ 69%]
tests/test_image.py::test_evaluate_testcase_without_crash PASSED         [ 71%]
tests/test_image.py::test_evaluate_testcase_reports_crash_with_stack PASSED [ 74%]
tests/test_image.py::test_firefox_web_features PASSED                    [ 76%]
tests/test_image.py::test_firefox_draws_on_display PASSED                [ 79%]
tests/test_image.py::test_gdb_runs_firefox PASSED                        [ 82%]
tests/test_image.py::test_evaluate_js_shell PASSED                       [ 84%]
tests/test_image.py::test_firefox_screenshot PASSED                      [ 87%]
tests/test_image.py::test_firefox_content_sandbox PASSED                 [ 89%]
tests/test_image.py::test_firefox_profiler PASSED                        [ 92%]
tests/test_image.py::test_firefox_accessibility_tree PASSED              [ 94%]
tests/test_image.py::test_screen_reader PASSED                           [ 97%]
tests/test_image.py::test_full_build_and_tests SKIPPED (BUG_FIX_IMAG...) [100%]

=========================== short test summary info ============================
SKIPPED [1] tests/test_image.py:1161: BUG_FIX_IMAGE_FULL_BUILD is not set
=========== 38 passed, 1 skipped, 2 deselected in 111.13s (0:01:51) ============
[taskcluster 2026-12-04T20:11:27.747Z]                        Exit Code: 0
[taskcluster 2026-12-04T20:11:27.747Z]                        User Time: 19.997ms
[taskcluster 2026-12-04T20:11:27.747Z]                      Kernel Time: 18.886ms
[taskcluster 2026-12-04T20:11:27.747Z]                        Wall Time: 2m5.340891002s
[taskcluster 2026-12-04T20:11:27.747Z]  Average Available System Memory: 6.06 GiB
[taskcluster 2026-12-04T20:11:27.747Z]       Average System Memory Used: 1.69 GiB
[taskcluster 2026-12-04T20:11:27.747Z]          Peak System Memory Used: 3.26 GiB
[taskcluster 2026-12-04T20:11:27.747Z]              Total System Memory: 7.75 GiB
[taskcluster 2026-12-04T20:11:27.747Z]                           Result: SUCCEEDED
[taskcluster 2026-12-04T20:11:27.748Z] === Task Finished ===
[taskcluster 2026-12-04T20:11:27.748Z] Task Duration: 2m5.341689614s