Skip to content

Skip Convex env validation when deploy key can't list vars#563

Open
stickerdaniel wants to merge 1 commit into
mainfrom
fix/convex-env-validation-skip
Open

Skip Convex env validation when deploy key can't list vars#563
stickerdaniel wants to merge 1 commit into
mainfrom
fix/convex-env-validation-skip

Conversation

@stickerdaniel

Copy link
Copy Markdown
Owner

Convex deploy keys can deploy but are denied ViewEnvironmentVariables, so scripts/validate-convex-env.ts (which runs convex env list) fails in CI whenever the build authenticates with a deployment-scoped deploy key. A leaked deploy key must not be able to read secret values, so this is by design on Convex's side. The pre-flight check then hard-fails the production build.

This skips the validation when convex env list fails with a permission error, logging the required var names instead of failing the build. The deploy still runs, and a genuinely missing var surfaces at runtime. Validation still works wherever the auth can read env vars (local dev, project-level keys).

bun scripts/static-checks.ts scripts/validate-convex-env.ts passes.

Convex deploy keys can deploy but are denied ViewEnvironmentVariables, so
`convex env list` fails in CI under deploy-key auth and blocks production
builds for forks using deployment-scoped deploy keys. Skip the pre-flight
validation on a permission error instead of failing; the deploy still runs
and missing vars surface at runtime.
Copilot AI review requested due to automatic review settings June 15, 2026 01:10
@qodo-code-review

Copy link
Copy Markdown

Qodo reviews are paused for this user.

Troubleshooting steps vary by plan Learn more →

On a Teams plan?
Reviews resume once this user has a paid seat and their Git account is linked in Qodo.
Link Git account →

Using GitHub Enterprise Server, GitLab Self-Managed, or Bitbucket Data Center?
These require an Enterprise plan - Contact us
Contact us →

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Jun 15, 2026

Copy link
Copy Markdown

Deploying with  Cloudflare Workers  Cloudflare Workers

The latest updates on your project. Learn more about integrating Git with Workers.

Status Name Latest Commit Preview URL Updated (UTC)
✅ Deployment successful!
View logs
saas-starter fbed1a8 Commit Preview URL

Branch Preview URL
Jun 15 2026, 01:12 AM

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copy link
Copy Markdown
Owner Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants