• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mozilla / relman-auto-nag / #4077

pending completion
#4077

push

coveralls-python

suhaibmujahid
Merge remote-tracking branch 'upstream/master' into wiki-missed

549 of 3109 branches covered (17.66%)

615 of 615 new or added lines in 27 files covered. (100.0%)

1773 of 8016 relevant lines covered (22.12%)

0.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/auto_nag/scripts/close_intermittents.py
1
# This Source Code Form is subject to the terms of the Mozilla Public
2
# License, v. 2.0. If a copy of the MPL was not distributed with this file,
3
# You can obtain one at http://mozilla.org/MPL/2.0/.
4

5
from auto_nag.bzcleaner import BzCleaner
×
6

7

8
class Intermittents(BzCleaner):
×
9
    normal_changes_max: int = 300
×
10

11
    def description(self):
×
12
        return "Intermittent test failure bugs unchanged in 21 days"
×
13

14
    def get_bz_params(self, date):
×
15
        params = {
×
16
            "include_fields": ["_custom"],
17
            "n1": "1",
18
            "f1": "longdescs.count",
19
            "o1": "changedafter",
20
            "v1": "-3w",
21
            "f2": "blocked",
22
            "o2": "isempty",
23
            "f3": "flagtypes.name",
24
            "o3": "notequals",
25
            "v3": "needinfo?",
26
            "f4": "OP",
27
            "n4": "1",
28
            "f5": "bug_status",
29
            "o5": "changedto",
30
            "v5": "REOPENED",
31
            "f6": "bug_status",
32
            "o6": "changedafter",
33
            "v6": "-7d",
34
            "f7": "CP",
35
            "f8": "bug_severity",
36
            "o8": "notequals",
37
            "v8": ["S1", "critical"],
38
            "f9": "component",
39
            "o9": "nowordssubstr",
40
            "v9": "new tab page, messaging system",
41
            "f10": "keywords",
42
            "o10": "allwords",
43
            "v10": "intermittent-failure",
44
            "f11": "keywords",
45
            "o11": "nowords",
46
            "v11": "leave-open, test-verify-fail",
47
            "priority": "P5",
48
            "resolution": "---",
49
            "status_whiteboard_type": "notregexp",
50
            "status_whiteboard": "(leave open|leave-open|leaveopen|test disabled|test-disabled|testdisabled)",
51
        }
52

53
        return params
×
54

55
    def handle_bug(self, bug, data):
×
56
        bugid = str(bug["id"])
×
57

58
        status_flags = {
×
59
            field: "wontfix"
60
            for field, value in bug.items()
61
            if field.startswith("cf_status_") and value in ("affected", "fix-optional")
62
        }
63

64
        self.autofix_changes[bugid] = {
×
65
            **status_flags,
66
            "status": "RESOLVED",
67
            "resolution": "INCOMPLETE",
68
            "comment": {
69
                "body": f"https://wiki.mozilla.org/Bug_Triage#Intermittent_Test_Failure_Cleanup\n{self.get_documentation()}"
70
            },
71
        }
72

73
        return bug
×
74

75

76
if __name__ == "__main__":
×
77
    Intermittents().run()
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc