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
failure to restore cache produces corrupted files passed to incremental builds #929
Comments
|
your save-artifacts script should not output anything except the tar stream. it's possible we are combining stdout+stderr. I'd ask that you revise your save-artifacts script to eliminate extraneous output before we investigate this further. |
|
stderr is displayed to the screen and not sent to the tar, we have many other builds which do the same and don't have issue (just with this particularly large one) |
|
if you pass this flag: you can examine the staging dir that is being injected into your build and see what's in there. |
|
Here is the same with the prints removed from |
|
Here's what it's sending along: note that that on subsequent runs that tar file is sometimes different sized -- maybe some timeout of some sort? |
|
can you run with loglevel 5? |
|
gotta grab my train, I'll try with that tomorrow |
|
here's log level 5, I've cut out the filenames and substituted the variables seen in the original post: we're using v1.1.10 |
|
Looks like there is indeed a 30s timeout, and you are hitting it: i'll create a fix to bump it up significantly. |
|
should there be an additional PR to empty the artifacts dir in the event that tar fails? |
it wouldn't be a bad idea, any chance you can contribute it? |
|
I'll see if I can, the current messaging is misleadingly wrong about that though 😆 |
there appear to be two problems here, first that a valid tar is being rejected and second that the partially written files are still being passed into subsequent builds.
I've had difficulty finding a minimal testcase yet so I'll include my logs, observations, and in parallel work on trying to make a minimal reproduction.
The command we're using to build is:
s2i build \ --pull-policy=never --incremental-pull-policy=never \ --incremental --copy \ "$DIRECTORY" "$BUILDER" "$TARGET_TAG"The log outputs (I've prefixed our helper tool's output with
~~~)(see below for the structure of our artifacts, this error happens as it tries to untar
pre-commit-cache.tar-- we're using tar-of-tar to work around the IO bottlenecks alluded to in #832)If I manually run the
save-artifactsmyself it appears to succeed:And that tarfile is fine:
Is it possibly a file size thing -- the artifact involved is quite large:
The messages from our tool "Attempting to restore ..." only appear if something is in
/tmp/artifacts-- which should (?) be empty given the messageWARNING: Clean build will be performed because of error saving previous build artifacts.I'll try and make a minimal reproduction that doesn't involve our builders / helpers / infra.
The text was updated successfully, but these errors were encountered: