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

Speed up CI Build #996

Merged
merged 4 commits into from
Aug 14, 2019
Merged

Conversation

markmandel
Copy link
Member

@markmandel markmandel commented Aug 13, 2019

  • Run more things in parallel.
  • Cache C++ build output, as that is the longer path.

@markmandel markmandel added kind/cleanup Refactoring code, fixing up documentation, etc area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/tests Unit tests, e2e tests, anything to make sure things don't break labels Aug 13, 2019
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 2fe02d02-92ed-479e-85ea-70725daac70e

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/996/head:pr_996 && git checkout pr_996
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.0.0-1d1dd4d

cloudbuild.yaml Outdated
- name: "make-docker"
id: push-images
waitFor:
- build
- build-images
dir: "build"
args: [ "-j", "3", "push"]
Copy link
Member

Choose a reason for hiding this comment

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

We build 4 images now, so this can be -j 4.

cloudbuild.yaml Show resolved Hide resolved
@markmandel
Copy link
Member Author

First pass seemed to scrape off 3 minutes. Not as much as I would like.

@markmandel
Copy link
Member Author

@googlebot rescan

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 7af13475-17bb-403c-9826-f24aa1d7e186

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/996/head:pr_996 && git checkout pr_996
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.0.0-eb92bdf

- Run more things in parallel.
- Cache C++ build output, as that is the longer path.
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 8662c7b1-7c90-464e-8cb2-c6a20a4f91fa

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/996/head:pr_996 && git checkout pr_996
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.0.0-9e658c6

@markmandel
Copy link
Member Author

That's better - a 14 minute build.

@markmandel markmandel marked this pull request as ready for review August 13, 2019 20:43
@aLekSer
Copy link
Collaborator

aLekSer commented Aug 13, 2019

Cool gain in execution time.
However there is a real chance (saw it on a cloudbuild run) that steps tests and run-sdk-conformance-tests would overlap with fail result.
It should occur when SDK conformance would remove ./node_modules and make tests would use node_modules (
Step #15 - "tests": /usr/bin/make run-sdk-command COMMAND=test SDK_FOLDER=node in particular)
Removing node_modules performed by this command:

$(MAKE) run-sdk-command COMMAND=clean

You could see from logs that Step 15 tests and Step 21 SDK conformance runs simultaneously:
https://console.cloud.google.com/cloud-build/builds/8662c7b1-7c90-464e-8cb2-c6a20a4f91fa?project=agones-images

@markmandel
Copy link
Member Author

Why does it need to be removed? Could we not gitignore it instead?

@aLekSer
Copy link
Collaborator

aLekSer commented Aug 13, 2019

we could, I need to recap pros and cons as well as reason behind adding clean step for Node JS.

@markmandel
Copy link
Member Author

Looking at the code - it's already .gitignored. So I can remove the clean step. Ran it locally, and git did not complain about anything not being added 👍

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 96ff6b54-bcd0-41e9-abb7-a412b0dc0a01

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/996/head:pr_996 && git checkout pr_996
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.0.0-92c9bf4

@markmandel
Copy link
Member Author

One thing I don't understand. I upped the e2e test parrallel count to 64 (from 32), no increase in performance. Seems odd.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 7720793f-ba41-41dd-b787-6a2971a3c797

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/996/head:pr_996 && git checkout pr_996
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.0.0-5148373

@markmandel
Copy link
Member Author

markmandel commented Aug 13, 2019

Just removed 4 minutes from the e2e test!

13 minute run!

@@ -56,7 +56,10 @@ func TestFleetScaleUpEditAndScaleDown(t *testing.T) {
fixtures := []bool{true, false}

for _, usePatch := range fixtures {
usePatch := usePatch
Copy link
Member Author

Choose a reason for hiding this comment

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

@@ -137,7 +137,6 @@ run-sdk-conformance-no-build: ensure-build-sdk-image
run-sdk-conformance-test:
$(MAKE) run-sdk-command COMMAND=build-sdk-test
$(MAKE) run-sdk-conformance-no-build
$(MAKE) run-sdk-command COMMAND=clean
Copy link
Collaborator

@aLekSer aLekSer Aug 14, 2019

Choose a reason for hiding this comment

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

Note that there is also a clean step in Rust. Will check if Rust package files are gitignored.
I suggest adding a new make target for clean. Otherwise it would be not visible from sdk.mk that we have a special way to remove package files.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Rust target dir have appropriate .gitignore. https://github.com/googleforgames/agones/blob/master/test/sdk/rust/.gitignore
So the only request for adding new target for clean left.

Could be:

clean-sdk-conformance-tests:
	$(MAKE) run-all-sdk-command COMMAND=clean

Copy link
Collaborator

Choose a reason for hiding this comment

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

Created a PR linked to this.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: cac641e8-737e-48b4-b702-79b23f9d1e31

The following development artifacts have been built, and will exist for the next 30 days:

A preview of the website (the last 30 builds are retained):

To install this version:

  • git fetch https://github.com/GoogleCloudPlatform/agones.git pull/996/head:pr_996 && git checkout pr_996
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.0.0-c94a333

@markmandel markmandel merged commit 56b9a6e into googleforgames:master Aug 14, 2019
@markmandel markmandel added this to the 1.0 milestone Aug 14, 2019
@markmandel markmandel deleted the ci/go-go-go-faster branch August 14, 2019 23:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/build-tools Development tooling. I.e. pretty much everything in the `build` directory. area/tests Unit tests, e2e tests, anything to make sure things don't break kind/cleanup Refactoring code, fixing up documentation, etc
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants