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

cache_to inline and cache_from #304

Merged
merged 5 commits into from
Aug 29, 2022

Conversation

GaryPWhite
Copy link
Contributor

Fixes #83.

Changes

Sets up cache_to and cache_from for docker-compose builds. Note that the cache_to is set to inline. My best estimation for how we push the cache with a given image up to ghcr is included in the link provided -- there's not much documentation on it from docker directly.

Also worth noting -- builds (once cached) are lightning fast!

For significant contributions please make sure you have completed the following items:

@GaryPWhite GaryPWhite requested a review from a team August 15, 2022 20:32
@cartersocha
Copy link
Contributor

@austinlparker this might help with some of the build times

@austinlparker
Copy link
Member

Yeah, would certainly help on rebuilds if not initial pull I reckon?

@cartersocha
Copy link
Contributor

Rebuilds for sure.

I'm not an expert but I think it can help on initial builds too if we connect it to a cache source for images in gchr like Gary refers to.

Ideally only the delta in the repo needs to be rebuilt

@GaryPWhite
Copy link
Contributor Author

I found through some tinkering that we should probably update the .env file when we do releases to ghcr -- otherwise it will not pick up the right version.

Otherwise we could put together a makefile that pulls the most recent version of image and then tries to build -- would automatically use the cache_from that way.

although then people would need make :)

@austinlparker
Copy link
Member

although then people would need make :)

I mean... you kinda do need make rn, even on Windows, if you want to get the toolchain. That said, would it break entirely if someone skipped make and just did docker-compose up?

Copy link
Contributor

@mic-max mic-max left a comment

Choose a reason for hiding this comment

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

After merging this a release would be done so to upload the cached version of the images to the docker repository. I think just to be safe here we could try with a single service - I elect the particularly slow shippingservice (Rust) which will be easy to see the speedup and know the caching worked.

@GaryPWhite
Copy link
Contributor Author

commented out, so we don't have to re-find the implementation later.

@GaryPWhite GaryPWhite requested a review from mic-max August 22, 2022 15:58
@austinlparker
Copy link
Member

@mic-max are there any changes on this that are pending? shows you still have stuff requested but I don't see it. would like to get this PR updated and merged in.

@cartersocha
Copy link
Contributor

@GaryPWhite please update the branch so we can merge!

@austinlparker
Copy link
Member

anyone know why maintainers cant refresh this branch? weird. waiting on OP to refresh then g2g

@cartersocha
Copy link
Contributor

I think it's because some of the upstream repos have branch protections and some sort of access restrictions

@cartersocha cartersocha merged commit feb0d56 into open-telemetry:main Aug 29, 2022
@GaryPWhite GaryPWhite deleted the cache_from branch August 29, 2022 15:24
@cartersocha
Copy link
Contributor

@GaryPWhite just tried this on my mac and it was broken. I'm getting this error: "cache export feature is currently not supported for docker driver. Please switch to a different driver"

Any tips? I made sure docker is updated and couldn't find anything specific on Google

jmichalak9 pushed a commit to jmichalak9/opentelemetry-demo that referenced this pull request Mar 22, 2024
* cache_to inline and cache_from

* drop -alpha and update version

* comment all but loadservice
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add cache_from command to docker compose
4 participants