syndesisio / syndesis-rest

The API for Syndesis - a flexible, customizable, cloud-hosted platform that provides core integration capabilities as a service. It leverages Red Hat's existing product architecture using OpenShift Online/Dedicated and Fuse Integration Services.
https://syndesis-staging.b6ff.rh-idev.openshiftapps.com/api/v1/
Apache License 2.0
6 stars 17 forks source link

OpenShift error when creating build configuration #747

Closed rhuss closed 6 years ago

rhuss commented 7 years ago
io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: https://openshift.default.svc/apis/build.openshift.io/v1/namespaces/proj7630/builds?labelSelector=openshift.io/build-config.name%3Dtwsf&fieldSelector=status%3DRunning. Message: No field label conversion function found for version: build.openshift.io/v1. Received status: Status(apiVersion=v1, code=400, details=null, kind=Status, message=No field label conversion function found for version: build.openshift.io/v1, metadata=ListMeta(resourceVersion=null, selfLink=null, additionalProperties={}), reason=BadRequest, status=Failure, additionalProperties={}).
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.requestFailure(OperationSupport.java:470) ~[kubernetes-client-2.6.0-000015.fuse-000002.jar!/:na]
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.assertResponseCode(OperationSupport.java:409) ~[kubernetes-client-2.6.0-000015.fuse-000002.jar!/:na]
    at io.fabric8.kubernetes.client.dsl.base.OperationSupport.handleResponse(OperationSupport.java:379) ~[kubernetes-client-2.6.0-000015.fuse-000002.jar!/:na]

the corresponding code looks like

    @Override
    public boolean isBuildStarted(String name) {
        String sName = Names.sanitize(name);
        return !openShiftClient.builds()
                               .withLabel("openshift.io/build-config.name", sName)
                               .withField("status", "Running")
                               .list().getItems().isEmpty();
    }

and has not changed since 6 weeks.

@iocanel any ideas what this could be ?

iocanel commented 7 years ago

@rhuss: I haven't seen that before. With a quick search I found:

https://github.com/openshift/jenkins-sync-plugin/issues/173 and some other related issues.

Where do u get this?

rhuss commented 7 years ago

I get this when I create when checking for a running build for the integration runtime on our ignite cluster (3.6.) with the images used from the pipeline builds. I never have seen this before, too. I'm a bit afraid that this is because our upstream images use a very old kubernetes-client (2.2.13), whereas the pipeline builds have 2.6.0. For 2.2.13 I never have seen this issue.

rhuss commented 7 years ago

@iocanel do know what the difference between 2.2.13 and 2.6.0 of kubernetes-client is ? For 2.2.13 the code above still works fine, so there must be some difference within the client.

iocanel commented 7 years ago

@rhuss: I think that in the 2.6.0 the major difference is control for the api groups.

iocanel commented 7 years ago

I would give it a shot with the latest 2.5.x and see if we can live with it.

rhuss commented 7 years ago

If I understood @cunningt correctly, the goal is to align FIS, which seems to have bumped up to 2.6 already. But maybe its worth for them also to downgrade to 2.5 ?

2.5.9 is the latest, right ? Let me try this with the upstream version ...

rhuss commented 7 years ago

2.5.9 does not work either ...

rhuss commented 7 years ago

2.4.1 works ...

rhuss commented 7 years ago

2.5.1 does not. So the change from 2.4.1 to 2.5.1 broke this // @iocanel

rhuss commented 7 years ago

The difference can be found here: https://github.com/fabric8io/kubernetes-client/compare/v2.4.1...v2.5.1

Not sure, what to do next ....