Commit Graph

3040 Commits

Author SHA1 Message Date
Jarek Kowalski
64a0df6f4e fix(ui): changed default tab to Snapshots (#3308) v0.14.0 2023-09-16 10:01:13 -07:00
Jarek Kowalski
6d513ea00a fix(kopiaui): fixed opening file browser for mounted directories (#3307) 2023-09-16 09:53:04 -07:00
Christoph Anderson
a4eeed93cb feat(kopiaui): Retain window size and location after close (#3302)
* Minor refactoring. Added electron-store as a
new dependency. Electron windows now store their size.

* Removed package.json and package-lock.json

* Update electron.js

fixed typos

---------

Co-authored-by: lupusA <lupuapps@gmail.com>
Co-authored-by: Jarek Kowalski <jaak@jkowalski.net>
2023-09-16 16:19:56 +00:00
Jarek Kowalski
3cf3fad129 chore(ci): upgraded UI (#3305) 2023-09-16 08:58:53 -07:00
Jarek Kowalski
af1550ad81 feat(server): reduce server refreshes of the repository (#3265)
* feat(server): reduce server refreshes of the repository

Previously each source would refresh itself from the repository
very frequently to determine the upcoming snapshot time. This change
refactors source manager so it does not own the repository connection
on its own but instead delegates all policy reads through the server.

Also introduces a new server scheduler that is responsible for
centrally managing the snapshot schedule and triggering snapshots
when they are due.

* Update cli/command_server_start.go

Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com>

* Update internal/server/server.go

Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com>

* Update internal/server/server_maintenance.go

Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com>

* pr feedback

---------

Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com>
2023-09-15 12:08:35 -07:00
Jarek Kowalski
14ab42a7b0 fix(repository): removed useless log (#3299) 2023-09-14 23:28:15 -07:00
Julio Lopez
eac341ea3a chore(deps): use commit id for GH action versions (#3298)
* deps(gha): use commit id for actions/setup-go version 4.1.0
* deps(gha): add comment with semver for golang/govulncheck-action
* deps(gha): upgrade actions/upload-artifact to v3.1.3
  Release notes: https://github.com/actions/upload-artifact/releases
* deps(gha): upgrade codecov-action to 3.1.4
  Release notes: https://github.com/codecov/codecov-action/releases/tag/v3.1.4
2023-09-14 14:42:22 -07:00
dependabot[bot]
bd7efef734 build(deps): bump ossf/scorecard-action from 2.1.2 to 2.2.0 (#3291)
Bumps [ossf/scorecard-action](https://github.com/ossf/scorecard-action) from 2.1.2 to 2.2.0.
- [Release notes](https://github.com/ossf/scorecard-action/releases)
- [Changelog](https://github.com/ossf/scorecard-action/blob/main/RELEASE.md)
- [Commits](e38b1902ae...08b4669551)

---
updated-dependencies:
- dependency-name: ossf/scorecard-action
  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>
Co-authored-by: Julio Lopez <1953782+julio-lopez@users.noreply.github.com>
2023-09-14 14:11:50 -07:00
dependabot[bot]
3090bb1c18 build(deps): bump github/codeql-action from 2.2.4 to 2.21.5 (#3292)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2.2.4 to 2.21.5.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](17573ee1cc...00e563ead9)

---
updated-dependencies:
- dependency-name: github/codeql-action
  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>
2023-09-14 14:02:12 -07:00
dependabot[bot]
022478b229 build(deps): bump actions/checkout from 3.1.0 to 4.0.0 (#3290)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3.1.0 to 4.0.0.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3.1.0...3df4ab11eba7bda6032a0b82a6bb43b11571feac)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-13 16:43:21 -07:00
Jarek Kowalski
abb5922085 chore(ci): switched back to LTS version of Ubuntu for Docker image (#3295) 2023-09-12 22:32:27 -07:00
Jarek Kowalski
164dcceb11 feat(server): introduced generic scheduler (#3293)
This is a generic scheduler that executes a loop consisting of:

- determining upcoming set of events
- waiting until the appropriate time
- triggering the events
2023-09-12 07:37:41 -07:00
PhracturedBlue
30d6ef2ceb feat(ui): Allow specifying whether local or all snapshots are shown by default in the UI (#3289) 2023-09-11 22:49:36 -07:00
PhracturedBlue
741fbd4442 feat(server): Add socket-activation support (#3283) 2023-09-10 19:46:28 -07:00
Christoph Hecht
3257abbd17 docs(site): Add LVM example for actions (#3286)
* Add LVM example for actions

* Fix wording of LVM example
2023-09-10 19:45:19 -07:00
Jarek Kowalski
aa064bb442 fix(providers): fixed list/get caching with rclone providers (#3284)
Added improved providervalidation logic which tests for read-after-write
property between connections. The new test was failing before the change
and is now passing for Google Drive, OneDrive and DropBox.
2023-09-09 13:07:53 -07:00
Julio Lopez
c4a3ddc514 chore(ci): use 'with.go-version-file' in actions/setup-go (#3282)
This simplifies managing the Go version used in CI, as it will
only require updating the `go.mod` file on a version upgrade.
2023-09-08 17:36:57 -07:00
Jarek Kowalski
8736fca3aa chore(ci): always use latest patch version of Go (#3280) 2023-09-08 07:20:32 -07:00
Jarek Kowalski
f0f0075e21 chore(ci): upgrade golang to 1.21 (#3277) 2023-09-07 20:27:25 -07:00
Jarek Kowalski
20f2900eee chore(ci): upgrade rclone to 1.63.1 (#3278) 2023-09-06 20:14:39 -07:00
Jarek Kowalski
06af162394 fix(cli): added output to indicate completion of snapshot verification (#3275) 2023-09-06 19:53:16 -07:00
Julio Lopez
c9e8347821 chore(ci): add OSSF Scorecard workflow (#3260) 2023-09-05 19:25:46 -07:00
dependabot[bot]
c038839169 build(deps): bump actions/checkout from 3 to 4 (#3271)
* build(deps): bump actions/checkout from 3 to 4

Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

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

* pin version for action/checkout

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Julio Lopez <1953782+julio-lopez@users.noreply.github.com>
2023-09-06 01:31:08 +00:00
dependabot[bot]
e264f60c8b build(deps): bump github.com/google/fswalker from 0.3.0 to 0.3.2 (#3268)
Bumps [github.com/google/fswalker](https://github.com/google/fswalker) from 0.3.0 to 0.3.2.
- [Commits](https://github.com/google/fswalker/compare/v0.3.0...v0.3.2)

---
updated-dependencies:
- dependency-name: github.com/google/fswalker
  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>
2023-09-04 21:09:02 -07:00
dependabot[bot]
1d55d45bc4 build(deps): bump the common-golang-dependencies group with 4 updates (#3273)
Bumps the common-golang-dependencies group with 4 updates: [github.com/minio/minio-go/v7](https://github.com/minio/minio-go), [golang.org/x/sys](https://github.com/golang/sys), [golang.org/x/term](https://github.com/golang/term) and [golang.org/x/text](https://github.com/golang/text).


Updates `github.com/minio/minio-go/v7` from 7.0.62 to 7.0.63
- [Release notes](https://github.com/minio/minio-go/releases)
- [Commits](https://github.com/minio/minio-go/compare/v7.0.62...v7.0.63)

Updates `golang.org/x/sys` from 0.11.0 to 0.12.0
- [Commits](https://github.com/golang/sys/compare/v0.11.0...v0.12.0)

Updates `golang.org/x/term` from 0.11.0 to 0.12.0
- [Commits](https://github.com/golang/term/compare/v0.11.0...v0.12.0)

Updates `golang.org/x/text` from 0.12.0 to 0.13.0
- [Release notes](https://github.com/golang/text/releases)
- [Commits](https://github.com/golang/text/compare/v0.12.0...v0.13.0)

---
updated-dependencies:
- dependency-name: github.com/minio/minio-go/v7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/sys
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/term
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: common-golang-dependencies
- dependency-name: golang.org/x/text
  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>
2023-09-04 21:08:46 -07:00
Jarek Kowalski
532d083dc8 feat(ui): imported latest UI changes (#3272)
* https://github.com/kopia/htmlui/pull/177
* https://github.com/kopia/htmlui/pull/141
2023-09-04 19:51:44 -07:00
Jarek Kowalski
b352305c9d feat(cli): added '--otlp-trace' flag that replaces Jaeger tracing with OTLP over gRPC (#3264)
Jaeger exporter support is now deprecated upstream, so we need to move
to OTLP. Fortunately Jaeger supports OTLP out of the box.
See https://www.jaegertracing.io/docs/1.48/deployment/

To configure the exporter, use environment variables as described in
https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/protocol/exporter.md#configuration-options
2023-09-04 19:48:28 -07:00
dependabot[bot]
58fbdd84bf build(deps): bump github.com/hanwen/go-fuse/v2 from 2.3.0 to 2.4.0 (#3270) 2023-09-05 01:16:32 +00:00
Jarek Kowalski
af7b97f70a chore(ci): added exponential back-off to gettool (#3267) 2023-09-04 09:07:48 -07:00
Jarek Kowalski
044db7593b feat(repository): apply retention policies server-side (#3249)
* feat(repository): apply retention policies server-side

This allows append-only snapshots where the client can never delete
arbitrary manifests and policies are maintained on the server.

The client only needs permissions to create snapshots in a given, which
automatically gives them permission to invoke the server-side method
for their own snapshots only.

* Update cli/command_acl_add.go

Co-authored-by: Guillaume <Gui13@users.noreply.github.com>

* Update internal/server/api_manifest.go

Co-authored-by: Guillaume <Gui13@users.noreply.github.com>

* Update internal/server/api_manifest.go

Co-authored-by: Guillaume <Gui13@users.noreply.github.com>

* Update internal/server/grpc_session.go

Co-authored-by: Guillaume <Gui13@users.noreply.github.com>

---------

Co-authored-by: Guillaume <Gui13@users.noreply.github.com>
2023-09-02 18:23:21 -07:00
Jarek Kowalski
80423cf5f6 feat(server): fixed server logging file & console (#3262)
Previously some logs from a running server were only kept in memory
(including storage activity logs) which was confusing to many folks.

This changes the behavior so that logs are sent to their regular
(console/file) file locations in addition to the UI tasks.

Old behavior can be restored by adding `--no-persistent-logs` to
server.
2023-09-02 18:10:18 -07:00
dependabot[bot]
8df0e07e99 build(deps-dev): bump the kopia-ui-npm-dependencies group (#3261)
Bumps the kopia-ui-npm-dependencies group in /app with 4 updates: [@playwright/test](https://github.com/Microsoft/playwright), [concurrently](https://github.com/open-cli-tools/concurrently), [electron](https://github.com/electron/electron) and [playwright](https://github.com/Microsoft/playwright).


Updates `@playwright/test` from 1.36.2 to 1.37.1
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.36.2...v1.37.1)

Updates `concurrently` from 8.2.0 to 8.2.1
- [Release notes](https://github.com/open-cli-tools/concurrently/releases)
- [Commits](https://github.com/open-cli-tools/concurrently/compare/v8.2.0...v8.2.1)

Updates `electron` from 25.3.2 to 26.1.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/v25.3.2...v26.1.0)

Updates `playwright` from 1.36.2 to 1.37.1
- [Release notes](https://github.com/Microsoft/playwright/releases)
- [Commits](https://github.com/Microsoft/playwright/compare/v1.36.2...v1.37.1)

---
updated-dependencies:
- dependency-name: "@playwright/test"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: concurrently
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: electron
  dependency-type: direct:development
  update-type: version-update:semver-major
  dependency-group: kopia-ui-npm-dependencies
- dependency-name: playwright
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: kopia-ui-npm-dependencies
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-09-02 16:04:53 -07:00
Jarek Kowalski
20928258d6 test(general): fixed TestOnNthCompletion test flake, which was 1-5/10000 runs (#3263) 2023-09-02 16:04:36 -07:00
Julio Lopez
1320f0c8e8 chore(general): remove unnecessary //nolint directives (#3256) 2023-08-29 12:40:40 -07:00
Julio Lopez
d637814a5a chore(ci): add govulncheck step to lint workflow (#3252) 2023-08-27 23:53:18 -07:00
Jarek Kowalski
fe55dcb6a2 feat(repository): added hard size limit to the on-disk cache (#3238)
* test(providers): added capacity limits to blobtesting.mapStorage

* refactor(general): added mutex map which dynamically allocates and releases named mutexes

* refactor(repository): refactored cache cleanup and limit enforcement

* refactor(repository): plumb through cache size limits in the repository

* feat(cli): added CLI options to set cache size limits

* unified flag setting and field naming

* Update cli/command_cache_set.go

Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com>

* pr feedback

---------

Co-authored-by: Shikhar Mall <mall.shikhar.in@gmail.com>
2023-08-24 09:38:56 -07:00
Julio Lopez
1fd1ff0151 chore(ci): add page with workflow status badges for quick reference (#3248) 2023-08-23 17:38:07 -07:00
Le Tran
cde557b0bf feat(providers): allow other GCS OAuth2.0 credential types (#3064)
Change google client to accept more credentials type, including json config file for workload identity federation
Refactor tokenSourceFromCredentialsFile to remove duplicate code
Add unit tests

---------

Co-authored-by: Le Tran <le.tran@kasten.io>
Co-authored-by: Julio Lopez <1953782+julio-lopez@users.noreply.github.com>
2023-08-23 16:29:44 -07:00
Julio Lopez
49621f6a44 fix(general): add checklocks annotation (#3247) 2023-08-23 16:26:08 -07:00
Vaibhav Kamra
2f1a63f47d feat(repository): allow configuring auto compaction count (#3240) 2023-08-23 15:38:06 -07:00
Jarek Kowalski
1120e4f629 chore(ci): reenable check-locks after the fix was merged upstream (#3245) 2023-08-22 19:41:03 -07:00
ashmrtn
42c251f4da Add options struct to test helper (#3244)
Use an options struct to make it more obvious when tests are running
with read only storage.
2023-08-23 00:00:53 +00:00
ashmrtn
af08a41222 fix(repository): Disable manifest manager compaction when in read-only mode (#3226)
* Thread ReadOnly option to manifest manager

Don't allow attempting to compact manifests if the repo was opened
read-only.

* Add test for disabling compaction in readonly mode

* Allow content manager to say if it's readonly

This can be leveraged by higher layers to determine if they should
attempt operations such as manifest compaction.

* Rework manifest compaction checks

Use whether the content manager is in read-only mode to help determine
if manifests should be compacted or not.
2023-08-21 17:55:39 -07:00
dependabot[bot]
17c7e45c3d build(deps): bump the common-golang-dependencies group with 4 updates (#3242)
Bumps the common-golang-dependencies group with 4 updates: [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go), [github.com/Azure/azure-sdk-for-go/sdk/azidentity](https://github.com/Azure/azure-sdk-for-go), [github.com/minio/minio-go/v7](https://github.com/minio/minio-go) and [google.golang.org/api](https://github.com/googleapis/google-api-go-client).


Updates `cloud.google.com/go/storage` from 1.31.0 to 1.32.0
- [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/pubsub/v1.31.0...pubsub/v1.32.0)

Updates `github.com/Azure/azure-sdk-for-go/sdk/azidentity` from 1.3.0 to 1.3.1
- [Release notes](https://github.com/Azure/azure-sdk-for-go/releases)
- [Changelog](https://github.com/Azure/azure-sdk-for-go/blob/main/documentation/release.md)
- [Commits](https://github.com/Azure/azure-sdk-for-go/compare/sdk/azcore/v1.3.0...sdk/azcore/v1.3.1)

Updates `github.com/minio/minio-go/v7` from 7.0.61 to 7.0.62
- [Release notes](https://github.com/minio/minio-go/releases)
- [Commits](https://github.com/minio/minio-go/compare/v7.0.61...v7.0.62)

Updates `google.golang.org/api` from 0.137.0 to 0.138.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.137.0...v0.138.0)

---
updated-dependencies:
- dependency-name: cloud.google.com/go/storage
  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-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: common-golang-dependencies
- dependency-name: github.com/minio/minio-go/v7
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: common-golang-dependencies
- dependency-name: google.golang.org/api
  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>
2023-08-22 00:40:42 +00:00
dependabot[bot]
f37632b428 build(deps): bump github.com/google/uuid from 1.3.0 to 1.3.1 (#3243)
Bumps [github.com/google/uuid](https://github.com/google/uuid) from 1.3.0 to 1.3.1.
- [Release notes](https://github.com/google/uuid/releases)
- [Changelog](https://github.com/google/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/uuid/compare/v1.3.0...v1.3.1)

---
updated-dependencies:
- dependency-name: github.com/google/uuid
  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>
2023-08-21 17:31:40 -07:00
ashmrtn
b57d16d4a7 fix(repository): skip epoch compaction and advancement on read-only storage (#3225)
* Set epoch manager not to compact if readonly

Thread read-only parameter through the stack and make use of it when
loading epochs.

* Add test for manager read-only mode

Uses a bit of a contrived setup, but the state used in the test is
possible to reach given the right set of conditions and can cause the
manager to get stuck trying to refresh.

* Pull read-only status from Storage provider
2023-08-21 15:29:13 -07:00
ashmrtn
29320a7c33 refactor(providers): Create default provider that has common functions (#3241)
* Rename UnsupportedBlobRetention struct

Rename this struct to DefaultProviderImplementation in preparation for
adding other simple "default" functionality to it.

* Add other functions to default provider

Add other simple function implementations to the default provider so
that other providers can just embed this to get basic behavior.

* Cleanup existing users of default provider

* Add default provider to remaining storage types

Add the default provider to remaining storage providers and remove
functions that are now implemented by the default provider.
2023-08-21 15:27:15 -07:00
ashmrtn
08c58d53b6 feat(providers): Create IsReadOnly API for blob storage (#3230)
* Add new blob.Storage call to see if it's readonly

Return whether the storage is readonly so higher layers in the stack can
selectively disable some functionality if needed, like compaction.

Co-authored-by: Julio Lopez <1953782+julio-lopez@users.noreply.github.com>
2023-08-21 17:00:50 +00:00
PhracturedBlue
9237b29023 feat(server): add server support for unix domain sockets (#3216)
* Add server support for unix domain sockets

* Ensure socket path < 104 bytes for UDS test
2023-08-20 17:17:20 -07:00
Jarek Kowalski
a12f81bb6f chore(ci): upgraded linter to 1.54.0 (#3239) 2023-08-20 17:00:32 -07:00