-
-
Notifications
You must be signed in to change notification settings - Fork 112
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
Exclude abstract components from list #851
Conversation
📝 Walkthrough📝 WalkthroughWalkthroughThe pull request introduces a new function, Changes
Assessment against linked issues
Suggested labels
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
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
🧹 Outside diff range and nitpick comments (1)
internal/exec/describe_component.go (1)
88-89
: Add function documentation to clarify the expected input structure.The function would benefit from detailed documentation explaining the expected structure of the
componentsMap
parameter, including an example of the metadata format that defines abstract components.-// FilterAbstractComponents This function removes abstract components and returns the list of components +// FilterAbstractComponents filters out components marked as "abstract" in their metadata. +// The componentsMap is expected to have the following structure: +// { +// "component-name": { +// "metadata": { +// "type": "abstract|concrete" +// } +// } +// } +// Returns a slice of component names, excluding those marked as abstract.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
internal/exec/atmos.go
(1 hunks)internal/exec/describe_component.go
(2 hunks)
🔇 Additional comments (1)
internal/exec/atmos.go (1)
54-54
: LGTM! The change correctly implements abstract component filtering.
The replacement of lo.Keys(v4)
with FilterAbstractComponents(v4)
successfully implements the PR objective of excluding abstract components from the UI list.
Let's verify if the lo
package is still needed in this file:
✅ Verification successful
The lo
package is still actively used in the file - import should be retained
The verification shows that the lo
package is used in three other locations within the same file:
lo.MapEntries()
for stack components mappinglo.Uniq()
andlo.Flatten()
withlo.Values()
for component set operationslo.ForEach()
for component iteration
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Check if lo package is used elsewhere in the file
rg --type go "lo\." internal/exec/atmos.go
Length of output: 257
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.
thanks @samtholiya
These changes were released in v1.125.0. |
issue: https://linear.app/cloudposse/issue/DEV-2808/atmos-tui-should-not-include-abstract-components
what
We want to exclude abstract components from the UI list
Considering we have the following yaml:
Currently we would get the following options in the atmos TUI


After this pr we would get only
station
as shownwhy
Since abstract components are not real components and disabled components are supposed to be not usable.
references
https://sweetops.slack.com/archives/C031919U8A0/p1733161390410539
Summary by CodeRabbit