Uploaded image for project: 'Tools (JBoss Tools)'
  1. Tools (JBoss Tools)
  2. JBIDE-22423

Edit resources: Cannot edit build config resource

XMLWordPrintable

    • devex #115 May 2016
    • Hide

      ASSERT: Have an application based on eap 6.4 template.
      EXEC: Select build config in Properties view.
      EXEC: Select context menu item Edit... and change build config and try to save.

      RESULT: Error pops up.

      EXPECTED RESULT: Build config is changed and saved successfully.

      Show
      ASSERT: Have an application based on eap 6.4 template. EXEC: Select build config in Properties view. EXEC: Select context menu item Edit... and change build config and try to save. RESULT: Error pops up. EXPECTED RESULT: Build config is changed and saved successfully.
    • Workaround Exists
    • Hide

      Delete key:value pair "from" : {} in build config in image change trigger

      Show
      Delete key:value pair "from" : {} in build config in image change trigger

      When I am trying to edit build config resource, I get an error. See stack trace below. Problem causes key value pair "from" : {} in image change trigger. I don't know why it is added here, but output from oc binary (oc get bc eap-app -o json) does not show this key value in json (it's the only difference).

      See stack trace of the error

      Could not update "[eapapp] Build Config : eap-app.json" for project "eapapp" : BuildConfig "eap-app" is invalid: triggers[2].imageChange.from.kind: invalid value '', Details: only an ImageStreamTag type of reference is allowed in an ImageChange trigger.
      
      
      com.openshift.restclient.OpenShiftException: Could not update resource eap-app: {
        "kind": "Status",
        "apiVersion": "v1",
        "metadata": {},
        "status": "Failure",
        "message": "BuildConfig \"eap-app\" is invalid: triggers[2].imageChange.from.kind: invalid value '', Details: only an ImageStreamTag type of reference is allowed in an ImageChange trigger.",
        "reason": "Invalid",
        "details": {
          "name": "eap-app",
          "kind": "BuildConfig",
          "causes": [
            {
              "reason": "FieldValueInvalid",
              "message": "invalid value '', Details: only an ImageStreamTag type of reference is allowed in an ImageChange trigger.",
              "field": "triggers[2].imageChange.from.kind"
            }
          ]
        },
        "code": 422
      }
      
      	at com.openshift.internal.restclient.DefaultClient.createOpenShiftException(DefaultClient.java:488)
      	at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:254)
      	at org.jboss.tools.openshift.internal.ui.property.OpenShiftResourceDocumentProvider$2.run(OpenShiftResourceDocumentProvider.java:131)
      	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)
      Caused by: com.openshift.internal.restclient.http.HttpClientException: {
        "kind": "Status",
        "apiVersion": "v1",
        "metadata": {},
        "status": "Failure",
        "message": "BuildConfig \"eap-app\" is invalid: triggers[2].imageChange.from.kind: invalid value '', Details: only an ImageStreamTag type of reference is allowed in an ImageChange trigger.",
        "reason": "Invalid",
        "details": {
          "name": "eap-app",
          "kind": "BuildConfig",
          "causes": [
            {
              "reason": "FieldValueInvalid",
              "message": "invalid value '', Details: only an ImageStreamTag type of reference is allowed in an ImageChange trigger.",
              "field": "triggers[2].imageChange.from.kind"
            }
          ]
        },
        "code": 422
      }
      
      	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.createException(UrlConnectionHttpClient.java:278)
      	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:243)
      	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.put(UrlConnectionHttpClient.java:165)
      	at com.openshift.internal.restclient.DefaultClient.update(DefaultClient.java:250)
      	... 2 more
      Caused by: java.io.IOException: Server returned HTTP response code: 422 for URL: https://10.1.2.2:8443/oapi/v1/namespaces/eapapp/buildconfigs/eap-app
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1840)
      	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1441)
      	at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
      	at com.openshift.internal.restclient.http.UrlConnectionHttpClient.request(UrlConnectionHttpClient.java:239)
      	... 4 more
      
      
      

            jcantril@redhat.com Jeffrey Cantrill
            mlabuda_jira Marián Labuda (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: