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

pkg,test: Remove duplicate package imports #2501

Conversation

timflannagan
Copy link
Contributor

Update various pkg,test packages are removed any obvious duplicate
package imports that violate local static linters.

Signed-off-by: timflannagan timflannagan@gmail.com

Description of the change:
Remove any obvious duplicate package imports that are identified by local, static linters.

Motivation for the change:
Reduce duplicate package imports to help increase maintainability over time (and help alleviate a huge diff when migrating to enforcing this eventually in CI).

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /doc
  • Commit messages sensible and descriptive

Update various pkg,test packages are removed any obvious duplicate
package imports that violate local static linters.

Signed-off-by: timflannagan <timflannagan@gmail.com>
Copy link
Contributor

@tylerslaton tylerslaton left a comment

Choose a reason for hiding this comment

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

Looks good to go. Have two small non-blocking questions.

@@ -6,7 +6,6 @@ import (

"github.com/operator-framework/api/pkg/operators/v1alpha1"
"github.com/operator-framework/operator-lifecycle-manager/pkg/controller/registry/resolver/cache"
"github.com/operator-framework/operator-registry/pkg/registry"
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking question: Would it make sense to keep the default name and remove the alternatively named one (opregistry) instead?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Answering both comments: totally fair question - I mainly went with my gut locally and tried to avoid removing the package import alias that was used more frequently. The one caveat is more common/standardized package imports that are used and I value consistency over standardization generally speaking.

@@ -14,7 +14,6 @@ import (
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/labels"

"github.com/operator-framework/api/pkg/lib/version"
Copy link
Contributor

Choose a reason for hiding this comment

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

non-blocking question: Same as above

@tylerslaton
Copy link
Contributor

/lgtm

@openshift-ci openshift-ci bot added the lgtm Indicates that a PR is ready to be merged. label Dec 1, 2021
Copy link
Member

@njhale njhale 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
Copy link

openshift-ci bot commented Dec 1, 2021

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: njhale, timflannagan

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

@openshift-ci openshift-ci bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Dec 1, 2021
@openshift-bot
Copy link
Contributor

/retest-required

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

@openshift-merge-robot openshift-merge-robot merged commit 40b8b71 into operator-framework:master Dec 2, 2021
@timflannagan timflannagan deleted the cleanup/remove-duplicate-package-imports branch December 2, 2021 14:46
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.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants