-
Notifications
You must be signed in to change notification settings - Fork 68
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add webcompat_score rule #2558
base: master
Are you sure you want to change the base?
Add webcompat_score rule #2558
Conversation
a110499
to
7b0ce91
Compare
7b0ce91
to
fca4b3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, @jgraham! I left some minor comments.
The rule needs to be added to cron scripts. If updating the scores is not time-sensitive, using cron_run_daily.sh
would be less intesive on Bugzilla compared to cron_run_hourly.sh
.
Also, we need to add it to the wiki page.
def handle_bug( | ||
self, bug: dict[str, Any], data: dict[str, Any] | ||
) -> Optional[dict[str, Any]]: | ||
bug_id = bug["id"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The ID should be a string consistent with other rules, and this is what the parent class expects:
bug_id = bug["id"] | |
bug_id = str(bug["id"]) |
We have an issue to change that (i.e., #1432).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed, although note that making the change as written would break things (because the bug number is an integer in self.scored_bugs
).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: It would be great to have bug_id = str(bug["id"])
, so it will less likely to be messied when doing the refactoring in #1432 (it will match the search query).
You could use bug["id"]
directly when using the ID with self.scored_bugs
.
"f6": "product", | ||
"o6": "notequals", | ||
"v6": "Web Compatibility", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why should the bug not be in Web Compatibility
when considering the webcompat:site-report
keyword?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Because the first OR condition gets everything in Web Compatibility :: Site Reports
. This matches the logic we're using when importing the bugs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to confirm that this is initial. In this way, we will exclude bugs that have the webcompat:site-report
keyword if they are in the Web Compatibility
product (other than the Site Reports
component).
fca4b3c
to
9ad3c39
Compare
This sets the cf_webcompat_score field to match a value computed in BigQuery.
9ad3c39
to
d451e79
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
"f6": "product", | ||
"o6": "notequals", | ||
"v6": "Web Compatibility", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I just wanted to confirm that this is initial. In this way, we will exclude bugs that have the webcompat:site-report
keyword if they are in the Web Compatibility
product (other than the Site Reports
component).
def handle_bug( | ||
self, bug: dict[str, Any], data: dict[str, Any] | ||
) -> Optional[dict[str, Any]]: | ||
bug_id = bug["id"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: It would be great to have bug_id = str(bug["id"])
, so it will less likely to be messied when doing the refactoring in #1432 (it will match the search query).
You could use bug["id"]
directly when using the ID with self.scored_bugs
.
This sets the cf_webcompat_score field to match a value computed in BigQuery.
Checklist
to-be-announced
tag added if this is worth announcing