Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: exec, run, info strict commands implementation, flags renaming. #3723

Merged
merged 180 commits into from
Feb 10, 2025
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
180 commits
Select commit Hold shift + click to select a range
73bec7a
fix: exec command implementation
levkohimins Dec 14, 2024
e5414c0
fix: flags duplication
levkohimins Dec 15, 2024
58a1e68
chore: update golangci-lint
levkohimins Dec 15, 2024
e4fb601
fix: log level
levkohimins Dec 15, 2024
6252aae
fix: revert pointer
levkohimins Dec 15, 2024
4b1b428
fix: no-color flag duplication
levkohimins Dec 15, 2024
07da3b2
fix: golint
levkohimins Dec 15, 2024
00e47f3
fix: strict mode test
levkohimins Dec 16, 2024
3c5c517
chore: deprecated name funcs improvement
levkohimins Dec 17, 2024
06950e7
fix: deprecated names prefix
levkohimins Dec 17, 2024
38e95b4
chore: handle formatter error
levkohimins Dec 18, 2024
2e56b81
chore: debugging provider cache
levkohimins Dec 18, 2024
aa9afe4
chore: remove debug code
levkohimins Dec 18, 2024
d17e292
chore: debug code
levkohimins Dec 18, 2024
e07d93e
fix: update test envs
levkohimins Dec 19, 2024
bd710c4
chore: exec-cmd integration test
levkohimins Dec 19, 2024
2919cbb
chore: docs update
levkohimins Dec 20, 2024
a05afe3
fix: app_test
levkohimins Dec 20, 2024
b9b82fc
fix: markdown
levkohimins Dec 20, 2024
7281497
fix: markdown
levkohimins Dec 20, 2024
4f04342
fix: tests
levkohimins Dec 20, 2024
6635e0c
fix: render-json flag names
levkohimins Dec 20, 2024
a064757
chore: get rid of unnecessary flags for some commands
levkohimins Dec 20, 2024
1248c4c
chore: docs update
levkohimins Dec 20, 2024
49d0be4
chore: make `-non-interactive` flag global.
levkohimins Dec 20, 2024
c3e8b99
fix: test
levkohimins Dec 20, 2024
472e7fe
chore: docs update
levkohimins Dec 20, 2024
1a21c47
Merge branch 'main' into feat/exec-cmd
levkohimins Dec 20, 2024
5706817
chore: docs update
levkohimins Dec 20, 2024
adf4602
chore: rename `terraform` package to `run`
levkohimins Dec 25, 2024
81d7385
chore: sorting flags
levkohimins Dec 25, 2024
a43b532
chore: cli flag parsing improvements
levkohimins Dec 25, 2024
a9382f0
fix: cli arg parsing
levkohimins Dec 25, 2024
5001276
chore: cli flag parsing improvements
levkohimins Dec 26, 2024
45d22e6
Merge branch 'main' into feat/exec-cmd
levkohimins Dec 27, 2024
0543289
chore: move cli package to internal
levkohimins Dec 27, 2024
d2d1676
fix: test
levkohimins Dec 27, 2024
959c17a
fix: strict go lint
levkohimins Dec 27, 2024
3d5475c
Merge branch 'feat/exec-cmd' into feat/run-command
levkohimins Dec 27, 2024
35e6545
Merge branch 'main' into feat/exec-cmd
levkohimins Dec 30, 2024
58011f1
chore: resolve conflict
levkohimins Dec 30, 2024
994ee98
Merge branch 'feat/exec-cmd' into feat/run-command
levkohimins Dec 30, 2024
d5a7b43
chore: commands restructuring
levkohimins Dec 30, 2024
575938b
chore: move version_check
levkohimins Dec 30, 2024
dec1a46
chore: split shell package
levkohimins Dec 30, 2024
8b3fe03
fix: unit tests
levkohimins Dec 30, 2024
e004ae7
fix: unit tests
levkohimins Dec 30, 2024
3d5d33f
chore: clone options
levkohimins Dec 31, 2024
7ea97be
chore: opts cloning improvements
levkohimins Jan 1, 2025
bb265ea
chore: wrap error
levkohimins Jan 1, 2025
4451777
fix: resolve config path for run command
levkohimins Jan 1, 2025
8604247
fix: cloning opts
levkohimins Jan 1, 2025
c4bff8d
chore: golint strict
levkohimins Jan 1, 2025
8047e52
chore: code improvements
levkohimins Jan 1, 2025
3b26ac3
chore: move default command
levkohimins Jan 1, 2025
a7d4b1f
fix: log tf output command
levkohimins Jan 2, 2025
0da468c
fix: unit test
levkohimins Jan 2, 2025
cbbd200
chore: move `version_check` back to `run` package
levkohimins Jan 2, 2025
1d1e6a6
fix: circleci config
levkohimins Jan 2, 2025
ac6c8d2
chore: add help and test for `run` command
levkohimins Jan 2, 2025
0f83abc
chore: code improvements
levkohimins Jan 4, 2025
d0e15a4
chore: help for the default command
levkohimins Jan 4, 2025
c53b360
feat: Rename `cli-options` page to `cli`
yhakbar Jan 7, 2025
a099bc4
feat: Reorganizing CLI page
yhakbar Jan 7, 2025
7c268f7
fix: Removing unnecessary docs files
yhakbar Jan 7, 2025
d7dcc27
feat: Adding migration guide
yhakbar Jan 7, 2025
dc99e42
fix: Reorganizing commands
yhakbar Jan 7, 2025
0312a2a
Merge remote-tracking branch 'origin/main' into feat/updating-docs-fo…
yhakbar Jan 7, 2025
0807b62
chore: fix tests, exec command improvement
levkohimins Jan 7, 2025
763b251
Merge branch 'feat/updating-docs-for-exec' into feat/run-command
levkohimins Jan 7, 2025
db6c971
fix: Addressing markdownlint errors
yhakbar Jan 8, 2025
37e91c9
chore: change `options` cloning
levkohimins Jan 8, 2025
bfe7e35
Merge branch 'fix/addressing-markdown-lint-errors' into feat/run-command
levkohimins Jan 8, 2025
ec7e414
fix: tests
levkohimins Jan 8, 2025
700c634
fix: tests
levkohimins Jan 8, 2025
816520c
fix: windows error: too big path
levkohimins Jan 8, 2025
5242a45
fix: temp dir path
levkohimins Jan 8, 2025
f34e870
fix: creating tmp dir
levkohimins Jan 8, 2025
a09082f
chore: add comment
levkohimins Jan 8, 2025
4fc021d
fix: TestExecCommand test
levkohimins Jan 8, 2025
99a555c
chore: code improvements
levkohimins Jan 8, 2025
06b5d81
fix: pr issues
levkohimins Jan 9, 2025
9e3d56b
fix: test
levkohimins Jan 9, 2025
11181ea
Merge branch 'main' into feat/run-command
levkohimins Jan 9, 2025
e783d44
chore: cli-design experiment, cli help improvements
levkohimins Jan 10, 2025
fe2d42c
Merge branch 'main' into feat/run-command
levkohimins Jan 10, 2025
6fef4a8
fix: markdown
levkohimins Jan 10, 2025
54cb483
fix: Fixing race condition in `TestDownloadTerraformSourceFromLocalFo…
yhakbar Jan 10, 2025
ae5fec0
fix: tests
levkohimins Jan 10, 2025
1e7977b
fix: test
levkohimins Jan 10, 2025
880e737
Merge remote-tracking branch 'origin/fix/fixing-race-condition-in-tes…
levkohimins Jan 10, 2025
54fedf2
fix: test
levkohimins Jan 10, 2025
1c5165a
fix: test
levkohimins Jan 10, 2025
3b9a519
fix: Adding `graph` to list of commands that force forward
yhakbar Jan 10, 2025
65201ba
chore: help unit test
levkohimins Jan 10, 2025
c60b3a6
Merge branch 'fix/adding-graph-to-default-log-disable-entries' into f…
levkohimins Jan 10, 2025
f123718
chore: flag setter func
levkohimins Jan 12, 2025
0640a56
fix: test
levkohimins Jan 12, 2025
c3fdf39
chore: remove debug code
levkohimins Jan 12, 2025
04c71c2
fix: unit tests
levkohimins Jan 12, 2025
ea15023
fix: unit tests
levkohimins Jan 12, 2025
1869102
chore: code improvement
levkohimins Jan 12, 2025
13bfaef
chore: strict package refactoring
levkohimins Jan 13, 2025
268709d
chore: fix tests
levkohimins Jan 13, 2025
b170def
chore: experiment package refactoring
levkohimins Jan 14, 2025
1f587bf
chore: docs update
levkohimins Jan 14, 2025
7ef5630
chore: code improvements
levkohimins Jan 14, 2025
4c31fb1
fix: tests
levkohimins Jan 14, 2025
899364d
chore: move back to control `dependencies-inputs`
levkohimins Jan 14, 2025
4adbb8b
chore: revert `skip-dependencies-inputs`
levkohimins Jan 14, 2025
cf44ec0
Merge branch 'main' into feat/run-command
levkohimins Jan 14, 2025
653b999
chore: fix pr comments
levkohimins Jan 15, 2025
d1d4151
chore: get rid of LogFormatter from Options
levkohimins Jan 15, 2025
3fd0eff
fix: tests
levkohimins Jan 15, 2025
88bb714
fix: tests
levkohimins Jan 15, 2025
0d1e072
fix: test
levkohimins Jan 15, 2025
d23f9f8
chore: fix issues, strict control improvements
levkohimins Jan 29, 2025
b7a8a3a
fix: terragrunt config path resolving
levkohimins Jan 30, 2025
e4ab1e8
chore: Renaming the CLI options file to align with `main`
yhakbar Jan 30, 2025
3bcc71e
chore: Merging in `main` adjustments
yhakbar Jan 30, 2025
c825502
fix: Resolving conflicts with main
yhakbar Jan 30, 2025
2c308b5
fix: Fixing inaccuracy in flag docs
yhakbar Jan 30, 2025
9d84c13
fix: Resolving the rest of the conflicts
yhakbar Jan 30, 2025
1b54484
fix: Fixing shortcuts docs
yhakbar Jan 30, 2025
f307d8b
fix: Fixing line on flexibility
yhakbar Jan 30, 2025
ac29fa5
fix: Fixing example for run with dashes
yhakbar Jan 30, 2025
394d810
fix: More fixes for call-outs to experiments
yhakbar Jan 30, 2025
b4b1990
fix: More docs cleanup
yhakbar Jan 30, 2025
0145231
fix: resolving merging conflicts `cli.md`
levkohimins Jan 30, 2025
67aeca7
Merge branch 'feat/run-command' of https://github.com/gruntwork-io/te…
levkohimins Jan 30, 2025
ccbbf92
docs: Adding experiment docs
yhakbar Jan 30, 2025
173f712
Merge branch 'main' into feat/run-command
levkohimins Jan 30, 2025
0b4b695
Merge branch 'feat/run-command' of https://github.com/gruntwork-io/te…
levkohimins Jan 30, 2025
a8cd8c9
chore: rename cli-redesign.md
levkohimins Jan 30, 2025
046e576
chore: removing fixing too longpath by changing TMP dir
levkohimins Jan 30, 2025
af34fa5
fix: markdown lint
levkohimins Jan 30, 2025
c8a158c
fix: stack args
levkohimins Jan 31, 2025
c0bc2c3
chore: code improvements
levkohimins Jan 31, 2025
c77f358
Merge branch 'main' into feat/run-command
levkohimins Jan 31, 2025
2c4da0b
fix: fix global deprecated flags.
levkohimins Jan 31, 2025
2431ebd
fix: unit test
levkohimins Jan 31, 2025
76e37c1
chore: code comments
levkohimins Feb 2, 2025
2346df4
chore: docs update
levkohimins Feb 2, 2025
930a312
fix: enable strict control
levkohimins Feb 3, 2025
5a0523d
fix: unit test
levkohimins Feb 4, 2025
c8466ac
chore: redone shortcuts commands
levkohimins Feb 4, 2025
6396cb7
fix: Adjusting strict control docs (#3838)
yhakbar Feb 6, 2025
81d38b7
Merge remote-tracking branch 'origin/main' into feat/run-command
yhakbar Feb 6, 2025
9c011c3
fix: Renaming `strict.go` filename
yhakbar Feb 6, 2025
da4230b
fix: Fixing `depreacedName` name typo
yhakbar Feb 6, 2025
a87b21c
fix: Adding WIP to migration docs for CLI Redesign
yhakbar Feb 6, 2025
6a6fd64
fix: Fixing docs for `terragrunt-info`
yhakbar Feb 6, 2025
1faef1b
fix: Fixing wording of `graph` docs
yhakbar Feb 6, 2025
44694c6
fix: Fixing docs for dependency blocks
yhakbar Feb 6, 2025
6060566
fix: Fixing typo in `run-all` docs
yhakbar Feb 6, 2025
f8d1dac
fix: Cleand up formatting docs
yhakbar Feb 6, 2025
c809f63
fix: Fixing `diff` docs
yhakbar Feb 6, 2025
fd98f37
fix: Fixing includes docs
yhakbar Feb 6, 2025
874702b
fix: Breaking up control usage over multiple lines so that it's easie…
yhakbar Feb 6, 2025
2770bc2
fix: Fixing typo in `help_test.go`
yhakbar Feb 6, 2025
0836612
fix: Fixing `flag_opts.go` example typo
yhakbar Feb 6, 2025
4350c47
fix: Fixing docs bugs
yhakbar Feb 6, 2025
a187afd
fix: Checking error in `help_test.go`
yhakbar Feb 6, 2025
733a7c6
fix: Typo in `exec` help
yhakbar Feb 6, 2025
434c654
fix: Don't prioritize Terraform
yhakbar Feb 6, 2025
27b76d7
chore: strict control for moved global flags
levkohimins Feb 6, 2025
95d80ae
Merge remote-tracking branch 'origin/feat/run-command' into feat/run-…
levkohimins Feb 6, 2025
3131c90
fix: strict control msgs
levkohimins Feb 6, 2025
98065cd
fix: run cmd usage.
levkohimins Feb 6, 2025
555755d
fix: cli slice/map flags
levkohimins Feb 6, 2025
9bb185c
fix: test
levkohimins Feb 6, 2025
706f439
fix: grammar
levkohimins Feb 6, 2025
6f40746
fix: Removing accidentally committed file.
yhakbar Feb 6, 2025
61973d0
chore: coderabbitai's suggestions
levkohimins Feb 10, 2025
b6bb130
Merge remote-tracking branch 'origin/feat/run-command' into feat/run-…
levkohimins Feb 10, 2025
c1b3c63
Merge branch 'main' into feat/run-command
levkohimins Feb 10, 2025
22dc610
fix: stack flags
levkohimins Feb 10, 2025
e9eced1
fix: go-lint
levkohimins Feb 10, 2025
1e0a679
fix: tests
levkohimins Feb 10, 2025
4457102
fix: markdown lint
levkohimins Feb 10, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
fix: golint
  • Loading branch information
levkohimins committed Dec 15, 2024
commit 07da3b249563566261993ca5c8c3d95a38ceb527
7 changes: 4 additions & 3 deletions cli/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func (app *App) RunContext(ctx context.Context, args []string) error {
}
}(ctx)

args = RemoveNoColorDuplicates(args)
args = removeNoColorFlagDuplicates(args)

if err := app.App.RunContext(ctx, args); err != nil && !errors.IsContextCanceled(err) {
return err
Expand All @@ -143,8 +143,8 @@ func (app *App) RunContext(ctx context.Context, args []string) error {
return nil
}

func RemoveNoColorDuplicates(args []string) []string {
var (
func removeNoColorFlagDuplicates(args []string) []string {
var ( //nolint:prealloc
foundNoColor bool
filteredArgs []string
)
Expand All @@ -154,6 +154,7 @@ func RemoveNoColorDuplicates(args []string) []string {
if foundNoColor {
continue
}

foundNoColor = true
}

Expand Down
15 changes: 8 additions & 7 deletions cli/flags/flag.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,13 +197,14 @@ func autoEnvVar(name string) string {
}

func deprecatedNames(names []string) ([]string, []string) {
var deprecatedNames, deprecatedEnvVars []string

for _, name := range names {
envVarSuffix := strings.ToUpper(strings.ReplaceAll(name, "-", "_"))

deprecatedEnvVars = append(deprecatedEnvVars, DeprecatedEnvVarPrefix+envVarSuffix)
deprecatedNames = append(deprecatedNames, DeprecatedFlagNamePrefix+name)
var (
deprecatedNames = make([]string, len(names))
deprecatedEnvVars = make([]string, len(names))
)

for i := range names {
deprecatedEnvVars[i] = DeprecatedEnvVarPrefix + strings.ToUpper(strings.ReplaceAll(names[i], "-", "_"))
deprecatedNames[i] = DeprecatedFlagNamePrefix + names[i]
}

return deprecatedNames, deprecatedEnvVars
Expand Down
4 changes: 2 additions & 2 deletions test/integration_scaffold_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ func TestScaffoldErrorNoModuleUrl(t *testing.T) {
tmpEnvPath, err := os.MkdirTemp("", "terragrunt-scaffold-test")
require.NoError(t, err)

_, _, err = helpers.RunTerragruntCommandWithOutput(t, fmt.Sprintf("terragrunt scaffold --terragrunt-non-interactive --terragrunt-working-dir %s", tmpEnvPath))
_, _, err = helpers.RunTerragruntCommandWithOutput(t, "terragrunt scaffold --terragrunt-non-interactive --terragrunt-working-dir "+tmpEnvPath)
require.Error(t, err)
assert.Contains(t, err.Error(), "No module URL passed")
}
Expand Down Expand Up @@ -197,6 +197,6 @@ func TestScaffold3rdPartyModule(t *testing.T) {
assert.FileExists(t, tmpEnvPath+"/terragrunt.hcl")

// validate the generated files
_, _, err = helpers.RunTerragruntCommandWithOutput(t, fmt.Sprintf("terragrunt hclvalidate --terragrunt-non-interactive --terragrunt-working-dir %s", tmpEnvPath))
_, _, err = helpers.RunTerragruntCommandWithOutput(t, "terragrunt hclvalidate --terragrunt-non-interactive --terragrunt-working-dir "+tmpEnvPath)
require.NoError(t, err)
}