Thanks to visit codestin.com
Credit goes to github.com

Skip to content

[16.0] Non cancelable context#5501

Merged
eriknordmark merged 4 commits into
lf-edge:16.0from
europaul:backport/16.0/non-cancelable-context
Dec 18, 2025
Merged

[16.0] Non cancelable context#5501
eriknordmark merged 4 commits into
lf-edge:16.0from
europaul:backport/16.0/non-cancelable-context

Conversation

@europaul

@europaul europaul commented Dec 18, 2025

Copy link
Copy Markdown
Contributor

Description

Backport of #5497

PR dependencies

None.

How to test and validate this PR

This PR should not change EVE's behavior, just make it more robust. So existing testing should suffice.

Changelog notes

Improve context management in controllerconn.

Checklist

  • I've added a reference link to the original PR
  • PR's title follows the template

Update eve-libs to include context validation in dialer.

Signed-off-by: Paul Gaiduk <[email protected]>
(cherry picked from commit a840bb2)
Signed-off-by: Paul Gaiduk <[email protected]>
Validate that the context passed to SendOnIntf is not nil and is
cancelable. Otherwise, dump the stack for better traceability.

Signed-off-by: Paul Gaiduk <[email protected]>
(cherry picked from commit 96f45c4)
Replace context.Background with context from
GetContextForAllIntfFunctions - it's cancelable and thus more suitable
for network operations.

Signed-off-by: Paul Gaiduk <[email protected]>
(cherry picked from commit 77ec87b)
When doing HTTP requests in loops it's a good practice to close the
response body explicitly after reading it, instead of deferring it
until the surrounding function returns. This helps to free up resources
sooner and avoid potential resource leaks, especially in bigger loops.

Signed-off-by: Paul Gaiduk <[email protected]>
(cherry picked from commit 4d88c7a)
@codecov

codecov Bot commented Dec 18, 2025

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 28.08%. Comparing base (a9c5321) to head (8666706).
⚠️ Report is 13 commits behind head on 16.0.

Additional details and impacted files
@@            Coverage Diff             @@
##             16.0    #5501      +/-   ##
==========================================
+ Coverage   19.52%   28.08%   +8.55%     
==========================================
  Files          19       19              
  Lines        3021     2314     -707     
==========================================
+ Hits          590      650      +60     
+ Misses       2310     1520     -790     
- Partials      121      144      +23     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@eriknordmark eriknordmark 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.

LGTM

@eriknordmark eriknordmark merged commit 7e7ed58 into lf-edge:16.0 Dec 18, 2025
47 of 49 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.

3 participants