Skip to content

Remove check for interactive mode in labs installer#3709

Merged
pietern merged 1 commit intomainfrom
labs-auth-investigation
Oct 2, 2025
Merged

Remove check for interactive mode in labs installer#3709
pietern merged 1 commit intomainfrom
labs-auth-investigation

Conversation

@pietern
Copy link
Contributor

@pietern pietern commented Oct 2, 2025

Changes

If this condition evaluates to true, it returns (nil, nil) and leads to a panic further along in the code. The check for an interactive terminal is done earlier than necessary and can be removed altogether. The askWorkspaceProfile function also checks for an interactive terminal and returns an error if there isn't one.

We mark Git Bash as a terminal where prompting is not supported (see #1069).

Fixes #3597.

Tests

Manually confirmed the installer no longer panics in Git Bash on Windows.

@pietern pietern requested review from alexott and nfx as code owners October 2, 2025 13:15
@pietern pietern temporarily deployed to test-trigger-is October 2, 2025 13:16 — with GitHub Actions Inactive
@pietern pietern enabled auto-merge October 2, 2025 13:16
@eng-dev-ecosystem-bot
Copy link
Collaborator

eng-dev-ecosystem-bot commented Oct 2, 2025

Run: 18194129204

Env ✅​pass 🔄​flaky 🙈​skip
✅​ aws linux 320 537
✅​ aws windows 321 536
🔄​ aws-ucws linux 427 9 433
🔄​ aws-ucws windows 428 9 432
✅​ azure linux 320 536
✅​ azure windows 321 535
🔄​ azure-ucws linux 432 4 432
✅​ azure-ucws windows 437 431
✅​ gcp linux 319 538
✅​ gcp windows 320 537
9 failing tests:
Test Name aws-ucws linux aws-ucws windows azure-ucws linux
TestAccept/bundle/deploy/dashboard/detect-change 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deploy/dashboard/generate_inplace 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deploy/dashboard/nested-folders 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deploy/dashboard/simple 🔄​flaky 🔄​flaky 🔄​flaky
TestAccept/bundle/deploy/dashboard/simple_outside_bundle_root 🔄​flaky 🔄​flaky 🔄​flaky
TestAccept/bundle/deploy/dashboard/simple_syncroot 🔄​flaky 🔄​flaky 🔄​flaky
TestAccept/bundle/deployment/bind/dashboard 🔄​flaky 🔄​flaky ✅​pass
TestAccept/bundle/deployment/bind/dashboard/recreation 🔄​flaky 🔄​flaky ✅​pass
TestDashboardAssumptions_WorkspaceImport 🔄​flaky 🔄​flaky 🔄​flaky

@pietern pietern added this pull request to the merge queue Oct 2, 2025
Merged via the queue into main with commit c112faf Oct 2, 2025
13 checks passed
@pietern pietern deleted the labs-auth-investigation branch October 2, 2025 14:01
pietern added a commit that referenced this pull request Oct 8, 2025
…3735)

## Changes

When authentication is configured via environment variables,
`askWorkspaceProfile()` was failing because it checked for a profile
name instead of checking if auth is actually configured. This made labs
installers fail when running from non-interactive terminals (Cursor,
specifically).

The fix makes `askWorkspaceProfile()` consistent with `askCluster()` and
`askWarehouse()`, which both check if their values are already set
before prompting.

## Why

When running tests from Cursor, I saw the following failures after
#3709:

Failing Tests:
* TestInstallerWorksForReleases
* TestInstallerWorksForDevelopment

Both tests fail with the error:
```
login: ask for workspace: profile: not in an interactive terminal
```

## Tests

The tests that previously failed on a non-interactive terminal now pass.
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.

EDW Migration Specialization : Panic Payload: runtime error: invalid memory address or nil pointer dereference

4 participants

Comments