lburgazzoli commented on a change in pull request #76: Context handling
improvement
URL: https://github.com/apache/camel-k/pull/76#discussion_r217885844
##########
File path: pkg/stub/action/integration/util.go
##########
@@ -24,7 +25,81 @@ func LookupContextForIntegration(integration
*v1alpha1.Integration) (*v1alpha1.I
return &ctx, nil
}
- return nil, nil
+ ctxList := v1alpha1.NewIntegrationContextList()
+ if err := sdk.List(integration.Namespace, &ctxList); err != nil {
+ return nil, err
+ }
+
+ var c *v1alpha1.IntegrationContext
+
+ if len(integration.Spec.Dependencies) == 0 {
+ // The integration has no dependencies, try to find the one that
+ // has minimum dependencies requirement.
+
+ ndeps := math.MaxUint16
Review comment:
Sounds good and simpler
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services