runatlantis / atlantis

Terraform Pull Request Automation
https://www.runatlantis.io
Other
7.82k stars 1.06k forks source link

`help` is not a supported command in `--allow-commands` #2988

Open andrusha opened 1 year ago

andrusha commented 1 year ago

Community Note


Overview of the Issue

https://github.com/runatlantis/atlantis/pull/2877 introduced --allow-commands flag. It surprisingly does not recognize help command (see list of available commands), which is inconsistent with what is considered and acts like a command in Atlantis:

Screenshot 2023-01-16 at 14 26 56

This potentially breaks Atlantis deployment and is annoying to manually fix afterwards.

Reproduction Steps

  1. Run atlantis with --allow-commands help

Logs

Logs ``` [31mError: invalid --allow-commands: unknown command name: help[39m ```

Environment details

Additional Context

andrusha commented 1 year ago

@krrrr38 @nitrocode @chenrui333 take a look, please.

nitrocode commented 1 year ago

@andrusha if you do not set allow-commands to help, or setting it to plan, does commenting atlantis help on a PR work?

@krrrr38 and I did speak about the Atlantis help command briefly within that PR. I think it does work but it may not be accessible from --allow-commands.

I believe the information that comes from help is not an explicitly defined command, more of a default if a subcommand is not found.

krrrr38 commented 1 year ago

I think we don't need to do anything. Because available allow commads are written in docs and server returns correct error message. https://www.runatlantis.io/docs/server-configuration.html#allow-commands

Do you want to disable help command in your usecase? @andrusha


First of all, thank you for using new feature and submit issue!

andrusha commented 1 year ago

@nitrocode I don't think help works when --allow-commands option is set, at least not from Github comments.

Either way even if it's a special from within the application I think it makes sense to not fail on it being an input to allow-commands, as it is confusing to people not familiar with Atlantis internals.