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

etcd watch cache for origin types #9057

Merged
merged 1 commit into from
Jun 2, 2016
Merged

etcd watch cache for origin types #9057

merged 1 commit into from
Jun 2, 2016

Conversation

liggitt
Copy link
Contributor

@liggitt liggitt commented May 27, 2016

No description provided.

@liggitt
Copy link
Contributor Author

liggitt commented May 27, 2016

[test]

@liggitt liggitt changed the title WIP - etcd watch cache for origin types etcd watch cache for origin types May 31, 2016
@liggitt
Copy link
Contributor Author

liggitt commented May 31, 2016

@deads2k PTAL

@liggitt
Copy link
Contributor Author

liggitt commented Jun 1, 2016

@liggitt
Copy link
Contributor Author

liggitt commented Jun 1, 2016

[test]

@deads2k
Copy link
Contributor

deads2k commented Jun 1, 2016

oh good, a small one :)

store := &etcdgeneric.Etcd{
NewFunc: func() runtime.Object { return &authorizationapi.ClusterPolicy{} },
NewListFunc: func() runtime.Object { return &authorizationapi.ClusterPolicyList{} },
QualifiedResource: authorizationapi.Resource("clusterpolicy"),
QualifiedResource: authorizationapi.Resource("clusterpolicies"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Most of the time singular is correct: create, delete, update, get (and their multiple flavors) all singular. Only list is plural. I'd prefer the common case look right.

Copy link
Contributor

Choose a reason for hiding this comment

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

Most of the time singular is correct:

Joy, inconsistent in our code.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if we're using this to look up configured storage, which would you expect?

@deads2k
Copy link
Contributor

deads2k commented Jun 1, 2016

Looks like the upstream API could use some significant work. It seems like this object can't decide what its supposed to be doing or how its supposed to be getting built.

I'm fine with the way it's wired in. I'd be surprised if end up suggesting people change these.

@@ -21,11 +22,12 @@ type REST struct {
}

// NewStorage returns a RESTStorage object that will work against nodes.
func NewStorage(s storage.Interface) *REST {
func NewStorage(optsGetter restoptions.Getter) *REST {
Copy link
Contributor

Choose a reason for hiding this comment

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

the rebase is changing this for every NewStorage to use generic.RESTOption to sync it with upstream, I wonder how the restoptions.Getter is different.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we want to look up options for a specific resource, so we can do things like shard etcd, have different watch cache enablement or size settings, etc.

Copy link
Contributor

Choose a reason for hiding this comment

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

@liggitt go, so generally it won't be difficult to adapt the Getter to work with generic.RESTOption and we can do it on one place (I think the Getter will have to implement the RESTOption interface).

Copy link
Contributor Author

@liggitt liggitt Jun 1, 2016

Choose a reason for hiding this comment

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

RESTOption isn't an interface. This Getter allows the storage to obtain a RESTOption struct, and we'll apply it to the generic etcd struct in one place

@liggitt
Copy link
Contributor Author

liggitt commented Jun 1, 2016

clean test run other than TestImageStreamImport issue https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4296/
[test]

@liggitt
Copy link
Contributor Author

liggitt commented Jun 1, 2016

@deads2k comments addressed, other than plural QualifiedResource

@liggitt
Copy link
Contributor Author

liggitt commented Jun 1, 2016

clean test run other than TestImageStreamImport issue https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4300/

@deads2k
Copy link
Contributor

deads2k commented Jun 1, 2016

lgtm

@mfojtik
Copy link
Contributor

mfojtik commented Jun 1, 2016

lgtm as well (will fix the rebase), @liggitt I guess this is needed for https://bugzilla.redhat.com/show_bug.cgi?id=1333932 right?

@liggitt
Copy link
Contributor Author

liggitt commented Jun 1, 2016

@mfojtik yes, only reason I'm merging it now. [test][merge]

@openshift-bot
Copy link
Contributor

openshift-bot commented Jun 1, 2016

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4313/) (Image: devenv-rhel7_4301)

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 353cce3

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 353cce3

@mfojtik
Copy link
Contributor

mfojtik commented Jun 1, 2016

@liggitt I think the merge is still b0rken, @smarterclayton are you going to unblock us by disabling the flaking integration tests?

@liggitt
Copy link
Contributor Author

liggitt commented Jun 1, 2016

He force merged the integration fix already (#9118)

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/4313/)

@openshift-bot openshift-bot merged commit 3c4e093 into openshift:master Jun 2, 2016
@liggitt liggitt deleted the etcd-watch-cache branch June 2, 2016 04:01
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.

4 participants