engine: tee archive correctly even when run step fails#1994
Conversation
|
@maiamcc if you sync a large, multi-GB file, how does this affect memory usage? |
|
ya, this feels like it's trying to optimize for the wrong thing. can we re-tar the files for each container? |
|
Ugh you're both very correct. |
| } | ||
| }() | ||
| var archiveReader io.Reader = pr | ||
| tarBytes, err := ioutil.ReadAll(pr) |
There was a problem hiding this comment.
I think this is going to explode memory usage on large files. Try it out with a large, multi-GB file (dd if=/dev/zero of=file.txt count=1024 bs=1048576) and running tilt up. Then create a memory profile by pressing Ctrl+O in the terminal UI.
You can check out the profile with pprof by running go tool pprof tilt.heap_profile.
There was a problem hiding this comment.
That makes sense, and I don't have the internet bandwidth to test this right now asdfgh (like I literally can't even pull the golang docker image) so I pushed up a version where we recreate the tar archive every time, and if tests pass i'll land -- can verify performance later.
|
CI failed with: but passes locally?? Rerunning tests. |
|
ping! ready! |
|
I will create a memory profile |
|
thanks, appreciate it <3 |
1 similar comment
|
thanks, appreciate it <3 |

Fixes observed bug:
go buildw/o error),and we fall back to image build b/c of "inconsistent state: one update
succeeded, one failed"
The second
go buildsucceeded b/c we weren't correctly syncing the change with thesyntax error to the second container -- early return from
buildAndDeploymeant thatwe didn't appropriately tee the tar reader.