Skip to content

Clean up dropped resources in relayer construction#1927

Merged
jmank88 merged 3 commits intomainfrom
ogt/clean-up-potential-resource-drops-in-relayer-client
Mar 26, 2026
Merged

Clean up dropped resources in relayer construction#1927
jmank88 merged 3 commits intomainfrom
ogt/clean-up-potential-resource-drops-in-relayer-client

Conversation

@ogtownsend
Copy link
Copy Markdown
Contributor

@ogtownsend ogtownsend commented Mar 25, 2026

This PR addresses an apparent memory leak where resources created within the relayer closures are not properly cleaned up when the connection refreshes.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 25, 2026

📊 API Diff Results

No changes detected for module github.com/smartcontractkit/chainlink-common

View full report

jmank88
jmank88 previously approved these changes Mar 25, 2026
@ogtownsend ogtownsend marked this pull request as ready for review March 25, 2026 21:43
@ogtownsend ogtownsend requested review from a team as code owners March 25, 2026 21:43
Copilot AI review requested due to automatic review settings March 25, 2026 21:43
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR aims to prevent leaked/dropped resources during relayer construction in the LOOP relayer gRPC client/server wiring, supporting LINK-777.

Changes:

  • Return accumulated net.Resources (deps) from relayer/CCIP provider client-connection constructors so clientConn.refresh can close them on failure.
  • Fix a server-side resource closer bug where the CSA keystore resource was closing the wrong connection.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pkg/loop/internal/relayer/relayer.go
Comment thread pkg/loop/internal/relayer/relayer.go
@jmank88 jmank88 added this pull request to the merge queue Mar 26, 2026
Merged via the queue into main with commit c8e0d77 Mar 26, 2026
30 of 32 checks passed
@jmank88 jmank88 deleted the ogt/clean-up-potential-resource-drops-in-relayer-client branch March 26, 2026 16:37
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.

4 participants