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

Unable to re-edit Service config

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 4.4.0.Alpha2
    • 4.3.1.Beta2
    • openshift, upstream
    • None
    • devex #3 February 2016, devex #114 May 2016
    • 20
    • Hide

      close the editor (cancel the current changes)
      refresh the OpenShift Explorer view
      open the editor again.

      Show
      close the editor (cancel the current changes) refresh the OpenShift Explorer view open the editor again.

      Once a service config has been changed, closing and reopening the config editor does not reveal the latest config, which then causes 409 error when saving subsequent changes, making it impossible to submit new changes.

      Steps to reproduce:

      • select a service in the OpenShift Explorer
      • click on the Edit... command.
      • in the JSON editor for the service config, note the resource version. Eg:
      {
          "metadata" : {
              "name" : "jee-sample",
              "namespace" : "sample",
              "selfLink" : "/api/v1/namespaces/sample/services/jee-sample",
              "uid" : "5663ba0f-da47-11e5-ab9d-525400659b2e",
              "resourceVersion" : "38301",
              "creationTimestamp" : "2016-02-23T16:06:03Z",
              "labels" : {"app" : "jee-sample"},
              "annotations" : {"openshift.io/generated-by" : "OpenShiftWebConsole"}
          },
      ...
      
      • make some changes and save
      • the service config version should have incremented:
      {
          "kind" : "Service",
          "apiVersion" : "v1",
          "metadata" : {
              "name" : "jee-sample",
              "namespace" : "sample",
              "selfLink" : "/api/v1/namespaces/sample/services/jee-sample",
              "uid" : "5663ba0f-da47-11e5-ab9d-525400659b2e",
              "resourceVersion" : "38390",
              "creationTimestamp" : "2016-02-23T16:06:03Z",
              "labels" : {"app" : "jee-sample"},
              "annotations" : {"openshift.io/generated-by" : "OpenShiftWebConsole"}
          }
          ....
      
      • close the config editor
      • re-open the config editor

      ASSERT: the editor displays the latest config
      FAIL the editor displays the initial config

      Also, on subsequent changes, the OpenShift server responds with a 409 error because the new config to save is based out-dated version

      Could not update "[sample] Service : jee-sample.json" for project "sample" : services "jee-sample" cannot be updated: the object has been modified; please apply your changes to the latest version and try again
      Could not update resource jee-sample: {
        "kind": "Status",
        "apiVersion": "v1",
        "metadata": {},
        "status": "Failure",
        "message": "services \"jee-sample\" cannot be updated: the object has been modified; please apply your changes to the latest version and try again",
        "reason": "Conflict",
        "details": {
          "name": "jee-sample",
          "kind": "services"
        },
        "code": 409
      }
      

              jcantril@redhat.com Jeffrey Cantrill
              xcoulon@redhat.com Xavier Coulon
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: