-
-
Notifications
You must be signed in to change notification settings - Fork 106
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
[Vendor] Print error message when an error occurs during installation of the last vendored component #936
base: main
Are you sure you want to change the base?
Conversation
… of the last vendored component
📝 WalkthroughWalkthroughThe pull request modifies the Changes
Assessment against linked issues
Suggested Labels
The changes directly address the issue raised in #935 by ensuring that error messages are now printed when a package installation fails, giving users more visibility into what went wrong during the vendor pull process. Finishing Touches
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: 0
🧹 Nitpick comments (1)
internal/exec/vendor_model.go (1)
165-167
: LGTM! Consider standardizing error message format.The change effectively adds error message output for the last component, addressing the PR objective. The implementation maintains consistency with the existing error handling pattern.
For better consistency across all error messages, consider extracting the error message format into a constant:
+const vendorErrorFormat = "Failed to vendor %s: error : %s" // Earlier in the code where error message is formatted -errMsg = fmt.Sprintf("Failed to vendor %s: error : %s", pkg.name, msg.err) +errMsg = fmt.Sprintf(vendorErrorFormat, pkg.name, msg.err)This would ensure uniform error messaging throughout the codebase and make future message format updates easier to maintain.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
internal/exec/vendor_model.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
📝 WalkthroughWalkthroughThe pull request modifies the Changes
Assessment against linked issues
Suggested Labels
The changes directly address the issue by modifying the output to include error messages during package installation, which was the primary concern in the linked issue #935. The modification ensures that users receive more informative feedback when a component fails to vendor, particularly in scenarios involving OCI registry interactions. Finishing Touches
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: 0
🧹 Nitpick comments (1)
internal/exec/vendor_model.go (1)
165-167
: LGTM! The error message handling looks solid.The change effectively addresses the issue by displaying error messages when the last package fails to install. This improves visibility and helps users identify installation problems more easily.
Consider adding some visual separation between the package status and error message for better readability. Here's a suggested enhancement:
- tea.Printf("%s %s %s %s", mark, pkg.name, version, errMsg), + tea.Printf("%s %s %s%s", mark, pkg.name, version, errMsg != "" ? " | " + errMsg : ""),
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
internal/exec/vendor_model.go
(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: Summary
Thanks, looks helpful! |
what
Adds an error message to the output of
atmos vendor pull
for the last component in a vendor manifestreferences
closes #935
Summary by CodeRabbit