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: create dependency cache layer of interop tests #4593

Merged
merged 2 commits into from
Oct 5, 2023

Conversation

thomaseizinger
Copy link
Contributor

@thomaseizinger thomaseizinger commented Oct 5, 2023

Description

Currently, the Docker images for the HEAD branch of the pull-request get re-built completely every time we push a new commit to a branch. That is because the RUN caches use the local disk of the host system but those are ephemeral in GitHub actions.

To fix this, we rewrite the dockerfiles to use cargo chef, a tool developed to create a cached layer of built dependencies that doesn't get invalidated as the application source changes.

Normally, these layers are also cached on the local filesystem. To have them available across pull-requests and branches, we instruct buildkit to use the same S3 cache as we use in the interop tests already for docker layers. As a result, this should greatly speed up our CI.

Resolves: #3925.

Notes & open questions

Change checklist

  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • A changelog entry has been made in the appropriate crates

@thomaseizinger thomaseizinger requested a review from mxinden October 5, 2023 03:23
@thomaseizinger
Copy link
Contributor Author

@thomaseizinger
Copy link
Contributor Author

CI being green is good enough to merge this! Let's go! :)

@thomaseizinger thomaseizinger added send-it trivial Marks PRs which are considered trivial and don't need approval from another maintainer. labels Oct 5, 2023
@thomaseizinger
Copy link
Contributor Author

I've tagged this as resolving #3925 because it essentially solves the same problem just in a different way. We have caches now that can be reused between PRs :)

@mergify mergify bot merged commit 7d1d67c into master Oct 5, 2023
@mergify mergify bot deleted the feat/faster-interop-builds branch October 5, 2023 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
send-it trivial Marks PRs which are considered trivial and don't need approval from another maintainer.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ci: make docker caching on self-hosted runners work
1 participant