Skip to content

Replace fatih/color with in-tree ANSI helpers#5178

Open
pietern wants to merge 1 commit intoreplace-jsoncolorfrom
fatih-color
Open

Replace fatih/color with in-tree ANSI helpers#5178
pietern wants to merge 1 commit intoreplace-jsoncolorfrom
fatih-color

Conversation

@pietern
Copy link
Copy Markdown
Contributor

@pietern pietern commented May 4, 2026

Summary

  • Drops github.com/fatih/color as a direct dependency by migrating its ~14 call sites (bundle render, bundle run, cfgpickers, logstream, cmd/labs, experimental/aitools, experimental/ssh, python_mutator) to a small ANSI helper set.
  • Adds libs/cmdio/color.go with cmdio.Red(ctx, msg)-style helpers and a RenderFuncMap(ctx) for templates. The gate matches fatih/color's historical stdout-TTY decision and degrades to plain text when ctx has no cmdIO attached.
  • Stacks on top of Replace nwidger/jsoncolor with an in-tree colorizer #5170. ANSI constants shared across both colorizers now live in libs/cmdio/color.go.

No user-visible output changes — the new helpers emit byte-identical SGR sequences.

Test plan

  • Manual smoke: databricks bundle validate against a bundle with errors and warnings (colored summary on TTY, uncolored when piped) and databricks current-user me -o json (colored on TTY, uncolored when piped through jq).

This pull request and its description were written by Isaac.

@pietern pietern had a problem deploying to test-trigger-is May 4, 2026 15:36 — with GitHub Actions Failure
@pietern pietern temporarily deployed to test-trigger-is May 4, 2026 15:36 — with GitHub Actions Inactive
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Approval status: pending

/bundle/ - needs approval

5 files changed
Suggested: @denik
Also eligible: @anton-107, @lennartkats-db, @shreyas-goenka, @andrewnester, @janniklasrose

/cmd/labs/ - needs approval

Files: cmd/labs/project/fetcher.go, cmd/labs/project/installer.go, cmd/labs/project/project.go
Eligible: @alexott, @asnare

/experimental/aitools/ - needs approval

Files: experimental/aitools/cmd/install.go, experimental/aitools/lib/installer/installer.go
Suggested: @arsenyinfo
Also eligible: @pkosiec, @lennartkats-db, @MarioCadenas, @fjakobs, @jamesbroadhead, @Shridhad, @atilafassina, @keugenek, @igrekun, @pffigueiredo, @ditadi, @calvarjorge

/libs/apps/ - needs approval

4 files changed
Suggested: @arsenyinfo
Also eligible: @pkosiec, @MarioCadenas, @fjakobs, @jamesbroadhead, @Shridhad, @atilafassina, @keugenek, @igrekun, @pffigueiredo, @ditadi, @calvarjorge

/libs/cmdio/ - needs approval

8 files changed
Suggested: @simonfaltum
Also eligible: @tanmay-db, @renaudhartert-db, @hectorcast-db, @parthban-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

/libs/databrickscfg/ - needs approval

Files: libs/databrickscfg/cfgpickers/clusters.go, libs/databrickscfg/cfgpickers/warehouses.go, libs/databrickscfg/cfgpickers/warehouses_test.go
Suggested: @simonfaltum
Also eligible: @tanmay-db, @renaudhartert-db, @hectorcast-db, @parthban-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

/libs/log/ - needs approval

Files: libs/log/handler/colors.go, libs/log/handler/colors_test.go, libs/log/handler/friendly.go
Suggested: @simonfaltum
Also eligible: @tanmay-db, @renaudhartert-db, @hectorcast-db, @parthban-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

General files (require maintainer)

4 files changed
Based on git history:

  • @simonfaltum -- recent work in libs/cmdio/, ./, experimental/aitools/lib/installer/

Any maintainer (@andrewnester, @anton-107, @denik, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

1 similar comment
@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 4, 2026

Approval status: pending

/bundle/ - needs approval

5 files changed
Suggested: @denik
Also eligible: @anton-107, @lennartkats-db, @shreyas-goenka, @andrewnester, @janniklasrose

/cmd/labs/ - needs approval

Files: cmd/labs/project/fetcher.go, cmd/labs/project/installer.go, cmd/labs/project/project.go
Eligible: @alexott, @asnare

/experimental/aitools/ - needs approval

Files: experimental/aitools/cmd/install.go, experimental/aitools/lib/installer/installer.go
Suggested: @arsenyinfo
Also eligible: @pkosiec, @lennartkats-db, @MarioCadenas, @fjakobs, @jamesbroadhead, @Shridhad, @atilafassina, @keugenek, @igrekun, @pffigueiredo, @ditadi, @calvarjorge

/libs/apps/ - needs approval

4 files changed
Suggested: @arsenyinfo
Also eligible: @pkosiec, @MarioCadenas, @fjakobs, @jamesbroadhead, @Shridhad, @atilafassina, @keugenek, @igrekun, @pffigueiredo, @ditadi, @calvarjorge

/libs/cmdio/ - needs approval

8 files changed
Suggested: @simonfaltum
Also eligible: @tanmay-db, @renaudhartert-db, @hectorcast-db, @parthban-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

/libs/databrickscfg/ - needs approval

Files: libs/databrickscfg/cfgpickers/clusters.go, libs/databrickscfg/cfgpickers/warehouses.go, libs/databrickscfg/cfgpickers/warehouses_test.go
Suggested: @simonfaltum
Also eligible: @tanmay-db, @renaudhartert-db, @hectorcast-db, @parthban-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

/libs/log/ - needs approval

Files: libs/log/handler/colors.go, libs/log/handler/colors_test.go, libs/log/handler/friendly.go
Suggested: @simonfaltum
Also eligible: @tanmay-db, @renaudhartert-db, @hectorcast-db, @parthban-db, @Divyansh-db, @tejaskochar-db, @mihaimitrea-db, @chrisst, @rauchy

General files (require maintainer)

4 files changed
Based on git history:

  • @simonfaltum -- recent work in libs/cmdio/, ./, experimental/aitools/lib/installer/

Any maintainer (@andrewnester, @anton-107, @denik, @shreyas-goenka, @simonfaltum, @renaudhartert-db) can approve all areas.
See OWNERS for ownership rules.

@pietern pietern temporarily deployed to test-trigger-is May 5, 2026 10:29 — with GitHub Actions Inactive
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.

1 participant