-
Notifications
You must be signed in to change notification settings - Fork 39
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
model consumption in path expansion #776
Conversation
@@ -64,6 +65,11 @@ func checkProperties(ctx solution_context.SolutionContext, resource, toCheck *co | |||
if err != nil || template == nil { | |||
return false, fmt.Errorf("error getting resource template for resource %s: %w", resource.ID, err) | |||
} | |||
|
|||
if strings.Contains(resource.ID.Name, PHANTOM_PREFIX) { |
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.
HasPrefix
is technically more correct, right?
func checkIfLoneDependency(ctx solution_context.SolutionContext, | ||
resource, toCheck construct.ResourceId, direction knowledgebase.Direction, | ||
selector knowledgebase.ResourceSelector) (bool, error) { |
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.
func checkIfLoneDependency(ctx solution_context.SolutionContext, | |
resource, toCheck construct.ResourceId, direction knowledgebase.Direction, | |
selector knowledgebase.ResourceSelector) (bool, error) { | |
func checkIfLoneDependency( | |
ctx solution_context.SolutionContext, | |
resource, toCheck construct.ResourceId, | |
direction knowledgebase.Direction, | |
selector knowledgebase.ResourceSelector | |
) (bool, error) { |
nit: I prefer this style of multi-line definition, but we haven't standardized anything
if err != nil { | ||
errs = errors.Join(errs, err) | ||
} | ||
if node.Parent.IsZero() && hasPath { |
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.
node.Parent.IsZero()
is always true because it's checked in the outer if
, right?
consumption: | ||
consumed: | ||
- model: EnvironmentVariables | ||
property_path: Object.spec.containers[0].env |
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.
This kinda feels like it should be just a property as the model
, with the converter
being the default value of property_path
. Fine for now, but feels like it could be unified.
Adds as source to cloudront and as dest to rest api for correct resolution and topology yaml
visualization fixes to only consider parent(groups) for namespace resources and clusters/network resources
Introduces emitter and consumer for construct expansion and path selection
kb now stores models to be used for emissions
during path expansion we consume anything from the target which is available and wanted by the src
example for emissions
sample inputs
sample outputs for relevant consumers
Standard checks