Resize fifo to 1024K
The container which writes logs synchronously would be blocked in the following scenarios:
- Container writes logs synchronously to stdout or stderr .
- Upgrade containerd and speed a lot of time.
So it is important to resize fifo in container runtime. After commit, the pipe_max_size had adjusted to 1024K.
/assign @thaJeztah
The failed tests seem not to be related to the change.
The failed tests seem not to be related to the change.
Hm.. interesting; linting failure I suspect is because of an old version of GolangCI-lint, which is not yet aware of the max builtin? Not sure why that only shows up now.
Running [/home/runner/golangci-lint-1.51.1-linux-amd64/golangci-lint run --out-format=github-actions --path-prefix=src/github.com/containerd/fifo] in [/home/runner/work/fifo/fifo/src/github.com/containerd/fifo] ...
Error: undefined: max (typecheck)
Error: issues found
Don't know about the other one (I'm not too familiar with all of this repository);
=== RUN TestFifoCloseWhileReadingAndWriting
fifo_test.go:450:
Error Trace: /home/runner/work/fifo/fifo/src/github.com/containerd/fifo/fifo_test.go:450
Error: An error is expected but got nil.
Test: TestFifoCloseWhileReadingAndWriting
fifo_test.go:454: Read should not succeed
--- FAIL: TestFifoCloseWhileReadingAndWriting (0.50s)
Can you rebase your PR? https://github.com/containerd/fifo/pull/58 should have fixed the CI failures
Can you rebase your PR? #58 should have fixed the CI failures
Done. I do not understand the failed test.
=== RUN TestFifoCloseWhileReadingAndWriting
fifo_test.go:450:
Error Trace: /home/runner/work/fifo/fifo/src/github.com/containerd/fifo/fifo_test.go:450
Error: An error is expected but got nil.
Test: TestFifoCloseWhileReadingAndWriting
fifo_test.go:454: Read should not succeed
--- FAIL: TestFifoCloseWhileReadingAndWriting (0.50s)
It's a shame that the api surface returns a ReadWriteCloser directly, otherwise I'd say why don't we just expose a method that lets you set the buffer size to whatever you want. Alternatively, we could expose a new constructor, like OpenFifoWithOpts() where we can pass in options to control things like this. My opinion is it should be the users choice, and we shouldn't automatically set the buf size for them if possible.