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

validate command prints usage when used like documented? #781

Closed
verygitmuchhub opened this issue Nov 14, 2024 · 8 comments
Closed

validate command prints usage when used like documented? #781

verygitmuchhub opened this issue Nov 14, 2024 · 8 comments
Labels
bug 🐛 An issue with the system Short List

Comments

@verygitmuchhub
Copy link

Describe the Bug

We bumped from 1.90.0 to 1.105.0. Our CI uses

atmos validate component <component> --stack <stack>

With 1.105.0 (and 1.106.0) we now get the commands usage printed instead/additionally:

atmos validate component "vpc/foo" --stack bar
Atmos supports native '' commands with all the options, arguments and flags.

In addition, 'component' and 'stack' are required in order to generate variables for the component in the stack.

atmos  <subcommand> <component> -s <stack> [options]
atmos  <subcommand> <component> --stack <stack> [options]

For more details, execute ' --help'

component 'vpc/foo' in stack 'bar' validated successfully

So it looks like some validation still took place and it was successfull.

Expected Behavior

Exit code 0 on successfull validation, some other number otherwise. No usage gets printed to the screen.

Steps to Reproduce

Run atmos validate component <component> --stack <stack> as documented via --help.

Screenshots

No response

Environment

  • OS: Linux
  • atmos Version: 1.105.0
  • terraform Version: 1.8.5

Additional Context

No response

@verygitmuchhub verygitmuchhub added the bug 🐛 An issue with the system label Nov 14, 2024
@osterman
Copy link
Member

This is a regression. We will get it fixed ASAP.

@GabisCampana
Copy link

@aknysh

@Cerebrovinny
Copy link
Collaborator

@aknysh not able to found the regression checking this https://raw.githubusercontent.com/cloudposse/atmos/b53d696375a6716b2fd0bc024fb1861b46c78bb5/internal/exec/validate_stacks.go

maybe you can point out the root cause for this? also silence usage from cobra can be a viable option on this case

@aknysh
Copy link
Member

aknysh commented Nov 15, 2024

@Cerebrovinny i'll check it and let you know

@osterman
Copy link
Member

This was resolved as part of:

@osterman
Copy link
Member

These changes were released in v1.119.0.

@mss
Copy link
Contributor

mss commented Dec 12, 2024

Unfortunately that PR didn't fix this issue:

± atmos version

 █████  ████████ ███    ███  ██████  ███████ 
██   ██    ██    ████  ████ ██    ██ ██      
███████    ██    ██ ████ ██ ██    ██ ███████ 
██   ██    ██    ██  ██  ██ ██    ██      ██ 
██   ██    ██    ██      ██  ██████  ███████ 
                                             

👽 Atmos 1.123.0 on linux/amd64

± atmos validate component wms-base --stack wms-xe02-sandbox

Atmos supports native '' commands with all the options, arguments and flags.

In addition, 'component' and 'stack' are required in order to generate variables for the component in the stack.

atmos  <subcommand> <component> -s <stack> [options]
atmos  <subcommand> <component> --stack <stack> [options]

For more details, execute ' --help'

component 'wms-base' in stack 'wms-xe02-sandbox' validated successfully

@mss
Copy link
Contributor

mss commented Jan 6, 2025

The changelog for v1.132.0 has the entry "Do not show help when executing atmos validate component <component> --stack <stack> command" so hopefully this is fixed in that version (not verified yet).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 An issue with the system Short List
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

6 participants