[PR #546] [CLOSED] Config load caching bug #609

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/546
Author: @cursor[bot]
Created: 2/14/2026
Status: Closed

Base: cursor/appstoreconnectcli-async-await-f47dHead: cursor/config-load-caching-bug-7228


📝 Commits (7)

  • 096f892 refactor: unify polling loops with shared helper
  • 69d31a4 refactor: centralize secure open nofollow logic
  • 111cfed perf: cache asc config loads in runtime resolvers
  • 198a563 refactor: dedupe linkage output registry adapters
  • b004364 refactor(cli): add shared output flag binder
  • 447fc78 refactor(asc): add generic output registry adapters
  • 2f3814e Fix config cache to retry after load failures

📊 Changes

26 files changed (+616 additions, -237 deletions)

View changed files

📝 internal/asc/client_core.go (+45 -2)
internal/asc/client_core_config_cache_test.go (+115 -0)
📝 internal/asc/client_publish.go (+6 -14)
📝 internal/asc/output_registry.go (+14 -0)
📝 internal/asc/output_registry_init.go (+92 -88)
internal/asc/poll.go (+52 -0)
internal/asc/poll_test.go (+80 -0)
📝 internal/asc/secure_open_other.go (+6 -2)
📝 internal/asc/secure_open_unix.go (+2 -3)
📝 internal/cli/apps/apps.go (+10 -13)
📝 internal/cli/assets/assets_helpers.go (+13 -12)
📝 internal/cli/assets/assets_previews.go (+6 -9)
📝 internal/cli/assets/assets_screenshots.go (+8 -12)
📝 internal/cli/builds/builds.go (+4 -6)
📝 internal/cli/shared/build_wait.go (+5 -13)
📝 internal/cli/shared/secure_open_other.go (+7 -6)
📝 internal/cli/shared/secure_open_unix.go (+3 -5)
📝 internal/cli/shared/shared.go (+14 -0)
📝 internal/cli/shared/shared_test.go (+36 -0)
📝 internal/cli/versions/versions.go (+14 -20)

...and 6 more files

📄 Description

Summary

  • Fixes a bug where loadConfig() would permanently cache a nil configuration if the initial load failed, preventing recovery from transient issues. The sync.Once and cachedConfig are now reset on error, allowing subsequent calls to retry loading the configuration.

Validation

  • make format
  • make lint
  • make test


🔄 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/546 **Author:** [@cursor[bot]](https://github.com/apps/cursor) **Created:** 2/14/2026 **Status:** ❌ Closed **Base:** `cursor/appstoreconnectcli-async-await-f47d` ← **Head:** `cursor/config-load-caching-bug-7228` --- ### 📝 Commits (7) - [`096f892`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/096f892dc64c67d9a1c4939d5d434f85a8f8a099) refactor: unify polling loops with shared helper - [`69d31a4`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/69d31a4fd05299ddd9bbb718d4c1b955da96be5f) refactor: centralize secure open nofollow logic - [`111cfed`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/111cfedb802e6c48f2ea22775d60334009ec5e08) perf: cache asc config loads in runtime resolvers - [`198a563`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/198a5634cf1ca435f6cf21be8497815bea5f42a4) refactor: dedupe linkage output registry adapters - [`b004364`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/b0043640933d80fbf0b033b0d91811b965ef2a05) refactor(cli): add shared output flag binder - [`447fc78`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/447fc7866385593eb693219155c7637026eec35f) refactor(asc): add generic output registry adapters - [`2f3814e`](https://github.com/rudrankriyam/App-Store-Connect-CLI/commit/2f3814ee495fc6e9ffe8811185c572dc759d31ee) Fix config cache to retry after load failures ### 📊 Changes **26 files changed** (+616 additions, -237 deletions) <details> <summary>View changed files</summary> 📝 `internal/asc/client_core.go` (+45 -2) ➕ `internal/asc/client_core_config_cache_test.go` (+115 -0) 📝 `internal/asc/client_publish.go` (+6 -14) 📝 `internal/asc/output_registry.go` (+14 -0) 📝 `internal/asc/output_registry_init.go` (+92 -88) ➕ `internal/asc/poll.go` (+52 -0) ➕ `internal/asc/poll_test.go` (+80 -0) 📝 `internal/asc/secure_open_other.go` (+6 -2) 📝 `internal/asc/secure_open_unix.go` (+2 -3) 📝 `internal/cli/apps/apps.go` (+10 -13) 📝 `internal/cli/assets/assets_helpers.go` (+13 -12) 📝 `internal/cli/assets/assets_previews.go` (+6 -9) 📝 `internal/cli/assets/assets_screenshots.go` (+8 -12) 📝 `internal/cli/builds/builds.go` (+4 -6) 📝 `internal/cli/shared/build_wait.go` (+5 -13) 📝 `internal/cli/shared/secure_open_other.go` (+7 -6) 📝 `internal/cli/shared/secure_open_unix.go` (+3 -5) 📝 `internal/cli/shared/shared.go` (+14 -0) 📝 `internal/cli/shared/shared_test.go` (+36 -0) 📝 `internal/cli/versions/versions.go` (+14 -20) _...and 6 more files_ </details> ### 📄 Description ## Summary - Fixes a bug where `loadConfig()` would permanently cache a `nil` configuration if the initial load failed, preventing recovery from transient issues. The `sync.Once` and `cachedConfig` are now reset on error, allowing subsequent calls to retry loading the configuration. ## Validation - [x] `make format` - [x] `make lint` - [x] `make test` --- --- <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#609
No description provided.