Skip to content

Clear not_landed needinfos after patches land - #3004

Open
loganrosen wants to merge 2 commits into
mozilla:masterfrom
loganrosen:loganrosen-clear-not-landed-needinfos
Open

Clear not_landed needinfos after patches land#3004
loganrosen wants to merge 2 commits into
mozilla:masterfrom
loganrosen:loganrosen-clear-not-landed-needinfos

Move not-landed cleanup to separate rule

2e68427
Select commit
Loading
Failed to load commit list.
Community-TC Integration / bugbot tests failed Aug 30, 2026 in 1m 27s

Community-TC (pull_request)

bugbot tests

Details

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

Task Status

Started: 2026-08-30T20:53:25.133Z
Resolved: 2026-08-30T20:54:52.451Z
Task Execution Time: 1 minute, 27 seconds, 318 milliseconds
Task Status: failed
Reason Resolved: failed
TaskId: HpQkZrtyQgeRcVo26tCkzA
RunId: 0

Artifacts

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


[taskcluster 2026-08-30T20:53:25.210Z] Worker Type (proj-relman/ci) settings:
[taskcluster 2026-08-30T20:53:25.210Z]   {
[taskcluster 2026-08-30T20:53:25.210Z]     "generic-worker": {
[taskcluster 2026-08-30T20:53:25.210Z]       "config": {
[taskcluster 2026-08-30T20:53:25.210Z]         "headlessTasks": false
[taskcluster 2026-08-30T20:53:25.210Z]       },
[taskcluster 2026-08-30T20:53:25.210Z]       "engine": "multiuser",
[taskcluster 2026-08-30T20:53:25.210Z]       "go-arch": "amd64",
[taskcluster 2026-08-30T20:53:25.210Z]       "go-os": "linux",
[taskcluster 2026-08-30T20:53:25.210Z]       "go-version": "go1.26.2",
[taskcluster 2026-08-30T20:53:25.210Z]       "release": "https://github.com/taskcluster/taskcluster/releases/tag/v99.1.0",
[taskcluster 2026-08-30T20:53:25.210Z]       "revision": "c76d61efe4bdc1a05bcec848739cd41ebf061f01",
[taskcluster 2026-08-30T20:53:25.210Z]       "source": "https://github.com/taskcluster/taskcluster/commits/c76d61efe4bdc1a05bcec848739cd41ebf061f01",
[taskcluster 2026-08-30T20:53:25.210Z]       "version": "99.1.0"
[taskcluster 2026-08-30T20:53:25.210Z]     },
[taskcluster 2026-08-30T20:53:25.210Z]     "image": "projects/community-tc-workers/global/images/generic-worker-ubuntu-24-04-aaynirqnxlbwcojgnbeo",
[taskcluster 2026-08-30T20:53:25.210Z]     "instance-id": "625856104751507795",
[taskcluster 2026-08-30T20:53:25.210Z]     "instance-type": "projects/757942385826/machineTypes/n2-standard-4",
[taskcluster 2026-08-30T20:53:25.210Z]     "local-ipv4": "10.142.0.6",
[taskcluster 2026-08-30T20:53:25.210Z]     "machine-setup": {

...(3 lines hidden)...

[taskcluster 2026-08-30T20:53:25.210Z]     "project-id": "community-tc-workers",
[taskcluster 2026-08-30T20:53:25.210Z]     "public-hostname": "proj-relman-ci-zciciuq-qz24vcdp7qem0a.c.community-tc-workers.internal",
[taskcluster 2026-08-30T20:53:25.210Z]     "public-ipv4": "35.231.235.239",
[taskcluster 2026-08-30T20:53:25.210Z]     "region": "us-east1",
[taskcluster 2026-08-30T20:53:25.210Z]     "zone": "us-east1-d"
[taskcluster 2026-08-30T20:53:25.210Z]   }
[taskcluster 2026-08-30T20:53:25.210Z] Task ID: HpQkZrtyQgeRcVo26tCkzA
[taskcluster 2026-08-30T20:53:25.210Z] === Task Starting ===
[taskcluster 2026-08-30T20:53:25.893Z] [d2g] Loading docker image
[taskcluster 2026-08-30T20:53:42.398Z] [d2g] Loaded docker image "docker.io/astral/uv:python3.10-trixie"
[taskcluster 2026-08-30T20:53:42.398Z] Executing command 0: docker run -t --name taskcontainer_Ai-AogGMRg-eI-ZmmXWucw --memory-swap -1 --pids-limit -1 --pull=never --log-driver=none '--add-host=localhost.localdomain:127.0.0.1' --env-file 'env.list' 'astral/uv:python3.10-trixie' /bin/bash -lcx 'git clone --quiet https://github.com/loganrosen/bugbot bugbot && cd bugbot && git -c advice.detachedHead=false checkout 2e68427d8ecbdf9ae63fd258a5b804deff4e2e40 && uv sync --quiet --locked --extra test && uv run pre-commit run --all-files --show-diff-on-failure && uv run tox -e $TOX_ENV && uv run coveralls'
++ id -u
+ '[' 0 -eq 0 ']'
+ PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ export PATH
+ '[' '' ']'
+ '[' -d /etc/profile.d ']'
++ run-parts --list --regex '^[a-zA-Z0-9_][a-zA-Z0-9._-]*\.sh$' /etc/profile.d
+ unset i
+ '[' /bin/bash ']'
+ '[' -f /root/.bashrc ']'
+ . /root/.bashrc
+ git clone --quiet https://github.com/loganrosen/bugbot bugbot
+ cd bugbot
+ git -c advice.detachedHead=false checkout 2e68427d8ecbdf9ae63fd258a5b804deff4e2e40
HEAD is now at 2e68427 Move not-landed cleanup to separate rule
+ uv sync --quiet --locked --extra test
+ uv run pre-commit run --all-files --show-diff-on-failure
[INFO] Initializing environment for https://github.com/Riverside-Healthcare/djLint.
[INFO] Initializing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Initializing environment for https://github.com/pre-commit/pre-commit-hooks.
[WARNING] repo `https://github.com/pre-commit/pre-commit-hooks` uses deprecated stage names (commit, push) which will be removed in a future version.  Hint: often `pre-commit autoupdate --repo https://github.com/pre-commit/pre-commit-hooks` will fix this.  if it does not -- consider reporting an issue to that repo.
[INFO] Initializing environment for https://github.com/codespell-project/codespell.
[INFO] Initializing environment for https://github.com/marco-c/taskcluster_yml_validator.
[INFO] Initializing environment for https://github.com/asottile/yesqa.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Initializing environment for https://github.com/pre-commit/mirrors-mypy:tokenize-rt==4.2.1,types-filelock==3.2.7,types-pytz==2021.3.8,types-python-dateutil==2.8.17,types-PyYAML==6.0.8,types-requests==2.27.30,types-tabulate==0.8.9.
[INFO] Initializing environment for https://github.com/astral-sh/uv-pre-commit.
[INFO] Installing environment for https://github.com/Riverside-Healthcare/djLint.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/astral-sh/ruff-pre-commit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/pre-commit-hooks.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/codespell-project/codespell.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/marco-c/taskcluster_yml_validator.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/asottile/yesqa.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/pre-commit/mirrors-mypy.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
[INFO] Installing environment for https://github.com/astral-sh/uv-pre-commit.
[INFO] Once installed this environment will be reused.
[INFO] This may take a few minutes...
djLint linting for Jinja.................................................Passed
djLint linting for Jinja.................................................Passed
ruff.....................................................................Passed
ruff-format..............................................................Failed
- hook id: ruff-format
- files were modified by this hook

warning: Selection `CPY` has no effect because preview is not enabled.
2 files reformatted, 172 files left unchanged

check python ast.........................................................Passed
check docstring is first.................................................Passed
check that executables have shebangs.....................................Passed
check for merge conflicts................................................Passed
check for broken symlinks............................(no files to check)Skipped
debug statements (python)................................................Passed
trim trailing whitespace.................................................Passed
check yaml...............................................................Passed
mixed line ending........................................................Passed
python tests naming......................................................Passed
check json...............................................................Passed
fix requirements.txt.................................(no files to check)Skipped
check vcs permalinks.....................................................Passed
codespell................................................................Passed
taskcluster_yml..........................................................Passed
Strip unnecessary `# noqa`s..............................................Passed
mypy.....................................................................Passed
Check for useless excludes...............................................Passed
uv-lock..................................................................Passed
pre-commit hook(s) made changes.
If you are seeing this message in CI, reproduce locally with: `pre-commit run --all-files`.
To run `pre-commit` as part of git workflow, use `pre-commit install`.
All changes made by hooks:
diff --git a/bugbot/rules/not_landed_cleanup.py b/bugbot/rules/not_landed_cleanup.py
index b04a7db..6c919f5 100644
--- a/bugbot/rules/not_landed_cleanup.py
+++ b/bugbot/rules/not_landed_cleanup.py
@@ -97,24 +97,20 @@ class NotLandedCleanup(BzCleaner):
                 revision_ids = tracked[bugid] = set()
             revision_ids.update(
                 int(revision_id)
-                for revision_id in extra.removeprefix(
-                    NEEDINFO_TRACKING_PREFIX
-                ).split(",")
+                for revision_id in extra.removeprefix(NEEDINFO_TRACKING_PREFIX).split(
+                    ","
+                )
                 if revision_id
             )
         return tracked
 
-    def get_tracked_revision_ids(
-        self, bugids: set[str]
-    ) -> dict[str, set[int] | None]:
+    def get_tracked_revision_ids(self, bugids: set[str]) -> dict[str, set[int] | None]:
         changes = list(db.BugChange.get(name=NOT_LANDED_RULE))
         changes += list(db.BugChange.get(name=self.name()))
         changes.sort(key=lambda change: change.id)
         return self.get_revision_tracking(changes, bugids)
 
-    def get_landed_bug_ids(
-        self, revision_ids_by_bug: dict[str, set[int]]
-    ) -> set[str]:
+    def get_landed_bug_ids(self, revision_ids_by_bug: dict[str, set[int]]) -> set[str]:
         landed = set()
         for bugid, revision_ids in revision_ids_by_bug.items():
             if not revision_ids:
diff --git a/tests/rules/test_not_landed_cleanup.py b/tests/rules/test_not_landed_cleanup.py
index 666794b..1065c69 100644
--- a/tests/rules/test_not_landed_cleanup.py
+++ b/tests/rules/test_not_landed_cleanup.py
@@ -91,9 +91,7 @@ def test_revision_tracking_distinguishes_legacy_and_empty_results():
         _change(3, NEEDINFO_TRACKING_PREFIX),
     ]
 
