-
-
Notifications
You must be signed in to change notification settings - Fork 107
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
Add support for atlantis version #852
Conversation
📝 WalkthroughWalkthroughThe changes in this pull request introduce a new command execution mechanism for the Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
cmd/atlantis.go
(2 hunks)internal/exec/atlantis_generate_repo_config.go
(1 hunks)internal/exec/utils.go
(1 hunks)
🧰 Additional context used
🪛 golangci-lint (1.62.2)
cmd/atlantis.go
15-15: Error return value of exec.ExecuteAtlantis
is not checked
(errcheck)
🔇 Additional comments (2)
internal/exec/atlantis_generate_repo_config.go (1)
20-32
: Implementation looks solid!
The new ExecuteAtlantis
function is well-structured with proper error handling and follows the established patterns in the codebase.
internal/exec/utils.go (1)
664-674
: Clean implementation of version command handling!
The changes correctly handle the special case for the version command while maintaining the existing behavior for other single-argument commands.
Run: func(cmd *cobra.Command, args []string) { | ||
exec.ExecuteAtlantis(cmd, args) | ||
}, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Handle the error returned by ExecuteAtlantis
The error returned by ExecuteAtlantis
should be checked and handled appropriately to prevent silent failures.
Apply this diff to handle the error:
Run: func(cmd *cobra.Command, args []string) {
- exec.ExecuteAtlantis(cmd, args)
+ if err := exec.ExecuteAtlantis(cmd, args); err != nil {
+ fmt.Fprintf(os.Stderr, "Error executing atlantis command: %v\n", err)
+ os.Exit(1)
+ }
},
📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
Run: func(cmd *cobra.Command, args []string) { | |
exec.ExecuteAtlantis(cmd, args) | |
}, | |
Run: func(cmd *cobra.Command, args []string) { | |
if err := exec.ExecuteAtlantis(cmd, args); err != nil { | |
fmt.Fprintf(os.Stderr, "Error executing atlantis command: %v\n", err) | |
os.Exit(1) | |
} | |
}, |
🧰 Tools
🪛 golangci-lint (1.62.2)
15-15: Error return value of exec.ExecuteAtlantis
is not checked
(errcheck)
There's Pull Request makes no sense because we don't support any Atlantis commands today. We do support one command to generate Atlantis configurations, but we never call the Atlantis binary via Atmos. The Atlantis binary is never even needed. |
what
We are adding support for atlantis version
why
We say atmos supports all native atlantis commands, yet we do not support
atmos atlantis version
references
issue: https://linear.app/cloudposse/issue/DEV-2839/atmos-atlantis-version-does-not-work
Summary by CodeRabbit
New Features
Bug Fixes
Documentation