Skip to content

Commit eda7e84

Browse files
Merge pull request #19008 from gabemontero/relax-jenkins-deploy-verify
Automatic merge from submit-queue (batch tested with PRs 19008, 18727, 19038). allow for bypass of not proceeding deployment check jenkins extended tests given update center sync delay is now on startup @openshift/sig-developer-experience ptal see discussion in openshift/jenkins#544 and failure in https://ci.openshift.redhat.com/jenkins/job/test_branch_origin_extended_image_ecosystem/417/consoleFull#-153881154656cbb9a5e4b02b88ae8c2f77
2 parents 73e9c8f + e08918a commit eda7e84

17 files changed

+39
-29
lines changed

Diff for: test/extended/builds/contextdir.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var _ = g.Describe("[Feature:Builds][Slow] builds with a context directory", fun
6565
// oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete,
6666
// which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment
6767
g.By("waiting for a deployment")
68-
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, oc)
68+
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), dcName, 1, true, oc)
6969
o.Expect(err).NotTo(o.HaveOccurred())
7070

7171
g.By("waiting for endpoint")

Diff for: test/extended/builds/gitauth.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ var _ = g.Describe("[Feature:Builds][Slow] can use private repositories as build
8787
o.Expect(err).NotTo(o.HaveOccurred())
8888

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

9393
sourceSecretName := secretFunc()

Diff for: test/extended/builds/new_app.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ var _ = g.Describe("[Feature:Builds][Conformance] oc new-app", func() {
5959
o.Expect(err).NotTo(o.HaveOccurred())
6060

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

Diff for: test/extended/builds/pipeline.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,10 @@ var _ = g.Describe("[Feature:Builds][Slow] openshift pipeline build", func() {
128128
o.Expect(err).NotTo(o.HaveOccurred())
129129

130130
g.By("waiting for jenkins deployment")
131-
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, oc)
131+
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, false, oc)
132+
if err != nil {
133+
exutil.DumpApplicationPodLogs("jenkins", oc)
134+
}
132135
o.Expect(err).NotTo(o.HaveOccurred())
133136

134137
j = jenkins.NewRef(oc)

Diff for: test/extended/cluster/cl.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ var _ = g.Describe("[Feature:Performance][Serial][Slow] Load cluster", func() {
172172
// deploymentName is buildName without the -1 suffix
173173
deploymentName := buildName[:len(buildName)-2]
174174
e2e.Logf("Waiting for deployment: %q", deploymentName)
175-
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), ns, deploymentName, 1, oc)
175+
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), ns, deploymentName, 1, true, oc)
176176
o.Expect(err).NotTo(o.HaveOccurred())
177177
e2e.Logf("Deployment %q completed", deploymentName)
178178
}

Diff for: test/extended/image_ecosystem/jenkins_plugin.go

+12-7
Original file line numberDiff line numberDiff line change
@@ -173,7 +173,9 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin",
173173
// and test image is present, a new image stream is created using the test image, and our jenkins template is instantiated with
174174
// an override to use that images stream and test image
175175
var licensePrefix, pluginName string
176-
newAppArgs := []string{exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-ephemeral-template.json")}
176+
// with the startup costs now of jenkins 2.89 or greater and trying to incur those during startup, need more memory
177+
// to avoid deployment timeouts
178+
newAppArgs := []string{"-f", exutil.FixturePath("..", "..", "examples", "jenkins", "jenkins-ephemeral-template.json"), "-p", "MEMORY_LIMIT=2Gi"}
177179
useSnapshotImage := false
178180
origPluginNewAppArgs, useOrigPluginSnapshotImage := jenkins.SetupSnapshotImage(jenkins.UseLocalPluginSnapshotEnvVarName, localPluginSnapshotImage, localPluginSnapshotImageStream, newAppArgs, oc)
179181
loginPluginNewAppArgs, useLoginPluginSnapshotImage := jenkins.SetupSnapshotImage(jenkins.UseLocalLoginPluginSnapshotEnvVarName, localLoginPluginSnapshotImage, localLoginPluginSnapshotImageStream, newAppArgs, oc)
@@ -202,7 +204,10 @@ var _ = g.Describe("[image_ecosystem][jenkins][Slow] openshift pipeline plugin",
202204
o.Expect(err).NotTo(o.HaveOccurred())
203205

204206
g.By("waiting for jenkins deployment")
205-
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, oc)
207+
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), "jenkins", 1, false, oc)
208+
if err != nil {
209+
exutil.DumpApplicationPodLogs("jenkins", oc)
210+
}
206211
o.Expect(err).NotTo(o.HaveOccurred())
207212

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

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

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

393398
g.By("get build console logs and see if succeeded")

Diff for: test/extended/image_ecosystem/mariadb_ephemeral.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ var _ = g.Describe("[image_ecosystem][mariadb][Slow] openshift mariadb image", f
4646

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

5252
g.By("expecting the mariadb service get endpoints")

Diff for: test/extended/image_ecosystem/mongodb_ephemeral.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ var _ = g.Describe("[image_ecosystem][mongodb] openshift mongodb image", func()
3838
o.Expect(oc.Run("new-app").Args("-f", templatePath).Execute()).Should(o.Succeed())
3939

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

4444
g.By("expecting the mongodb pod is running")

Diff for: test/extended/image_ecosystem/mysql_ephemeral.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ var _ = g.Describe("[image_ecosystem][mysql][Slow] openshift mysql image", func(
4343

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

4949
g.By("expecting the mysql service get endpoints")

Diff for: test/extended/image_ecosystem/mysql_replica.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func replicationTestFactory(oc *exutil.CLI, tc testCase) func() {
8383
// oc.KubeFramework().WaitForAnEndpoint currently will wait forever; for now, prefacing with our WaitForADeploymentToComplete,
8484
// which does have a timeout, since in most cases a failure in the service coming up stems from a failed deployment
8585
g.By("waiting for the deployment to complete")
86-
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), helperName, 1, oc)
86+
err = exutil.WaitForDeploymentConfig(oc.KubeClient(), oc.AppsClient().Apps(), oc.Namespace(), helperName, 1, true, oc)
8787
o.Expect(err).NotTo(o.HaveOccurred())
8888

8989
g.By("waiting for an endpoint")

Diff for: test/extended/image_ecosystem/postgresql_replica.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ func PostgreSQLReplicationTestFactory(oc *exutil.CLI, image string) func() {
9999

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

105105
err = e2e.WaitForEndpoint(oc.KubeFramework().ClientSet, oc.Namespace(), postgreSQLHelperName)

Diff for: test/extended/image_ecosystem/s2i_perl.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ var _ = g.Describe("[image_ecosystem][perl][Slow] hot deploy for openshift perl
6262
}
6363
o.Expect(err).NotTo(o.HaveOccurred())
6464

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

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

9595
g.By("waiting for a new endpoint")

Diff for: test/extended/image_ecosystem/s2i_php.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ var _ = g.Describe("[image_ecosystem][php][Slow] hot deploy for openshift php im
5252
}
5353
o.Expect(err).NotTo(o.HaveOccurred())
5454

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

5858
g.By("waiting for endpoint")

Diff for: test/extended/image_ecosystem/s2i_python.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ var _ = g.Describe("[image_ecosystem][python][Slow] hot deploy for openshift pyt
6565
}
6666
o.Expect(err).NotTo(o.HaveOccurred())
6767

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

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

108108
g.By("waiting for a new endpoint")

Diff for: test/extended/image_ecosystem/s2i_ruby.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ var _ = g.Describe("[image_ecosystem][ruby][Slow] hot deploy for openshift ruby
5858
}
5959
o.Expect(err).NotTo(o.HaveOccurred())
6060

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

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

9999
g.By("waiting for a new endpoint")

Diff for: test/extended/image_ecosystem/sample_repos.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -74,12 +74,12 @@ func NewSampleRepoTest(c SampleRepoConfig) func() {
7474
o.Expect(err).NotTo(o.HaveOccurred())
7575

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

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

8585
g.By("expecting the db service is available")

Diff for: test/extended/util/framework.go

+5-3
Original file line numberDiff line numberDiff line change
@@ -808,7 +808,7 @@ var CheckImageStreamTagNotFoundFn = func(i *imageapi.ImageStream) bool {
808808

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

@@ -841,8 +841,10 @@ func WaitForDeploymentConfig(kc kclientset.Interface, dcClient appstypeclientset
841841
}
842842
}
843843

844-
if progressing != nil && progressing.Status == kapi.ConditionFalse {
845-
return false, fmt.Errorf("not progressing")
844+
if enforceNotProgressing {
845+
if progressing != nil && progressing.Status == kapi.ConditionFalse {
846+
return false, fmt.Errorf("not progressing")
847+
}
846848
}
847849

848850
if progressing != nil &&

0 commit comments

Comments
 (0)