Dashboard › cli › Distillation
ac1981cf-5b63-42a6-b69c-ba2b2da6e825["lore_tm_v1_282owKJTHxHnRMGnnJ65skFImXWMiFYAHtOrO9sDXbg","lore_tm_v1_Caw_0plMoLfwiqXVnGWdLhuA7OvDb6LmP9DlHYcmlN0"]
packages/cli/src/lib/ghcr.ts configures GHCR_REQUEST_TIMEOUT = 10_000, GHCR_MAX_RETRIES = 1, and GHCR_BLOB_TIMEOUT = 30_000.packages/cli/src/lib/ghcr.ts defines isRetryableError() to retry TimeoutError, AbortError, and errors containing timeout, econnreset, econnrefused, network, or fetch failed; HTTP-level failures are not retried.packages/cli/src/lib/ghcr.ts defines buildSignal() using AbortSignal.timeout(timeout) and, when supplied, AbortSignal.any([timeoutSignal, externalSignal]); isExternalAbort() prevents retries of caller-triggered cancellation.fetchWithRetry() in packages/cli/src/lib/ghcr.ts uses customFetch, makes up to 2 total attempts because GHCR_MAX_RETRIES = 1, and throws UpgradeError("network_error", ...) after attempts are exhausted.packages/cli/src/lib/ghcr.ts exports GHCR_TAG = "nightly" and uses OCI manifest media type application/vnd.oci.image.manifest.v1+json.getAnonymousToken(signal?) requests https://ghcr.io/token?scope=repository:getsentry/cli:pull, requires a JSON token field, and throws UpgradeError("network_error", ...) for failed HTTP responses or missing tokens.fetchManifest(token, tag, signal?) requests /v2/getsentry/cli/manifests/${tag} with bearer authorization, the OCI manifest Accept header, and getUserAgent(); fetchNightlyManifest(token) awaits fetchManifest(token, GHCR_TAG).getNightlyVersion(manifest) reads manifest.annotations?.version and throws UpgradeError("network_error", "Nightly manifest has no version annotation") when absent.findLayerByFilename(manifest, filename) matches the org.opencontainers.image.title layer annotation and throws UpgradeError("version_not_found", \No nightly build found for ${filename}`)` when no layer matches.downloadNightlyBlob(token, digest, signal?) applies the 30-second GHCR_BLOB_TIMEOUT only to the initial authenticated GHCR request; the redirected Azure download uses the callerβs signal without AbortSignal.timeout because full nightly binaries are approximately 30 MB and a 30-second limit would require sustained throughput of approximately 8 Mbps.packages/cli/src/lib/ghcr.ts uses TAGS_PAGE_SIZE = 100; fetchTagPage() calls /v2/getsentry/cli/tags/list?n=100, adds &last=${encodeURIComponent(lastTag)} for pagination, and returns data.tags ?? [].listTags(token, prefix?, signal?) repeatedly awaits fetchTagPage(), optionally retains tags via tag.startsWith(prefix), stops on an empty page or a page shorter than 100 tags, and otherwise advances with tags.at(-1).downloadLayerBlob(token, digest, signal?) awaits downloadNightlyBlob(token, digest, signal) and returns response.arrayBuffer(); it is intended for small patch payloads of 50β500 KB.