Skip to content

Conversation

@julio-lopez
Copy link
Collaborator

@julio-lopez julio-lopez commented Nov 26, 2025

@julio-lopez julio-lopez requested a review from Copilot November 26, 2025 03:47
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an issue where the rclone storage provider was using a cancellable context to execute the rclone subprocess, which could cause premature termination of the rclone server. The fix ensures the rclone process lifecycle is independent of the caller's context cancellation by using context.WithoutCancel().

Key changes:

  • Modified New() to use context.WithoutCancel(ctx) when creating the rclone command, preventing premature process termination
  • Added test coverage to verify storage operations work correctly after the context used in New() is cancelled

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
repo/blob/rclone/rclone_storage.go Changed exec.CommandContext to use non-cancellable context for rclone subprocess
repo/blob/rclone/rclone_storage_test.go Added test verifying storage operations work after context cancellation

@julio-lopez julio-lopez changed the title fix(provider): execute rclone with non-cancelling context fix(providers): execute rclone with non-cancelling context Nov 26, 2025
@codecov
Copy link

codecov bot commented Nov 26, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.03%. Comparing base (cb455c6) to head (6b7b254).
⚠️ Report is 785 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5040      +/-   ##
==========================================
+ Coverage   75.86%   78.03%   +2.16%     
==========================================
  Files         470      548      +78     
  Lines       37301    31398    -5903     
==========================================
- Hits        28299    24500    -3799     
+ Misses       7071     4849    -2222     
- Partials     1931     2049     +118     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@julio-lopez julio-lopez marked this pull request as ready for review November 26, 2025 07:04
Copilot AI review requested due to automatic review settings November 26, 2025 07:04
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.


t.Run("PasswordCreds", func(t *testing.T) {
ctx := testlogging.Context(t)
newctx, cancel := context.WithCancel(ctx)
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable name newctx should use camelCase as newCtx to be consistent with the naming convention used in the rclone test (line 107 of rclone_storage_test.go).

Copilot uses AI. Check for mistakes.
newctx, cancel := context.WithCancel(ctx)

st, err := createSFTPStorage(ctx, t, sftp.Options{
st, err := createSFTPStorage(newctx, t, sftp.Options{
Copy link

Copilot AI Nov 26, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variable reference newctx should be newCtx to match the corrected camelCase naming convention.

Copilot uses AI. Check for mistakes.
@julio-lopez julio-lopez merged commit e456f78 into kopia:master Nov 26, 2025
27 checks passed
@julio-lopez julio-lopez deleted the fix/rclone-provider branch November 26, 2025 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Rclone backups are not working

1 participant