mirror of
https://github.com/kopia/kopia.git
synced 2026-01-29 00:33:24 -05:00
The kopia server was not uploading any logs to the repository, because "repodiag" blob uploads would always fail. The cause was the following: when the (log) repodiag blob PUT operation was initiated, the `Context` used for this operation was already canceled. The context used for blob uploads is passed to `repodiag.NewLogManager` when opening the repository. In the case of the kopia server, the repository is asynchronously opened in `server.Server.InitReposotoryAsync`. The context passed to `repo.Open` is canceled after the "open repository" server task completes. This issue was introduced in #1691 Change: Use `context.WithoutCancel()` instead of the context passed when the repo diagnoser is created. New tests are included to reproduce this failure and verify the fix. - test: ensure server logs are uploaded to the repo - test: honor cancellation in map storage - test: repodiag context cancellation Ref: - #1691