Skip to content

Improve context handling#235

Merged
thelovekesh merged 11 commits into
mainfrom
update/context-handling
May 26, 2026
Merged

Improve context handling#235
thelovekesh merged 11 commits into
mainfrom
update/context-handling

Conversation

@thelovekesh
Copy link
Copy Markdown
Collaborator

  • Improve context handling
  • Add atomicwriter.WriteFile to write state files in a atomic way

@github-actions
Copy link
Copy Markdown

📦 wpm cli builds 📦

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request comprehensively improves context propagation across the CLI, archiving utilities, and API clients to ensure context cancellation (such as SIGINT) is properly honored. It also introduces a new atomicwriter package to write configuration and lockfiles atomically, improves HTTP connection reuse by draining response bodies, limits error body read sizes, and cleans up stale cache files. The reviewer feedback suggests replacing time.After with time.NewTimer in the retry loop of renameFile to prevent potential short-term timer leaks.

Comment thread pkg/api/cache.go
@thelovekesh thelovekesh merged commit 090a8d7 into main May 26, 2026
17 checks passed
@thelovekesh thelovekesh deleted the update/context-handling branch May 26, 2026 21:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant