Skip to content

validate command prints usage when used like documented? #781

Closed

Description

@verygitmuchhub

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

Activity

  1. added
    bug
    on Nov 14, 2024
  2. osterman commented on Nov 14, 2024

    @osterman
    Member

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

  3. GabisCampana commented on Nov 14, 2024

    @GabisCampana
  4. Cerebrovinny commented on Nov 15, 2024

    @Cerebrovinny
    Contributor

    Andriy Knysh (@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

  5. aknysh commented on Nov 15, 2024

    @aknysh
    Member

    Vinicius C. (@Cerebrovinny) i'll check it and let you know

  6. moved this from In Progress to Done in Atmos Developmenton Dec 11, 2024
  7. osterman commented on Dec 11, 2024

    @osterman
    Member
  8. osterman commented on Dec 11, 2024

    @osterman
    Member

    These changes were released in v1.119.0.

  9. mss commented on Dec 12, 2024

    @mss
    Contributor

    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
    
  10. mss commented on Jan 6, 2025

    @mss
    Contributor

    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

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions