-
Notifications
You must be signed in to change notification settings - Fork 4
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
Improve image build waiting mechanism #79
Comments
Seems Docker inspects the Retry-After header if a 50x error is returned but I'll confirm this error with pull is solved: https://forums.docker.com/t/force-docker-client-to-retry-pulling-layers/31947 by other hand, I think the best approach is to create a background task that performs the build when the dockerfile is provided and store the result in some storage. When the docker client request again we can check if it's present in the storage and serve it |
this is how it works! look here |
I prefer to use the background task feature of Micronaut (https://guides.micronaut.io/latest/micronaut-scheduled-gradle-groovy.html#scheduling-a-job-manually) |
Dont' think impact much, it's just another way to execute the task in a separate thread. |
delegate into MN the wait for image build completion closes #79
delegate into MN the wait for image build completion closes #79
delegate into MN the wait for image build completion closes #79
delegate into MN the wait for image build completion closes #79
delegate into MN the wait for image build completion closes #79
Wave can build container on-fly when the container request provides a dockerfile.
https://github.com/seqeralabs/wave/blob/2b24fb330bab6220870141140f62164ed7404e4e/wave-api/src/main/groovy/io/seqera/wave/api/SubmitContainerTokenRequest.groovy#L30-L30
However, the build process can take some minutes. Therefore subsequence image requests need to wait for the build completion before starting to pull the corresponding layers.
Now it's uses a very simple blicking mechanism in the controller handler.
https://github.com/seqeralabs/wave/blob/2b24fb330bab6220870141140f62164ed7404e4e/src/main/groovy/io/seqera/wave/controller/RegistryProxyController.groovy#L62-L63
But this can be very inefficient. Likely a better approach consistent using reactive response.
Also the build response
status
should be taken into account an return an error when the build failsThe text was updated successfully, but these errors were encountered: