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

Move cached discovery clients to their own packages #72214

Merged
merged 4 commits into from Feb 14, 2019

Conversation

@caesarxuchao
Copy link
Member

caesarxuchao commented Dec 19, 2018

Fix #68854.

This pull tries to rearrange the discovery clients in a more logical way.

[update] a good by-product is the removal of a few vendored packages from the staging repositories.

Breaking changes in client-go:
The disk-cached discovery client is moved from k8s.io/client-go/discovery to k8s.io/client-go/discovery/cached/disk.
The memory-cached discovery client is moved from k8s.io/client-go/discovery/cached to k8s.io/client-go/discovery/cached/memory.

/sig api-machinery
/kind cleanup
/assign @liggitt @mborsz

@mborsz

This comment has been minimized.

Copy link
Member

mborsz commented Dec 21, 2018

/lgtm

@k8s-ci-robot k8s-ci-robot added the lgtm label Dec 21, 2018

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

caesarxuchao commented Dec 27, 2018

@liggitt could you help approve the change? Thanks.

@liggitt

This comment has been minimized.

Copy link
Member

liggitt commented Dec 30, 2018

this is a nicer structure, but I have mixed feelings about whether the external churn for callers is worth the change. do we have a good sense for the amount of direct usage these have and what the impact on client-go users would be?

cc @kubernetes/sig-api-machinery-pr-reviews

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

caesarxuchao commented Jan 3, 2019

If we trust the google search engine, there are not many imports.

Less than 20 results for the memcached one.

2 results for the disk cached one.

I tried github code search as well, but it doesn't support exact match.

I can send a breaking change waring to the kubernetes-dev mailing list if that helps move this forward.

@liggitt

This comment has been minimized.

Copy link
Member

liggitt commented Jan 4, 2019

seems reasonable, would like a second ack from @kubernetes/sig-api-machinery-pr-reviews

/assign @deads2k

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

caesarxuchao commented Jan 10, 2019

Gentle ping @deads2k

@caesarxuchao caesarxuchao force-pushed the caesarxuchao:move-discovery branch from c2c0c3f to c748262 Feb 12, 2019

@caesarxuchao caesarxuchao force-pushed the caesarxuchao:move-discovery branch from c748262 to 24d5fb9 Feb 12, 2019

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

caesarxuchao commented Feb 12, 2019

/retest

@caesarxuchao caesarxuchao force-pushed the caesarxuchao:move-discovery branch from 24d5fb9 to 171d9ec Feb 12, 2019

@caesarxuchao caesarxuchao force-pushed the caesarxuchao:move-discovery branch from 171d9ec to 1f2e2e6 Feb 12, 2019

@lavalamp

This comment has been minimized.

Copy link
Member

lavalamp commented Feb 12, 2019

The structure is much nicer. Can you leave type aliases behind so as to not break people? https://golang.org/doc/go1.9#language

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

caesarxuchao commented Feb 13, 2019

Can you leave type aliases behind so as to not break people?

I can't do that for the disk cached one, otherwise there will be cyclic imports. It only has two public importers anyway.

For the mememory cached one, I didn't do the type aliase, because the package doesn't define any public type. I did add a glue package for the legacy code in the last commit.

@lavalamp

This comment has been minimized.

Copy link
Member

lavalamp commented Feb 13, 2019

@deads2k

This comment has been minimized.

Copy link
Contributor

deads2k commented Feb 13, 2019

I don't feel strongly about an alias. This change lgtm

/lgtm
/approve
/hold

holding in case @lavalamp really wants an alias.

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

caesarxuchao commented Feb 13, 2019

@lavalamp no, the alias will introduce cycle no matter how we arrange the directory now, because of these two facts:

  • The disk cached client used to live in the discovery package.
  • The disk cached client depends on the discovery package.
@lavalamp

This comment has been minimized.

Copy link
Member

lavalamp commented Feb 13, 2019

/approve
/hold cancel

I guess we break some interface every release, why stop now? :/

@k8s-ci-robot

This comment has been minimized.

Copy link
Contributor

k8s-ci-robot commented Feb 13, 2019

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: caesarxuchao, deads2k, lavalamp

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

@caesarxuchao

This comment has been minimized.

Copy link
Member Author

caesarxuchao commented Feb 13, 2019

/retest

@fejta-bot

This comment has been minimized.

Copy link

fejta-bot commented Feb 14, 2019

/retest
This bot automatically retries jobs that failed/flaked on approved PRs (send feedback to fejta).

Review the full test history for this PR.

Silence the bot with an /lgtm cancel or /hold comment for consistent failures.

@k8s-ci-robot k8s-ci-robot merged commit d8f0146 into kubernetes:master Feb 14, 2019

16 of 17 checks passed

pull-kubernetes-kubemark-e2e-gce-big Job triggered.
Details
cla/linuxfoundation caesarxuchao authorized
Details
pull-kubernetes-bazel-build Job succeeded.
Details
pull-kubernetes-bazel-test Job succeeded.
Details
pull-kubernetes-cross Skipped
pull-kubernetes-e2e-gce Job succeeded.
Details
pull-kubernetes-e2e-gce-100-performance Job succeeded.
Details
pull-kubernetes-e2e-gce-device-plugin-gpu Job succeeded.
Details
pull-kubernetes-godeps Job succeeded.
Details
pull-kubernetes-integration Job succeeded.
Details
pull-kubernetes-local-e2e Skipped
pull-kubernetes-local-e2e-containerized Skipped
pull-kubernetes-node-e2e Job succeeded.
Details
pull-kubernetes-typecheck Job succeeded.
Details
pull-kubernetes-verify Job succeeded.
Details
pull-publishing-bot-validate Skipped
tide In merge pool.
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.