Skip to content

Migrate progress logger functions to use cmdio directly - #3818

Merged
pietern merged 7 commits into
mainfrom
progress-logger-migrate-to-cmdio
Oct 28, 2025
Merged

Migrate progress logger functions to use cmdio directly#3818
pietern merged 7 commits into
mainfrom
progress-logger-migrate-to-cmdio

Conversation

@pietern

Copy link
Copy Markdown
Contributor

Changes

This continues the progress logger simplification by migrating from the Logger.Log() event-based system to direct cmdio calls. This builds on #3811 and #3812, which made the progress logger effectively only write strings to stderr.

Why

This simplifies the codebase by removing the (unused) event abstraction layer while maintaining functionality. The compatibility layer provides a clean migration path and will eventually be removed once the functionality in those functions have a dedicated new home.

Tests

Tests pass. Analysis of the diff suggests that before/after is functionally equivalent. A minor note is that we no longer have a mutex around .Log() calls, but there are no concurrent calls to the function.

In-place mode was designed to update job progress in place using ANSI escape codes (e.g., showing 'PENDING' → 'RUNNING' → 'TERMINATED' on the same line). However, acceptance tests show jobs typically output only a single state transition: 'Run URL: <url>' followed by '[TIMESTAMP] "job-name" TERMINATED', suggesting the job completes before multiple states can be observed. The default mode selection logic required log-file to not be stderr AND stderr to be a terminal to enable in-place mode, which is an uncommon configuration. Additionally, only JobProgressEvent supported in-place updates while all other events (URLs, errors, pipeline events) fell back to append mode, making the feature inconsistent. The implementation added complexity with ANSI escape codes, terminal detection, and an IsInplaceSupported() interface method across all event types. Since the feature provided minimal practical value and likely was rarely (if ever) enabled by default, it has been removed in favor of the simpler append mode.
The JSON mode for progress logging was designed to output structured JSON events for machine parsing. However, this mode had several limitations: it prevented interactive prompts (Ask/AskSelect methods would error), required --auto-approve for destroy commands, and added complexity with JSON marshaling in the logger. The feature provided minimal practical value as most CLI usage is interactive, and the default append mode is sufficient for both human and machine consumption. Since the mode added unnecessary complexity without clear benefits, it has been removed in favor of the simpler append-only mode.
Comment threadcmd/root/root.go
// If cmdio logger initialization succeeds, then this function logs with the
// initialized cmdio logger, otherwise with the default cmdio logger
cmdio.LogError(cmd.Context(), err)
fmt.Fprintf(cmd.ErrOrStderr(), "Error: %s\n", err.Error())

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

No need for a dependency on cmdio here.

The previous implementation wrote directly to os.Stderr.

@eng-dev-ecosystem-bot

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

Copy link
Copy Markdown
Collaborator

Run: 18843637880

