Repository navigation
fix(platform): name the failing credential in deploy, repair and upgrade errors - #887
Open
Brooooooklyn wants to merge 15 commits into
Open
Brooooooklyn wants to merge 15 commits into
Brooooooklyn wants to merge 15 commits into
Conversation
… missing permission Each operator and runtime client now knows which credential it holds and where it came from. A 401 or 403 answer names it, keeps the same error class, status and path, and says what to do: replace a token Cloudflare did not accept, or add the missing permission. Under browser login the AI Gateway client says it used the runtime token (from the variable or saved on this machine), so the fix is the runtime token. Without a runtime token it says browser login cannot use AI Gateway. The operator check and the runtime-token preflight run every check and throw one error that lists each denied permission. The email-only error class stays, so install still keeps a token that only lacks email access. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The plan reads Cloudflare inventory in parallel. Collect each 401 or 403 answer and group it by credential, next to any missing account prerequisite, instead of surfacing the first raw error. One denial is still thrown as it is, and the first denial stays the cause. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
After activation, a read that comes back empty, or that has an older deployment we already listed at its head, now waits and reads again within the same budget, the same as a head that still shows the previous deployment. If it stays stale, the deploy ends with "could not confirm activation" and leaves the cutover for recovery. A head with an unknown id still fails as "changed concurrently after activation". A new Worker whose list is empty right after creation waits the same way. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…signature Parse the S3 <Code> from the R2 error body. For 401/403 with Unauthorized, AccessDenied, SignatureDoesNotMatch or InvalidAccessKeyId, say the platform's R2 upload credentials are likely wrong and give operator steps. Other codes keep the raw response. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Setting only one VOID_PLATFORM_R2_* value replaced half of the live pair and left the Workers signing with a mismatched pair. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
One SigV4-signed ListObjectsV2 against the assets bucket. A rejected signature fails with the source of the pair and the steps to fix it; a network error or R2 outage only warns. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… the platform When the run sends an R2 key pair to the Workers (from VOID_PLATFORM_R2_*, or the saved pair for a new api Worker), sign one request to the assets bucket first. A rejected pair stops the command before traffic pauses, so the installation is not left marked failed. A bucket this run creates is not checked. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…on repair Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he R2 key pair check Stop only on the credential codes the upload mapping uses (or a bare 401/403), warn with a clock hint on RequestTimeTooSkewed, and treat R2's 400 InvalidArgument / AuthorizationHeaderMalformed answer to a wrong-length Access Key ID as a rejected pair, in the check and in the upload error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ent token for AI Gateway Drop "Wrangler" from the browser login label, which the CLI rewrites in printed errors. Under browser login, a management token in CLOUDFLARE_API_TOKEN with AI Gateway access also fixes an AI Gateway error, so say so in the error and the maintenance guide. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…p it after a later failure Raw-fetch client methods (KV value, R2 objects, deletes) and the workers.dev subdomain read now name the rejected credential. When a token check is denied and a later check fails for another reason, report the denial so install still clears and asks again for a rejected saved token. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… print each denial once Label the management token pasted or saved during browser-login setup so its denials say which token Cloudflare rejected, and skip a cause in the retry warning when an earlier message already contains it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The management-token retry warning walked the cause chain and printed the first denied read again under the combined list, because a labeled list never contains the raw message. Skip any cause the AggregateError above it already lists. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
🚀 Deploying Preview to Cloudflare 🚀Preview URL: https://fix-platform-credential-errors-void-cloud.voidzero-docs.workers.dev (commit 2c825bf)This URL reflects your latest Preview deploymentPreview Deployments by commit
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Answers operator feedback: platform deploys stopped after an upgrade because of bad credentials, and no error said which credential failed.
What changes for the operator
Feedback → result
void platform credentials checkcommandKnown limits
repair --plan/upgrade --plando not run the runtime-token or R2 checks.Verification
vp check: cleanvp test run: 840 files passed (18,101 tests)🤖 Generated with Claude Code