Skip to content

Conversation

@sgreene570
Copy link
Contributor

@sgreene570 sgreene570 commented Jun 4, 2019

- What I did

The openshift v1 infrastructure API types have been updated (https://github.com/openshift/api/blob/master/config/v1/types_infrastructure.go). As is, render.go does not take into account bare metal or GCP cluster type strings. The currently used struct fields are also marked as deprecated in the API source code.

- How to verify it

Should not be semantically different.

- Description for the changelog

Update platform type strings in controller config spec

@openshift-ci-robot openshift-ci-robot added the size/L Denotes a PR that changes 100-499 lines, ignoring generated files. label Jun 4, 2019
@sgreene570
Copy link
Contributor Author

/retest

case configv1.VSpherePlatformType:
platform = "vsphere"
}
platform := strings.ToLower(string(infra.Status.PlatformStatus.Type))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the only semantic difference is that we don't fallback to a none platform right? cc @abhinavdahiya for confirmation

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

actually looks like the none platform is defined? @runcom not sure if that's used by installer though.
https://github.com/openshift/api/blob/master/config/v1/types_infrastructure.go

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oh great, nevermind this comment then

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

question: is there any way the platform won't be set to anything (not None, but empty)? maybe we should check to make sure it has a value?

@runcom
Copy link
Member

runcom commented Jun 4, 2019

Looks great as is, just a friendly ping to installer 👍

@sgreene570 sgreene570 force-pushed the platform-info-api-fix branch from 849ae0a to a4bada1 Compare June 4, 2019 22:10
@runcom runcom closed this Jun 4, 2019
@runcom runcom reopened this Jun 4, 2019
@runcom
Copy link
Member

runcom commented Jun 4, 2019

gosh, fat fingers (wanted to comment)

/approve
/lgtm

@openshift-ci-robot openshift-ci-robot added lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 4, 2019
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

2 similar comments
@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@openshift-bot
Copy link
Contributor

/retest

Please review the full test history for this PR and help us cut down flakes.

@runcom
Copy link
Member

runcom commented Jun 5, 2019

uhm, something isn't properly working here

/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 Jun 5, 2019
Copy link
Contributor

@kikisdeliveryservice kikisdeliveryservice left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is the intention of this PR to add support for additional platforms? For example, the previous state put baremetal, GCP, libvirt to None as opposed to passing them as actual platform values. I'm pretty sure this is why the switch statement was originally used and that we should make sure we actually want to expand the potential platform values that we are passing before we merge this.

See: https://github.com/openshift/api/blob/43c075c38fd931d1c85b41039e79caac63fc1925/config/v1/types_infrastructure.go#L70

@runcom

@runcom
Copy link
Member

runcom commented Jun 5, 2019

Is the intention of this PR to add support for additional platforms? For example, the previous state put baremetal, GCP, libvirt to None as opposed to passing them as actual platform values. I'm pretty sure this is why the switch statement was originally used and that we should make sure we actually want to expand the potential platform values that we are passing before we merge this.

See: https://github.com/openshift/api/blob/43c075c38fd931d1c85b41039e79caac63fc1925/config/v1/types_infrastructure.go#L70

@runcom

4.2 supports that set of platforms so we should be good landing this to master (cross checked with Ian as well)

@kikisdeliveryservice
Copy link
Contributor

4.2 supports that set of platforms so we should be good landing this to master (cross checked with Ian as well)

is there any issue merging here before they are fully supported?

@runcom
Copy link
Member

runcom commented Jun 5, 2019

s there any issue merging here before they are fully supported?

nope afaict, the installer sets the platform and if someone is using master is not something released so free to break anytime w/o support.

@kikisdeliveryservice
Copy link
Contributor

nope afaict, the installer sets the platform and if someone is using master is not something released so free to break anytime w/o support.

Fair enough! 😄

Just 1 comment from me above, as I'd like a check that platform has a value otherwise set to None: #814 (comment)

@runcom
Copy link
Member

runcom commented Jun 5, 2019

/lgtm cancel

keep holding this PR because the PlatformStatus is still empty because we need openshift/installer#1725 (comment). We can go ahead with this PR once the installer PR lands

@openshift-ci-robot openshift-ci-robot removed lgtm Indicates that a PR is ready to be merged. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Jun 5, 2019
@sgreene570 sgreene570 force-pushed the platform-info-api-fix branch from a4bada1 to 41b59b5 Compare June 5, 2019 17:17
@sgreene570
Copy link
Contributor Author

Added empty string check so this will be ready once the installer PR is merged.

@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 14, 2019
@sgreene570
Copy link
Contributor Author

Added a unit test for the function I modified 😃

@openshift-ci-robot openshift-ci-robot added the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jun 22, 2019
@sgreene570 sgreene570 force-pushed the platform-info-api-fix branch from 41dfa81 to 7d3a890 Compare July 2, 2019 22:03
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Jul 2, 2019
@runcom
Copy link
Member

runcom commented Jul 3, 2019

/retest

@runcom
Copy link
Member

runcom commented Jul 3, 2019

/approve
/hold cancel

@openshift-ci-robot openshift-ci-robot added approved Indicates a PR has been approved by an approver from all required OWNERS files. and removed do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. labels Jul 3, 2019
@runcom
Copy link
Member

runcom commented Jul 3, 2019

/retest

@sgreene570 sgreene570 force-pushed the platform-info-api-fix branch from 7d3a890 to 155f738 Compare July 3, 2019 16:31
@runcom runcom assigned kikisdeliveryservice and unassigned runcom Jul 3, 2019
@kikisdeliveryservice
Copy link
Contributor

@runcom
Copy link
Member

runcom commented Jul 3, 2019

Let's just add a //nolint:linter_name on top of it to silence the l'Inter - standard practice

@kikisdeliveryservice
Copy link
Contributor

Let's just add a //nolint:linter_name on top of it to silence the l'Inter - standard practice

nice!! i thought that was the way but wasn't sure. just saw similar here: https://github.com/openshift/machine-config-operator/pull/918/files#diff-fa45321336db7ad1cedc28bf643a4f97

@sgreene570 sgreene570 force-pushed the platform-info-api-fix branch from 155f738 to e0b06c4 Compare July 3, 2019 17:42
@openshift-ci-robot
Copy link
Contributor

openshift-ci-robot commented Jul 3, 2019

@sgreene570: The following test failed, say /retest to rerun them all:

Test name Commit Details Rerun command
ci/prow/e2e-etcd-quorum-loss 41b59b56cd6b786f7ac52a7e8f2145cb6d07ea06 link /test e2e-etcd-quorum-loss

Full PR test history. Your PR dashboard. Please help us cut down on flakes by linking to an open issue when you hit one in your PR.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

@kikisdeliveryservice
Copy link
Contributor

/skip

@kikisdeliveryservice
Copy link
Contributor

i think we're just probably waiting for that e2e test to stop flaking

@sgreene570
Copy link
Contributor Author

/retest

@runcom
Copy link
Member

runcom commented Jul 10, 2019

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jul 10, 2019
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: runcom, sgreene570

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-merge-robot openshift-merge-robot merged commit 53d9f47 into openshift:master Jul 10, 2019
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. lgtm Indicates that a PR is ready to be merged. size/L Denotes a PR that changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants