Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package kopia for openSUSE:Factory checked in at 2025-11-27 15:20:23 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/kopia (Old) and /work/SRC/openSUSE:Factory/.kopia.new.14147 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "kopia" Thu Nov 27 15:20:23 2025 rev:9 rq:1320278 version:0.22.2 Changes: -------- --- /work/SRC/openSUSE:Factory/kopia/kopia.changes 2025-11-25 17:20:09.310917460 +0100 +++ /work/SRC/openSUSE:Factory/.kopia.new.14147/kopia.changes 2025-11-27 15:22:07.722415835 +0100 @@ -1,0 +2,14 @@ +Thu Nov 27 05:52:01 UTC 2025 - Johannes Kastl <[email protected]> + +- Update to version 0.22.2: + * Storage Providers + - Fix regression #5039: execute rclone with non-cancelling + context (#5040) by Julio López + * Testing + - allow S3 versioned tests cleanup to succeed (#5038) by Julio + López + * CI/CD + - make PR title options consistent with chlog (#5036) by Julio + López + +------------------------------------------------------------------- Old: ---- kopia-0.22.1.obscpio New: ---- kopia-0.22.2.obscpio ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ kopia.spec ++++++ --- /var/tmp/diff_new_pack.FlY07o/_old 2025-11-27 15:22:09.338483988 +0100 +++ /var/tmp/diff_new_pack.FlY07o/_new 2025-11-27 15:22:09.338483988 +0100 @@ -17,7 +17,7 @@ Name: kopia -Version: 0.22.1 +Version: 0.22.2 Release: 0 Summary: Cross-platform backup tool with fast incremental backups License: Apache-2.0 ++++++ _service ++++++ --- /var/tmp/diff_new_pack.FlY07o/_old 2025-11-27 15:22:09.378485674 +0100 +++ /var/tmp/diff_new_pack.FlY07o/_new 2025-11-27 15:22:09.382485843 +0100 @@ -3,7 +3,7 @@ <param name="url">https://github.com/kopia/kopia</param> <param name="scm">git</param> <param name="exclude">.git</param> - <param name="revision">v0.22.1</param> + <param name="revision">v0.22.2</param> <param name="versionformat">@PARENT_TAG@</param> <param name="versionrewrite-pattern">v(.*)</param> <param name="changesgenerate">enable</param> ++++++ _servicedata ++++++ --- /var/tmp/diff_new_pack.FlY07o/_old 2025-11-27 15:22:09.406486856 +0100 +++ /var/tmp/diff_new_pack.FlY07o/_new 2025-11-27 15:22:09.414487193 +0100 @@ -1,6 +1,6 @@ <servicedata> <service name="tar_scm"> <param name="url">https://github.com/kopia/kopia</param> - <param name="changesrevision">4526f031bf196c91cd874f5b5cf658ed434e7279</param></service></servicedata> + <param name="changesrevision">e456f78fa2d15b102988eee1025a2451eeaa3ebf</param></service></servicedata> (No newline at EOF) ++++++ kopia-0.22.1.obscpio -> kopia-0.22.2.obscpio ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/internal/testlogging/ctx.go new/kopia-0.22.2/internal/testlogging/ctx.go --- old/kopia-0.22.1/internal/testlogging/ctx.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/internal/testlogging/ctx.go 2025-11-26 08:05:28.000000000 +0100 @@ -41,6 +41,18 @@ return ContextWithLevel(t, LevelDebug) } +// ContextForCleanup returns a context with attached logger that emits all log entries to go testing.T log output. +// This context is not canceled when the test finishes, so it is suitable to be used in cleanup functions. +func ContextForCleanup(t testingT) context.Context { + return contextWithLevelForCleanup(t, LevelDebug) +} + +func contextWithLevelForCleanup(t testingT, level Level) context.Context { + return logging.WithLogger(context.WithoutCancel(t.Context()), func(module string) logging.Logger { + return PrintfLevel(t.Logf, "["+module+"] ", level) + }) +} + // ContextWithLevel returns a context with attached logger that emits all log entries with given log level or above. func ContextWithLevel(t testingT, level Level) context.Context { return logging.WithLogger(t.Context(), func(module string) logging.Logger { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/internal/testutil/dockertestutil.go new/kopia-0.22.2/internal/testutil/dockertestutil.go --- old/kopia-0.22.1/internal/testutil/dockertestutil.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/internal/testutil/dockertestutil.go 2025-11-26 08:05:28.000000000 +0100 @@ -50,7 +50,7 @@ t.Cleanup(func() { // t.Context() is canceled by the time cleanup executes, so it cannot be used here - runDockerAndGetOutputOrSkip(context.Background(), t, "kill", containerID) + runDockerAndGetOutputOrSkip(context.WithoutCancel(t.Context()), t, "kill", containerID) }) return containerID diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/repo/blob/azure/azure_storage_test.go new/kopia-0.22.2/repo/blob/azure/azure_storage_test.go --- old/kopia-0.22.1/repo/blob/azure/azure_storage_test.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/repo/blob/azure/azure_storage_test.go 2025-11-26 08:05:28.000000000 +0100 @@ -86,7 +86,9 @@ require.NoError(t, err) - defer st.Close(ctx) + t.Cleanup(func() { + st.Close(testlogging.ContextForCleanup(t)) + }) blobtesting.CleanupOldData(ctx, t, st, blobtesting.MinCleanupAge) } @@ -152,8 +154,12 @@ require.NoError(t, err) cancel() - defer st.Close(ctx) - defer blobtesting.CleanupOldData(ctx, t, st, 0) + t.Cleanup(func() { + ctx := testlogging.ContextForCleanup(t) + + blobtesting.CleanupOldData(ctx, t, st, 0) + st.Close(ctx) + }) blobtesting.VerifyStorage(ctx, t, st, blob.PutOptions{}) blobtesting.AssertConnectionInfoRoundTrips(ctx, t, st) @@ -190,8 +196,12 @@ require.NoError(t, err) cancel() - defer st.Close(ctx) - defer blobtesting.CleanupOldData(ctx, t, st, 0) + t.Cleanup(func() { + ctx := testlogging.ContextForCleanup(t) + + blobtesting.CleanupOldData(ctx, t, st, 0) + st.Close(ctx) + }) blobtesting.VerifyStorage(ctx, t, st, blob.PutOptions{}) blobtesting.AssertConnectionInfoRoundTrips(ctx, t, st) @@ -228,8 +238,12 @@ require.NoError(t, err) cancel() - defer st.Close(ctx) - defer blobtesting.CleanupOldData(ctx, t, st, 0) + t.Cleanup(func() { + ctx := testlogging.ContextForCleanup(t) + + blobtesting.CleanupOldData(ctx, t, st, 0) + st.Close(ctx) + }) blobtesting.VerifyStorage(ctx, t, st, blob.PutOptions{}) blobtesting.AssertConnectionInfoRoundTrips(ctx, t, st) @@ -266,8 +280,12 @@ require.NoError(t, err) cancel() - defer st.Close(ctx) - defer blobtesting.CleanupOldData(ctx, t, st, 0) + t.Cleanup(func() { + ctx := testlogging.ContextForCleanup(t) + + blobtesting.CleanupOldData(ctx, t, st, 0) + st.Close(ctx) + }) blobtesting.VerifyStorage(ctx, t, st, blob.PutOptions{}) blobtesting.AssertConnectionInfoRoundTrips(ctx, t, st) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/repo/blob/b2/b2_storage_test.go new/kopia-0.22.2/repo/blob/b2/b2_storage_test.go --- old/kopia-0.22.1/repo/blob/b2/b2_storage_test.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/repo/blob/b2/b2_storage_test.go 2025-11-26 08:05:28.000000000 +0100 @@ -81,8 +81,12 @@ cancel() require.NoError(t, err) - defer st.Close(ctx) - defer blobtesting.CleanupOldData(ctx, t, st, 0) + t.Cleanup(func() { + ctx := testlogging.ContextForCleanup(t) + + blobtesting.CleanupOldData(ctx, t, st, 0) + st.Close(ctx) + }) blobtesting.VerifyStorage(ctx, t, st, blob.PutOptions{}) blobtesting.AssertConnectionInfoRoundTrips(ctx, t, st) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/repo/blob/gcs/gcs_storage_test.go new/kopia-0.22.2/repo/blob/gcs/gcs_storage_test.go --- old/kopia-0.22.1/repo/blob/gcs/gcs_storage_test.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/repo/blob/gcs/gcs_storage_test.go 2025-11-26 08:05:28.000000000 +0100 @@ -53,8 +53,12 @@ cancel() require.NoError(t, err) - defer st.Close(ctx) - defer blobtesting.CleanupOldData(ctx, t, st, 0) + t.Cleanup(func() { + ctx := testlogging.ContextForCleanup(t) + + blobtesting.CleanupOldData(ctx, t, st, 0) + st.Close(ctx) + }) blobtesting.VerifyStorage(ctx, t, st, blob.PutOptions{}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/repo/blob/rclone/rclone_storage.go new/kopia-0.22.2/repo/blob/rclone/rclone_storage.go --- old/kopia-0.22.1/repo/blob/rclone/rclone_storage.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/repo/blob/rclone/rclone_storage.go 2025-11-26 08:05:28.000000000 +0100 @@ -339,7 +339,7 @@ "--vfs-write-back=0s", // disable write-back, critical for correctness ) - r.cmd = exec.CommandContext(ctx, rcloneExe, arguments...) //nolint:gosec + r.cmd = exec.CommandContext(context.WithoutCancel(ctx), rcloneExe, arguments...) //nolint:gosec r.cmd.Env = append(r.cmd.Env, opt.RCloneEnv...) // https://github.com/kopia/kopia/issues/1934 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/repo/blob/rclone/rclone_storage_test.go new/kopia-0.22.2/repo/blob/rclone/rclone_storage_test.go --- old/kopia-0.22.1/repo/blob/rclone/rclone_storage_test.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/repo/blob/rclone/rclone_storage_test.go 2025-11-26 08:05:28.000000000 +0100 @@ -62,6 +62,38 @@ return rcloneExe } +func TestRCloneStorageCancelContext(t *testing.T) { + t.Parallel() + testutil.ProviderTest(t) + + rcloneExe := mustGetRcloneExeOrSkip(t) + dataDir := testutil.TempDirectory(t) + ctx := testlogging.Context(t) + + // use context that gets canceled after opening storage to ensure it's not used beyond New(). + newCtx, cancel := context.WithCancel(ctx) + st, err := rclone.New(newCtx, &rclone.Options{ + // pass local file as remote path. + RemotePath: dataDir, + RCloneExe: rcloneExe, + }, true) + + cancel() + + require.NoError(t, err, "unable to connect to rclone backend") + require.NotNil(t, st, "unable to connect to rclone backend") + + t.Cleanup(func() { + st.Close(testlogging.ContextForCleanup(t)) + }) + + var tmp gather.WriteBuffer + defer tmp.Close() + + err = st.GetBlob(ctx, blob.ID(uuid.New().String()), 0, -1, &tmp) + require.ErrorIs(t, err, blob.ErrBlobNotFound, "unexpected error when downloading non-existent blob") +} + func TestRCloneStorage(t *testing.T) { t.Parallel() testutil.ProviderTest(t) @@ -72,8 +104,8 @@ dataDir := testutil.TempDirectory(t) // use context that gets canceled after opening storage to ensure it's not used beyond New(). - newctx, cancel := context.WithCancel(ctx) - st, err := rclone.New(newctx, &rclone.Options{ + newCtx, cancel := context.WithCancel(ctx) + st, err := rclone.New(newCtx, &rclone.Options{ // pass local file as remote path. RemotePath: dataDir, RCloneExe: rcloneExe, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/repo/blob/s3/s3_storage_test.go new/kopia-0.22.2/repo/blob/s3/s3_storage_test.go --- old/kopia-0.22.1/repo/blob/s3/s3_storage_test.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/repo/blob/s3/s3_storage_test.go 2025-11-26 08:05:28.000000000 +0100 @@ -537,10 +537,9 @@ getOrMakeBucket(t, cli, options, true) // ensure it is a bucket with object locking enabled - want := "Enabled" - if got, _, _, _, _ := cli.GetObjectLockConfig(ctx, options.BucketName); got != want { - t.Fatalf("object locking is not enabled: got '%s', want '%s'", got, want) - } + got, _, _, _, _ := cli.GetObjectLockConfig(ctx, options.BucketName) //nolint:dogsled + + require.Equal(t, "Enabled", got, "object locking is not enabled") // ensure a locking configuration is in place lockingMode := minio.Governance @@ -555,7 +554,7 @@ require.NoError(t, err, "could not create storage") t.Cleanup(func() { - blobtesting.CleanupOldData(ctx, t, s, 0) + blobtesting.CleanupOldData(testlogging.ContextForCleanup(t), t, s, 0) }) err = s.PutBlob(ctx, blob.ID("test-put-blob-0"), gather.FromSlice([]byte("xxyasdf243z")), blob.PutOptions{}) @@ -586,8 +585,12 @@ cancel() require.NoError(t, err) - defer st.Close(ctx) - defer blobtesting.CleanupOldData(ctx, t, st, 0) + t.Cleanup(func() { + ctx := testlogging.ContextForCleanup(t) + + blobtesting.CleanupOldData(ctx, t, st, 0) + st.Close(ctx) + }) blobtesting.VerifyStorage(ctx, t, st, opts) blobtesting.AssertConnectionInfoRoundTrips(ctx, t, st) @@ -608,8 +611,12 @@ st, err := newStorage(ctx, &options) require.NoError(t, err) - defer st.Close(ctx) - defer blobtesting.CleanupOldData(ctx, t, st, 0) + t.Cleanup(func() { + ctx := testlogging.ContextForCleanup(t) + + blobtesting.CleanupOldData(ctx, t, st, 0) + st.Close(ctx) + }) // Now attempt to add a block and expect to fail require.Error(t, diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/repo/blob/s3/s3_versioned_test.go new/kopia-0.22.2/repo/blob/s3/s3_versioned_test.go --- old/kopia-0.22.1/repo/blob/s3/s3_versioned_test.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/repo/blob/s3/s3_versioned_test.go 2025-11-26 08:05:28.000000000 +0100 @@ -849,25 +849,25 @@ func getVersionedTestStore(tb testing.TB, envName string) *s3Storage { tb.Helper() - ctx := testlogging.Context(tb) o := getProviderOptions(tb, envName) o.Prefix = path.Join(tb.Name(), uuid.NewString()) + "/" - s, err := newStorage(ctx, o) + s, err := newStorage(testlogging.Context(tb), o) require.NoError(tb, err, "error creating versioned store client") tb.Cleanup(func() { - cleanupVersions(tb, s) + ctx := testlogging.ContextForCleanup(tb) + + cleanupVersions(ctx, tb, s) blobtesting.CleanupOldData(ctx, tb, s, 0) }) return s } -func cleanupVersions(tb testing.TB, s *s3Storage) { +func cleanupVersions(ctx context.Context, tb testing.TB, s *s3Storage) { tb.Helper() - ctx := testlogging.Context(tb) ch := make(chan minio.ObjectInfo, 4) errChan := s.cli.RemoveObjects(ctx, s.BucketName, ch, minio.RemoveObjectsOptions{}) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/repo/blob/sftp/sftp_storage.go new/kopia-0.22.2/repo/blob/sftp/sftp_storage.go --- old/kopia-0.22.1/repo/blob/sftp/sftp_storage.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/repo/blob/sftp/sftp_storage.go 2025-11-26 08:05:28.000000000 +0100 @@ -553,7 +553,9 @@ impl.rec = connection.NewReconnector(impl) - conn, err := impl.rec.GetOrOpenConnection(ctx) + // removing cancelation from ctx since ctx is likely to be canceled after + // New returns, causing the initial connection to be closed and not reused + conn, err := impl.rec.GetOrOpenConnection(context.WithoutCancel(ctx)) if err != nil { return nil, errors.Wrap(err, "unable to open SFTP storage") } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/kopia-0.22.1/repo/blob/sftp/sftp_storage_test.go new/kopia-0.22.2/repo/blob/sftp/sftp_storage_test.go --- old/kopia-0.22.1/repo/blob/sftp/sftp_storage_test.go 2025-11-25 04:18:33.000000000 +0100 +++ new/kopia-0.22.2/repo/blob/sftp/sftp_storage_test.go 2025-11-26 08:05:28.000000000 +0100 @@ -212,8 +212,9 @@ t.Run("PasswordCreds", func(t *testing.T) { ctx := testlogging.Context(t) + newctx, cancel := context.WithCancel(ctx) - st, err := createSFTPStorage(ctx, t, sftp.Options{ + st, err := createSFTPStorage(newctx, t, sftp.Options{ Path: "/upload2", Host: host, Username: sftpUsernameWithPasswordAuth, @@ -226,6 +227,8 @@ t.Fatalf("unable to connect to SSH: %v", err) } + cancel() + deleteBlobs(ctx, t, st) blobtesting.VerifyStorage(ctx, t, st, blob.PutOptions{}) ++++++ kopia.obsinfo ++++++ --- /var/tmp/diff_new_pack.FlY07o/_old 2025-11-27 15:22:10.994553827 +0100 +++ /var/tmp/diff_new_pack.FlY07o/_new 2025-11-27 15:22:10.998553997 +0100 @@ -1,5 +1,5 @@ name: kopia -version: 0.22.1 -mtime: 1764040713 -commit: 4526f031bf196c91cd874f5b5cf658ed434e7279 +version: 0.22.2 +mtime: 1764140728 +commit: e456f78fa2d15b102988eee1025a2451eeaa3ebf ++++++ vendor.tar.gz ++++++ /work/SRC/openSUSE:Factory/kopia/vendor.tar.gz /work/SRC/openSUSE:Factory/.kopia.new.14147/vendor.tar.gz differ: char 134, line 2
