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

CI: Update Rust SDK conformance test cache version #1135

Merged
merged 3 commits into from
Oct 25, 2019

Conversation

aLekSer
Copy link
Collaborator

@aLekSer aLekSer commented Oct 22, 2019

Update cache for Cloud Builds.
As it could be seen from #1125 cloud runs, Rust sdk test downloading dependencies, while it should use cache for that in order to decrease overall CI build.
Fix documentation.

@markmandel
Copy link
Member

What do you mean by "bringing it back" ? Do you mean clearing it somehow?

@aLekSer
Copy link
Collaborator Author

aLekSer commented Oct 22, 2019

I would update this PR after first test run to make sure that second one is utilising the cache of first run.

@aLekSer
Copy link
Collaborator Author

aLekSer commented Oct 22, 2019

@markmandel I mean that it stops working. It uses only test/sdk/rust/Cargo.toml check sum.
- '--key=$_RUST_SDK_BUILD_CACHE_KEY-$( checksum test/sdk/rust/Cargo.toml )'
So it does not update the cache if key still the same.
That was done intentionally in order not to download all dependencies each time.

@aLekSer aLekSer changed the title Bump up Rust SDK test version to update cache Bump up Rust SDK test version to update cloud build cache Oct 22, 2019
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: c385e1ba-aac5-415a-b811-4a699c1885d7

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/1135/head:pr_1135 && git checkout pr_1135
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.1.0-a8a89ba

@aLekSer
Copy link
Collaborator Author

aLekSer commented Oct 22, 2019

Triggered one more build with the same save_cache key. New cache should be used.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 2dc5efa4-805b-443e-ab78-c00bda6b0903

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/1135/head:pr_1135 && git checkout pr_1135
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.1.0-01cb103

@aLekSer
Copy link
Collaborator Author

aLekSer commented Oct 23, 2019

Comparing the results:
Rust build now spent 1 minutes less on second than on a first run.
If not used cache we had (first run):

+ cargo fetch
Updating crates.io index
Downloading crates ...
Downloaded cfg-if v0.1.10
Downloaded futures v0.1.29
Downloaded backtrace v0.3.40
Downloaded backtrace-sys v0.1.32
... [skipped lines]
+ cargo build
Compiling protobuf v2.0.6
Compiling cc v1.0.46
... [skipped lines]
Compiling agones v0.1.0 (/go/src/agones.dev/agones/sdks/rust)

Second run (does not need to perform steps above every time):

+ cargo fetch
Updating crates.io index
+ cargo build
Compiling agones v0.1.0 (/go/src/agones.dev/agones/sdks/rust)

@markmandel
Copy link
Member

Should we rename this PR to be more indicative of what it's doing?

@markmandel
Copy link
Member

Or should it be closed - I'm actually not sure what it's doing 😄

@markmandel markmandel added the area/tests Unit tests, e2e tests, anything to make sure things don't break label Oct 23, 2019
@aLekSer aLekSer changed the title Bump up Rust SDK test version to update cloud build cache Update Rust SDK conformance test cache version Oct 24, 2019
@aLekSer
Copy link
Collaborator Author

aLekSer commented Oct 24, 2019

This PR is needed to make Rust builds faster and Rust SDK conformance test now from #1122 don't need to download and compile third party dependencies.
In recent #1125 @roberthbailey requested this update because cargo fetch saw that we have updated Agones Rust SDK and it started to download and compile all other dependencies:

Updating crates.io index
Downloading crates ...
Downloaded cc v1.0.46
...
Compiling agones v0.1.0 (/go/src/agones.dev/agones/sdks/rust)

As it could be seen in these logs:
https://console.cloud.google.com/cloud-build/builds/4b1bf464-c8df-41c8-bb03-c3eb21a1806a?project=agones-images

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: abed07d8-682a-4f19-b1e5-931336848516

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/1135/head:pr_1135 && git checkout pr_1135
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.1.0-8de2bd5

Need to update the version to trigger `save_cache` in order to avoid
downloading third party dependencies.
@aLekSer aLekSer changed the title Update Rust SDK conformance test cache version CI: Update Rust SDK conformance test cache version Oct 24, 2019
@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: e32273f3-b9c4-4388-845e-02cecb43b7b9

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/1135/head:pr_1135 && git checkout pr_1135
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.1.0-42f7203

@@ -17,7 +17,7 @@
# when Rust SDK or Rust test would be updated
[package]
name = "rust-simple"
version = "0.1.0"
version = "0.2.0"
Copy link
Member

Choose a reason for hiding this comment

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

What is this doing? Why the version increase?

@aLekSer
Copy link
Collaborator Author

aLekSer commented Oct 25, 2019

Hash of this file is used as a key in cloud build cache. After Robert changes #1125 , we got new version. However, as it could be seen from the CI logs, cache was not updated. And I was not able to find a way to make checksum of all files in Rust SDK directory, so I choose this way of forcing cache updates. Since we do not change Rust code very often.

@markmandel markmandel added the kind/cleanup Refactoring code, fixing up documentation, etc label Oct 25, 2019
Copy link
Member

@markmandel markmandel left a comment

Choose a reason for hiding this comment

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

Got it! Thanks! Approved!

@google-oss-robot
Copy link

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: aLekSer, markmandel

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-robot
Copy link

New changes are detected. LGTM label has been removed.

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 1e816be5-fa7b-4322-9a18-fdb262363137

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/1135/head:pr_1135 && git checkout pr_1135
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.1.0-98bb451

@agones-bot
Copy link
Collaborator

Build Succeeded 👏

Build Id: 32f88660-e325-4886-8405-661c4674f275

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/1135/head:pr_1135 && git checkout pr_1135
  • helm install install/helm/agones --namespace agones-system --name agones --set agones.image.tag=1.1.0-abacecb

@markmandel markmandel merged commit 0e244fd into googleforgames:master Oct 25, 2019
@markmandel markmandel added this to the 1.1.0 milestone Oct 29, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved area/tests Unit tests, e2e tests, anything to make sure things don't break kind/cleanup Refactoring code, fixing up documentation, etc size/XS
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants