Uploaded image for project: 'OpenShift Bugs'
  1. OpenShift Bugs
  2. OCPBUGS-62875

'oc create istag/$ISTAG --dry-run=server' is unexpectedly creating the object from the server

XMLWordPrintable

    • Quality / Stability / Reliability
    • False
    • Hide

      None

      Show
      None
    • None
    • Moderate
    • No
    • In Progress
    • Enhancement
    • Hide
      * Before this update, deleting an `istag` resource with the `--dry-run=server` option unintentionally caused actual deletion of the image from the server. This unexpected deletion occurred due to the `dry-run` option being implemented incorrectly in the `oc delete istag` command. With this release, the `dry-run` option is wired to the 'oc delete istag' command. As a result, the accidental deletion of image objects is prevented and the `istag` object remains intact when using the `--dry-run=server` option. (link:https://issues.redhat.com/browse/OCPBUGS-35855[OCPBUGS-35855])
      ______
      The openshift-apiserver's image-related API servers (e.g., Image) didn’t have the --dry-run=server functionality wired through their storage layer, so the dry-run flag wasn’t honored. When users used oc with --dry-run=server on image resources, the requests were executed rather than simulated—this unintended behavior could lead to real, unexpected side effects.This PR respect the dry-run option and correctly simulate image operations without side effects, aligning with expected Kubernetes behavior and preventing unwanted modifications in workflows.
      Show
      * Before this update, deleting an `istag` resource with the `--dry-run=server` option unintentionally caused actual deletion of the image from the server. This unexpected deletion occurred due to the `dry-run` option being implemented incorrectly in the `oc delete istag` command. With this release, the `dry-run` option is wired to the 'oc delete istag' command. As a result, the accidental deletion of image objects is prevented and the `istag` object remains intact when using the `--dry-run=server` option. (link: https://issues.redhat.com/browse/OCPBUGS-35855 [ OCPBUGS-35855 ]) ______ The openshift-apiserver's image-related API servers (e.g., Image) didn’t have the --dry-run=server functionality wired through their storage layer, so the dry-run flag wasn’t honored. When users used oc with --dry-run=server on image resources, the requests were executed rather than simulated—this unintended behavior could lead to real, unexpected side effects.This PR respect the dry-run option and correctly simulate image operations without side effects, aligning with expected Kubernetes behavior and preventing unwanted modifications in workflows.
    • None
    • None
    • None
    • None

      Description of problem:

      'oc create istag/$ISTAG --dry-run=server' is unexpectedly creating the object from the server this is not expected behavior.
      
      - Attempted to create the `istag` resource object by using the `dry-run=server` option. However, the object(image) was actually created from the server.
      - Conversely, when applied the same `dry-run=server` parameter to other resources, they remained intact and were not created.

      Version-Release number of selected component (if applicable):

      OCP 4.15

      How reproducible:

      Try creating the `istag` resource using the `--dry-run=server` option with the server strategy.

      Steps to Reproduce:

      1. Example with resource ImageStreamTag istag
      
      ~~~ 
      $ oc create imagestream dryrun-test --dry-run=server -o yaml -n test1
      
      $ oc get is dryrun-test -n test1
      NAME          IMAGE REPOSITORY                                                     TAGS   UPDATED
      dryrun-test   image-registry.xxxxxx.svc:5000/test1/dryrun-test  
      ~~~
      
      ~~~ 

      Actual results:

      For `istag` resource, whenever tried to create the image with option `dry-run=server`. It actually got created from the server.

      Expected results:

      After creating the `istag` using the `--dry-run=server` option with the server strategy, the `istag` object should not create on the server.

      Additional info:

       

      This is one bug was not fixed in PR https://github.com/openshift/openshift-apiserver/pull/511

              rh-ee-bpalmer Bryce Palmer
              wk2019 Ke Wang
              None
              None
              Ke Wang Ke Wang
              None
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: