mozilla / mozilla/bugbug

Use mozconfig of the failed task

Open
#6,872 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

CI agents hackbot
Dominant language
Python
Stars
570
Forks
351
Avg merge
2d 13h
Merged PRs (30d)
65

Description

We should use the mozconfig of the task that fails. @padenot suggested this as an example:

async def mozconfig_for_task(task_id, source_repo):
      task = await fetch_json(
          f"[https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/{task_id}](https://firefox-ci-tc.services.mozilla.com/api/queue/v1/task/%7Btask_id%7D)"
      )

      env = task["payload"].get("env", {})
      extra = json.loads(env.get("EXTRA_MOZHARNESS_CONFIG", "{}"))

      if env.get("MOZCONFIG"):
          return source_repo / env["MOZCONFIG"]

      configs = load_mozharness_configs(
          env["MOZHARNESS_CONFIG"],
          env.get("MOZHARNESS_CONFIG_PATHS", ""),
          source_repo,
      )

      config = merge_configs(configs)
      config.update(extra)

      if "src_mozconfig" in config:
          return source_repo / config["src_mozconfig"]

      return (
          source_repo
          / config["app_name"]
          / "config"
          / "mozconfigs"
          / config["mozconfig_platform"]
          / config["mozconfig

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the failed-task handling and the existing mozconfig selection logic. Use the proposed mozconfig_for_task entry point and inspect the task payload's env fields, including MOZCONFIG, MOZHARNESS_CONFIG, and EXTRA_MOZHARNESS_CONFIG. Done means the failed task's mozconfig is selected consistently.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Needs clarification
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.