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

Store Jobs under batch/v1 instead of deprecated extensions/v1beta1 #12517

Merged
merged 2 commits into from
Jan 23, 2017

Conversation

soltysh
Copy link
Contributor

@soltysh soltysh commented Jan 17, 2017

Fixes #10950. This only changes the version under jobs are stored in etcd, the location stays the same.

@deads2k @liggitt ptal

@soltysh
Copy link
Contributor Author

soltysh commented Jan 17, 2017

[test]

@mfojtik
Copy link
Contributor

mfojtik commented Jan 17, 2017

@soltysh I read the title as "Steve Jobs under batch/v1... " :-)

// }

func TestStorageVersionsUnified(t *testing.T) {
func TestStorageVersions(t *testing.T) {
Copy link
Contributor

Choose a reason for hiding this comment

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

do we have a test to make sure that an extensions/v1beta1 Job can be read from storage, and if updated, gets persisted back as a batch/v1 Job?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, down this file:

if _, err := projectAdminKubeClient.Batch().Jobs(ns).Get(job.Name); err != nil {
t.Errorf("%s: Error reading Job from the batch client: %#v", name, err)
}
if _, err := projectAdminKubeClient14.Extensions().Jobs(ns).Get(job.Name); err != nil {
t.Errorf("%s: Error reading Job from the extensions client: %#v", name, err)
}

@@ -184,7 +184,7 @@ func BuildDefaultAPIServer(options configapi.MasterConfig) (*apiserveroptions.Se
master.DefaultAPIResourceConfigSource(),
)*/
// the order here is important, it defines which version will be used for storage
storageFactory.AddCohabitatingResources(extensions.Resource("jobs"), batch.Resource("jobs"))
storageFactory.AddCohabitatingResources(batch.Resource("jobs"), extensions.Resource("jobs"))
storageFactory.AddCohabitatingResources(extensions.Resource("horizontalpodautoscalers"), autoscaling.Resource("horizontalpodautoscalers"))
Copy link
Contributor

Choose a reason for hiding this comment

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

@DirectXMan12 should the same storage version switch be done for HPA? I assume we'll want a similar test (store as extensions/v1beta1 HPA, read/write and ensure the update was stored as autoscaling/v1 HPA)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

HPA doesn't have generated client for extensions/v1beta1, that's why we're missing those.

@soltysh soltysh force-pushed the issue10950 branch 2 times, most recently from e5863a7 to c601e5f Compare January 17, 2017 17:37
@soltysh
Copy link
Contributor Author

soltysh commented Jan 18, 2017

Flake #11024.

[test]

@soltysh
Copy link
Contributor Author

soltysh commented Jan 18, 2017

Flake #12540

[test]

@soltysh
Copy link
Contributor Author

soltysh commented Jan 18, 2017

Grrr.... the failures are playing on my nerves today. I've rebased the PR and waiting for fresh results. I hit #12540 once again.

@soltysh
Copy link
Contributor Author

soltysh commented Jan 19, 2017

I can't reproduce #12558 manually locally nor in AWS, trying in this PR.

@smarterclayton
Copy link
Contributor

Yikes, panic on in cluster config?

@soltysh
Copy link
Contributor Author

soltysh commented Jan 20, 2017

Yikes, panic on in cluster config?

That's just me chasing flakes, nothing to worry about.

@soltysh soltysh force-pushed the issue10950 branch 2 times, most recently from 87b3bb4 to 626690c Compare January 20, 2017 12:13
@soltysh
Copy link
Contributor Author

soltysh commented Jan 20, 2017

I've cherry-picked the fix from #12582 here and will re-run tests. That will give me double check for this error :)

@soltysh
Copy link
Contributor Author

soltysh commented Jan 20, 2017

I've cherry-picked the new version and let the fun begin with a new test run...

@openshift-bot
Copy link
Contributor

Evaluated for origin test up to 3d343d5

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test Running (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13089/) (Base Commit: bb1a153)

@openshift-bot
Copy link
Contributor

continuous-integration/openshift-jenkins/test SUCCESS

@soltysh
Copy link
Contributor Author

soltysh commented Jan 20, 2017

@liggitt anything else left here or this is good to merge?

@liggitt
Copy link
Contributor

liggitt commented Jan 21, 2017

LGTM

@soltysh
Copy link
Contributor Author

soltysh commented Jan 23, 2017

[merge]

@openshift-bot
Copy link
Contributor

Evaluated for origin merge up to 3d343d5

@openshift-bot
Copy link
Contributor

openshift-bot commented Jan 23, 2017

continuous-integration/openshift-jenkins/merge SUCCESS (https://ci.openshift.redhat.com/jenkins/job/test_pr_origin/13173/) (Base Commit: 389335e) (Image: devenv-rhel7_5751)

@openshift-bot openshift-bot merged commit c5b9726 into openshift:master Jan 23, 2017
@soltysh soltysh deleted the issue10950 branch January 23, 2017 10:08
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.

5 participants