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

allow for bypass of not proceeding deployment check jenkins extended tests given update center sync delay is now on startup #19008

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion test/extended/builds/contextdir.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var _ = g.Describe("[Feature:Builds][Slow] builds with a context directory", fun
// oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete,
// which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment
g.By("waiting for a deployment")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for endpoint")
Expand Down
2 changes: 1 addition & 1 deletion test/extended/builds/gitauth.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ var _ = g.Describe("[Feature:Builds][Slow] can use private repositories as build
o.Expect(err).NotTo(o.HaveOccurred())

g.By("expecting the deployment of the gitserver to be in the Complete phase")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), gitServerDeploymentConfigName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), gitServerDeploymentConfigName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

sourceSecretName := secretFunc()
Expand Down
2 changes: 1 addition & 1 deletion test/extended/builds/new_app.go
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ var _ = g.Describe("[Feature:Builds][Conformance] oc new-app", func() {
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for the deployment to complete")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), a58, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), a58, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())
})

Expand Down
5 changes: 4 additions & 1 deletion test/extended/builds/pipeline.go
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,10 @@ var _ = g.Describe("[Feature:Builds][Slow] openshift pipeline build", func() {
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for jenkins deployment")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, false, oc)
if err != nil {
exutil.DumpApplicationPodLogs("jenkins", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())

j = jenkins.NewRef(oc)
Expand Down
2 changes: 1 addition & 1 deletion test/extended/cluster/cl.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ var _ = g.Describe("[Feature:Performance][Serial][Slow] Load cluster", func() {
// deploymentName is buildName without the -1 suffix
deploymentName := buildName[:len(buildName)-2]
e2e.Logf("Waiting for deployment: %q", deploymentName)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), ns, deploymentName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), ns, deploymentName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())
e2e.Logf("Deployment %q completed", deploymentName)
}
Expand Down
19 changes: 12 additions & 7 deletions test/extended/image_ecosystem/jenkins_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,7 +173,9 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin",
// and test image is present, a new image stream is created using the test image, and our jenkins template is instantiated with
// an override to use that images stream and test image
var licensePrefix, pluginName string
newAppArgs := []string{exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-ephemeral-template.json")}
// with the startup costs now of jenkins 2.89 or greater and trying to incur those during startup, need more memory
// to avoid deployment timeouts
newAppArgs := []string{"-f", exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-ephemeral-template.json"), "-p", "MEMORY_LIMIT=2Gi"}
useSnapshotImage := false
origPluginNewAppArgs, useOrigPluginSnapshotImage := jenkins.SetupSnapshotImage(jenkins.UseLocalPluginSnapshotEnvVarName, localPluginSnapshotImage, localPluginSnapshotImageStream, newAppArgs, oc)
loginPluginNewAppArgs, useLoginPluginSnapshotImage := jenkins.SetupSnapshotImage(jenkins.UseLocalLoginPluginSnapshotEnvVarName, localLoginPluginSnapshotImage, localLoginPluginSnapshotImageStream, newAppArgs, oc)
Expand Down Expand Up @@ -202,7 +204,10 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin",
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for jenkins deployment")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, false, oc)
if err != nil {
exutil.DumpApplicationPodLogs("jenkins", oc)
}
o.Expect(err).NotTo(o.HaveOccurred())

j = jenkins.NewRef(oc)
Expand Down Expand Up @@ -267,9 +272,9 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin",
// we leverage some of the openshift utilities for waiting for the deployment before we poll
// jenkins for the successful job completion
g.By("waiting for frontend, frontend-prod deployments as signs that the build has finished")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend-prod", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend-prod", 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("get build console logs and see if succeeded")
Expand Down Expand Up @@ -319,9 +324,9 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin",
// we leverage some of the openshift utilities for waiting for the deployment before we poll
// jenkins for the successful job completion
g.By("waiting for frontend, frontend-prod deployments as signs that the build has finished")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend-prod", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend-prod", 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("get build console logs and see if succeeded")
Expand Down Expand Up @@ -387,7 +392,7 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin",
// we leverage some of the openshift utilities for waiting for the deployment before we poll
// jenkins for the successful job completion
g.By("waiting for frontend deployments as signs that the build has finished")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "frontend", 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("get build console logs and see if succeeded")
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/mariadb_ephemeral.go
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ var _ = g.Describe("[image_ecosystem][mariadb][Slow] openshift mariadb image", f

// oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete,
// which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mariadb", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mariadb", 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("expecting the mariadb service get endpoints")
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/mongodb_ephemeral.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ var _ = g.Describe("[image_ecosystem][mongodb] openshift mongodb image", func()
o.Expect(oc.Run("new-app").Args("-f", templatePath).Execute()).Should(o.Succeed())

g.By("waiting for the deployment to complete")
err := exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mongodb", 1, oc)
err := exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mongodb", 1, true, oc)
o.Expect(err).ShouldNot(o.HaveOccurred())

g.By("expecting the mongodb pod is running")
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/mysql_ephemeral.go
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ var _ = g.Describe("[image_ecosystem][mysql][Slow] openshift mysql image", func(

// oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete,
// which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mysql", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "mysql", 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("expecting the mysql service get endpoints")
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/mysql_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ func replicationTestFactory(oc *exutil.CLI, tc testCase) func() {
// oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete,
// which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment
g.By("waiting for the deployment to complete")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), helperName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), helperName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for an endpoint")
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/postgresql_replica.go
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ func PostgreSQLReplicationTestFactory(oc *exutil.CLI, image string) func() {

// oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete,
// which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), postgreSQLHelperName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), postgreSQLHelperName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

err = e2e.WaitForEndpoint(oc.KubeFramework().ClientSet, oc.Namespace(), postgreSQLHelperName)
Expand Down
4 changes: 2 additions & 2 deletions test/extended/image_ecosystem/s2i_perl.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ var _ = g.Describe("[image_ecosystem][perl][Slow] hot deploy for openshift perl
}
o.Expect(err).NotTo(o.HaveOccurred())

err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for endpoint")
Expand All @@ -89,7 +89,7 @@ var _ = g.Describe("[image_ecosystem][perl][Slow] hot deploy for openshift perl
g.By("turning on hot-deploy")
err = oc.Run("env").Args("dc", dcName, "PERL_APACHE2_RELOAD=true").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for a new endpoint")
Expand Down
2 changes: 1 addition & 1 deletion test/extended/image_ecosystem/s2i_php.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ var _ = g.Describe("[image_ecosystem][php][Slow] hot deploy for openshift php im
}
o.Expect(err).NotTo(o.HaveOccurred())

err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "cakephp-mysql-example", 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "cakephp-mysql-example", 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for endpoint")
Expand Down
4 changes: 2 additions & 2 deletions test/extended/image_ecosystem/s2i_python.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ var _ = g.Describe("[image_ecosystem][python][Slow] hot deploy for openshift pyt
}
o.Expect(err).NotTo(o.HaveOccurred())

err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for endpoint")
Expand Down Expand Up @@ -102,7 +102,7 @@ var _ = g.Describe("[image_ecosystem][python][Slow] hot deploy for openshift pyt
g.By("turning on hot-deploy")
err = oc.Run("env").Args("dc", dcName, "APP_CONFIG=conf/reload.py").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for a new endpoint")
Expand Down
4 changes: 2 additions & 2 deletions test/extended/image_ecosystem/s2i_ruby.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ var _ = g.Describe("[image_ecosystem][ruby][Slow] hot deploy for openshift ruby
}
o.Expect(err).NotTo(o.HaveOccurred())

err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for endpoint")
Expand Down Expand Up @@ -93,7 +93,7 @@ var _ = g.Describe("[image_ecosystem][ruby][Slow] hot deploy for openshift ruby
g.By("turning on hot-deploy")
err = oc.Run("env").Args("dc", dcName, "RAILS_ENV=development").Execute()
o.Expect(err).NotTo(o.HaveOccurred())
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 2, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("waiting for a new endpoint")
Expand Down
4 changes: 2 additions & 2 deletions test/extended/image_ecosystem/sample_repos.go
Original file line number Diff line number Diff line change
Expand Up @@ -74,12 +74,12 @@ func NewSampleRepoTest(c SampleRepoConfig) func() {
o.Expect(err).NotTo(o.HaveOccurred())

g.By("expecting the app deployment to be complete")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), c.deploymentConfigName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), c.deploymentConfigName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

if len(c.dbDeploymentConfigName) > 0 {
g.By("expecting the db deployment to be complete")
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), c.dbDeploymentConfigName, 1, oc)
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), c.dbDeploymentConfigName, 1, true, oc)
o.Expect(err).NotTo(o.HaveOccurred())

g.By("expecting the db service is available")
Expand Down
8 changes: 5 additions & 3 deletions test/extended/util/framework.go
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,7 @@ var CheckImageStreamTagNotFoundFn = func(i *imageapi.ImageStream) bool {

// WaitForDeploymentConfig waits for a DeploymentConfig to complete transition
// to a given version and report minimum availability.
func WaitForDeploymentConfig(kc kclientset.Interface, dcClient appstypeclientset.DeploymentConfigsGetter, namespace, name string, version int64, cli *CLI) error {
func WaitForDeploymentConfig(kc kclientset.Interface, dcClient appstypeclientset.DeploymentConfigsGetter, namespace, name string, version int64, enforceNotProgressing bool, cli *CLI) error {
e2e.Logf("waiting for deploymentconfig %s/%s to be available with version %d\n", namespace, name, version)
var dc *appsapi.DeploymentConfig

Expand Down Expand Up @@ -841,8 +841,10 @@ func WaitForDeploymentConfig(kc kclientset.Interface, dcClient appstypeclientset
}
}

if progressing != nil && progressing.Status == kapi.ConditionFalse {
return false, fmt.Errorf("not progressing")
if enforceNotProgressing {
if progressing != nil && progressing.Status == kapi.ConditionFalse {
return false, fmt.Errorf("not progressing")
}
}

if progressing != nil &&
Expand Down