Skip to content

Misc improvements for the bug fix Docker image - #7110

Merged
marco-c merged 5 commits into
mozilla:masterfrom
marco-c:better_docker_image
Oct 16, 2026
Merged

marco-c merged 5 commits into
mozilla:masterfrom
marco-c:better_docker_image

Conversation

@marco-c

@marco-c marco-c commented Oct 9, 2026

Copy link
Copy Markdown
Collaborator

No description provided.

@marco-c
marco-c force-pushed the better_docker_image branch 9 times, most recently from d8a5580 to 859f67f Compare October 10, 2026 22:54
@marco-c
marco-c force-pushed the better_docker_image branch 2 times, most recently from f2c0d95 to 9f28ce5 Compare October 12, 2026 12:36
Comment thread libs/agent-tools/agent_tools/firefox/tools/bootstrap_firefox.py Outdated
Comment thread agents/bug-fix/Dockerfile Outdated
Comment thread agents/bug-fix/Dockerfile Outdated
Comment thread agents/bug-fix/Dockerfile Outdated
Comment thread agents/bug-fix/Dockerfile
@marco-c
marco-c force-pushed the better_docker_image branch 2 times, most recently from 29b82ec to e9540b1 Compare October 12, 2026 22:42
@marco-c
marco-c requested a review from padenot October 13, 2026 08:37
@marco-c
marco-c marked this pull request as ready for review October 13, 2026 08:37
@marco-c
marco-c requested a review from a team as a code owner October 13, 2026 08:37
@marco-c
marco-c force-pushed the better_docker_image branch from e9540b1 to 08fb2a6 Compare October 14, 2026 10:52

@canova canova left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah great that we are adding profiler-cli to hackbot! I would also prefer the npm install option as oppose to fetching it. But I would prefer the solution in bug 2058493 over both, but we are still not ready to land that one. So as an interim solution we can go with this. But I would prefer to file issues/bugs so we can keep track of this work.

Comment thread agents/bug-fix/Dockerfile
Comment thread agents/bug-fix/Dockerfile
Comment thread agents/bug-fix/Dockerfile
Comment thread agents/bug-fix/Dockerfile
@marco-c

marco-c commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

Thanks @canova for the insights. Depending on when your bug is fixed, I'll either land this first and update the image later, or update the PR first.

@marco-c

marco-c commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

@suhaibmujahid suhaibmujahid left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM! My comments aren’t blockers, so we can file follow-ups if we’d rather not address them now.

Comment thread agents/bug-fix/docker-entrypoint.sh
Comment thread agents/bug-fix/Dockerfile Outdated
Comment thread agents/bug-fix/Dockerfile Outdated
Comment thread agents/bug-fix/Dockerfile Outdated
Comment thread .taskcluster.yml
@marco-c
marco-c force-pushed the better_docker_image branch from 9d8d69a to 9148eb6 Compare October 15, 2026 23:40
Install the build prerequisites and Firefox runtime dependencies that `mach
bootstrap` cannot install itself (it runs unprivileged), along with the fonts,
debug symbols and audio setup Firefox's own CI test images use. An entrypoint
starts Xvfb, a D-Bus session and PipeWire, so Firefox launched from the agent's
shell has a display and a working audio device. Add gdb, strace, ripgrep, jq
and sqlite3 for debugging, uv, and profiler-cli, which with the bootstrapped
samply and profiler-edit (also put on PATH, as is node) is what the Firefox
tree's profiling skills use.

Set a git identity matching hackbot_runtime's, so the agent's own `git commit`
and `git stash` work.

ffpuppet looks up minidump-stackwalk only when it is imported, before bootstrap
has installed it, so crashes caught by evaluate_testcase came back without a
stack. bootstrap_firefox now points ffpuppet at the bootstrapped copy. It also
installs the developer tools (treeherder-cli, searchfox-cli, ...) that
non-interactive bootstrap skips.

Build the JS shell too, which desktop builds skip, so evaluate_js_shell has one
to run.

Add opt-in smoke tests for the image (BUG_FIX_IMAGE=<image>), covering the
entrypoint services, tools, evaluate_testcase with and without a crash and,
with BUG_FIX_IMAGE_SLOW=1, bootstrap, configure and running tests.
Build the agent image with podman in a privileged task, as taskboot does but
with the non-final target taskboot cannot select, and run the tests inside it
as a task image. The tests gain a mode where they check the container they run
in. After merges to master that change the image or what goes into it, slower
tests bootstrap Firefox, make an artifact build and a full build with the
agent's mozconfig, and run tests in them.
Keep podman's storage in a Taskcluster cache, so a build reuses the layers
that didn't change. Install the Python environment last in the agent stage,
so the system packages layers survive Python changes.
bootstrap_firefox (and its tool) take the application to bootstrap for, so
the agent can install the JDK and Android SDK and NDK an Android build needs,
and link their versioned directories under stable names the image puts on
PATH (java, adb, aapt2, apksigner, apkanalyzer, lint, sdkmanager).
Bootstrapping for Android also writes a mozconfig for it, which build_firefox
then builds with, until bootstrapping for desktop again. The agent's prompt
explains how to build and test Android code without the emulator, which
isn't available.

Fixes mozilla#7067
After merges to master that change the image, bootstrap a Firefox checkout for
Android the way the agent does, make an artifact build, inspect and verify the
APKs it builds, run android-components unit tests through `mach gradle`, and
check the Android formatter catches and fixes misformatted code.
@marco-c
marco-c force-pushed the better_docker_image branch from 9148eb6 to 68fb0bc Compare October 16, 2026 08:22
@marco-c
marco-c merged commit eaee1c8 into mozilla:master Oct 16, 2026
10 checks passed
@marco-c
marco-c deleted the better_docker_image branch October 16, 2026 08:41
@marco-c marco-c linked an issue Oct 19, 2026 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make sure the bug fix agent image contains all tools the agent might need to fix Firefox bugs Add Android/Gradle toolchain to workers

4 participants