feat: support for .yml and .yaml file extensions for component vendoring#725
feat: support for .yml and .yaml file extensions for component vendoring#725aknysh merged 3 commits intocloudposse:mainfrom RoseSecurity:support-yml-for-component-vendoring
.yml and .yaml file extensions for component vendoring#725Conversation
|
@coderabbitai full review |
✅ Actions performedFull review triggered. |
📝 Walkthrough📝 WalkthroughWalkthroughThe changes in this pull request involve the introduction of a new function, Changes
Poem
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
CodeRabbit Configuration File (
|
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (1)
- internal/exec/vendor_component_utils.go (3 hunks)
🧰 Additional context used
🔇 Additional comments (1)
internal/exec/vendor_component_utils.go (1)
Line range hint
1-438: Summary: Changes successfully implement PR objectives with minor suggestions for improvement.The modifications in this file successfully implement support for both
.yamland.ymlfile extensions for component vendoring, aligning with the PR objectives. The changes also improve path handling for local files, enhancing the overall functionality of the component vendoring process.Key improvements:
- Added support for
component.ymlin addition tocomponent.yaml.- Enhanced error messages to include both file extensions.
- Improved path handling for local file sources.
Suggestions for further improvement:
- Consider using constants for file extensions to improve maintainability.
- Add comments to explain the purpose of new logic, especially for local file handling.
Overall, the changes are well-implemented and achieve the desired functionality. The suggested improvements are minor and aimed at enhancing code clarity and maintainability.
|
@RoseSecurity I like option 2, but defer to @aknysh |
.yml and .yaml files for component vendoring.yml and .yaml file extensions for component vendoring
There was a problem hiding this comment.
Actionable comments posted: 2
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
📒 Files selected for processing (1)
- internal/exec/vendor_component_utils.go (4 hunks)
🧰 Additional context used
🔇 Additional comments (2)
internal/exec/vendor_component_utils.go (2)
66-68: LGTM! Changes align with PR objective.The modification to use
findComponentConfigFilecorrectly implements the support for both.yamland.ymlfile extensions. This change is consistent with the new function's implementation and fulfills the PR's objective.
Line range hint
1-450: Overall, the changes successfully implement the PR objectives.The modifications in this file successfully add support for both
.ymland.yamlfile extensions for component vendoring. The newfindComponentConfigFilefunction and the updates toReadAndProcessComponentVendorConfigFiledirectly address the PR's main objective. Additional changes inExecuteComponentVendorInternalimprove code consistency and enhance local file handling.The implementation aligns with the second solution discussed in the PR, which proposed modifying a constant and adding a helper function. While the constant wasn't modified, the helper function (
findComponentConfigFile) was added to streamline the process of finding the configuration file.Minor suggestions for adding comments have been made to improve code clarity. Overall, the changes are well-implemented and improve the functionality of the component vendoring process.
|
These changes were released in v1.91.0. |
what
.ymland.yamlwhen vendoring usingcomponent.yamlalternative solutions
component.yamlexists before checking ifcomponent.ymlexistswhy
component.yaml, file ending for yaml files is a matter of preference and both should be accepted.testing
make buildreferences
Summary by CodeRabbit
Summary by CodeRabbit
New Features
.yamland.ymlfile formats.Refactor