Env❌​FAIL🟨​KNOWN🔄​flaky💚​RECOVERED🙈​SKIP✅​pass🙈​skip
💚​aws linux11319583
💚​aws windows11320582
💚​aws-ucws linux11440478
💚​aws-ucws windows11441477
🔄​azure linux211317582
💚​azure windows11320581
❌​azure-ucws linux111437477
❌​azure-ucws windows111438476
❌​gcp linux3611282584
❌​gcp windows10411209582
118 failing tests:
Test Nameaws linuxaws windowsaws-ucws linuxaws-ucws windowsazure linuxazure windowsazure-ucws linuxazure-ucws windowsgcp linuxgcp windows
TestAccept💚​R💚​R💚​R💚​R💚​R💚​R🟨​K🟨​K🟨​K🟨​K
TestAccept/bundle/deploy/empty-bundle✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENGINE=direct-exp✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deploy/empty-bundle/DATABRICKS_BUNDLE_ENGINE=terraform✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deploy/files/no-snapshot-sync✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deploy/files/no-snapshot-sync/DATABRICKS_BUNDLE_ENGINE=direct-exp✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deploy/mlops-stacks✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deployment/bind/cluster✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deployment/bind/dashboard✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deployment/bind/dashboard/recreation✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deployment/bind/experiment✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deployment/bind/job/generate-and-bind✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deployment/bind/job/job-abort-bind✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deployment/bind/job/job-spark-python-task✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deployment/bind/model-serving-endpoint✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/deployment/unbind/permissions✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/resources/clusters/deploy/simple✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/resources/clusters/deploy/simple/DATABRICKS_BUNDLE_ENGINE=direct-exp✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/resources/clusters/deploy/simple/DATABRICKS_BUNDLE_ENGINE=terraform✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/resources/dashboards/detect-change✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/resources/dashboards/generate_inplace✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/resources/dashboards/nested-folders✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p
TestAccept/bundle/resources/dashboards/simple✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p
TestAccept/bundle/resources/dashboards/simple_outside_bundle_root✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p
TestAccept/bundle/resources/dashboards/simple_syncroot✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p
TestAccept/bundle/resources/jobs/check-metadata✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/resources/jobs/check-metadata/DATABRICKS_BUNDLE_ENGINE=direct-exp✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/resources/jobs/fail-on-active-runs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/resources/jobs/fail-on-active-runs/DATABRICKS_BUNDLE_ENGINE=terraform✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/resources/models/basic✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/resources/models/basic/DATABRICKS_BUNDLE_ENGINE=direct-exp✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/resources/models/basic/DATABRICKS_BUNDLE_ENGINE=terraform✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p
TestAccept/bundle/resources/secret_scopes✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/resources/synced_database_tables/basic🙈​s🙈​s✅​p✅​p🙈​s🙈​s❌​F❌​F🙈​s🙈​s
TestAccept/bundle/run/app-with-job🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S🙈​S
TestAccept/bundle/templates/default-python/combinations/classic✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=direct-exp/DLT=no/NBOOK=no/PY=no✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=direct-exp/DLT=no/NBOOK=no/PY=yes✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=direct-exp/DLT=yes/NBOOK=no/PY=no✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=direct-exp/DLT=yes/NBOOK=yes/PY=yes✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=no/NBOOK=no/PY=no✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=no/PY=yes✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestAccept/bundle/templates/default-python/combinations/classic/DATABRICKS_BUNDLE_ENGINE=terraform/DLT=yes/NBOOK=yes/PY=yes✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestBundleInitHelpers✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestGenerateFromExistingJobAndDeploy✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestGenerateFromExistingPipelineAndDeploy✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p
TestSparkJarTaskDeployAndRunOnWorkspace✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_14.3_LTS✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestSparkJarTaskDeployAndRunOnWorkspace/Databricks_Runtime_15.4_LTS✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDir✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDir/dbfs_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDir/dbfs_to_local✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDir/dbfs_to_uc-volumes🙈​s🙈​s✅​p✅​p🙈​s🙈​s✅​p✅​p🙈​s❌​F
TestFsCpDir/local_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDirToDirFileNotOverwritten✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDirToDirFileNotOverwritten/dbfs_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDirToDirFileNotOverwritten/dbfs_to_local✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDirToDirFileNotOverwritten/local_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDirToDirWithOverwriteFlag✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDirToDirWithOverwriteFlag/dbfs_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDirToDirWithOverwriteFlag/dbfs_to_local✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpDirToDirWithOverwriteFlag/local_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToDirFileNotOverwritten✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToDirFileNotOverwritten/dbfs_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToDirFileNotOverwritten/dbfs_to_local✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToDirFileNotOverwritten/local_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToDirWithOverwriteFlag✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToDirWithOverwriteFlag/dbfs_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToDirWithOverwriteFlag/dbfs_to_local✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToDirWithOverwriteFlag/local_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFile✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFile/dbfs_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFile/local_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFileFileNotOverwritten✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFileFileNotOverwritten/dbfs_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFileFileNotOverwritten/dbfs_to_local✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFileFileNotOverwritten/local_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFileWithOverwriteFlag✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFileWithOverwriteFlag/dbfs_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFileWithOverwriteFlag/dbfs_to_local✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsCpFileToFileWithOverwriteFlag/local_to_dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsLsOnFile✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsLsOnFile/dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsMkdirCreatesIntermediateDirectories✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsMkdirCreatesIntermediateDirectories/dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsMkdirWhenFileExistsAtPath✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsMkdirWhenFileExistsAtPath/dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsRmFile✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsRmFile/dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsRmNonEmptyDirectory✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFsRmNonEmptyDirectory/dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestSyncFullFileSync✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestSyncIncrementalFileSync✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestSyncNestedFolderDoesntFailOnNonEmptyDirectory✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestSyncNestedFolderSync✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestSyncNestedSpacePlusAndHashAreEscapedSync✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestExportDir✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFilerReadDir✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFilerReadDir/workspace_files_extensions✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFilerRecursiveDelete✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFilerRecursiveDelete/dbfs✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFilerRecursiveDelete/workspace_files✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFilerRecursiveDelete/workspace_files_extensions✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFilerWorkspaceFilesExtensionsRead✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFilerWorkspaceFilesExtensionsStat✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F❌​F
TestFilerWorkspaceNotebook✅​p✅​p✅​p✅​p🔄​f✅​p✅​p✅​p✅​p❌​F
TestFilerWorkspaceNotebook/sqlNb.sql✅​p✅​p✅​p✅​p🔄​f✅​p✅​p✅​p✅​p
TestWorkspaceFilesExtensionsNotebooksAreNotDeletedAsFiles✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestWorkspaceFilesExtensionsNotebooksAreNotReadAsFiles✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestFetchRepositoryInfoAPI_FromRepo✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F✅​p
TestFetchRepositoryInfoAPI_FromRepo//Workspace/Repos/deco-prod-admin@gcp-dev-deco.iam.gserviceaccount.com/integration-test-f823fc9f36ee45f7a5e76541a4d2a8ed/knowledge_base/dashboard_nyc_taxi❌​F
TestLock✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestLockUnlockWithAllowsLockFileNotExist✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestLockUnlockWithoutAllowsLockFileNotExist✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p✅​p❌​F
TestTagKeyGCP🙈​s🙈​s🙈​s🙈​s🙈​s🙈​s🙈​s🙈​s✅​p❌​F
TestTagKeyGCP/valid✅​p❌​F
TestTagValueGCP🙈​s🙈​s🙈​s🙈​s🙈​s🙈​s🙈​s🙈​s✅​p❌​F
TestTagValueGCP/unicode✅​p❌​F

