Skip to content

fix(linker): handle empty pr issue regexp#8911

Open
matan-wonderful wants to merge 1 commit into
apache:mainfrom
matan-wonderful:fix/linker-empty-pr-regexp
Open

fix(linker): handle empty pr issue regexp#8911
matan-wonderful wants to merge 1 commit into
apache:mainfrom
matan-wonderful:fix/linker-empty-pr-regexp

Conversation

@matan-wonderful

@matan-wonderful matan-wonderful commented Jun 8, 2026

Copy link
Copy Markdown

Summary

This PR fixes a linker crash when prToIssueRegexp is empty.

Normal-mode projects can enable the linker metric without a configured regexp, which currently produces a linker task with an empty regexp. PrepareTaskData leaves PrToIssueRegexp nil in that case, and LinkPrToIssue later panics when it calls FindAllString on the nil regexp.

Changes:

  • Skip linker metric pipeline generation when prToIssueRegexp is empty.
  • Reject explicit linker task options with an empty prToIssueRegexp.
  • Add a defensive nil-regexp guard in LinkPrToIssue.
  • Add unit coverage for empty and trimmed regexp handling.

Does this close any open issues?

No linked issue.

Screenshots

Not applicable.

Other Information

Validation:

  • go test ./plugins/linker/tasks ./plugins/linker/impl from backend/
  • git diff --check

Signed-off-by: Matan Ryngler <matan.r@wonderful.ai>
@matan-wonderful matan-wonderful force-pushed the fix/linker-empty-pr-regexp branch from 96d5911 to e0fdd84 Compare June 8, 2026 08:25
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.

1 participant