You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Code Quality] Fix context.Background() in logs_orchestrator_filters.go and update_extension_check.go #48470
Two secondary context.Background() leakage sites identified in the context cancellation audit (discussion #48389):
pkg/cli/logs_orchestrator_filters.go:167 — fetchJobStatusesForProcessedRun(context.Background(), ...) is called inside buildRunsModel; the enclosing log-download commands carry a live context. Ctrl+C cannot cancel job-status fetches.
pkg/cli/update_extension_check.go:49 — upgradeExtensionIfOutdated has no context parameter, but its only caller (runUpgradeCommand:245) holds opts.ctx from cobra. The GitHub API call for the latest release is fully uncancellable.
Suggested Changes
logs_orchestrator_filters.go
Propagate context from the caller into buildRunsModel → fetchJobStatusesForProcessedRun
Replace context.Background() at line 167 with the passed-in context
update_extension_check.go
Add ctx context.Context parameter to upgradeExtensionIfOutdated
Update the call site in runUpgradeCommand to pass opts.ctx
Use the context for the GitHub API release-check call
Files Affected
pkg/cli/logs_orchestrator_filters.go (line 167)
pkg/cli/update_extension_check.go (line 49, 245)
Success Criteria
Both functions accept and honour a context.Context parameter
Ctrl+C during log downloads and extension checks propagates cancellation correctly
Activity