-
Notifications
You must be signed in to change notification settings - Fork 187
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
pkg/cincinnati: update unamrshal to node to match the result from cincinnati #113
pkg/cincinnati: update unamrshal to node to match the result from cincinnati #113
Conversation
6c15af8
to
ba739b8
Compare
According to openshift/cincinnati@5d226da, this should have been "fixed" already. Personally, I'm in favor of reverting that change and keeping this one. |
0c8b59c
to
4a6aad8
Compare
Running this locally $ oc get clusterversion -oyaml
apiVersion: v1
items:
- apiVersion: config.openshift.io/v1
kind: ClusterVersion
metadata:
creationTimestamp: 2019-02-06T00:51:12Z
generation: 1
name: version
namespace: ""
resourceVersion: "956"
selfLink: /apis/config.openshift.io/v1/clusterversions/version
uid: 4cbc79c7-29a9-11e9-b85c-664f163f5f0f
spec:
channel: fast
clusterID: a7d11204-7193-41ca-ad4a-337a540a5dac
upstream: https://api.openshift.com/api/upgrades_info/v1/graph
status:
availableUpdates:
- image: quay.io/openshift-release-dev/ocp-release:4.0.0-6
version: 4.0.0-6
conditions:
- lastTransitionTime: 2019-02-06T00:51:21Z
status: "False"
type: Available
- lastTransitionTime: 2019-02-06T00:53:21Z
status: "False"
type: Failing
- lastTransitionTime: 2019-02-06T00:51:21Z
message: 'Working towards 0.0.1-2019-02-06-003220: 22% complete'
status: "True"
type: Progressing
- lastTransitionTime: 2019-02-06T00:51:21Z
status: "True"
type: RetrievedUpdates
desired:
image: quay.io/abhinavdahiya/origin-release@sha256:4e9f3686380d26566e9112fdd53262068004a22a85f93111a0f10d0b3dfdc3a9
version: 0.0.1-2019-02-06-003220
history:
- completionTime: null
image: quay.io/abhinavdahiya/origin-release@sha256:4e9f3686380d26566e9112fdd53262068004a22a85f93111a0f10d0b3dfdc3a9
startedTime: 2019-02-06T00:51:21Z
state: Partial
version: 0.0.1-2019-02-06-003220
observedGeneration: 1
versionHash: G0evldCtMHI=
kind: List
metadata:
resourceVersion: ""
selfLink: "" this returns list of available versions availableUpdates:
- image: quay.io/openshift-release-dev/ocp-release:4.0.0-6
version: 4.0.0-6 |
I’m not super happy about a string called payload. If Cincinnati has more structured data, that’s one thing (payload: {image: }}). Payload string isn’t really future proof or correct. |
/retest |
1 similar comment
/retest |
/hold need to make sure we have finalized the cincinnati openshift's response api |
cincinnati counterpart of this is openshift/cincinnati#56. I'd be happy if we can get the two green-stamped at the same time, ensuring client and server stop trying to re-define the cincinnati protocol independently. |
4a6aad8
to
06bf9f8
Compare
openshift/cincinnati#56 was merged /hold cancel ping @smarterclayton @crawford |
…cinnati Based on [1] the fields for a node must be `version`, `image` and `metadata`. But response from current api: ```console $ curl --silent --header 'Accept:application/json' https://api.openshift.com/api/upgrades_info/v1/graph | jq . { "nodes": [ { "version": "4.0.0-5", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-5", "metadata": {} }, { "version": "4.0.0-4", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-4", "metadata": {} }, { "version": "4.0.0-6", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-6", "metadata": {} }, { "version": "4.0.0-7", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-7", "metadata": {} }, { "version": "4.0.0-8", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-8", "metadata": {} }, { "version": "4.0.0-9", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-9", "metadata": {} }, { "version": "4.0.0-0.1", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-0.1", "metadata": { "description": "This is the beta1 image based on the 4.0.0-0.nightly-2019-01-15-010905 build" } }, { "version": "4.0.0-0.okd-0", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-0.okd-0", "metadata": {} }, { "version": "4.0.0-0.2", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-0.2", "metadata": {} }, { "version": "4.0.0-0.3", "payload": "quay.io/openshift-release-dev/ocp-release:4.0.0-0.3", "metadata": {} } ], "edges": [ [ 1, 0 ], [ 0, 2 ], [ 2, 3 ], [ 3, 4 ], [ 4, 5 ], [ 6, 8 ], [ 8, 9 ] ] } ``` has fields `version`, `payload` and `metadata` for a node. 3956b76 changed the previouly `Payload` field to `Image` creating invalid node object when fetching updates from cincinnati. With this PR, we are using the unmarshalling `version` and `payload` fields for a node. [1]: https://github.com/openshift/cincinnati/blob/3616af287436ebe3b47262cbd1d32ad7e238a277/docs/design/cincinnati.md#response
06bf9f8
to
bb95420
Compare
/lgtm |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: abhinavdahiya, smarterclayton The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Based on cincinnati graph api Response the fields for a node must be
version
,image
andmetadata
. But response from current api:has fields
version
,payload
andmetadata
for a node.3956b76 changed the previouly
Payload
field toImage
creating invalid node object.With this PR, we are using the unmarshalling
version
andpayload
fields for a node./cc @crawford @smarterclayton