-    assert NotLandedCleanup.get_revision_tracking(
-        changes, {"1", "2", "3"}
-    ) == {
+    assert NotLandedCleanup.get_revision_tracking(changes, {"1", "2", "3"}) == {
         "1": None,
         "2": {20, 21, 22},
         "3": set(),
@@ -139,9 +137,7 @@ def test_resolved_bug_clears_only_owned_flags(monkeypatch):
     unrelated = _flag(2, creation_date="2026-08-15T12:10:35Z")
     bugs = {"123": _bug("123", status="RESOLVED", flags=[owned, unrelated])}
     _set_bugs(monkeypatch, bugs)
-    monkeypatch.setattr(
-        rule, "get_tracked_revision_ids", lambda bugids: {"123": {123}}
-    )
+    monkeypatch.setattr(rule, "get_tracked_revision_ids", lambda bugids: {"123": {123}})
     monkeypatch.setattr(rule, "get_landed_bug_ids", lambda revisions: set())
 
     assert rule.get_bugs() == bugs
@@ -154,18 +150,14 @@ def test_open_bug_with_landed_patch_is_cleared(monkeypatch):
     rule = _rule(monkeypatch)
     bugs = {"123": _bug("123")}
     _set_bugs(monkeypatch, bugs)
-    monkeypatch.setattr(
-        rule, "get_tracked_revision_ids", lambda bugids: {"123": {123}}
-    )
+    monkeypatch.setattr(rule, "get_tracked_revision_ids", lambda bugids: {"123": {123}})
     rule.phab = SimpleNamespace(
         load_revision=lambda rev_id: {"fields": {"status": {"value": "published"}}}
     )
 
     rule.get_bugs()
 
-    assert rule.autofix_changes == {
-        "123": {"flags": [{"id": 123, "status": "X"}]}
-    }
+    assert rule.autofix_changes == {"123": {"flags": [{"id": 123, "status": "X"}]}}
 
 
 def test_all_relevant_patches_must_land(monkeypatch):
@@ -183,10 +175,7 @@ def test_all_relevant_patches_must_land(monkeypatch):
 
 def test_cleanup_is_capped_to_framework_limit(monkeypatch):
     rule = _rule(monkeypatch)
-    bugs = {
-        str(bugid): _bug(str(bugid), status="RESOLVED")
-        for bugid in range(1, 52)
-    }
+    bugs = {str(bugid): _bug(str(bugid), status="RESOLVED") for bugid in range(1, 52)}
     _set_bugs(monkeypatch, bugs)
     monkeypatch.setattr(
         rule,
[taskcluster 2026-08-30T20:54:51.416Z]                        Exit Code: 1
[taskcluster 2026-08-30T20:54:51.416Z]                        User Time: 9.036ms
[taskcluster 2026-08-30T20:54:51.416Z]                      Kernel Time: 19.363ms
[taskcluster 2026-08-30T20:54:51.416Z]                        Wall Time: 1m9.017999741s
[taskcluster 2026-08-30T20:54:51.416Z]  Average Available System Memory: 14.08 GiB
[taskcluster 2026-08-30T20:54:51.416Z]       Average System Memory Used: 1.53 GiB
[taskcluster 2026-08-30T20:54:51.416Z]          Peak System Memory Used: 1.75 GiB
[taskcluster 2026-08-30T20:54:51.416Z]              Total System Memory: 15.61 GiB
[taskcluster 2026-08-30T20:54:51.416Z]                           Result: FAILED
[taskcluster 2026-08-30T20:54:51.416Z] === Task Finished ===
[taskcluster 2026-08-30T20:54:51.416Z] Task Duration: 1m9.018547859s
[taskcluster:error] exit status 1