fix(cli): secrets set --env-file skips what a cloud environment cannot take

Merged
SA
2mo ago
+90-7

Summary

  • superset environments secrets set --env-file .env now skips the names a cloud environment can't take, instead of stopping partway through the file. Skipped: the names the sandbox owns (PORT, SUPERSET_*, VERCEL_SANDBOX_*) and agent keys (ANTHROPIC_API_KEY, OPENAI_API_KEY, …). Each skipped name is reported with its reason. A repeated name keeps its last value, as a shell would.
  • integrations github status says "1 repository".

Why

Found in the onboarding dry run (App Review org). Uploading a real laptop .env set 64 of about 140 variables, then failed at PORT with a server error. That left the environment half-configured, and nothing said what was missing. Every .env produced by the repo's local setup contains these names, so everyone following the documented flow would hit this.

Testing

  • planEnvFile.test.ts: reserved names and agent keys are skipped; a repeated name keeps its last value.
  • Manual, against production (App Review org): the same .env now gives "Set 127 variables", plus 12 "Skipped X: reason" lines.
  • bun run typecheck, bun test (cli).

Summary by cubic

Updates superset environments secrets set --env-file to skip variables a cloud environment cannot accept instead of stopping partway through the upload. It reports each skipped variable and its reason, including when the file contains nothing settable; repeated names keep their last value.

  • Skips sandbox-owned names (PORT, SUPERSET_*, VERCEL_SANDBOX_*) and agent keys.
  • Fixes integrations github status to print “1 repository” when appropriate.

Summary by CodeRabbit

  • Bug Fixes
    • Environment secret uploads now skip reserved keys and agent sign-in entries, while continuing to set eligible variables. Results identify skipped keys and explain why they were skipped; an error is shown if no variables can be set.
    • GitHub installation status now uses the correct singular or plural form based on the number of installed repositories.