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

[Refactor] Standardize all k8s.io/api/core/v1 imports as corev1 #1721

Merged
merged 1 commit into from
Dec 7, 2023

Conversation

rueian
Copy link
Contributor

@rueian rueian commented Dec 7, 2023

This PR unifies all v1 "k8s.io/api/core/v1" to corev1 "k8s.io/api/core/v1" and removes duplicated imports, such as here found by @kevin85421:

corev1 "k8s.io/api/core/v1"
v1 "k8s.io/api/core/v1"

The corev1 alias is a better choice than v1 given that there are a lot of other packages named v1 such as k8s.io/api/batch/v1 and k8s.io/apimachinery/pkg/apis/meta/v1. If we just use the v1, we will be easily confused with other v1.

Checks

  • I've made sure the tests are passing.
  • Testing Strategy
    • Unit tests
    • Manual tests
    • This PR is not tested :(

This also removes duplicated `k8s.io/api/core/v1` imports with different aliases.
Copy link
Contributor

@astefanutti astefanutti left a comment

Choose a reason for hiding this comment

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

Nice!

Copy link
Member

@kevin85421 kevin85421 left a comment

Choose a reason for hiding this comment

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

LGTM!

@kevin85421 kevin85421 merged commit 22696fe into ray-project:master Dec 7, 2023
25 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants