Skip to content

fix(env): match Tanka's multiple-environments error format#8

Merged
julienduchesne merged 1 commit into
masterfrom
julienduchesne/multi-env-error-per-line
Jun 10, 2026
Merged

fix(env): match Tanka's multiple-environments error format#8
julienduchesne merged 1 commit into
masterfrom
julienduchesne/multi-env-error-per-line

Conversation

@julienduchesne

Copy link
Copy Markdown
Collaborator

Summary

When an inline file resolves to multiple environments and no --name is given, rtk printed every match on a single comma-separated line. With dozens of inline environments that's painful to scan. Format the error like Tanka's ErrMultipleEnvs instead, listing one environment per line.

  • Names are sorted and rendered one per line (\n - <name>), matching Tanka's output
  • Reuse Tanka's wording, including the matching "<name>" variant when a --name filter still leaves multiple matches

Made with Cursor

@julienduchesne julienduchesne requested a review from a team as a code owner June 10, 2026 15:02
@github-actions

github-actions Bot commented Jun 10, 2026

Copy link
Copy Markdown

Benchmark Results

Benchmark Test vs tk vs base
Diff cluster_scoped 49.06x faster equal
Diff configmap_unchanged 29.38x faster equal
Diff deployment_nested_changes 28.31x faster equal
Env List Single Inline Directory (--json) 46.91x faster equal
Env List Single Inline File (--json) 46.8x faster equal
Env List All Environments (--json) 85.3x faster equal
Eval Single Static Environment 15.24x faster equal
Eval Inline Environment File 19.93x faster equal
Eval Eval Expression - Deeply Nested Path 15.88x faster equal
Export (Full) Single Static Environment 7.08x faster equal
Export (Full) Single Inline Environment 22.28x faster equal
Export (Full) All Environments 20.05x faster equal
Export (Replace) Single Static Environment 5.88x faster equal
Export (Replace) Single Inline Environment 21.43x faster equal
Export (Replace) All Environments 32.83x faster equal
Helm Template Full Export 1.42x faster equal
Tool Importers Count Single Lib Directory (Non-Recursive) 2.52x faster equal
Tool Importers Count Single Lib Directory (Recursive) 2.52x faster equal
Tool Importers Count Entire Lib Directory (Non-Recursive) 1.62x faster equal
Tool Importers Count Entire Lib Directory (Recursive) 1.13x faster equal
Tool Importers Global Lib File 3.17x faster equal
Tool Importers Single Env-Specific Lib File 1.68x faster equal
Tool Importers All Env-Specific Lib Files 5.17x faster equal
Tool Importers All Lib Files 5.07x faster equal
Tool Importers All Jsonnet Files 8.82x faster equal
Tool Imports Single Static Environment 3.31x faster equal
Tool Imports Single Inline Environment File 3.34x faster equal
Validate Manifests All Validations - equal
Validate Manifests Manifest Tests Only - equal
Validate Manifests Namespace Test Only - equal

Full results available in workflow artifacts.

Benchmark run on commit 9ea50df2da8d794816aa61899a73c693e3cd31c0

List matching environments one per line (sorted) instead of a single
comma-separated line, mirroring Tanka's `ErrMultipleEnvs` output. Long
inline-environment lists are now far easier to read.

Co-authored-by: Cursor <cursoragent@cursor.com>
@julienduchesne julienduchesne force-pushed the julienduchesne/multi-env-error-per-line branch from 4217e66 to 9ea50df Compare June 10, 2026 15:12
@julienduchesne julienduchesne merged commit d7ca716 into master Jun 10, 2026
25 checks passed
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.

2 participants