Skip to content

Support importing web-bugs data from GitHub#546

Open
jgraham wants to merge 2 commits into
mainfrom
web_bugs
Open

Support importing web-bugs data from GitHub#546
jgraham wants to merge 2 commits into
mainfrom
web_bugs

Conversation

@jgraham

@jgraham jgraham commented Jul 1, 2026

Copy link
Copy Markdown
Member

Checklist for reviewer:

  • Commits should reference a bug or github issue, if relevant (if a bug is referenced, the pull request should include the bug number in the title)

  • Scan the PR and verify that no changes (particularly to .circleci/config.yml) will cause environment variables (particularly credentials) to be exposed in test logs

  • Ensure the container image will be using permissions granted to telemetry-airflow responsibly.

jgraham added 2 commits July 1, 2026 09:28
Import web-bugs GitHub issues so that we can collect statistics on
them and use them with autowebcompat.

Because there are are large number of issues backfill is expected to
be slow, so there's support for interruptable import of the initial
issues. This is expected to be run before deploying the ETL.
@jgraham
jgraham requested a review from a team as a code owner July 1, 2026 08:29
@jgraham
jgraham requested a review from ksy36 July 1, 2026 08:30
if backfill_file and repo.repo == "webcompat/web-bugs":
# Milestone 8 is invalid issues, skip these in the backfill because the
# web-bugs data files overwrite these with web-bugs-private data
milestone = 8

@ksy36 ksy36 Jul 16, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

So I realized this would also skip issues in invalid milestone that are triaged by Softvision, there are about 20k:
https://github.com/webcompat/web-bugs/issues?q=is%3Aissue%20state%3Aclosed%20milestone%3Ainvalid%20-label%3Abugbug-probability-high

We replace the content of a public issue based on its title on the bugbug side
if item["title"] == "Issue closed.":, so we can do the same to match bugbug? These are the issues that are automatically closed by ml bot.


# Otherwise try both parsers and see which returns the most data.
webcompat_parse = self._parse_issue_body_webcompat(number, body)
webbugs_parse = self._parse_issue_body_webcompat(number, body)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Suggested change
webbugs_parse = self._parse_issue_body_webcompat(number, body)
webbugs_parse = self._parse_issue_body_webbugs(number, body)

context.bq_client,
[WebBugsRepo(gh_client, context.project["web_bugs"]["web_bugs"].table())],
backfill=context.args.web_bugs_backfill,
backfill_files=parse_backfill_paths(context.args.web_bugs_backfill_file),

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This seems to be failing with ERROR:root:'NoneType' object is not iterable when trying to run the default job without supplying backfill as parse_backfill_paths expects type Iterable

)
path_obj = Path(path)
if not path_obj.exists():
ValueError(f"Invalid --web-bugs-backfill-file {item}; path does not exist")

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

should this raise? and the one above

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.

2 participants