Commit Graph

3660 Commits

Author SHA1 Message Date
dependabot[bot]
a126800d66 build(deps): bump github.com/aws/aws-sdk-go from 1.44.36 to 1.44.37 (#2061)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.36 to 1.44.37.
- [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.44.36...v1.44.37)

---
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-06-18 15:46:59 -07:00
dependabot[bot]
5fe2fcc5cd build(deps): bump github.com/aws/aws-sdk-go from 1.44.35 to 1.44.36 (#2059)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.35 to 1.44.36.
- [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.44.35...v1.44.36)

---
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-06-16 18:30:33 -07:00
Shlok Chaudhari
06c8de08de test(cli): add separate test case for days in --retention-period flag (#2057) 2022-06-16 11:10:23 -07:00
dependabot[bot]
c887de0d24 build(deps): bump github.com/aws/aws-sdk-go from 1.44.34 to 1.44.35 (#2056)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.34 to 1.44.35.
- [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.44.34...v1.44.35)

---
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-06-16 00:49:26 -07:00
Shlok Chaudhari
493adba9cf fix(cli): update kingpin version to fix --retention-period and other time.Duration type flags (#2054)
* fix(cli): Update Kingpin dependency to fix time.Duration type flags like --retention-period
* test(cli): add a test for duration parser to parse days, weeks
2022-06-15 11:27:43 -07:00
Ali Dowair
c9ca61013e docs(site): update instructions on creating issues (#2053)
New issues should all be created in the main (`kopia/kopia`) project,
as that project is the most watched. Keeping all issues in one
central location will help us track and address them more
efficiently. We can use issue labels to indicate that an issue
relates to the UI or other auxiliary project.
2022-06-15 13:18:17 +03:00
Jarek Kowalski
4b2d349ce4 feat(ui): added 'Ignore Identical Snapshots' (#2049)
Contributeds by @basldfalksjdf, thanks!

Also upgraded React tooling to the latest version.
2022-06-15 06:21:21 +00:00
dependabot[bot]
9ac08ff36d build(deps): bump github.com/aws/aws-sdk-go from 1.44.33 to 1.44.34 (#2047)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.33 to 1.44.34.
- [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.44.33...v1.44.34)

---
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-06-14 22:11:42 -07:00
ashmrtn
61e651d30c feat(snapshots): Allow users to dynamically create entries in a directory during an upload (#1996)
* Allow dynamic directory entries with virtualfs

* Tests for new virtualfs implementation

* Add escape hatch for estimator during upload

Some virtualfs.StreamingDirectory-s may not be able to (efficiently)
support iterating through entries multiple times. Make a way for the
estimator to ask if they support multiple iterations and skip the
directory if they do not.

* Exapand Directory interface

Expand the Directory interface instead of making a new interface as it's
error-prone to ensure all wrapper types properly handle types that use
the new interface.

* Post-rebase fixes

* Make StreamingDirectory single iteration only

Simplify code and test slightly by not allowing users to declare a
StreamingDirectory that can be iterated through multiple times.

* Add better test for estimator ignoring stream dir

Previous test in uploader had a race condition, meaning it may not catch
all cases.

* Ignore atomic access in checklocks

Comparisons known to be done after all additions to the variables in
question.

* Implement reviewer feedback

* Remove unused function parameter
2022-06-14 19:08:49 -07:00
dependabot[bot]
07bad72874 build(deps): bump google.golang.org/api from 0.83.0 to 0.84.0 (#2046)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.83.0 to 0.84.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.83.0...v0.84.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-06-14 19:06:27 -07:00
Ali Dowair
eddde91f2d chore(snapshots): unify sparse and normal FS output paths (#1981)
* Unify sparse and normal IO output

This commit refactors the code paths that excercise normal and sparse
writing of restored content. The goal is to expose sparsefile.Copy()
and iocopy.Copy() to be interchangeable, thereby allowing us to wrap
or transform their behavior more easily in the future.

* Introduce getStreamCopier()

* Pull ioCopy() into getStreamCopier()

* Fix small nit in E2E test

We should be getting the block size of the destination file, not
the source file.

* Call stat.GetBlockSize() once per FilesystemOutput

A tiny refactor to pull this call out of the generated stream copier,
as the block size should not change from one file to the next within
a restore entry.

NOTE: as a side effect, if block size could not be found (an error
is returned), we will return the default stream copier instead of
letting the sparse copier fail. A warning will be logged, but this
error will not cause the restore to fail; it will proceed silently.
2022-06-14 18:09:45 +00:00
dependabot[bot]
13a06d2c03 build(deps): bump github.com/minio/minio-go/v7 from 7.0.27 to 7.0.28 (#2043)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.27 to 7.0.28.
- [Release notes](https://github.com/minio/minio-go/releases)
- [Commits](https://github.com/minio/minio-go/compare/v7.0.27...v7.0.28)

---
updated-dependencies:
- dependency-name: github.com/minio/minio-go/v7
  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-06-14 06:53:35 +00:00
dependabot[bot]
ef20cc8197 build(deps): bump github.com/pkg/sftp from 1.13.4 to 1.13.5 (#2041)
Bumps [github.com/pkg/sftp](https://github.com/pkg/sftp) from 1.13.4 to 1.13.5.
- [Release notes](https://github.com/pkg/sftp/releases)
- [Commits](https://github.com/pkg/sftp/compare/v1.13.4...v1.13.5)

---
updated-dependencies:
- dependency-name: github.com/pkg/sftp
  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-06-14 05:47:34 +00:00
dependabot[bot]
62c45b1f61 build(deps): bump github.com/aws/aws-sdk-go from 1.44.26 to 1.44.33 (#2039)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.26 to 1.44.33.
- [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.44.26...v1.44.33)

---
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-06-13 21:47:12 -07:00
basldfalksjdf
a78dacc0d1 feat(snapshots): add option to ignore empty snapshots being saved (#2036)
* Add policy to ignore empty snapshots being saved

* Update command_snapshot_create.go

* Update source_manager.go

* Update command_snapshot_create.go

* Update source_manager.go

* fixes

* Update source_manager.go

* Update command_snapshot_create.go

* fix

* fix

Co-authored-by: Mehak  Satija <mehaksatija@Mehaks-MacBook-Pro.local>
Co-authored-by: Mehak  Satija <mehaksatija@Mehaks-MBP.hitronhub.home>
2022-06-13 03:41:08 +00:00
Jarek Kowalski
ff54c7dd12 refactor(repository): re-enabled parallel uploads of blobs (#2034)
* refactor(repository): re-enabled parallel uploads of blobs

This fixes a performance regression where all blob writes were
serialized under a lock introduced by mistake in #1838.

Added regression test to prevent this in the future.

* added TestParallelUploadUploadsBlobsInParallel

* make linter happy again
2022-06-11 14:17:57 -07:00
dependabot[bot]
902ce4ebe0 build(deps): bump google.golang.org/api from 0.82.0 to 0.83.0 (#2033)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.82.0 to 0.83.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.82.0...v0.83.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-06-11 06:31:33 +00:00
dependabot[bot]
0c2985c6ae build(deps): bump github.com/stretchr/testify from 1.7.1 to 1.7.2 (#2032)
Bumps [github.com/stretchr/testify](https://github.com/stretchr/testify) from 1.7.1 to 1.7.2.
- [Release notes](https://github.com/stretchr/testify/releases)
- [Commits](https://github.com/stretchr/testify/compare/v1.7.1...v1.7.2)

---
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-06-11 06:08:03 +00:00
Julio Lopez
c6fba5468c chore(deps): allow at least 2 open PR to reduce HoL blocking (#2031) 2022-06-10 22:29:49 -07:00
Julio Lopez
df3be1c503 chore(deps): update dependabot frequency for Go deps (#2028)
Allow more frequent update while limiting the number of open PRs to 1.
Similarly, for GHA deps.
2022-06-10 22:18:40 -07:00
Julio Lopez
2f9f04a534 build(deps): bump github.com/klauspost/compress from 1.15.5 to 1.15.6 (#2009)
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.15.5 to 1.15.6.
- [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.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  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-06-11 02:23:08 +00:00
Jarek Kowalski
1ffad15069 chore(ci): upgraded linter to 1.46.2 (#2027) 2022-06-10 05:30:07 +00:00
Jarek Kowalski
bc88a8c705 fix(repository): fixed stress test caused by index leaking file handles (#2026)
Fixed regression caused by #1980

Switching to new mmap library uncovered a bug where we were not properly
closing indices that are no longer in use, since previous mmap had
a finalizer defined to do so.
2022-06-09 15:56:28 +00:00
Jarek Kowalski
4c5a6f4b3b chore(repository): fixed minor logger data race (#2025) 2022-06-09 12:51:16 +00:00
Jarek Kowalski
a2fdbdd717 chore(repository): reduced memory allocations when logging content.ID (#2024)
This fixes regression introduced in #1960.

Tested by backing up Linux 5.14.8 source on M1 Mac (average of 15 runs):

Before: duration=6.7s avg_heap_objects=7411657 avg_heap_bytes=871794888
After: duration=5.6s (17% faster) avg_heap_objects=5947800 (20% less) avg_heap_bytes=795762120 (9% less)
2022-06-09 06:23:45 +00:00
basldfalksjdf
94071072cb docs(site): updated directions for Google Cloud access (#2013)
* Update _index.md

* Update _index.md

* Update _index.md

Added endpoint option when using s3 for gcs connection
2022-06-07 20:56:02 -07:00
basldfalksjdf
cffc2489c0 docs(site): Update _index.md (#2017) 2022-06-07 20:55:39 -07:00
Jarek Kowalski
544dd41e7f fix(snapshots): fixed random deadlock when Uploader results in a failure (#2020)
* fix(snapshots): fixed random deadlock when Uploader results in a failure

The deadlock was caused by not properly waiting for all asynchronous
work to complete before closing the worker pool.

Introduced `workshare.AsyncGroup.Close()` and some assertions.

* fixed select race

* linter fix

* pr feedback
2022-06-07 18:37:08 -07:00
ashmrtn
ef8828a072 refactor(snapshots): Remove remaining internal uses of Readdir (#1986)
* Remove remaining internal uses of Readdir

* Remove old helpers and interface functions.

* Update tests for updated fs.Directory interface

* Fix index out of range error in snapshot walker

Record one error if an error occurred and it's not limiting errors

* Use helper functions more; exit loops early

Follow up on reviewer comments and reduce code duplication, use more
targetted functions like Directory.Child, and exit directory iteration
early if possible.

* Remove fs.Entries type and unused functions

Leave some functions dealing with sorting and finding entries in fs
package. This retains tests for those functions while still allowing
mockfs to access them.

* Simplify function return
2022-06-04 06:36:25 -07:00
Jarek Kowalski
7a3827a8ee refactor(snapshots): disable fine-grained Span creation when tracing is disabled (#2010)
This fixes memory usage increase from #1988
2022-06-04 03:55:46 +00:00
dependabot[bot]
17c520f244 build(deps): bump github.com/aws/aws-sdk-go from 1.44.22 to 1.44.26 (#2002)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.44.22 to 1.44.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.44.22...v1.44.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-06-03 18:06:21 -07:00
dependabot[bot]
6166ed4d83 build(deps): bump github.com/prometheus/common from 0.32.1 to 0.34.0 (#2006)
Bumps [github.com/prometheus/common](https://github.com/prometheus/common) from 0.32.1 to 0.34.0.
- [Release notes](https://github.com/prometheus/common/releases)
- [Commits](https://github.com/prometheus/common/compare/v0.32.1...v0.34.0)

---
updated-dependencies:
- dependency-name: github.com/prometheus/common
  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-06-03 15:44:17 -07:00
dependabot[bot]
49e5364f50 build(deps): bump google.golang.org/grpc from 1.46.2 to 1.47.0 (#2005)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.46.2 to 1.47.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.46.2...v1.47.0)

---
updated-dependencies:
- dependency-name: google.golang.org/grpc
  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-06-03 15:25:48 -07:00
dependabot[bot]
ef9913a2b4 build(deps): bump github.com/prometheus/client_golang (#2001)
Bumps [github.com/prometheus/client_golang](https://github.com/prometheus/client_golang) from 1.12.1 to 1.12.2.
- [Release notes](https://github.com/prometheus/client_golang/releases)
- [Changelog](https://github.com/prometheus/client_golang/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prometheus/client_golang/compare/v1.12.1...v1.12.2)

---
updated-dependencies:
- dependency-name: github.com/prometheus/client_golang
  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-06-03 10:47:38 -07:00
dependabot[bot]
7e9ea50286 build(deps-dev): bump concurrently from 7.1.0 to 7.2.1 in /app (#1998)
Bumps [concurrently](https://github.com/open-cli-tools/concurrently) from 7.1.0 to 7.2.1.
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v7.1.0...v7.2.1)

---
updated-dependencies:
- dependency-name: concurrently
  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-06-01 22:18:17 -07:00
dependabot[bot]
11677f1a9d build(deps): bump electron-log from 4.4.6 to 4.4.7 in /app (#1997)
Bumps [electron-log](https://github.com/megahertz/electron-log) from 4.4.6 to 4.4.7.
- [Release notes](https://github.com/megahertz/electron-log/releases)
- [Changelog](https://github.com/megahertz/electron-log/blob/master/CHANGELOG.md)
- [Commits](https://github.com/megahertz/electron-log/compare/v4.4.6...v4.4.7)

---
updated-dependencies:
- dependency-name: electron-log
  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-06-01 21:36:05 -07:00
dependabot[bot]
b9ed41dbeb build(deps): bump github.com/klauspost/compress from 1.15.2 to 1.15.5 (#2000)
Bumps [github.com/klauspost/compress](https://github.com/klauspost/compress) from 1.15.2 to 1.15.5.
- [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.15.2...v1.15.5)

---
updated-dependencies:
- dependency-name: github.com/klauspost/compress
  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-06-01 21:35:56 -07:00
dependabot[bot]
e7532076e4 build(deps): bump github.com/minio/minio-go/v7 from 7.0.24 to 7.0.27 (#2004)
Bumps [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) from 7.0.24 to 7.0.27.
- [Release notes](https://github.com/minio/minio-go/releases)
- [Commits](https://github.com/minio/minio-go/compare/v7.0.24...v7.0.27)

---
updated-dependencies:
- dependency-name: github.com/minio/minio-go/v7
  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-06-01 21:35:45 -07:00
dependabot[bot]
f1493b81ff build(deps): bump google.golang.org/api from 0.81.0 to 0.82.0 (#2003)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.81.0 to 0.82.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.81.0...v0.82.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-06-01 19:09:29 -07:00
Julio Lopez
65fc11ed58 fix(general): use a fixed time for protecting newly created content (#1994)
* test MinContentAgeSubjectToGC

* lint: move check for whether content is deleted to the caller to reduce gocycle complexity

* nit: add new lines before return

* log GC stats

* fix(maintenance): use a fixed time for protecting newly created content

Previously, the reference time used to determine whether a content had been
recently created would change througout a snapshot GC execution. For
long-running GC tasks, this non-deterministically shrinked the safety window
specified in `MinContentAgeSubjectToGC`.

Now, the snapshot GC starting time is used as a fix refererence for the
safety check.

* remove test entry point to avoid double execution of the test
2022-05-31 20:29:38 -07:00
Julio Lopez
511f4aa65d chore(cli): minor metrics-related cleanups (#1995)
* stop ticker to release resources
* nit: fix typo
* nit: add new line at EOF
2022-05-31 14:04:01 -07:00
Julio Lopez
99fb50118f fix(cli): add retention to JSON output (#1992)
refactor(cli): snapshot list JSON functionality.
Defines SnapshotManifest struct for the snapshot list JSON output.

test(cli): `snapshot list --json`
2022-05-31 13:43:42 -07:00
Jeremy Edwards
9167c08183 chore(ci): restrict GH actions for provider and stress tests to upstream repository. (#1989) 2022-05-29 02:27:04 +00:00
Jarek Kowalski
f5c64c8480 feat(snapshots): streaming upload support (#1963)
* feat(snapshots): switched repofs directory iteration to streaming

* feat(snapshots): switched ignorefs directory iteration to streaming

* feat(snapshots): switched mockfs iteration to streaming

* feat(snapshots): switched uploader to streaming mode

* fixed data race

* inlined foreachEntryUnlessCanceled
2022-05-28 13:20:40 -07:00
Jarek Kowalski
17c74e6386 feat(cli): added open telemetry tracing support (#1988)
New flag `--enable-jaeger-collector` and the corresponding
`KOPIA_ENABLE_JAEGER_COLLECTOR` environment variable enables Jaeger
exporter, which by default sends OTEL traces to Jaeger collector on
http://localhost:14268/api/traces

To change this, use environment variables:

* `OTEL_EXPORTER_JAEGER_ENDPOINT`
* `OTEL_EXPORTER_JAEGER_USER`
* `OTEL_EXPORTER_JAEGER_PASSWORD`

When tracing is disabled, the impact on performance is negligible.

To see this in action:

1. Download latest Jaeger all-in-one from https://www.jaegertracing.io/download/
2. Run `jaeger-all-in-one` binary without any parameters.
3. Run `kopia --enable-jaeger-collector snapshot create ...`
4. Go to http://localhost:16686/search and search for traces
2022-05-28 10:39:00 -07:00
Jarek Kowalski
e8c1cfe142 feat(cli): added flags for pushing kopia metrics (#1983)
When enabled, metrics are pushed to the provided Prometheus Push
Gateway at the start and end of each command and periodically every
few seconds.

```
--metrics-push-addr=http://address:port
--metrics-push-interval=5s
--metrics-push-job=kopia
--metrics-push-grouping=a:b --metrics-push-grouping=c:d
--metrics-push-username=user
--metrics-push-password=pass
```
2022-05-28 07:44:59 -07:00
Jarek Kowalski
680e3f29bb feat(repository): switched to using go-mmap for indexes (#1980)
* feat(repository): switched to using go-mmap for indexes

Previous mmap implementation only allowed io.ReaderAt API
this one allows direct access to the underlying bytes which helps
remove a bunch of buffers, copying and allocation in index parsing.

* let the compiler do bounds check

* removed one more unnecessary allocation

* pr feedback
2022-05-27 03:24:10 +00:00
Jarek Kowalski
bb9c2bf250 feat(snapshots): implemented iteration for local filesystem (#1967)
When combined with #1963, it significantly reduces memory usage.

When backing up Kopia enlistment with various binaries 2.8GB
(files:74180 dirs:12322):

Before: max memory 440MB, time 5.8s
After:  max memory 360MB, time 5.4s
2022-05-26 21:32:16 +00:00
Julio Lopez
6757489a00 build(deps): bump github.com/chromedp/chromedp from 0.8.1 to 0.8.2 (#1979)
Bumps [github.com/chromedp/chromedp](https://github.com/chromedp/chromedp) from 0.8.1 to 0.8.2.
- [Release notes](https://github.com/chromedp/chromedp/releases)
- [Commits](https://github.com/chromedp/chromedp/compare/v0.8.1...v0.8.2)

---
updated-dependencies:
- dependency-name: github.com/chromedp/chromedp
  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-05-26 06:44:00 +00:00
Julio Lopez
e9ca80dd27 refactor(cli): deprecate snapshot gc command (#1973)
* refactor(cli): deprecate `snapshot gc` command
* replace `snapshot gc` in tests with `maintenance run`
2022-05-26 05:51:36 +00:00