Skip to content

Conversation

@benjaminapetersen
Copy link
Contributor

While experimenting with options for openshift/console-operator#301, I came across this bug:

Before:

Screen Shot 2019-09-30 at 4 58 35 PM

After:

Screen Shot 2019-09-30 at 5 08 47 PM

Simple swap in of .name for .text.

/assign @rhamilto @jhadvig

@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: benjaminapetersen

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files. labels Sep 30, 2019
@openshift-ci-robot openshift-ci-robot added the component/core Related to console core functionality label Sep 30, 2019
@rhamilto
Copy link
Member

rhamilto commented Oct 1, 2019

This change:

  1. isn't backward compatible
  2. orphans the text property

Why not simply put name in text?

@spadgett
Copy link
Member

spadgett commented Oct 1, 2019

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Oct 1, 2019
@spadgett
Copy link
Member

spadgett commented Oct 1, 2019

I think it's the operator PR that's wrong. The property in openshift/api uses text.

https://github.com/openshift/api/blob/3ca714bc5b1b13c4e9381147d9994c0384b20e23/console/v1/types.go#L5-L6

@spadgett
Copy link
Member

spadgett commented Oct 1, 2019

@benjaminapetersen
Copy link
Contributor Author

Ah, correct, per https://github.com/openshift/api/blob/master/console/v1/types.go#L6

type Link struct {
	// text is the display text for the link
	Text string `json:"text"`
	// href is the absolute secure URL for the link (must use https)
	Href string `json:"href"`
}

Text is the correct field. Migration to cluster-config-operator just merged, with the fields generated from openshift/api, though text was the field in the console-operator.

@spadgett spadgett closed this Oct 2, 2019
@benjaminapetersen
Copy link
Contributor Author

Ah, mistake because unknown fields are not pruned, I think thats what got me :)

@benjaminapetersen benjaminapetersen deleted the bug/cli-downloads/link-name branch October 2, 2019 18:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. component/core Related to console core functionality do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. size/XS Denotes a PR that changes 0-9 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants