LinearClient.defaultBackend makes a new HttpClient for each call and never closes it #643
Labels
No labels
agent-ready
bug
contract
documentation
duplicate
enhancement
good first issue
help wanted
invalid
needs-human
needs-input
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
iterative-works/iw-cli#643
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Found during IW-637.
private def defaultBackend: SyncBackend = DefaultSyncBackend()is adef, so each call to aLinearClientmethod that uses the default backend makes a newHttpClientand never closes it —core/adapters/LinearClient.scala:16.Two more
core/adapters/LinearClient.scalaitems, found in IW-701:issueSearchis deprecated in favour ofsearchIssues;buildSearchIssuesQuerystill usesissueSearch— Linear schema.LinearClient.buildLinearQuerystill interpolatesissueId.valueinto GraphQL text besidegraphqlRequest; safe only whileIssueIdstays regex-validated — IW-701 review-phase-01-20261008-071827.md (security, composition, architecture).Intake: needs-input
Workflow: diagnostic
Reason: G7 (1 [human] finding)
Analysis: project-management/issues/IW-643/analysis.md on branch IW-643
1. Should IW-643 also fix the same HttpClient leak in ForgejoClient and YouTrackClient, or only in LinearClient? (G7)
The issue names only
LinearClient.defaultBackend. The analysis widens the fix on its own initiative. Its claim that "no other open issue covers ForgejoClient or YouTrackClient" has no evidence, and the repository cannot confirm it. Both clients use the same definition: ForgejoClient.scala#L34 and YouTrackClient.scala#L17. The dashboard pollers call ForgejoClient most often. See the analysis scope decision.defaultBackendchanges, two more docs/api files and more test assertions.Recommended: a): it is the same defect with the same one-line cause, and ForgejoClient leaks the most in the dashboard, so a separate issue would repeat the same work.
Answer in a comment on this issue, per number, for example "1: a", or in your own words; intake reads it on its next iteration.