Skip to content
This repository has been archived by the owner on May 6, 2022. It is now read-only.

Split up xbuild Prow job #2663

Closed
jberkhahn opened this issue Jun 12, 2019 · 10 comments · Fixed by kubernetes/test-infra#13855
Closed

Split up xbuild Prow job #2663

jberkhahn opened this issue Jun 12, 2019 · 10 comments · Fixed by kubernetes/test-infra#13855
Assignees
Labels
Milestone

Comments

@jberkhahn
Copy link
Contributor

currently our prow xbuild job takes nearly an hour to run. It would be nice if we could split this job up into different jobs that built the images for different architectures that run separately. We should already have most of the cruft required for this in our Makefile, so it should mostly be a matter of writing the prow job yaml.

@jberkhahn jberkhahn added this to the 0.3.0 milestone Jun 12, 2019
@mszostok
Copy link
Contributor

mszostok commented Jun 13, 2019

/dibs

Hope that it also makes those builds more stable.

In the first iteration, we can split prow xbuild job to:

  • user-broker-image & test-broker-image
  • service-catalog-image
  • healthcheck-image
  • svcat-all

and after closing that issue #2658 and #2189 then we can even remove the user-broker-image job.

But maybe after that, we should consider if building each image e.g. service-catalog-image for 5 different architectures (amd64 arm arm64 ppc64le s390x) is really necessary? What is the purpose of doing that? Any thoughts @jberkhahn?

@mszostok mszostok added the prow label Jun 13, 2019
@MHBauer
Copy link
Contributor

MHBauer commented Jun 13, 2019

/assign @mszostok

Do we still have the #dibs in the docs somewhere? We should be using the kubernetes prow commands now.

@mszostok
Copy link
Contributor

@MHBauer
Copy link
Contributor

MHBauer commented Jun 13, 2019

oh, yea, I forgot that people have to be org member for assignment.

Even so, that's the only thing, and it's helpful for us to use the tooling we have. It's easier to check while browsing, what's been assigned, and who to talk to if you want and update on progress or to take over.

@MHBauer
Copy link
Contributor

MHBauer commented Jul 2, 2019

if building each image e.g. service-catalog-image for 5 different architectures (amd64 arm arm64 ppc64le s390x) is really necessary?

I don't know about arm or arm64, but IBM requires amd64, ppc64le & s390x.

@mszostok
Copy link
Contributor

mszostok commented Jul 8, 2019

could you point me, where you are using that?

I understand that the svcat binary should be built against different platforms because it's directly executed on the client host and each of us can have a different OS arch.

But what about the user-broker-image, test-broker-image, service-catalog-image, healthcheck-image? In production, they are executed as a docker container inside the Kubernetes cluster and they are shipped with docker image with the amd64 arch. (check that job: https://travis-ci.org/kubernetes-sigs/service-catalog/jobs/540981158)

Times

When we split prow xbuild job to:

  • user-broker-image & test-broker-image
  • service-catalog-image
  • healthcheck-image
  • svcat-all

and each of them will be built against 5 different arch then each build will take around 25minutes.
When we will execute that only against amd64 then it will take the only 5min.

Errors

Screen Shot 2019-07-08 at 18 16 38

Screen Shot 2019-07-08 at 18 16 06

The bottom line is that the amd and amd64 never failed with the exec format error.

So leaving only those build will also increase our builds stability.

@mszostok
Copy link
Contributor

mszostok commented Jul 8, 2019

Discussed on the SIG meeting. The service catalog binary is executed directly on OS, instead of using the default docker image. Currently, we want to leave support for all of the architecture.

@mszostok
Copy link
Contributor

mszostok commented Aug 13, 2019

Description

I've created PR to split the pull-service-catalog-xbuild job.

Instead of having one pipeline for building all images I split that by arch into:

  • pull-build-all-images-for-amd64
  • pull-build-all-images-for-arm
  • pull-build-all-images-for-arm64
  • pull-build-all-images-for-ppc64le
  • pull-build-all-images-for-s390x
  • pull-build-all-images-for-svcat (cli for darwin, linux, windows)

pros:

  • reduce pipeline time from 1h to around 7min
  • based on investigation Split up xbuild Prow job #2663 (comment), the most common random failures are connected with architecture so splitting by that type will help for restarting only failed builds

cons:

  • have 5 additional pipelines

I've tested that solution by executing those build on our test-infra clusters, results:

Sum duration: 43m55s

Based on the pros IMO is worth to have those additional 5 pipelines. What's more, they are split by arch so it's a fixed number of pipeline regardless of the number of domains (brokers, apiservers, healtchecks etc.)

Outdated solution

My first approach was to split build by domain into:

  • brokers-build-image-all-arch (user-broker & test-broker)
  • service-catalog-build-image-all-arch
  • healthcheck-build-image-all-arch
  • svcat-build-image-all-arch

pros:

  • reduce time to merge from 1h to 25min
  • have only 3 additional pipelines

cons:

@mszostok
Copy link
Contributor

Resolved by: kubernetes/test-infra#13855

(merged&tested)

@MHBauer
Copy link
Contributor

MHBauer commented Aug 13, 2019

wow, nice!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants