Skip to content

fix: forbid profile commands when config is env set#48

Merged
leonkenneth merged 3 commits into
mainfrom
fix-forbid-profile-commands-when-config-is-env-set
Jul 13, 2026
Merged

fix: forbid profile commands when config is env set#48
leonkenneth merged 3 commits into
mainfrom
fix-forbid-profile-commands-when-config-is-env-set

Conversation

@leonkenneth

Copy link
Copy Markdown
Contributor

this is also a change in behavior but I think clearer: ENV-var configuration is all-or-nothing and doesn't inherit any profile values

happy to discuss

@albert20260301

Copy link
Copy Markdown
Contributor

Opened #49 as a stacked fix for the failing Test CLI job.

The CI failure is the integration assertion at tests/integration.e2e.ts: with ALTERTABLE_API_KEY set, PR #48 now correctly reports _from_env, while the test still expected default.

## Summary
- update the lakehouse integration assertion to expect `_from_env` when
`ALTERTABLE_API_KEY` is supplied
- keep the test aligned with PR #48's env-config isolation behavior

## Verification
- `./cli/node_modules/.bin/tsc -p tsconfig.tests.json`
- `bun test "$PWD"/tests/scripting.test.ts`
- `bun test "$PWD"/tests/profile.test.ts`

I could not run `bun test "$PWD"/tests/integration.e2e.ts` locally
because this environment does not have Docker available to start the
mock lakehouse service used by CI.
Comment on lines +552 to +560
const ENV_CONFIG_VARS: ReadonlyArray<{ name: string; secret: boolean }> = [
{ name: "ALTERTABLE_API_KEY", secret: true },
{ name: "ALTERTABLE_BASIC_AUTH_TOKEN", secret: true },
{ name: "ALTERTABLE_LAKEHOUSE_USERNAME", secret: false },
{ name: "ALTERTABLE_LAKEHOUSE_PASSWORD", secret: true },
{ name: "ALTERTABLE_ENV", secret: false },
{ name: "ALTERTABLE_API_BASE", secret: false },
{ name: "ALTERTABLE_MANAGEMENT_API_BASE", secret: false },
];

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'll send a follow up refactor to better manage our env variables.

@leonkenneth leonkenneth enabled auto-merge (squash) July 13, 2026 13:33
@leonkenneth leonkenneth merged commit 63a5fc4 into main Jul 13, 2026
5 checks passed
@leonkenneth leonkenneth deleted the fix-forbid-profile-commands-when-config-is-env-set branch July 13, 2026 13:35
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.

3 participants