Skip to content

pkg/operator: Remove infra platform string constants - #814

Merged
openshift-merge-robot merged 2 commits into
openshift:masterfrom
sgreene570:platform-info-api-fix
Jul 10, 2019
Merged

pkg/operator: Remove infra platform string constants#814
openshift-merge-robot merged 2 commits into
openshift:masterfrom
sgreene570:platform-info-api-fix

Conversation

@sgreene570

@sgreene570 sgreene570 commented Jun 4, 2019

Copy link
Copy Markdown
Contributor

- 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
Copy Markdown
Contributor Author

/retest

Comment thread pkg/operator/render.go Outdated

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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

runcom commented Jun 4, 2019

Copy link
Copy Markdown
Member

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

Comment thread pkg/operator/render.go Outdated
@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

runcom commented Jun 4, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
Contributor

/retest

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

2 similar comments
@openshift-bot

Copy link
Copy Markdown
Contributor

/retest

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

@openshift-bot

Copy link
Copy Markdown
Contributor

/retest

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

@runcom

runcom commented Jun 5, 2019

Copy link
Copy Markdown
Member

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

@kikisdeliveryservice kikisdeliveryservice left a comment

Copy link
Copy Markdown
Contributor

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

runcom commented Jun 5, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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

runcom commented Jun 5, 2019

Copy link
Copy Markdown
Member

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
Copy Markdown
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

runcom commented Jun 5, 2019

Copy link
Copy Markdown
Member

/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
Copy Markdown
Contributor Author

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

Comment thread pkg/operator/render.go Outdated
@sgreene570

Copy link
Copy Markdown
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

runcom commented Jul 3, 2019

Copy link
Copy Markdown
Member

/retest

@runcom

runcom commented Jul 3, 2019

Copy link
Copy Markdown
Member

/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
Comment thread pkg/operator/render.go Outdated
@runcom

runcom commented Jul 3, 2019

Copy link
Copy Markdown
Member

/retest

Comment thread pkg/operator/render.go Outdated
@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
Copy Markdown
Contributor

verify isn't allowing the new check bc the type is deprecated here: https://github.com/openshift/api/blob/49f610c1a3a8461a9d0623ad35fa08d943b12c68/config/v1/types_infrastructure.go#L42

@runcom

runcom commented Jul 3, 2019

Copy link
Copy Markdown
Member

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

@kikisdeliveryservice

Copy link
Copy Markdown
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

openshift-ci-robot commented Jul 3, 2019

Copy link
Copy Markdown
Contributor

@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
Copy Markdown
Contributor

/skip

@kikisdeliveryservice

Copy link
Copy Markdown
Contributor

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

@sgreene570

Copy link
Copy Markdown
Contributor Author

/retest

@runcom

runcom commented Jul 10, 2019

Copy link
Copy Markdown
Member

/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
Copy Markdown
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
ptalgulk01 pushed a commit to ptalgulk01/machine-config-operator that referenced this pull request May 15, 2026
pkg/operator: Remove infra platform string constants
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