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

Remove duplicate namespace constants from core/v1 #73931

Open
wants to merge 1 commit into
base: master
from

Conversation

@adrianludwin
Copy link

adrianludwin commented Feb 11, 2019

What type of PR is this?
/kind cleanup

What this PR does / why we need it:
Two namespace-related constants are duplicated in core/v1 and meta/v1 (NamespaceDefault and NamespaceAll). The versions from core were referenced about a dozen or so times before this change, while the versions from meta are referenced hundreds of times. This change removes the redundant constants in core and changes all references to meta.

Special notes for your reviewer:
Please note that this is my first contribution to K8s and I apologize for any steps I've missed.

There are a lot of broken unit tests at head; I believe there are no remaining failures caused by this change but it's hard to be certain. The following integ tests pass: apimachinery, apiserver, client; the others are still running (when they complete successfully I'll update this description).

Does this PR introduce a user-facing change?:

NONE
@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 11, 2019

Thanks for your pull request. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

📝 Please follow instructions at https://git.k8s.io/community/CLA.md#the-contributor-license-agreement to sign the CLA.

It may take a couple minutes for the CLA signature to be fully registered; after that, please reply here with a new comment and we'll verify. Thanks.


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.

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 11, 2019

Hi @adrianludwin. Thanks for your PR.

I'm waiting for a kubernetes member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

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.

@adrianludwin

This comment has been minimized.

Copy link
Author

adrianludwin commented Feb 11, 2019

CLA: trying again

@danwinship

This comment has been minimized.

Copy link
Contributor

danwinship commented Feb 11, 2019

/ok-to-test
but I have no idea if the idea is right or not.
(also, what's up with the change to pkg/scheduler/apis/config/v1alpha1/zz_generated.conversion.go ? It looks maybe regenerated-with-an-older-version-of-tools or something?)

@adrianludwin

This comment has been minimized.

Copy link
Author

adrianludwin commented Feb 12, 2019

but I have no idea if the idea is right or not.
(also, what's up with the change to pkg/scheduler/apis/config/v1alpha1/zz_generated.conversion.go ? It looks maybe regenerated-with-an-older-version-of-tools or something?)

Thanks Dan, I'll check out the generated file. Do you know whom to ask about whether this is a reasonable change to make?

@adrianludwin adrianludwin force-pushed the adrianludwin:ns-cleanup branch from 59a92a3 to d0bf070 Feb 13, 2019

@adrianludwin

This comment has been minimized.

Copy link
Author

adrianludwin commented Feb 13, 2019

(also, what's up with the change to pkg/scheduler/apis/config/v1alpha1/zz_generated.conversion.go ? It looks maybe regenerated-with-an-older-version-of-tools or something?)

Fixed. Not sure what happened, but I switched between building with my locally installed tools and with Docker; when I deleted the file and re-built with Docker, the diffs went away.

@adrianludwin adrianludwin force-pushed the adrianludwin:ns-cleanup branch 2 times, most recently from 73c0548 to ab82745 Feb 13, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 13, 2019

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: adrianludwin
To fully approve this pull request, please assign additional approvers.
We suggest the following additional approver: smarterclayton

If they are not already assigned, you can assign the PR to them by writing /assign @smarterclayton in a comment when ready.

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

@adrianludwin adrianludwin force-pushed the adrianludwin:ns-cleanup branch from ab82745 to 04d8235 Feb 13, 2019

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 13, 2019

@adrianludwin: The following tests failed, say /retest to rerun them all:

Test name Commit Details Rerun command
pull-kubernetes-e2e-gce-100-performance 04d8235 link /test pull-kubernetes-e2e-gce-100-performance
pull-kubernetes-kubemark-e2e-gce-big 04d8235 link /test pull-kubernetes-kubemark-e2e-gce-big
pull-kubernetes-local-e2e-containerized 04d8235 link /test pull-kubernetes-local-e2e-containerized

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.

@caesarxuchao

This comment has been minimized.

Copy link
Member

caesarxuchao commented Feb 13, 2019

Note that this also breaks non-k8s-family repos that depend on k8s.io/api. I don't think it's worthwhile.

@adrianludwin

This comment has been minimized.

Copy link
Author

adrianludwin commented Feb 14, 2019

Note that this also breaks non-k8s-family repos that depend on k8s.io/api. I don't think it's worthwhile.

Thanks Chao. Would you be ok with a simple doc comment suggesting that people use the meta constants instead?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment