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

Early upload successfully built artifacts to remote cache #74

Open
szab100 opened this issue Dec 9, 2021 · 0 comments
Open

Early upload successfully built artifacts to remote cache #74

szab100 opened this issue Dec 9, 2021 · 0 comments
Labels
bug Something isn't working

Comments

@szab100
Copy link

szab100 commented Dec 9, 2021

Bug description

Leeway, when building the 'installer:docker' target in a gitpod.io workspace has a lot of build dependencies..
The default concurrency limit is 16, so it starts building many pkgs in parallel..

In my case, there are always some temporary build errors with some pkgs that stops the entire build process.
The key problem is that Leeway only starts uploading build artifacts once at the end of a successful build (or missing to do so due to premature exit on failures ?):
☁️ uploading build artifacts to remote cache

Since due to the build failure, many packages that are previously built are not present in the remote (and local) cache, so when I restart the build, I see many of those are getting re-built from scratch again and again. This is causing almost an endless loop, if the temporary errors keep popping up & I keep re-running the build command.

The only workaround I found was to specify lighter build targets from the list of components that are not present in the remote cache.. let them finish and see they are getting uploaded.. I can typically get the whole build done in like 10-15 total attempts, which is super annoying & time consuming.

Can this be improved, like by triggering both an image push & remote cache artifact upload at the end of each successfully built component, when it prints package build succeded (has a typo)?

Another idea for improvement: actually, uploading the artifacts to the remote cache at the very end of the build process is fine, but Leeway should wait for all forked background / parallel builds' results before exiting and still upload the successfully built targets' artifacts to remote cache in case of an overall build failure.. So let's say the entire build includes 25 targets, there is a build error with a single target (may fail the dependent ones), I would expect Leeway to print a stat in the end of how many of the 25 were built successfully, explicitly mentioning the failed targets, as well as that it uploads the successful ones to the remote cache, so on next attempt those pkgs will not get rebuilt.

Steps to reproduce

In description. I can provide build logs, if needed. Just let me know.

Expected behavior

No response

Example repository

No response

Anything else?

No response

@szab100 szab100 added the bug Something isn't working label Dec 9, 2021
@szab100 szab100 changed the title Upload artifacts to remote cache earlier Early upload of artifacts to remote cache Dec 9, 2021
@szab100 szab100 changed the title Early upload of artifacts to remote cache Early upload successfully built artifacts to remote cache Dec 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant