Skip to content
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

Make mcfgv1 and ctrlcommon canonical names for importing #1472

Merged
merged 2 commits into from Feb 19, 2020

Conversation

LorbusChris
Copy link
Member

@LorbusChris LorbusChris commented Feb 13, 2020

Entirely code-style.

Not having agreement on the name to use to import the package can lead to not-so-pretty double imports of the same package (as seen here in container_runtime_config_controller.go, where the api is imported as both v1 and mcfgv1).
The same is true for pkg/controller/common which is imported with different names across files, and also imported twice in one (render_controller.go).

This PR removes the double imports, and canonicalizes the import names as mcfgv1 and ctrlcommon across all files in this repo.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 13, 2020
@umohnani8
Copy link
Contributor

LGTM
thanks @LorbusChris!

Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

Should pkg/apis/machineconfiguration.openshift.io/install.go be updated as well?

(And perhaps pkg/generated, OTOH no-one should ever edit those.)

pkg/server/cluster_server.go Outdated Show resolved Hide resolved
@LorbusChris
Copy link
Member Author

I found another double import of pkg/controller/common, which is also imported with different names in different files. Second commit incoming.
/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 Feb 13, 2020
@LorbusChris
Copy link
Member Author

@mtrmac the api package will be moved into the api repo eventually -- I believe it is common practice to spell out the names there and not to shorten them.

@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 13, 2020
@LorbusChris LorbusChris changed the title Make mcfgv1 the canonical name for importing api package Make mcfgv1 and ctrcommon canonical names for importing Feb 13, 2020
@LorbusChris LorbusChris changed the title Make mcfgv1 and ctrcommon canonical names for importing Make mcfgv1 and ctrlcommon canonical names for importing Feb 13, 2020
@LorbusChris
Copy link
Member Author

and updated!

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 13, 2020
@runcom
Copy link
Member

runcom commented Feb 13, 2020

loving this - unfortunately we can't merge this right away as we need to wait at least Monday

/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 Feb 13, 2020
@runcom
Copy link
Member

runcom commented Feb 13, 2020

/approve

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 13, 2020
Copy link
Contributor

@mtrmac mtrmac left a comment

Choose a reason for hiding this comment

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

LGTM.

@openshift-ci-robot
Copy link
Contributor

@LorbusChris: The following test failed, say /retest to rerun all failed tests:

Test name Commit Details Rerun command
ci/prow/e2e-aws-scaleup-rhel7 65c5038 link /test e2e-aws-scaleup-rhel7

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.

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.

@runcom
Copy link
Member

runcom commented Feb 19, 2020

/skip

Copy link
Contributor

@yuqi-zhang yuqi-zhang left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Feb 19, 2020
@openshift-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: LorbusChris, mtrmac, runcom, yuqi-zhang

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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@runcom
Copy link
Member

runcom commented Feb 19, 2020

lifting hold I guess - this has 0 risk

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Feb 19, 2020
@openshift-merge-robot openshift-merge-robot merged commit af98c54 into openshift:master Feb 19, 2020
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.

None yet

7 participants