Skip to content

github-backup(deploy): provide jq in nix deploy entrypoint - #3482

Merged
dezren39 merged 1 commit into
mainfrom
queue/5426-3473-jq-deploy
Nov 1, 2026
Merged

dezren39 merged 1 commit into
mainfrom
queue/5426-3473-jq-deploy

Conversation

@dezren39

@dezren39 dezren39 commented Nov 1, 2026 •

Copy link
Copy Markdown
Member

Fixes #3473

infra/github-backup/deploy.nix builds the developing-today-backup-deploy entrypoint with writeShellApplication, but omitted jq from its arguments and runtimeInputs — while infra/github-backup/worker/deploy.sh sources lib/bitwarden-env.sh, which exits when jq is missing and uses jq to parse Bitwarden output before Wrangler can run. On a host without ambient jq, the Nix-provided entrypoint failed before Wrangler.

Change (2 lines, one file):

  • Add jq to the function arguments (supplied by pkgs.callPackage in lib/default.nix).
  • Add jq to runtimeInputs, so the built wrapper's PATH always provides it.

No other runtime inputs or deployment behavior change. No real deployment performed; no real secrets accessed (all secret/deploy dependencies stubbed).

Verification (laptop, worktree at 221b214):

  • nix build .#developingTodayBackupDeploy — succeeds; the built wrapper's PATH includes the jq-1.8.2 store bin alongside bws/git/nodejs/sops/wrangler.
  • Stub harness: built entrypoint run with env -i and a PATH containing no jq except the app's own runtimeInputs, with stub sops/bws/wrangler (via a fake HOME whose .local/bin the sourced helper prepends):
    • --dry-run → exit 0; reached stub wrangler deploy --dry-run ("dry run: config builds, nothing uploaded").
    • deploy (no args) → exit 0; full stub flow: versions list → versions upload (tag git-221b21497d25) → versions deploy stub-version-1@100% → deployments list.
  • Differential: the same deploy.sh run directly with no jq anywhere on PATH fails with Error: jq CLI not found in PATH. (exit 1) — the pre-fix failure this PR removes.

The sourced lib/bitwarden-env.sh helper exits when jq is missing and
uses jq to parse Bitwarden output, but the developing-today-backup-deploy
writeShellApplication did not include jq in its arguments or
runtimeInputs, so the nix-provided entrypoint failed before Wrangler
on hosts without ambient jq.

Fixes #3473
@dezren39
dezren39 requested a review from a team as a code owner November 1, 2026 10:11
@coderabbitai

coderabbitai Bot commented Nov 1, 2026

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 45 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: a15e443f-0c2f-4333-89a3-5df8f5746fb0
Commits

Reviewing files that changed from the base of the PR and between 39835db and 221b214.

Files selected for processing: 1
  • infra/github-backup/deploy.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 1, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-01T10:12:38.604080Z 221b214 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

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.

github-backup(deploy): nix deploy entrypoint does not provide jq, which the sourced Bitwarden helper requires

1 participant