Skip to content

fix(scan): honour the caller context when downloading the ports list - #324

Merged
vmfunc merged 2 commits into
vmfunc:mainfrom
TBX3D:fix/ports-list-context
Jul 22, 2026
Merged

fix(scan): honour the caller context when downloading the ports list#324
vmfunc merged 2 commits into
vmfunc:mainfrom
TBX3D:fix/ports-list-context

Conversation

@TBX3D

@TBX3D TBX3D commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

the common-scope ports fetch built its request with context.TODO(),
so a cancelled run or -max-time deadline could not abort a hung list
download even though the dialer already used the passed context.

the common-scope ports fetch built its request with context.TODO(),
so a cancelled run or -max-time deadline could not abort a hung list
download even though the dialer already used the passed context.
@TBX3D
TBX3D requested a review from vmfunc as a code owner July 3, 2026 23:56
@github-actions github-actions Bot added size/m <200 lines changed scan changes to scan engine tests test changes labels Jul 3, 2026
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

pr summary

2 files changed (+63 -1)

category files
go source 2
tests 1

@codecov-commenter

Copy link
Copy Markdown

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@7ea1cd2). Learn more about missing BASE report.
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #324   +/-   ##
=======================================
  Coverage        ?   54.90%           
=======================================
  Files           ?       81           
  Lines           ?     6874           
  Branches        ?        0           
=======================================
  Hits            ?     3774           
  Misses          ?     2828           
  Partials        ?      272           

☔ View full report in Codecov by Harness.
📢 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.

@vmfunc vmfunc left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

ports.go:50 was the only spot still on context.TODO() while the dialer already threaded ctx, so the list download couldn't be aborted mid-flight. right fix. and the test cancelling before the call so only ctx-awareness can unblock it is exactly the thing that proves it. in.

@vmfunc
vmfunc merged commit 41f35ac into vmfunc:main Jul 22, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

scan changes to scan engine size/m <200 lines changed tests test changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants