Skip to content

docs(variables, database): working ${VAR} references + ZBPACK env vars#57

Open
marvin-69-jpg wants to merge 1 commit into
zeabur:mainfrom
marvin-69-jpg:fix/variable-references-and-zbpack-env
Open

docs(variables, database): working ${VAR} references + ZBPACK env vars#57
marvin-69-jpg wants to merge 1 commit into
zeabur:mainfrom
marvin-69-jpg:fix/variable-references-and-zbpack-env

Conversation

@marvin-69-jpg
Copy link
Copy Markdown

Summary

Two related corrections to bring the skills in line with the actual CLI behavior in version 0.15.0 (observed 2026-04):

1. ${VAR} references via variable update -k DO work (when single-quoted)

The current zeabur-variables and zeabur-database skills route users to the dashboard for any cross-service variable reference, citing zeabur/cli#201 and labeling the CLI as broken for \${} values. In testing, single-quoted references via variable update -k are stored correctly and resolve at injection time:

```bash
npx zeabur@latest variable update --id \
-k 'DATABASE_URL=postgresql+psycopg://${POSTGRES_USERNAME}:${POSTGRES_PASSWORD}@${POSTGRES_HOST}:${POSTGRES_PORT}/${POSTGRES_DATABASE}' \
-k 'REDIS_URL=${REDIS_CONNECTION_STRING}' \
-y -i=false

Verified by:

- variable list — shows the literal ${...} stored

- service exec ... -- env | grep DATABASE_URL — shows fully resolved value

```

The skill is updated to:

  • Soften the blanket warning
  • Provide a working multi-key example
  • Note that exotic values (commas inside the value, multiple = signs) may still trigger Cobra parser issues, so verifying with variable list after the update is prudent

This is the same direction as #50, which removed the now-stale "variable update clears vars" warning from zeabur-update-service.

2. New section: zbpack build-time config via env vars

Adds documentation that zbpack reads env vars (via ZBPACK_<SCREAMING_SNAKE_CASE> of the underlying config key) at build time. The most useful one for monorepos: ZBPACK_DOCKERFILE_PATH=infra/zeabur/api.Dockerfile per service.

This replaces the need to swap a root zbpack.json between deploys when the project has multiple services with different Dockerfiles. (See companion PR #56 for the full monorepo deploy story.)

3. zeabur-database tip on custom URL schemes

Replace the stale ${} caveat with the corrected version, plus a tip: if your driver wants a non-default prefix (e.g. SQLAlchemy with psycopg3 wants postgresql+psycopg://, not postgresql://), construct the URL by interpolating the parts (${POSTGRES_USERNAME}, etc.) rather than reusing ${POSTGRES_CONNECTION_STRING} which always uses postgresql://.

Test plan

  • Set DATABASE_URL with 5 nested \${...} parts via variable update -k (single-quoted) — verified storage via variable list and resolution via service exec ... -- env
  • Set ZBPACK_DOCKERFILE_PATH on a service that previously fell back to python plan — next zeabur deploy --service-id build came up planType=docker with the right Dockerfile
  • Confirmed ${POSTGRES_CONNECTION_STRING} always uses postgresql:// prefix; constructing postgresql+psycopg:// requires interpolating parts

🤖 Generated with Claude Code

…CK env vars

Two related corrections:

1. \${VAR} variable references via 'variable update -k' DO work when
   single-quoted (verified 2026-04 against CLI 0.15.0). The skill
   previously routed users to the dashboard for any cross-service
   reference, citing zeabur/cli#201 — that bug appears fixed for the
   common case. Soften the warning, give a working multi-key example,
   note that exotic values (commas, multiple = signs) may still
   trigger Cobra parser issues so verifying with 'variable list' is
   prudent.

2. Add a 'zbpack build-time configuration via env vars' section to
   zeabur-variables documenting that zbpack reads env vars (via
   ZBPACK_<SCREAMING_SNAKE_CASE> of the underlying config key) at
   build time. ZBPACK_DOCKERFILE_PATH is the most useful one for
   monorepo deploys with multiple Dockerfiles, replacing the need to
   swap a root zbpack.json between deploys.

3. zeabur-database: replace the now-stale 'CLI has known bug with \${}'
   caveat with the corrected version, and add a tip about constructing
   a custom URL scheme prefix (e.g. postgresql+psycopg:// for
   SQLAlchemy with psycopg3) by interpolating parts rather than reusing
   the pre-built \${POSTGRES_CONNECTION_STRING}.

Same direction as PR zeabur#50 which corrected the parallel
'variable update clears vars' caveat in zeabur-update-service.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 26, 2026

Warning

Rate limit exceeded

@marvin-69-jpg has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 59 minutes and 12 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 59 minutes and 12 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: b57e3d3a-67fc-494e-ab93-1ae0ddfc41be

📥 Commits

Reviewing files that changed from the base of the PR and between 78b02c1 and 40f474d.

📒 Files selected for processing (2)
  • skills/zeabur-database/SKILL.md
  • skills/zeabur-variables/SKILL.md
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

Comment @coderabbitai help to get the list of available commands and usage tips.

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