Bug 1403134
Summary: | 'oc edit istag' failed with 'unable to find api field in struct RawExtension' | ||
---|---|---|---|
Product: | OpenShift Container Platform | Reporter: | Xingxing Xia <xxia> |
Component: | oc | Assignee: | Maciej Szulik <maszulik> |
Status: | CLOSED ERRATA | QA Contact: | Xingxing Xia <xxia> |
Severity: | low | Docs Contact: | |
Priority: | low | ||
Version: | 3.4.0 | CC: | aos-bugs, ffranz, jokerman, jvallejo, maszulik, mkargaki, mmccomas, tdawson |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: |
Cause:
.spec.dockerImageMetadata was unnecessarily used when patching ImageStreamTag.
Consequence:
As a consequence oc edit couldn't succeed.
Fix:
Patch mechanism used in oc edit was modified in such a way to always replace the contents of .spec.dockerImageMetadata field.
Result:
User should be able to invoke oc edit on any ImageStreamTag.
|
Story Points: | --- |
Clone Of: | Environment: | ||
Last Closed: | 2017-04-12 19:18:12 UTC | Type: | Bug |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Xingxing Xia
2016-12-09 07:34:33 UTC
Looks like this might be fixed in a future update to strategic merge patch that allows it to deal with fields without a schema (RawExtension in this case) Juan, it doesn't look like it's fixed in newer versions. The logic is still pretty much the same and it'll trip over in the same place when comparing two different dockerImageMetadata part of an Image. My proposed solution [1] allows setting patchStrategy for struct objects. Looking for input on the PR. [1] https://github.com/openshift/origin/pull/12731 > Juan, it doesn't look like it's fixed in newer versions. The logic is still pretty much the same and it'll trip over in the same place when comparing two different dockerImageMetadata part of an Image. Apologies for the confusion in #c2. I meant that this was part of a list of proposed changes to make generic kubectl cmds work with unstructured objects. See https://github.com/kubernetes/kubernetes/pull/40260 > My proposed solution [1] allows setting patchStrategy for struct objects. Looking for input on the PR. Sounds good, will take a look. Thanks! >Apologies for the confusion in #c2. I meant that this was part of a list of proposed changes to make generic kubectl cmds work with unstructured objects. See https://github.com/kubernetes/kubernetes/pull/40260
I've looked into k8s master which already had that changes and it didn't occur to me that this addresses the problem in any way, thus my proposed fix.
Commit pushed to master at https://github.com/openshift/origin https://github.com/openshift/origin/commit/2a248fb46d6153d2b359d8bf5234a48a7e492b42 Merge pull request #12731 from soltysh/bug1403134 Merged by openshift-bot Verified in openshift/oc v3.5.0.31-1. Now 'oc edit istag' succeeds in comment 0 steps Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://access.redhat.com/errata/RHBA-2017:0884 |