Skip to content

Name failing keys on the final line when config is invalid - #1256

Merged
theoephraim merged 1 commit into
mainfrom
invalid-env-final-line-keys
Oct 29, 2026
Merged

theoephraim merged 1 commit into
mainfrom
invalid-env-final-line-keys

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Fixes #1246. Thanks to the reporter for the clear write-up.

When config is invalid, the last line of output now names the failing keys:

💥 [varlock] Invalid env vars: DATABASE_URL, API_TOKEN, +3 more 💥

The keys go on the final line rather than the top banner because that's what platforms actually surface: Kubernetes FallbackToLogsOnError keeps the last 80 lines / 2 KB, and systemctl status shows the last 10 lines. ECS, Cloud Run and CI annotations show no output at all. Key names come from the schema, never values.

  • The list stops at 5 keys or ~80 chars, always lists at least one key, then +N more
  • InvalidEnvError.message carries the same text
  • All CLI error summaries (CliExitError) now get a [varlock] prefix, matching the runtime errors
  • The top banner and per-item details are unchanged

Not covered: load --format json-full (used by auto-load and the framework integrations) never throws, so it still prints no final summary line. That is tracked with the broader error-output review.

The last line of output now reads `💥 [varlock] Invalid env vars: A, B, +N more 💥`,
capped at 5 keys / ~80 chars. Tools that only keep the tail of a failed process
(k8s termination messages, systemd status) now show which vars to fix. CLI error
summaries get a [varlock] prefix.

Fixes #1246
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 29, 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
varlock-website b1ca563 Commit Preview URL

Branch Preview URL
Oct 29 2026, 05:41 AM

@github-actions

Copy link
Copy Markdown
Contributor

bumpy-frog

The changes in this PR will be included in the next version bump.

patch Patch releases

  • @varlock/native-helper-darwin 1.23.0 → 1.23.1
  • @varlock/native-helper-linux-arm64 1.23.0 → 1.23.1
  • @varlock/native-helper-linux-x64 1.23.0 → 1.23.1
  • @varlock/native-helper-win32-x64 1.23.0 → 1.23.1
  • varlock 1.23.0 → 1.23.1

Bump files in this PR

Click here if you want to add another bump file to this PR


This comment is maintained by bumpy.

@github-actions

Copy link
Copy Markdown
Contributor

📦 Bundle size

⚠️ grows the bundle by 2.4 KB (+0.0%)

Metric main This PR Δ
Total dist 5178.1 KB 5180.5 KB +2.4 KB (+0.0%)
JS 2000.1 KB 2001.0 KB +0.9 KB (+0.0%)
Sourcemaps 3041.0 KB 3042.5 KB +1.5 KB (+0.0%)
Type defs 137.0 KB 137.0 KB —
Other 0.0 KB 0.0 KB —

dist/ only; native binaries are versioned separately and not counted here.

@pullfrog pullfrog Bot 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.

✅ No new issues found.

Reviewed changes: Reviewed the complete PR and traced invalid-config failures through the CLI handler.

  • Failing-key summary: InvalidEnvError names failing schema keys, caps the list by count and approximate length, and reports omitted keys with +N more.
  • CLI formatting: Invalid-config and CliExitError summaries now include [varlock], without changing validation, silent errors, or exit behavior.
  • Coverage and docs: Added formatter and final-line smoke coverage, and updated the usage example. The Varlock build, 20 focused unit tests, and direct load/run CLI checks passed; the full smoke suite and website build were not run.

Pullfrog  | View workflow run | Using gpt-6.1-sol | 𝕏

@pkg-pr-new

pkg-pr-new Bot commented Oct 29, 2026

Copy link
Copy Markdown

Open in StackBlitz

varlock

npm i https://pkg.pr.new/varlock@1256

@varlock/astro-integration

npm i https://pkg.pr.new/@varlock/astro-integration@1256

@varlock/cloudflare-integration

npm i https://pkg.pr.new/@varlock/cloudflare-integration@1256

@varlock/nextjs-integration

npm i https://pkg.pr.new/@varlock/nextjs-integration@1256

@varlock/nuxt-integration

npm i https://pkg.pr.new/@varlock/nuxt-integration@1256

@varlock/vite-integration

npm i https://pkg.pr.new/@varlock/vite-integration@1256

@varlock/native-helper-darwin

npm i https://pkg.pr.new/@varlock/native-helper-darwin@1256

@varlock/native-helper-linux-arm64

npm i https://pkg.pr.new/@varlock/native-helper-linux-arm64@1256

@varlock/native-helper-linux-x64

npm i https://pkg.pr.new/@varlock/native-helper-linux-x64@1256

@varlock/native-helper-win32-x64

npm i https://pkg.pr.new/@varlock/native-helper-win32-x64@1256

@varlock/1password-plugin

npm i https://pkg.pr.new/@varlock/1password-plugin@1256

commit: b1ca563

@theoephraim
theoephraim merged commit 2136f8f into main Oct 29, 2026
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG]: "Configuration is currently invalid" banner doesn't name the failing keys

1 participant