-
Notifications
You must be signed in to change notification settings - Fork 593
feat(kopiaui): connect to repository asynchronously on startup #1691
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Codecov Report
@@ Coverage Diff @@
## master #1691 +/- ##
==========================================
+ Coverage 70.72% 70.75% +0.02%
==========================================
Files 387 387
Lines 30789 30918 +129
==========================================
+ Hits 21776 21876 +100
- Misses 7345 7365 +20
- Partials 1668 1677 +9
Continue to review full report at Codecov.
|
This allows KopiaUI server to start when the repository directory is not mounted or otherwise unavailable. Connection attempts will be retried indefinitely and user will see new `Initializing` page. This also exposes `Open` and `Connect` as tasks allowing the user to see logs directly in the UI and cancel the operation.
904e138 to
e27e281
Compare
jkowalski
added a commit
to jkowalski/kopia
that referenced
this pull request
Feb 2, 2022
v0.10.3 introduced a regression where RClone connections did not work in KopiaUI but were ok in the CLI. The root cause was kopia#1691 which caused storage context to be closed after opening the repository. Added test that verifies that storage does not rely on the context remaining open.
jkowalski
added a commit
that referenced
this pull request
Feb 2, 2022
v0.10.3 introduced a regression where RClone connections did not work in KopiaUI but were ok in the CLI. The root cause was #1691 which caused storage context to be closed after opening the repository. Added test that verifies that storage does not rely on the context remaining open.
jkowalski
added a commit
that referenced
this pull request
Feb 2, 2022
v0.10.3 introduced a regression where RClone connections did not work in KopiaUI but were ok in the CLI. The root cause was #1691 which caused storage context to be closed after opening the repository. Added test that verifies that storage does not rely on the context remaining open.
julio-lopez
added a commit
to julio-lopez/kopia
that referenced
this pull request
Oct 31, 2024
The kopia server never uploads logs to the repository, because the Context used for uploading the log blobs is already canceled when the PUT operation is initiated. 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 kopia#1691 Change: Use `context.WithoutCancel()` instead of the context passed when the repo diagnoser is created.
julio-lopez
added a commit
to kastenhq/kopia
that referenced
this pull request
Jan 22, 2025
The kopia server never uploads logs to the repository, because the Context used for uploading the log blobs is already canceled when the PUT operation is initiated. 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 kopia#1691 Change: Use `context.WithoutCancel()` instead of the context passed when the repo diagnoser is created.
julio-lopez
added a commit
to kastenhq/kopia
that referenced
this pull request
Jan 22, 2025
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 kopia#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.
julio-lopez
added a commit
to kastenhq/kopia
that referenced
this pull request
Jan 22, 2025
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 kopia#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.
julio-lopez
added a commit
that referenced
this pull request
Jan 23, 2025
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This allows KopiaUI server to start when the repository directory is not mounted or otherwise unavailable. Connection attempts will be retried indefinitely and user will see new
Initializingpage.This also exposes
OpenandConnectas tasks allowing the user to see logs directly in the UI and cancel the operation.Fixes #1643