J
863c0c7404
nit: use context.WithoutCancel instead of Background
2025-11-25 22:12:29 -08:00
J
0625353db1
fix(provider): create initial SFTP connection with non-cancelling context
2025-11-25 22:12:29 -08:00
J
c7a0eb515c
fix(provider): execute rclone with non-cancelling context
2025-11-25 22:12:28 -08:00
J
33d4318938
test(provider): test rclone after canceling starting context
2025-11-25 22:12:28 -08:00
Julio López
e1e1e0d807
fix(providers): allow S3 versioned tests cleanup to succeed ( #5038 )
...
- allow S3 versioned tests cleanup to succeed
- use ContextForCleanup
2025-11-24 22:32:51 -08:00
Julio López
b9e5279d76
chore(ci): make PR title options consistent with chlog ( #5036 )
2025-11-24 22:01:59 -08:00
Julio López
4526f031bf
fix(ui): revert omitzero changes ( #5035 )
...
- Revert "chore(ci): enable modernize:omitzero linter setting (#4981 )"
reverts 06845c750b
- Revert "refactor(general): omitzero JSON tag in policy structs (#4910 )"
reverts 033b4b1d5e
- Revert "refactor(general): `omitzero` JSON tag (#4907 )"
reverts 5bc467e2ca
- Ref: #5006
v0.22.1
2025-11-24 19:18:33 -08:00
Kopia Builder [bot]
4937b661f6
feat(ui): upgraded htmlui to the latest version ( #5034 )
2025-11-25 01:28:13 +00:00
dependabot[bot]
d36f64f0b3
build(deps): bump go.uber.org/zap from 1.27.0 to 1.27.1 ( #5033 )
...
Bumps [go.uber.org/zap](https://github.com/uber-go/zap ) from 1.27.0 to 1.27.1.
- [Release notes](https://github.com/uber-go/zap/releases )
- [Changelog](https://github.com/uber-go/zap/blob/master/CHANGELOG.md )
- [Commits](https://github.com/uber-go/zap/compare/v1.27.0...v1.27.1 )
---
updated-dependencies:
- dependency-name: go.uber.org/zap
dependency-version: 1.27.1
dependency-type: direct:production
update-type: version-update:semver-patch
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-24 16:35:56 -08:00
dependabot[bot]
366af4d18f
build(deps): bump github.com/prometheus/common ( #5032 )
2025-11-24 23:28:20 +00:00
Julio Lopez
b723b8e9e4
fix(app): serialize empty Manifest.Stats field ( #5029 )
...
- Fixes #5006
2025-11-24 04:54:55 +00:00
Nathan Baulch
ea1bdb1541
chore(ci): enable noctx linter ( #4972 )
...
* pass context in webdav helpers
* fix typo in function name
2025-11-19 21:46:28 -08:00
dependabot[bot]
c048f656d7
build(deps): bump golang.org/x/crypto from 0.44.0 to 0.45.0 ( #5017 )
...
Bumps [golang.org/x/crypto](https://github.com/golang/crypto ) from 0.44.0 to 0.45.0.
- [Commits](https://github.com/golang/crypto/compare/v0.44.0...v0.45.0 )
---
updated-dependencies:
- dependency-name: golang.org/x/crypto
dependency-version: 0.45.0
dependency-type: direct:production
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-19 21:32:21 -08:00
Julio Lopez
3d4cd24117
refactor(general): make purpose a string parameter ( #5015 )
...
Make purpose parameter a string.
Refactor TestDeriveKeyFromMasterKey
- make variables local to the test and rename accordingly
- make the purpose a `const (untyped) string`
2025-11-19 19:40:59 -08:00
Julio Lopez
7b64425ab1
chore(ci): pass context in helpers for running docker ( #5012 )
...
- Ref: #4972
2025-11-18 22:44:40 -08:00
Kopia Builder [bot]
e42fb02d1e
feat(ui): upgraded htmlui to the latest version ( #5011 )
2025-11-18 21:17:36 -08:00
Julio Lopez
297673b4c4
chore(ci): cleanup TestKopiaRunner ( #5010 )
...
Remove unnecessary environment variable cleanup in test.
Cleanup is done via `t.Setenv(...)`
Leverage require in TestKopiaRunner
2025-11-18 20:02:48 -08:00
Julio Lopez
7586b21b1f
chore(general): use contexts in tests ( #5009 )
...
Ref:
- Subset of the changes proposed by @NathanBaulch in #4972
2025-11-18 17:47:23 -08:00
Julio Lopez
3b2f44f3f1
refactor(general): leverage testing.T.Context in testlogging ( #5008 )
...
Ref:
- https://pkg.go.dev/testing@latest#T.Context
2025-11-18 10:42:39 -08:00
Julio Lopez
67ba03ac46
fix(general): prevent writing outside of installation target directory ( #5003 )
2025-11-17 21:22:58 -08:00
dependabot[bot]
7581c443b0
build(deps): bump the common-golang-dependencies group across 1 directory with 8 updates ( #5000 )
...
Bumps the common-golang-dependencies group with 6 updates in the / directory:
| Package | From | To |
| --- | --- | --- |
| [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go ) | `1.57.1` | `1.57.2` |
| [golang.org/x/crypto](https://github.com/golang/crypto ) | `0.43.0` | `0.44.0` |
| [golang.org/x/mod](https://github.com/golang/mod ) | `0.29.0` | `0.30.0` |
| [golang.org/x/net](https://github.com/golang/net ) | `0.46.0` | `0.47.0` |
| [google.golang.org/api](https://github.com/googleapis/google-api-go-client ) | `0.255.0` | `0.256.0` |
| [google.golang.org/grpc](https://github.com/grpc/grpc-go ) | `1.76.0` | `1.77.0` |
Updates `cloud.google.com/go/storage` from 1.57.1 to 1.57.2
- [Release notes](https://github.com/googleapis/google-cloud-go/releases )
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/main/CHANGES.md )
- [Commits](https://github.com/googleapis/google-cloud-go/compare/storage/v1.57.1...storage/v1.57.2 )
Updates `golang.org/x/crypto` from 0.43.0 to 0.44.0
- [Commits](https://github.com/golang/crypto/compare/v0.43.0...v0.44.0 )
Updates `golang.org/x/mod` from 0.29.0 to 0.30.0
- [Commits](https://github.com/golang/mod/compare/v0.29.0...v0.30.0 )
Updates `golang.org/x/net` from 0.46.0 to 0.47.0
- [Commits](https://github.com/golang/net/compare/v0.46.0...v0.47.0 )
Updates `golang.org/x/term` from 0.36.0 to 0.37.0
- [Commits](https://github.com/golang/term/compare/v0.36.0...v0.37.0 )
Updates `golang.org/x/text` from 0.30.0 to 0.31.0
- [Release notes](https://github.com/golang/text/releases )
- [Commits](https://github.com/golang/text/compare/v0.30.0...v0.31.0 )
Updates `google.golang.org/api` from 0.255.0 to 0.256.0
- [Release notes](https://github.com/googleapis/google-api-go-client/releases )
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md )
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.255.0...v0.256.0 )
Updates `google.golang.org/grpc` from 1.76.0 to 1.77.0
- [Release notes](https://github.com/grpc/grpc-go/releases )
- [Commits](https://github.com/grpc/grpc-go/compare/v1.76.0...v1.77.0 )
---
updated-dependencies:
- dependency-name: cloud.google.com/go/storage
dependency-version: 1.57.2
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/crypto
dependency-version: 0.44.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/mod
dependency-version: 0.30.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/net
dependency-version: 0.47.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/term
dependency-version: 0.37.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/text
dependency-version: 0.31.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: google.golang.org/api
dependency-version: 0.256.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: google.golang.org/grpc
dependency-version: 1.77.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-17 17:16:02 -08:00
Julio Lopez
7db061ee71
build(deps): Go 1.25 ( #4987 )
...
Upgrade to Go 1.25
Leverage `WaitGroup.Go` in Go 1.25
2025-11-17 16:42:12 -08:00
Julio Lopez
1aaf433cdc
build(deps): use stdlib context package ( #5001 )
v0.22.0
2025-11-17 15:59:46 -08:00
Julio Lopez
70f8d678d0
fix(general): handle errors closing writable descriptors ( #4998 )
2025-11-16 23:07:51 -08:00
Julio Lopez
070c15b888
chore(general): avoid wrapping always-nil error ( #4997 )
2025-11-16 22:55:35 -08:00
Julio Lopez
0b0e75f75f
chore(general): check for nil before de-refencing field ( #4996 )
2025-11-16 21:50:33 -08:00
Julio Lopez
f1127b228e
chore(general): check bounds for memory allocation ( #4995 )
2025-11-16 21:36:18 -08:00
Julio Lopez
db4b89bc3d
fix(cli): potential overflow in integer conversion ( #4993 )
2025-11-15 22:36:45 -08:00
Kopia Builder [bot]
56061316b9
feat(ui): upgraded htmlui to the latest version ( #4992 )
2025-11-15 22:34:36 -08:00
dependabot[bot]
6f1cb92518
build(deps): bump js-yaml from 4.1.0 to 4.1.1 in /app ( #4991 )
...
Bumps [js-yaml](https://github.com/nodeca/js-yaml ) from 4.1.0 to 4.1.1.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md )
- [Commits](https://github.com/nodeca/js-yaml/compare/4.1.0...4.1.1 )
---
updated-dependencies:
- dependency-name: js-yaml
dependency-version: 4.1.1
dependency-type: indirect
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-15 21:08:59 -08:00
Julio Lopez
3619aacb46
chore(ci): remove GOEXPERIMENT=coverageredesign ( #4988 )
2025-11-13 21:58:56 -08:00
Julio Lopez
0875010b1e
chore(general): fix typos ( #4986 )
...
- follow-up to #4985
2025-11-13 20:22:29 -08:00
Julio Lopez
c60ebebb17
chore(ci): make socket activation test more robust ( #4985 )
...
Objective: make the tests more robust and reduce random failures.
Preliminary refactoring:
- Accept testing.TB in testenv helpers. This is needed to
use `require.EventuallyWithT` in socket activation tests.
- Rename parameters for clarity
Tests refactoring:
- use t.Cleanup instead of defer where appropriate
- create file handlers in test routine instead of go routines
- remove unnecessary var declaration
- increased wait time to 30 seconds.
- allow running socket activation test on Darwin
Ref:
- #3283
- #3313
- #3318
2025-11-13 19:02:57 -08:00
lyndon-li
c3c971a785
feat(general): fix display errors for maintenance stats ( #4984 )
2025-11-13 12:27:42 -08:00
Julio Lopez
b7f811cfc9
chore(ci): build kopia with -trimpath ( #4983 )
...
Rationale: move towards reproducible (hermetic) builds.
The `-trimpath` flag removes absolute file system paths
from the resulting executables.
- add `-trimpath` to `KOPIA_BUILD_FLAGS`
- add `-trimpath` to `goreleaser` config
- move `KOPIA_BUILD_*` var defs to `Makefile`
2025-11-13 10:31:28 -08:00
Julio Lopez
bb20d9e11a
chore(ci): enable wsl_v5:{assign,expr} linter settings ( #4982 )
...
Enable wsl_v5 settings:
- assign
- expr
2025-11-12 23:12:06 -08:00
Julio Lopez
80eda18f99
chore(ci): enable wsl_v5:err linter ( #4928 )
2025-11-12 22:15:27 -08:00
lyndon-li
157c80e5e7
feat(snapshots): Flush after restoring each file ( #4825 )
...
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-11-12 20:59:56 -08:00
Julio Lopez
06845c750b
chore(ci): enable modernize:omitzero linter setting ( #4981 )
2025-11-12 20:54:03 -08:00
Julio Lopez
033b4b1d5e
refactor(general): omitzero JSON tag in policy structs ( #4910 )
...
The `omitempty` JSON tag is ineffective on fields of struct type, among others.
The fields with tags changed from `omitempty` to `omitzero` can be classified into 2 categories:
- fields for which the intent was to avoid serializing the value when it was zero or empty (such as structs with the zero value for the struct);
- policy-definition fields that have the `omitempty` to match the corresponding policy fields.
The fields are changed such that
- the fields are not serialized when they have the zero (or empty) value; and
- consistency is maintained between policy fields and the corresponding policy definition fields.
---
In the context of policy definitions:
**Fields of type `struct`**:
In some cases, the fields in the policy definition and values are of type struct, such as is the case for the `policy.Policy` and `policy.Definition` structs.
In these cases, the `omitzero` JSON tag avoids marshaling empty fields, making the serialized representation more compact and less noisy, while preserving the same behavior and thus semantic when unmarshaling omitted fields.
**Fields of pointer types**:
The `omitempty` and `omitzero` have _practically_ the same effect on fields of pointer types:
- the field is omitted when it is null
- the field is included when it is not null, even if the value that it points to is "the zero value" for the non-pointer type.
Note: when the pointer type defines an `IsZero()` member function, then that field would also be omitted during marshaling. There are no defined `IsZero()` function for these pointers, so
the semantics are preserved in this case.
The `omitzero` JSON tag in the fields definition structs, such as the `ActionPolicyDefinition struct`, does not change the semantics, it simply makes the marshaled representation more compact.
**Fields of type slice**:
The behavior for `omitempty` and `omitzero` differs for slices, and maps as well.
The struct fields of slice type, such as `[]string`, are left with the `omitempty` tag to be able to tell the difference between a nil slice and a non-nil, zero-length slice. Even though, currently most code paths do not explicitly differentiate between a nil slice and an empty slice, the `omitempty` tag is left unmodified out of abundance of caution.
---
Ref:
- #4973
- #4907
2025-11-12 18:33:30 -08:00
Julio Lopez
c32775f8f2
chore(ci): require Go 1.24 to build site ( #4980 )
2025-11-12 18:30:24 -08:00
Julio Lopez
9c1aec59e4
docs(site): fix CLI command docs ( #4979 )
...
Also, minor updates for contrib docs
2025-11-12 17:19:34 -08:00
Nathan Baulch
657fda216a
chore(ci): upgrade to golangci-lint 2.6.1 ( #4973 )
...
- upgrade to golangci-lint 2.6.1
- updates for gosec
- updates for govet
- updates for perfsprint
- updates modernize
Leaves out modernize:omitempty due to conflicts with tests
2025-11-11 21:27:10 -08:00
Julio Lopez
19af93f2b1
refactor(ci): enable wsl_v5:return linter ( #4975 )
...
Also, disable redundant nakedret linter
2025-11-11 16:53:10 -08:00
Julio Lopez
9931d1d03c
fix(test): use safer t.Setenv ( #4974 )
...
TestServerCreateAndConnectViaAPI now runs sequentially
as required by t.Setenv to avoid conflicts with other tests.
2025-11-11 16:00:46 -08:00
Nathan Baulch
557940c524
chore(ci): upgrade to golangci-lint v2.5.0 ( #4931 )
...
Upgrades golangci-lint to v2.5.0
Enables:
- wsl_v5
Disables:
- embeddedstructfieldcheck
- noinlineerr (not used in this codebase)
- noctx (temporarily)
- godot
- wsl (deprecated)
Co-authored-by: Julio Lopez <1953782+julio-lopez@users.noreply.github.com >
2025-11-11 12:37:07 -08:00
lyndon-li
7114e991c6
feat(general): add stats to maintenance run - SnapshotGC ( #4964 )
...
* snapshot gc stats
Signed-off-by: Lyndon-Li <lyonghui@vmware.com >
2025-11-10 16:28:43 -08:00
dependabot[bot]
36608d28a5
build(deps): bump the common-golang-dependencies group with 7 updates ( #4970 )
...
Bumps the common-golang-dependencies group with 7 updates:
| Package | From | To |
| --- | --- | --- |
| [github.com/Azure/azure-sdk-for-go/sdk/azcore](https://github.com/Azure/azure-sdk-for-go ) | `1.19.1` | `1.20.0` |
| [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go ) | `1.13.0` | `1.13.1` |
| [github.com/minio/minio-go/v7](https://github.com/minio/minio-go ) | `7.0.95` | `7.0.97` |
| [golang.org/x/oauth2](https://github.com/golang/oauth2 ) | `0.32.0` | `0.33.0` |
| [golang.org/x/sync](https://github.com/golang/sync ) | `0.17.0` | `0.18.0` |
| [golang.org/x/sys](https://github.com/golang/sys ) | `0.37.0` | `0.38.0` |
| [google.golang.org/api](https://github.com/googleapis/google-api-go-client ) | `0.254.0` | `0.255.0` |
Updates `github.com/Azure/azure-sdk-for-go/sdk/azcore` from 1.19.1 to 1.20.0
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases )
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.19.1...sdk/azcore/v1.20.0 )
Updates `github.com/Azure/azure-sdk-for-go/sdk/azidentity` from 1.13.0 to 1.13.1
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases )
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.13.0...sdk/azidentity/v1.13.1 )
Updates `github.com/minio/minio-go/v7` from 7.0.95 to 7.0.97
- [Release notes](https://github.com/minio/minio-go/releases )
- [Commits](https://github.com/minio/minio-go/compare/v7.0.95...v7.0.97 )
Updates `golang.org/x/oauth2` from 0.32.0 to 0.33.0
- [Commits](https://github.com/golang/oauth2/compare/v0.32.0...v0.33.0 )
Updates `golang.org/x/sync` from 0.17.0 to 0.18.0
- [Commits](https://github.com/golang/sync/compare/v0.17.0...v0.18.0 )
Updates `golang.org/x/sys` from 0.37.0 to 0.38.0
- [Commits](https://github.com/golang/sys/compare/v0.37.0...v0.38.0 )
Updates `google.golang.org/api` from 0.254.0 to 0.255.0
- [Release notes](https://github.com/googleapis/google-api-go-client/releases )
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/main/CHANGES.md )
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.254.0...v0.255.0 )
---
updated-dependencies:
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azcore
dependency-version: 1.20.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: github.com/Azure/azure-sdk-for-go/sdk/azidentity
dependency-version: 1.13.1
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: common-golang-dependencies
- dependency-name: github.com/minio/minio-go/v7
dependency-version: 7.0.97
dependency-type: direct:production
update-type: version-update:semver-patch
dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/oauth2
dependency-version: 0.33.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/sync
dependency-version: 0.18.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/sys
dependency-version: 0.38.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
- dependency-name: google.golang.org/api
dependency-version: 0.255.0
dependency-type: direct:production
update-type: version-update:semver-minor
dependency-group: common-golang-dependencies
...
Signed-off-by: dependabot[bot] <support@github.com >
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-11-10 16:12:56 -08:00
Julio Lopez
499aec5e66
refactor(general): leverage stats.CountSum in maintenance stats ( #4963 )
...
Leverage stats.CountSum and atomics in content rewrite.
Rationale: simplifies code
Also, fix typos and update comments for consistency.
2025-11-06 21:34:26 -08:00
Julio Lopez
b0f99ccb7f
refactor(general): remove dry run option for blob retention ext ( #4962 )
2025-11-06 11:12:46 -08:00