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: reduce size of Rust interop-test image #3926

Merged
merged 4 commits into from
May 15, 2023
Merged

Conversation

thomaseizinger
Copy link
Contributor

@thomaseizinger thomaseizinger commented May 14, 2023

Description

By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Notes & open questions

Once this is merged, I'll backport it to the older releases and update the commit hashes that libp2p/test-plans points to.

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 marked this pull request as ready for review May 14, 2023 20:16
@thomaseizinger thomaseizinger changed the title ci: reduce size of Rust interop-image ci: reduce size of Rust interop-test image May 14, 2023
@thomaseizinger
Copy link
Contributor Author

@Mergifyio backport v0.48 v0.49 v0.50 v0.51

@mergify
Copy link
Contributor

mergify bot commented May 15, 2023

backport v0.48 v0.49 v0.50 v0.51

✅ Backports have been created

@mergify mergify bot merged commit 0bc724a into master May 15, 2023
@mergify mergify bot deleted the feat/smaller-interop-image branch May 15, 2023 11:58
mergify bot pushed a commit that referenced this pull request May 15, 2023
By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Pull-Request: #3926.
(cherry picked from commit 0bc724a)

# Conflicts:
#	interop-tests/Dockerfile
mergify bot pushed a commit that referenced this pull request May 15, 2023
By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Pull-Request: #3926.
(cherry picked from commit 0bc724a)
mergify bot pushed a commit that referenced this pull request May 15, 2023
By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Pull-Request: #3926.
(cherry picked from commit 0bc724a)
mergify bot pushed a commit that referenced this pull request May 15, 2023
By using a multi-stage docker build, a distroless base image and a release build, we can get the size of the Rust interop test down to 50MB. Previously, the image would be around 500MB. A debug build image would still have ~400MB. The release build slows down our interop build step by about 1min 20s. That however is only because we don't currently seem to utilize the caches that from what I understand should work on self-hosted runners. I opted #3925 for that.

Resolves: #3881.

Pull-Request: #3926.
(cherry picked from commit 0bc724a)
mergify bot added a commit that referenced this pull request May 15, 2023
This is an automatic backport of pull request #3926 done by [Mergify](https://mergify.com).

Pull-Request: #3945.
mergify bot added a commit that referenced this pull request May 15, 2023
This is an automatic backport of pull request #3926 done by [Mergify](https://mergify.com).

Pull-Request: #3944.
mergify bot added a commit that referenced this pull request May 15, 2023
This is an automatic backport of pull request #3926 done by [Mergify](https://mergify.com).

Pull-Request: #3943.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

interop: make Docker image smaller by using multi-stage builds
2 participants