Base automatically changed from remove-json-mode to mainOctober 24, 2025 13:08
@pietern
pietern enabled auto-merge October 27, 2025 14:01
@pietern
pietern disabled auto-merge October 28, 2025 09:50
@pietern
pietern merged commit d37fd28 into mainOct 28, 2025
12 of 13 checks passed
@pietern
pietern deleted the progress-logger-migrate-to-cmdio branch October 28, 2025 09:50
pietern added a commit that referenced this pull request Oct 28, 2025
…3820)
## Changes
This change removes remaining references to the "progress logger".
All terminal I/O now goes through a single type in `cmdio`.
Builds on #3811, #3812, and #3818.
github-merge-queueBot pushed a commit that referenced this pull request Nov 4, 2025
## Changes
Make `LogString` write the string and newline in a single call to reduce
the likelihood of interleaved output when called concurrently. This was
atomic until #3818 where I removed the lock, assuming it wasn't
necessary.
Note: This fix assumes `io.WriteString` provides atomic writes for small
messages, which is not guaranteed.
## Why
Fixes flaky test from:
https://github.com/databricks/cli/actions/runs/18995883239/job/54255615389
pietern added a commit that referenced this pull request May 8, 2026
…Run* (#5221)
## Summary
- `compat.go` is gone. `Log`/`LogString` move to `log.go`, and
`readLine`/`Ask`/`AskYesOrNo` move to `ask.go`. The "compatibility
layer" doc comments (a transitional shim from #3818) are replaced with
descriptions of what each function does, since these are now their
permanent home.
- `Tuple`/`Select`/`SelectOrdered` move from `io.go` to `select.go` and
are reimplemented on top of `RunSelect`. A new `HideSelected` option on
`SelectOptions` preserves the existing post-prompt display behavior.
- `Secret` moves from `io.go` to `prompt.go` and becomes a thin wrapper
over `RunPrompt`. A new `HideEntered` option on `PromptOptions` carries
the masked-input post-submission behavior.
## Result
The `github.com/manifoldco/promptui` import is confined to
`libs/cmdio/prompt.go` and `libs/cmdio/select.go`; every other prompt
and selection helper in the package builds on those two entry points.
## Test plan
- [x] Manual: `databricks bundle run` from a bundle with multiple
resources triggers the resource picker (`cmdio.Select`).
- [x] Manual: `databricks secrets put-secret <scope> <key>` triggers the
masked secret prompt (`cmdio.Secret`).
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
This continues the progress logger simplification by migrating from the
`Logger.Log()` event-based system to direct cmdio calls. This builds on
#3811 and #3812, which made the progress logger effectively only write
strings to stderr.
## Why
This simplifies the codebase by removing the (unused) event abstraction
layer while maintaining functionality. The compatibility layer provides
a clean migration path and will eventually be removed once the
functionality in those functions have a dedicated new home.
## Tests
Tests pass. Analysis of the diff suggests that before/after is
functionally equivalent. A minor note is that we no longer have a mutex
around `.Log()` calls, but there are no concurrent calls to the
function.
denik pushed a commit that referenced this pull request May 20, 2026
…3820)
## Changes
This change removes remaining references to the "progress logger".
All terminal I/O now goes through a single type in `cmdio`.
Builds on #3811, #3812, and #3818.
denik pushed a commit that referenced this pull request May 20, 2026
## Changes
Make `LogString` write the string and newline in a single call to reduce
the likelihood of interleaved output when called concurrently. This was
atomic until #3818 where I removed the lock, assuming it wasn't
necessary.
Note: This fix assumes `io.WriteString` provides atomic writes for small
messages, which is not guaranteed.
## Why
Fixes flaky test from:
https://github.com/databricks/cli/actions/runs/18995883239/job/54255615389
denik pushed a commit that referenced this pull request May 20, 2026
…Run* (#5221)
## Summary
- `compat.go` is gone. `Log`/`LogString` move to `log.go`, and
`readLine`/`Ask`/`AskYesOrNo` move to `ask.go`. The "compatibility
layer" doc comments (a transitional shim from #3818) are replaced with
descriptions of what each function does, since these are now their
permanent home.
- `Tuple`/`Select`/`SelectOrdered` move from `io.go` to `select.go` and
are reimplemented on top of `RunSelect`. A new `HideSelected` option on
`SelectOptions` preserves the existing post-prompt display behavior.
- `Secret` moves from `io.go` to `prompt.go` and becomes a thin wrapper
over `RunPrompt`. A new `HideEntered` option on `PromptOptions` carries
the masked-input post-submission behavior.
## Result
The `github.com/manifoldco/promptui` import is confined to
`libs/cmdio/prompt.go` and `libs/cmdio/select.go`; every other prompt
and selection helper in the package builds on those two entry points.
## Test plan
- [x] Manual: `databricks bundle run` from a bundle with multiple
resources triggers the resource picker (`cmdio.Select`).
- [x] Manual: `databricks secrets put-secret <scope> <key>` triggers the
masked secret prompt (`cmdio.Secret`).
TanishqDatabricks pushed a commit to TanishqDatabricks/cli that referenced this pull request May 22, 2026
…Run* (databricks#5221)
## Summary
- `compat.go` is gone. `Log`/`LogString` move to `log.go`, and
`readLine`/`Ask`/`AskYesOrNo` move to `ask.go`. The "compatibility
layer" doc comments (a transitional shim from databricks#3818) are replaced with
descriptions of what each function does, since these are now their
permanent home.
- `Tuple`/`Select`/`SelectOrdered` move from `io.go` to `select.go` and
are reimplemented on top of `RunSelect`. A new `HideSelected` option on
`SelectOptions` preserves the existing post-prompt display behavior.
- `Secret` moves from `io.go` to `prompt.go` and becomes a thin wrapper
over `RunPrompt`. A new `HideEntered` option on `PromptOptions` carries
the masked-input post-submission behavior.
## Result
The `github.com/manifoldco/promptui` import is confined to
`libs/cmdio/prompt.go` and `libs/cmdio/select.go`; every other prompt
and selection helper in the package builds on those two entry points.
## Test plan
- [x] Manual: `databricks bundle run` from a bundle with multiple
resources triggers the resource picker (`cmdio.Select`).
- [x] Manual: `databricks secrets put-secret <scope> <key>` triggers the
masked secret prompt (`cmdio.Secret`).
Sign up for freeto 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.

4 participants

@pietern@eng-dev-ecosystem-bot@denik@shreyas-goenka