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

Collapse on top of upstream ETCD storage test #21412

Merged
merged 8 commits into from Nov 6, 2018

Conversation

enj
Copy link
Contributor

@enj enj commented Nov 1, 2018

UPSTREAM: 70019: Refactor dry run test to reuse ETCD storage data

This change updates the ETCD storage test so that its data is
exported. Thus it can be used by other tests. The dry run test was
updated to consume this data instead of having a duplicate copy.

The code to start a master that can be used for "one of every
resource" style tests was also factored out. It is reused in the
dry run test as well.

This prevents these tests from drifting in the future and reduces
the long term maintenance burden.

Signed-off-by: Monis Khan mkhan@redhat.com


UPSTREAM: : 70019: Remove too new ETCD storage data

We do not have the REST storage for these resources yet.

Signed-off-by: Monis Khan mkhan@redhat.com


Remove dead code from ETCD storage test

Signed-off-by: Monis Khan mkhan@redhat.com


Use new exported types in ETCD storage test

Signed-off-by: Monis Khan mkhan@redhat.com


Collapse on top of upstream ETCD storage test

This change updates the OpenShift ETCD storage test to reuse the
upstream ETCD storage test's data. This makes it easy for us to
keep up with upstream changes. It also makes it clear in which
areas we differ.

Signed-off-by: Monis Khan mkhan@redhat.com


Use upstream etcddata.GetResources in ETCD storage test

Signed-off-by: Monis Khan mkhan@redhat.com


/assign @deads2k @soltysh
@openshift/sig-master

@openshift-ci-robot openshift-ci-robot added sig/master size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. approved Indicates a PR has been approved by an approver from all required OWNERS files. labels Nov 1, 2018
@@ -195,8 +195,7 @@ func BuildStorageFactory(server *kapiserveroptions.ServerRunOptions, enforcedSto
storageFactory.AddCohabitatingResources(apps.Resource("replicasets"), extensions.Resource("replicasets"))
storageFactory.AddCohabitatingResources(networking.Resource("networkpolicies"), extensions.Resource("networkpolicies"))
storageFactory.AddCohabitatingResources(security.Resource("securitycontextconstraints"), kapi.Resource("securitycontextconstraints"))
// TODO: switch to prefer policy API group in 3.11
storageFactory.AddCohabitatingResources(extensions.Resource("podsecuritypolicies"), policy.Resource("podsecuritypolicies"))
storageFactory.AddCohabitatingResources(policy.Resource("podsecuritypolicies"), extensions.Resource("podsecuritypolicies"))
Copy link
Contributor

Choose a reason for hiding this comment

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

This matters? If so, it means we're testing the wrong thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Artifact from earlier code, dropped.

@enj
Copy link
Contributor Author

enj commented Nov 2, 2018

/retest

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

One nit wrt apiservices and you're good to go.

@@ -898,6 +521,78 @@ func TestEtcd3StoragePath(t *testing.T) {
t.Fatalf("error creating test namespace: %#v", err)
}

etcdStorageData := etcddata.GetEtcdStorageData()

// TODO storage is broken somehow. failing on v1beta1 serialization
Copy link
Member

Choose a reason for hiding this comment

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

Would you mind creating an issue about that?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

gvk *schema.GroupVersionKind
}

// TODO we store these in the wrong place and version in etcd
Copy link
Member

Choose a reason for hiding this comment

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

Fix this, master team will be addressing those as part of the migration story we own: https://jira.coreos.com/browse/MSTR-213

Copy link
Member

Choose a reason for hiding this comment

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

@deads2k I thought you fixed that one, didn't you?

@openshift-ci-robot openshift-ci-robot removed the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 5, 2018
This change updates the ETCD storage test so that its data is
exported. Thus it can be used by other tests. The dry run test was
updated to consume this data instead of having a duplicate copy.

The code to start a master that can be used for "one of every
resource" style tests was also factored out. It is reused in the
dry run test as well.

This prevents these tests from drifting in the future and reduces
the long term maintenance burden.

Signed-off-by: Monis Khan <mkhan@redhat.com>
We do not have the REST storage for these resources yet.

Signed-off-by: Monis Khan <mkhan@redhat.com>
This change updates the etcd storage path test to exercise custom
resource storage by creating custom resource definitions before
running the test.

Duplicated custom resource definition test logic was consolidated.

Signed-off-by: Monis Khan <mkhan@redhat.com>
Signed-off-by: Monis Khan <mkhan@redhat.com>
Signed-off-by: Monis Khan <mkhan@redhat.com>
This change updates the OpenShift ETCD storage test to reuse the
upstream ETCD storage test's data.  This makes it easy for us to
keep up with upstream changes.  It also makes it clear in which
areas we differ.

Signed-off-by: Monis Khan <mkhan@redhat.com>
Signed-off-by: Monis Khan <mkhan@redhat.com>
@enj
Copy link
Contributor Author

enj commented Nov 6, 2018

/retest

Copy link
Member

@soltysh soltysh left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Nov 6, 2018
@enj enj added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Nov 6, 2018
@enj
Copy link
Contributor Author

enj commented Nov 6, 2018

Bypassing approve since we are just reverting a patch master team is working on removing.

@openshift-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

Approval requirements bypassed by manually added approval.

This pull-request has been approved by: enj, soltysh

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

@enj
Copy link
Contributor Author

enj commented Nov 6, 2018

/retest

@openshift-merge-robot openshift-merge-robot merged commit 6614912 into openshift:master Nov 6, 2018
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. sig/master size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants