Skip to content

Commit

Permalink
resolve failing validation
Browse files Browse the repository at this point in the history
  • Loading branch information
girishramnani committed Nov 4, 2020
1 parent 4b9e481 commit bf95aaf
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 9 deletions.
3 changes: 1 addition & 2 deletions pkg/component/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -869,8 +869,7 @@ func ListDevfileComponents(client *occlient.Client, selector string) (ComponentL

// extract the labels we care about from each component
for _, elem := range deploymentList {
fmt.Println("HERE2")
component, err := GetComponent(client, elem.Labels[componentlabels.ComponentLabel], selector, client.Namespace)
component, err := GetComponent(client, elem.Labels[componentlabels.ComponentLabel], elem.Labels[applabels.ApplicationLabel], client.Namespace)
if err != nil {
return ComponentList{}, errors.Wrap(err, "Unable to get component")
}
Expand Down
4 changes: 0 additions & 4 deletions pkg/component/pushed_component.go
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ func (d defaultPushedComponent) GetURLs() ([]url.URL, error) {
if d.urls == nil {
name := d.GetName()
var routes url.URLList
fmt.Println("HERE5")
if routeAvailable, err := d.client.IsRouteSupported(); routeAvailable && err == nil {
routes, err = url.ListPushed(d.client, name, d.GetApplication())
if err != nil && !isIgnorableError(err) {
Expand All @@ -89,7 +88,6 @@ func (d defaultPushedComponent) GetURLs() ([]url.URL, error) {
}
d.urls = append(routes.Items, ingresses.Items...)
}
fmt.Println("HERE6")
return d.urls, nil
}

Expand Down Expand Up @@ -270,9 +268,7 @@ func newPushedComponent(applicationName string, p provider, c *occlient.Client)

// GetPushedComponent returns an abstraction over the cluster representation of the component
func GetPushedComponent(c *occlient.Client, componentName, applicationName string) (PushedComponent, error) {
fmt.Println("HERE3")
d, err := c.GetKubeClient().GetDeploymentByName(componentName)
fmt.Println("HERE4")
if err != nil {
if isIgnorableError(err) {
// if it's not found, check if there's a deploymentconfig
Expand Down
1 change: 0 additions & 1 deletion pkg/odo/cli/component/list.go
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,6 @@ func (lo *ListOptions) Run() (err error) {
currentComponentState := component.StateTypeNotPushed

if lo.KClient != nil {
fmt.Println("HERE")
devfileComponents, err = component.ListDevfileComponents(lo.Client, selector)
if err != nil {
return err
Expand Down
3 changes: 1 addition & 2 deletions pkg/url/url.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,14 +319,13 @@ func ListPushed(client *occlient.Client, componentName string, applicationName s
if componentName != "" {
labelSelector = labelSelector + fmt.Sprintf(",%v=%v", componentlabels.ComponentLabel, componentName)
}

klog.V(4).Infof("Listing routes with label selector: %v", labelSelector)
routes, err := client.ListRoutes(labelSelector)
fmt.Println("HERE6 " + err.Error())

if err != nil {
return URLList{}, errors.Wrap(err, "unable to list route names")
}
fmt.Println("HERE7")

var urls []URL
for _, r := range routes {
Expand Down

0 comments on commit bf95aaf

Please sign in to comment.