Commit Graph

2257 Commits

Author SHA1 Message Date
dependabot[bot]
da915a010d build(deps): bump google.golang.org/api from 0.73.0 to 0.74.0 (#1872)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.73.0 to 0.74.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.73.0...v0.74.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-01 19:37:53 -07:00
dependabot[bot]
341657d77c build(deps): bump github.com/aws/aws-sdk-go from 1.43.26 to 1.43.31 (#1873)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.43.26 to 1.43.31.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.43.26...v1.43.31)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  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>
2022-04-01 19:37:43 -07:00
Ali Dowair
044792db30 feat(cli): show storage capacity in repo status (#1867)
The connected repository's backing storage capacity and available
space can be now retrieved from `kopia repository status`. In text
format, these fields are printed in a human friendly form (MiB, GiB).
In JSON mode (`--json`), they are output as bytes.

Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com>
Co-authored-by: Julio
2022-04-01 01:03:51 +00:00
chaitalisg
08cf7eb936 test(general): Add a test method to perform repository format version upgrade (#1832)
Authored-by: Chaitali Gondhalekar (@chaitalisg)
Co-authored-by: Julio (@julio-lopez)
2022-03-30 15:16:49 -07:00
Jarek Kowalski
4f36e4e1d0 fix(repository): fixed accidental cache directory location change during refactoring (#1866) 2022-03-27 19:46:40 +00:00
Jarek Kowalski
b64ad62f69 refactor(repository): unified data and metadata cache implementations (#1864)
With this change there's now a single implementation with one boolean parameter that indicates whether we should fetch blobs or contents.
2022-03-27 08:53:20 -07:00
dependabot[bot]
b19d892e3d build(deps): bump github.com/zalando/go-keyring from 0.1.1 to 0.2.1 (#1857)
Bumps [github.com/zalando/go-keyring](https://github.com/zalando/go-keyring) from 0.1.1 to 0.2.1.
- [Release notes](https://github.com/zalando/go-keyring/releases)
- [Commits](https://github.com/zalando/go-keyring/compare/v0.1.1...v0.2.1)

---
updated-dependencies:
- dependency-name: github.com/zalando/go-keyring
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-27 05:44:18 +00:00
dependabot[bot]
bb4192ffe5 build(deps): bump github.com/sanity-io/litter from 1.5.2 to 1.5.4 (#1861)
Bumps [github.com/sanity-io/litter](https://github.com/sanity-io/litter) from 1.5.2 to 1.5.4.
- [Release notes](https://github.com/sanity-io/litter/releases)
- [Changelog](https://github.com/sanity-io/litter/blob/main/CHANGELOG.md)
- [Commits](https://github.com/sanity-io/litter/compare/v1.5.2...v1.5.4)

---
updated-dependencies:
- dependency-name: github.com/sanity-io/litter
  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>
2022-03-26 19:50:55 -07:00
dependabot[bot]
39db4aac82 build(deps): bump github.com/zeebo/blake3 from 0.2.2 to 0.2.3 (#1862)
Bumps [github.com/zeebo/blake3](https://github.com/zeebo/blake3) from 0.2.2 to 0.2.3.
- [Release notes](https://github.com/zeebo/blake3/releases)
- [Commits](https://github.com/zeebo/blake3/compare/v0.2.2...v0.2.3)

---
updated-dependencies:
- dependency-name: github.com/zeebo/blake3
  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>
2022-03-26 19:50:43 -07:00
dependabot[bot]
c7f3dc89d8 build(deps): bump google.golang.org/protobuf from 1.27.1 to 1.28.0 (#1863)
Bumps [google.golang.org/protobuf](https://github.com/protocolbuffers/protobuf-go) from 1.27.1 to 1.28.0.
- [Release notes](https://github.com/protocolbuffers/protobuf-go/releases)
- [Changelog](https://github.com/protocolbuffers/protobuf-go/blob/master/release.bash)
- [Commits](https://github.com/protocolbuffers/protobuf-go/compare/v1.27.1...v1.28.0)

---
updated-dependencies:
- dependency-name: google.golang.org/protobuf
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 19:50:26 -07:00
dependabot[bot]
9ae83f4753 build(deps-dev): bump electron-notarize from 1.1.1 to 1.2.1 in /app (#1858)
Bumps [electron-notarize](https://github.com/electron/electron-notarize) from 1.1.1 to 1.2.1.
- [Release notes](https://github.com/electron/electron-notarize/releases)
- [Changelog](https://github.com/electron/electron-notarize/blob/master/.releaserc.json)
- [Commits](https://github.com/electron/electron-notarize/compare/v1.1.1...v1.2.1)

---
updated-dependencies:
- dependency-name: electron-notarize
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 22:24:05 +00:00
dependabot[bot]
3ecee20d97 build(deps): bump github.com/chromedp/chromedp from 0.7.8 to 0.8.0 (#1854)
Bumps [github.com/chromedp/chromedp](https://github.com/chromedp/chromedp) from 0.7.8 to 0.8.0.
- [Release notes](https://github.com/chromedp/chromedp/releases)
- [Commits](https://github.com/chromedp/chromedp/compare/v0.7.8...v0.8.0)

---
updated-dependencies:
- dependency-name: github.com/chromedp/chromedp
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 22:16:31 +00:00
dependabot[bot]
d7cdcc7dc3 build(deps): bump github.com/aws/aws-sdk-go from 1.43.9 to 1.43.26 (#1860)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.43.9 to 1.43.26.
- [Release notes](https://github.com/aws/aws-sdk-go/releases)
- [Changelog](https://github.com/aws/aws-sdk-go/blob/main/CHANGELOG.md)
- [Commits](https://github.com/aws/aws-sdk-go/compare/v1.43.9...v1.43.26)

---
updated-dependencies:
- dependency-name: github.com/aws/aws-sdk-go
  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>
2022-03-26 22:13:56 +00:00
dependabot[bot]
fd9f452864 build(deps): bump github.com/stretchr/testify from 1.7.0 to 1.7.1 (#1859)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.0 to 1.7.1.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.0...v1.7.1)

---
updated-dependencies:
- dependency-name: github.com/stretchr/testify
  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>
2022-03-26 22:04:28 +00:00
dependabot[bot]
32cb189ec1 build(deps-dev): bump electron from 17.1.0 to 17.2.0 in /app (#1856)
Bumps [electron](https://github.com/electron/electron) from 17.1.0 to 17.2.0.
- [Release notes](https://github.com/electron/electron/releases)
- [Changelog](https://github.com/electron/electron/blob/main/docs/breaking-changes.md)
- [Commits](https://github.com/electron/electron/compare/v17.1.0...v17.2.0)

---
updated-dependencies:
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 21:46:05 +00:00
dependabot[bot]
4bbb5cd56c build(deps): bump github.com/golang-jwt/jwt/v4 from 4.3.0 to 4.4.1 (#1855)
Bumps [github.com/golang-jwt/jwt/v4](https://github.com/golang-jwt/jwt) from 4.3.0 to 4.4.1.
- [Release notes](https://github.com/golang-jwt/jwt/releases)
- [Changelog](https://github.com/golang-jwt/jwt/blob/main/VERSION_HISTORY.md)
- [Commits](https://github.com/golang-jwt/jwt/compare/v4.3.0...v4.4.1)

---
updated-dependencies:
- dependency-name: github.com/golang-jwt/jwt/v4
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 21:44:18 +00:00
dependabot[bot]
b6d4e316b3 build(deps): bump github.com/klauspost/compress from 1.14.4 to 1.15.1 (#1853)
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.14.4 to 1.15.1.
- [Release notes](https://github.com/klauspost/compress/releases)
- [Changelog](https://github.com/klauspost/compress/blob/master/.goreleaser.yml)
- [Commits](https://github.com/klauspost/compress/compare/v1.14.4...v1.15.1)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 21:31:00 +00:00
dependabot[bot]
65b1a56cdb build(deps): bump google.golang.org/api from 0.70.0 to 0.73.0 (#1852)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.70.0 to 0.73.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.70.0...v0.73.0)

---
updated-dependencies:
- dependency-name: google.golang.org/api
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 21:27:21 +00:00
dependabot[bot]
f5f2be5116 build(deps): bump plist from 3.0.4 to 3.0.5 in /app (#1851) 2022-03-26 19:42:52 +00:00
Jarek Kowalski
92683c5a5e feat(snapshots): support for controlling upload parallelism via policies (#1850) 2022-03-26 19:20:49 +00:00
Jarek Kowalski
d7e10dba59 feat(cli): improved kopia benchmark commands (#1849)
* added --parallel flag
* added `kopia benchmark encryption`
* added `kopia benchmark hashing`
2022-03-26 14:28:08 +00:00
Jarek Kowalski
b2b5e6fb97 fix(repository): fixed 'unable to get content data and info' (#1844)
We were incorrectly assigning the same content cache key regardless of
the storage format of the content (compression format, etc.)

This means that if a content has both compressed and non-compressed
entry in the index, it would sometimes get cached incorrectly
and the subsequent reads would fail.

Clearing the cache would fix the issue - this change appends
format-specific suffix to cache keys, so that clearing the cache is not
needed.

Huge thanks to Mark Derricutt who helped get to the bottom of this
on Slack.

Fix #1843
2022-03-22 20:39:36 -07:00
Ali Dowair
aafe56cd6f feat(snapshots): support restoring sparse files (#1823)
* feat(snapshots): support restoring sparse files

This commit implements basic support for restoring sparse files from
a snapshot. When specifying "--mode=sparse" in a snapshot restore
command, Kopia will make a best effort to make sure the underlying
filesystem allocates the minimum amount of blocks needed to persist
restored files. In other words, enabling this feature will "force"
all restored files to be sparse-blocks of zero bytes in the source
file should not be allocated.

* Address review comments

- Separate sparse option into its own bool flag
- Implement sparsefile packagewith copySparse method
- Truncate once before writing sparse file
- Check error from Truncate
- Add unit test for copySparse
- Invoke GetBlockSize once per file copy
- Remove support for Windows and explain why
- Add unit test for stat package

Co-authored-by: Dave Smith-Uchida <dave@kasten.io>
2022-03-22 19:09:50 -07:00
Jarek Kowalski
dc0d41b7e0 build(deps): upgrade minimist to 1.2.6 (#1845) 2022-03-21 21:50:14 -07:00
Jarek Kowalski
716ed71b59 fix(server): fixed server startup race condition (#1842)
This fixes a regression introduced in #1837
2022-03-20 22:21:03 -07:00
Jarek Kowalski
3b45daf27a fix(ci): fixed TestThrottler flake (#1841) 2022-03-20 20:38:32 -07:00
Jarek Kowalski
3ef472248d fix(ci): fixed flaky TestServerControl (#1840) 2022-03-20 20:19:21 -07:00
Jarek Kowalski
daa62de3e4 chore(ci): added checklocks static analyzer (#1838)
From https://github.com/google/gvisor/tree/master/tools/checklocks

This will perform static verification that we're using
`sync.Mutex`, `sync.RWMutex` and `atomic` correctly to guard access
to certain fields.

This was mostly just a matter of adding annotations to indicate which
fields are guarded by which mutex.

In a handful of places the code had to be refactored to allow static
analyzer to do its job better or to not be confused by some
constructs.

In one place this actually uncovered a bug where a function was not
releasing a lock properly in an error case.

The check is part of `make lint` but can also be invoked by
`make check-locks`.
2022-03-19 22:42:59 -07:00
Jarek Kowalski
9cba4a97be refactor(repository): major server code refactoring (#1837)
This removes big shared lock held for for the duration of each request
and replaces it with trivially short lock to capture the current
state of the server/repository before passing it to handlers.

Handlers are now limited to only accessing a small subset of Server
functionality to be able to better reason about them.
2022-03-19 22:01:38 -07:00
Jarek Kowalski
9054fd0dc2 chore(ci): upgraded linter to 1.45 (#1836)
* chore(deps): upgraded linter to 1.45

* fixed linter warning
2022-03-18 22:24:42 -07:00
Jarek Kowalski
6ba2f586ad feat(repository): ensure we don't run parallel fetches for the same blob IDs (#1835)
* feat(repository): ensure we don't run parallel fetches for the same blob IDs

Fixed a bunch of test flakes.

* fixed race condition, limit the size of mutex cache by using LRU
2022-03-18 21:27:06 -07:00
Jarek Kowalski
991c08e4b4 chore(repository): switched from opencensus to directly exporting prometheus metrics (#1831) 2022-03-17 23:39:36 -07:00
Julio Lopez
c6e39878b3 refactor(repository): minor refactor for common code path in helper (#1833) 2022-03-17 22:25:23 -07:00
Julio Lopez
3f9e27c97b feat(cli): add --json output to 'repo status' command (#1834)
* cleanup(repository) add kopia:sensitive tag to content.FormattingOptions field

* feat(cli): add --json output to  command
2022-03-17 22:22:24 -07:00
Ali Dowair
c7ce87f95b feat(providers): Implement API to get Storage free space (#1753)
* Introduce Volume sub-interface
  The Volume interface defines APIs to access a storage provider's
  volume (disk) capacity, usage, etc.. It is inherited by the Storage
  interface, and is at the same hierarchical level as the Reader
  interface.

* Add validations for new Volume method:
  Check that GetCapacity() either returns `ErrNotAVolume`, or that it
  returns a Capacity struct with values that make sense.

* Implement default (passthrough) GetCapacity:
  Cloud providers do not have finite volumes, and WebDAV volumes have no
  notion of volume size and usage. These implementations should just
  return an error (ErrNotAVolume) when their GetCapacity() is called.

* Implement GetCapacity for sftp storage: Uses the sftp.Client interface
* Implement GetCapacity for logging, readonly store
* Implement GetCapacity() for blobtesting implementations

* Implement GetCapacity() for Google Drive:
  Also modifies GetDriveClient to return the entire service instead of just the Files client.

* Implemented GetCapacity() for filesystem storage:
  Implemented the function in a seperate file for each OS/architecture (Unix, OpenBSD, Windows).
2022-03-16 12:35:33 -07:00
Jarek Kowalski
3ef81134a1 fix(cli): fixing ignoring lines starting with '#' in 'policy edit' (#1830)
Fixes #1821
2022-03-16 08:00:50 -07:00
Jarek Kowalski
2b8f7453db fix(cli): fixed and unified help text for policy commands (#1829)
Fixes #1822
2022-03-16 00:46:57 -07:00
Jarek Kowalski
c4ab086d5f chore(repository): streamlined internal content cache API (#1828)
moved from ./repo/content to ./internal/cache
2022-03-15 23:57:04 -07:00
Jarek Kowalski
1aa3a35518 refactor(repository): moved index blob cache to separate directory (#1827)
Also cleaned up internal content cache APIs.
2022-03-13 21:40:15 -07:00
Jarek Kowalski
69dc7ba969 feat(repository): added 'hint' to Prefetch methods. (#1825) 2022-03-12 23:16:39 -08:00
Jarek Kowalski
db7dcac33c feat(repo): exposed PrefetchContents on the repo.Repository() (#1824) 2022-03-12 14:36:54 -08:00
Jarek Kowalski
e591f4b79b chore(ci): skip non-deterministic tests when computing code coverage (#1817) 2022-03-09 07:42:01 -08:00
Jarek Kowalski
68c0d6e278 fix(snapshots): fixed snapshotting of mounted VSS snapshot roots (#1816) 2022-03-08 21:32:11 -08:00
Jarek Kowalski
c6944c70b1 fix(repository): fix deduplication when snapshotting identical files in parallel (#1815)
This issue was reported on Slack by Ming. Thanks!
This is particularly easy to reproduce when compression is used.
2022-03-08 20:11:06 -08:00
Jarek Kowalski
766cb57160 feat(ci): automatically bump homebrew version on tag (#1807) v0.10.6 2022-03-06 21:44:13 -08:00
Jarek Kowalski
53bc4d13f4 feat(ui): display snapshot description in snapshot list (#1806)
Fixes #1769
2022-03-06 21:09:20 -08:00
Jarek Kowalski
436933caa1 feat(kopiaui): support both left and right click to open tray menu (#1805)
* feat(kopiaui): support both left and right click to open tray menu

Fixes #1798

* feat(kopiaui): show all repository windows on double click
2022-03-06 21:09:01 -08:00
Jarek Kowalski
353e8b1ff4 feat(kopiaui): provide feedback for 'Check For Updates Now' (#1804)
Fixes #1797
2022-03-06 20:25:27 -08:00
Jarek Kowalski
133513c2cb feat(repository): removed noisy log output (#1803) 2022-03-06 18:51:23 -08:00
Jarek Kowalski
369d304084 refactor(repository): better context cancelation handling (#1802)
Instead of ignoring context cancelation in Open(), ensure we don't
spawn goroutines that might be canceled.
2022-03-06 16:56:30 -08:00