plan --answers, --stay-on-url and --google-key-from-env #52

Merged
jcoffey-dev merged 1 commits from feat/server-run-support into main 2026-10-31 01:06:08 +00:00
Owner

What a program needs to run a migration the guide's way, without a second copy of the guide's plan building. It's for the migrations screen in inbuxa Admin, where the server runs this tool.

  • plan --answers FILE DIR writes the guide's plans from its answers: plan.json, preview-plan.json and the setup's directory. It prints which files to run and which variables hold the secrets. The answers carry no secrets, and a file that does is refused. The guide now writes its plans through the same code.
  • --stay-on-url, on import jmap, export, export-directory and import-directory, moves every session URL onto the --url origin. It's for a server reached at an address it doesn't advertise, such as its own loopback or a tunnel. The answers' target takes stayOnUrl and allowInvalidCerts.
  • import imap --google-key-from-env reads the service account's key from $INBUXA_MIGRATE_GOOGLE_KEY, and a plan step names it as the googleKey secret.

Tests: 1579 pass locally, clippy is clean, and the live inbuxa tests pass. The new tests cover plan end to end (including a preview it wrote, run as is, and a refused secret), --stay-on-url against two mock hosts, and the Google key from the environment.

What a program needs to run a migration the guide's way, without a second copy of the guide's plan building. It's for the migrations screen in inbuxa Admin, where the server runs this tool. - **`plan --answers FILE DIR`** writes the guide's plans from its answers: `plan.json`, `preview-plan.json` and the setup's directory. It prints which files to run and which variables hold the secrets. The answers carry no secrets, and a file that does is refused. The guide now writes its plans through the same code. - **`--stay-on-url`**, on `import jmap`, `export`, `export-directory` and `import-directory`, moves every session URL onto the `--url` origin. It's for a server reached at an address it doesn't advertise, such as its own loopback or a tunnel. The answers' target takes `stayOnUrl` and `allowInvalidCerts`. - **`import imap --google-key-from-env`** reads the service account's key from `$INBUXA_MIGRATE_GOOGLE_KEY`, and a plan step names it as the `googleKey` secret. Tests: 1579 pass locally, clippy is clean, and the live inbuxa tests pass. The new tests cover `plan` end to end (including a preview it wrote, run as is, and a refused secret), `--stay-on-url` against two mock hosts, and the Google key from the environment.
jcoffey-dev added 1 commit 2026-10-31 00:58:53 +00:00
plan --answers, --stay-on-url and --google-key-from-env
ci / test (pull_request) Skipped
github/ci (branch) GitHub Actions
ci / github (pull_request) Successful in 6m51s
ci / announce (pull_request) Skipped
053af21f40
What a program needs to run a migration the guide's way without copying
the guide (the Admin migrations screen, step 1b):

- plan --answers FILE DIR writes the guide's plans from its answers:
  plan.json, preview-plan.json and the setup's directory, and says on
  stdout which files to run and which variables hold the secrets. The
  answers carry no secrets; a file that does is refused. The guide now
  writes its plans through the same code.
- --stay-on-url, on import jmap, export, export-directory and
  import-directory, moves every session URL onto the --url origin, for a
  server reached at an address it doesn't advertise (its own loopback, a
  tunnel). The answers' target takes stayOnUrl and allowInvalidCerts.
- import imap --google-key-from-env reads the service account's key from
  $INBUXA_MIGRATE_GOOGLE_KEY; a plan step names it as the googleKey
  secret. A Google source whose keyFile is empty takes the key as its
  secret.
jcoffey-dev merged commit a8e5f6beea into main 2026-10-31 01:06:08 +00:00
jcoffey-dev deleted branch feat/server-run-support 2026-10-31 01:06:08 +00:00
Sign in to join this conversation.