Skip to content

fix(github): return the issue extractor setup errors - #9359

Merged
klesh merged 1 commit into
apache:mainfrom
ShivamSharma43:fix/issue-extractor-err
Nov 11, 2026
Merged

klesh merged 1 commit into
apache:mainfrom
ShivamSharma43:fix/issue-extractor-err

Conversation

@ShivamSharma43

Copy link
Copy Markdown
Contributor

Summary

The GitHub extractApiIssues and GitHub GraphQL extractIssues subtasks returned nil when their setup failed, so they were marked successful without extracting anything and the error was lost.

Both extractors did this after NewIssueRegexes, and the GraphQL extractor did it again after getMilestoneMap:

if err != nil {
	return nil
}

NewIssueRegexes fails when a scope config regex (issueSeverity, issuePriority, issueTypeBug, ...) doesn't compile. getMilestoneMap fails when the _tool_github_milestones query fails. The pipeline then went on to convert whatever was already in _tool_github_issues, and the user wasn't told that the regex was invalid.

Changes:

  • plugins/github/tasks/issue_extractor.go, plugins/github_graphql/tasks/issue_extractor.go: return err, like the PR extractors of both plugins.
  • plugins/github/tasks/issue_extractor_test.go: TestExtractApiIssuesReturnsIssueRegexError passes a scope config with an invalid issueSeverity regex and checks that ExtractApiIssues returns the error.
  • plugins/github_graphql/tasks/issue_extractor_test.go (new): the same regex test for ExtractIssues, plus TestExtractIssuesReturnsMilestoneQueryError, which makes the milestone query fail through a mocked dal.Dal.

Does this close any open issues?

Closes #9358

Screenshots

N/A

Other Information

  • go test ./plugins/github/tasks/ ./plugins/github_graphql/tasks/: pass. The three new tests fail on main (the extractors return nil).
  • go build, go vet, gofmt and golangci-lint run ./plugins/github/... ./plugins/github_graphql/...: clean. The github and github_graphql e2e tests need E2E_DB_URL, which I didn't run locally; their scope configs have valid regexes, so they don't reach these error paths.
  • No other plugin's extractor has this return nil after its setup. The GitLab issue extractor already returns its regex errors.
  • No open PR touches these files.
  • Suggested label: pr-type/bug-fix.
  • AI assistance disclosure: this change was prepared with the help of Claude Code (Claude Opus 5.5), and I reviewed the diff. The commit carries a Generated-by: trailer per the ASF generative tooling guidance.

🤖 Generated with Claude Code

ExtractApiIssues and the github_graphql ExtractIssues returned nil when
NewIssueRegexes failed, e.g. on an invalid issue regex in the scope
config. The github_graphql extractor did the same when the milestone
query failed. The subtask was marked successful without extracting
anything, and the error was lost. Return it, like the PR extractors do.

Closes apache#9358

Generated-by: Claude Code (Claude Opus 5.5)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Shivam Sharma <192242476+ShivamSharma43@users.noreply.github.com>
Copilot AI balanced review requested due to automatic review settings November 10, 2026 07:53

Copilot AI left a comment

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.

Copilot was unable to review this pull request because the user who requested the review has insufficient remaining quota. Try requesting a review at a lower effort level.

@klesh
klesh merged commit aeccf3f into apache:main Nov 11, 2026
10 checks passed
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.

[Bug][GitHub] Extract Issues succeeds without extracting when the issue regexes or milestones can't be loaded

3 participants