[PR #549] [MERGED] perf(update): run stale update checks asynchronously #612

Closed
opened 2026-02-26 22:31:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/549
Author: @rudrankriyam
Created: 2/14/2026
Status: Merged
Merged: 2/14/2026
Merged by: @rudrankriyam

Base: mainHead: perf/async-update-check-preflight


📝 Commits (1)

  • fc2612c perf(update): run stale update checks asynchronously

📊 Changes

4 files changed (+231 additions, -13 deletions)

View changed files

📝 cmd/run.go (+48 -13)
📝 cmd/run_additional_test.go (+108 -0)
📝 internal/update/check.go (+34 -0)
📝 internal/update/update_test.go (+41 -0)

📄 Description

Summary

  • add update.CachedUpdateAvailable to do a cache-only preflight (no network) before command execution
  • keep synchronous update + restart only when cache already shows a newer version, otherwise run a best-effort async refresh with AutoUpdate=false and a short timeout
  • add regression tests for async non-blocking behavior, synchronous cached-update behavior, restart behavior, and cache probe logic

Test plan

  • make format
  • make lint
  • ASC_BYPASS_KEYCHAIN=1 make test
  • go test ./cmd -run 'TestRun_UpdateCheckRunsAsyncWhenCacheHasNoUpdate|TestRun_CachedUpdateChecksSynchronously|TestRun_CachedUpdateCanRestartProcess'
  • go test ./internal/update -run 'TestCachedUpdateAvailable_NoCache|TestCachedUpdateAvailable_FindsNewerVersion'

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/rudrankriyam/App-Store-Connect-CLI/pull/549 **Author:** [@rudrankriyam](https://github.com/rudrankriyam) **Created:** 2/14/2026 **Status:** ✅ Merged **Merged:** 2/14/2026 **Merged by:** [@rudrankriyam](https://github.com/rudrankriyam) **Base:** `main` ← **Head:** `perf/async-update-check-preflight` --- ### 📝 Commits (1) - [`fc2612c`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/fc2612c2b3ccc660f697cb825799b17fb233f52f) perf(update): run stale update checks asynchronously ### 📊 Changes **4 files changed** (+231 additions, -13 deletions) <details> <summary>View changed files</summary> 📝 `cmd/run.go` (+48 -13) 📝 `cmd/run_additional_test.go` (+108 -0) 📝 `internal/update/check.go` (+34 -0) 📝 `internal/update/update_test.go` (+41 -0) </details> ### 📄 Description ## Summary - add `update.CachedUpdateAvailable` to do a cache-only preflight (no network) before command execution - keep synchronous update + restart only when cache already shows a newer version, otherwise run a best-effort async refresh with `AutoUpdate=false` and a short timeout - add regression tests for async non-blocking behavior, synchronous cached-update behavior, restart behavior, and cache probe logic ## Test plan - [x] `make format` - [x] `make lint` - [x] `ASC_BYPASS_KEYCHAIN=1 make test` - [x] `go test ./cmd -run 'TestRun_UpdateCheckRunsAsyncWhenCacheHasNoUpdate|TestRun_CachedUpdateChecksSynchronously|TestRun_CachedUpdateCanRestartProcess'` - [x] `go test ./internal/update -run 'TestCachedUpdateAvailable_NoCache|TestCachedUpdateAvailable_FindsNewerVersion'` --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 22:31:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/App-Store-Connect-CLI#612
No description provided.