Skip to content

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

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

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
@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

This pull request has been automatically marked as stale because it has not had recent activity for 120 days. It will be closed in 7 days if no further activity occurs.

@github-actions github-actions Bot added the Stale label Oct 7, 2026
@github-actions

Copy link
Copy Markdown
Contributor

This pull request has been closed because it has not had recent activity. You could reopen it if you try to continue your work, and anyone who are interested in it are encouraged to continue work on this pull request.

@github-actions github-actions Bot closed this Oct 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant