Commit Graph

1747 Commits

Author SHA1 Message Date
Jarek Kowalski
fcd507a56d Refactored most of the CLI tests to run in-process as opposed to using sub-processes (#1059)
* cli: fixed remaining testability indirections for output and logging

* cli: added cli.RunSubcommand() which is used in testing to execute a subcommand in the same process

* tests: refactored most e2e tests to invoke kopia subcommands in-process

* Makefile: enable code coverage for cli/ and internal/

* testing: pass 'testing' tag to unit tests which uses much faster (insecure) password hashing scheme

* Makefile: push coverage from PRs again

* tests: disable buffer management to reduce memory usage on ARM

* cli: fixed misaligned atomic field on ARMHF

also temporarily fixed statup-time benign race condition when setting
default on the timeZone variable, which is the last global variable.
2021-05-11 22:26:28 -07:00
Jarek Kowalski
41931f21ce repo: refactored password persistence (#1065)
* introduced passwordpersist package which has password persistence
  strategies (keyring, file, none, multiple) with possibility of adding
  more in the future.
* moved all password persistence logic out of 'repo'
* removed global variable repo.EnableKeyRing
2021-05-11 21:53:36 -07:00
dependabot[bot]
b844ce6b50 build(deps): bump electron-log from 4.3.4 to 4.3.5 in /app (#1039)
Bumps [electron-log](https://github.com/megahertz/electron-log) from 4.3.4 to 4.3.5.
- [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.3.4...v4.3.5)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 20:12:22 -07:00
dependabot[bot]
b5c3855c6b build(deps): bump github.com/aws/aws-sdk-go from 1.38.30 to 1.38.36 (#1061)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.30 to 1.38.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.38.30...v1.38.36)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 20:12:00 -07:00
dependabot[bot]
e5fecb1842 build(deps): bump google.golang.org/api from 0.45.0 to 0.46.0 (#1060)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.45.0 to 0.46.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.45.0...v0.46.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 20:11:42 -07:00
dependabot[bot]
dec9d9a6d3 build(deps): bump github.com/pkg/profile from 1.5.0 to 1.6.0 (#1062)
Bumps [github.com/pkg/profile](https://github.com/pkg/profile) from 1.5.0 to 1.6.0.
- [Release notes](https://github.com/pkg/profile/releases)
- [Commits](https://github.com/pkg/profile/compare/v1.5.0...v1.6.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-10 20:11:31 -07:00
Jarek Kowalski
281a7fcc95 e2e test refactoring (#1058)
* tests: refactored test directory creation into separate package

* mechanical: refactored e2e test output parsing and error handling
2021-05-08 11:15:31 -07:00
Jarek Kowalski
8a2167784d cli: final steps to remove last global variables for password and globalPasswordFromToken (#1056)
* cli: removed globalPassword variable

* cli: remove globalPasswordFromToken variable
2021-05-07 12:43:47 -07:00
Jarek Kowalski
9e861c9e05 Implemented index v2 builder and parser (#1028)
* content: added GetCompressionHeaderID and GetEncryptionKeyID to content.info

Both must be zero in index v1 but will be non-zero in index v2 to
support in-content compression and key rotation in the future.

* content: cleaned up index v1 code

* content: added index v2 implementation

* content: updated index test to verify that we're able to store all supported values in all Info fields

* content: optimized sorting of content.Info by content ID using bucket sort and parallelization

For 10M contents this reduces sort time from 10s to ~2s

* content: fixed a bunch of off-by-one errors in index v2, added tests

* content: fixed test failures due to increased validation

* content: plumbed through index version (currently hardcoded to v1) in content manager
2021-05-07 09:56:27 -07:00
Jarek Kowalski
a461d767f7 cli: plumbed through 'textOutput' which controls stdout/stderr writers (#1053)
This is mostly for testability.
2021-05-06 20:26:35 -07:00
dependabot[bot]
6c5d58bf7a build(deps): bump github.com/aws/aws-sdk-go from 1.38.26 to 1.38.30 (#1047)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.26 to 1.38.30.
- [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.38.26...v1.38.30)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-05-03 12:21:36 -07:00
Jarek Kowalski
d2288c443f cli: major refactoring (#1046)
cli: major refactoring of how CLI commands are registered

The goal is to eliminate flags as global variables to allow for better
testing. Each command and subcommand and most sets of flags are now
their own struct with 'setup()' methods that attached the flags or
subcommand to the provided parent.

This change is 94.3% mechanical, but is fully organic and hand-made.

* introduced cli.appServices interface which provides the environment in which commands run
* remove auto-maintenance global flag
* removed globals in memory_tracking.go
* removed globals from cli_progress.go
* removed globals from the update_check.go
* moved configPath into TheApp
* removed remaining globals from config.go
* refactored logfile to get rid of global variables
* removed 'app' global variable
* linter fixes
* fixed password_*.go build
* fixed BSD build
2021-05-03 10:28:00 -07:00
Josef Vogt
a56e099f2a Benchmark: Remove superfluous = in printout (#1043) 2021-05-01 11:20:50 -07:00
Eric Cheng
1a7a016dfa Update full maintenance automation explanation (#1042)
Full maintenance is now enabled by default in >=0.8.0
2021-05-01 07:05:33 -07:00
Sirish Bathina
dd41296f2a Tagging of kopia snapshots and listing of snapshots by tag (#1030) 2021-04-30 06:16:19 -07:00
Steve Joachim
d2b816934c robustness: add tests for kopia server repos (#1029)
* Add error handling for robustness Checker
* robustness engine updates for concurrency
* add client-server utils for multiclient robustness
* create client package for robustness tests
* create multi-client robustness test framework
* multi-client robustness test definitions
* update robustness test runner scripts
* Address unparam lint errors

Co-authored-by: Julio Lopez <julio+gh@kasten.io>
2021-04-29 21:45:13 -07:00
Josef Vogt
5fcf3895ac Add documentation for nginx reverse proxy (#1033) 2021-04-29 17:21:52 -07:00
Jarek Kowalski
170d2a21f9 site: fixed Google indexing
Reported on https://kopia.discourse.group/t/site-unlisted-on-search-engines/417
See https://github.com/google/docsy/issues/217
2021-04-28 06:42:06 -07:00
dependabot[bot]
cc0dd86ffa build(deps): bump cloud.google.com/go/storage from 1.14.0 to 1.15.0 (#1024)
Bumps [cloud.google.com/go/storage](https://github.com/googleapis/google-cloud-go) from 1.14.0 to 1.15.0.
- [Release notes](https://github.com/googleapis/google-cloud-go/releases)
- [Changelog](https://github.com/googleapis/google-cloud-go/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-cloud-go/compare/spanner/v1.14.0...spanner/v1.15.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-27 11:33:58 -07:00
dependabot[bot]
11d764dccc build(deps): bump github.com/aws/aws-sdk-go from 1.38.25 to 1.38.26 (#1026)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.25 to 1.38.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.38.25...v1.38.26)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-27 10:53:55 -07:00
Jarek Kowalski
df430371b9 Refactored content.Info to be an interface and switched index parsing to be lazy (#1008) 2021-04-27 05:53:52 -07:00
dependabot[bot]
5dffad9658 build(deps): bump google.golang.org/api from 0.44.0 to 0.45.0 (#1022)
Bumps [google.golang.org/api](https://github.com/googleapis/google-api-go-client) from 0.44.0 to 0.45.0.
- [Release notes](https://github.com/googleapis/google-api-go-client/releases)
- [Changelog](https://github.com/googleapis/google-api-go-client/blob/master/CHANGES.md)
- [Commits](https://github.com/googleapis/google-api-go-client/compare/v0.44.0...v0.45.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-27 01:11:49 -07:00
dependabot[bot]
2593cdebf6 build(deps): bump github.com/aws/aws-sdk-go from 1.38.22 to 1.38.25 (#1021)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.22 to 1.38.25.
- [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.38.22...v1.38.25)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-27 01:09:52 -07:00
ripytide
dd3933f13a Grammar fix. (#1023)
Another option could have been "which provide excellent features for *a* very reasonable price. Either grammar fix works but I personally prefer the plural version included in the PR.
2021-04-26 20:12:31 -07:00
Jarek Kowalski
0fb4ba41b5 ui: show a spinner when saving/deleting policy (#1018)
Fixes #999
2021-04-25 21:54:56 -07:00
Jarek Kowalski
a5e1ecbbad ui: open .gitignore help in a new window (#1016)
Fixes #1011
2021-04-25 21:24:10 -07:00
Jarek Kowalski
d81f3f1131 ci: do not upload artifacts from self-hosted runners, fixes build race (#1015)
Fixes #1014
2021-04-25 20:12:25 -07:00
Jarek Kowalski
d290c0a967 ui: do not attempt running maintenance if the current user is not the maintenance owner, to avoid producing error in the Tasks tab (#1010) 2021-04-24 12:37:06 -07:00
Jarek Kowalski
70a83b381b kopia-ui: for read-only repositories start a read-only source manager (#1009) 2021-04-24 11:02:33 -07:00
Jarek Kowalski
069299f21d Policy path validation (#1006)
* policy: added path validation to disallow non-root paths ending with slash or backslash

* ui: unified error alerts
2021-04-21 23:04:03 -07:00
Jarek Kowalski
62fab592f0 ui: fixed Estimate not honoring the defined policies (#1002) 2021-04-21 17:26:00 -07:00
Denis Fondras
3f29141c33 User must install npm manually on OpenBSD (#995)
* user must install npm manually with OpenBSD

* simplify and add freebsd rules
2021-04-20 19:51:29 -07:00
Julio Lopez
bd5bdaaf68 build(deps): bump github.com/aws/aws-sdk-go from 1.38.21 to 1.38.22 (#996)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.21 to 1.38.22.
- [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.38.21...v1.38.22)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 23:41:59 -07:00
Jarek Kowalski
74f926cb0d content: added content.Info.OriginalLength (#989) 2021-04-19 19:44:10 -07:00
dependabot[bot]
a2d31adcff build(deps): bump github.com/aws/aws-sdk-go from 1.38.18 to 1.38.21 (#994)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.18 to 1.38.21.
- [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.38.18...v1.38.21)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-19 10:25:18 -07:00
Denis Fondras
28b21ac900 be consistent in $(MAKE) usage (#992) 2021-04-18 11:58:45 -07:00
teepr
d235672ea0 Remove "KB" label from processed files count (#991) 2021-04-18 08:36:32 -07:00
Jarek Kowalski
2062c07259 mechanical field renames (#988)
* content: mechanical rename content.Info.Length -> content.Info.PackedLength
* server: renamed grpc API ContentInfo.length->packed_length (non-breaking)
2021-04-16 22:42:32 -07:00
Julio Lopez
643c769042 build(deps): bump electron-is-dev from 1.2.0 to 2.0.0 in /app (#984)
Bumps [electron-is-dev](https://github.com/sindresorhus/electron-is-dev) from 1.2.0 to 2.0.0.
- [Release notes](https://github.com/sindresorhus/electron-is-dev/releases)
- [Commits](https://github.com/sindresorhus/electron-is-dev/compare/v1.2.0...v2.0.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-16 22:23:43 -07:00
Jarek Kowalski
922bc7cbc8 ci: refactored credentials handling (#987)
This strengthens credential handling after our signing keys may have
been leaked in the [codecov.io breach](https://about.codecov.io/security-update/)

* pass only minimal credentials to each build step to avoid
  exposing sensitive tokens to tools that don't need them
  (like code coverage)
* removed encrypted credential files and replaced with environment-based
* allow full ci/cd including publishing artifacts from forks
* regenerated all passwords, tokens and service accounts
* do not install Google Cloud SDK on GHA - it's already there
* moved RPM signing to 'Stage And Publish Artifacts' phase
* generated new GPG signing key

See https://kopia.discourse.group/t/important-impact-of-codecov-io-security-issue-on-kopia-build-pipeline/377
2021-04-16 08:17:13 -07:00
Janne Johansson
e0e7f66a90 simple version of ospath to get default paths for openbsd systems. Based on the XDG version (#986)
Co-authored-by: Janne Johansson <janne.johansson@safespring.com>
2021-04-14 07:45:45 -07:00
Denis Fondras
2b6af55142 Allow to compile Kopia cli on OpenBSD (#983)
* allow to compile Kopia cli on OpenBSD
2021-04-13 12:45:04 -07:00
Julio López
a50d314953 build(deps): bump @fortawesome/free-regular-svg-icons in /htmlui (#978)
Bumps [@fortawesome/free-regular-svg-icons](https://github.com/FortAwesome/Font-Awesome) from 5.15.2 to 5.15.3.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.15.2...5.15.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-13 08:09:07 -07:00
Julio López
bbb65e97b0 build(deps): bump uuid from 7.0.3 to 8.3.2 in /app (#977)
Bumps [uuid](https://github.com/uuidjs/uuid) from 7.0.3 to 8.3.2.
- [Release notes](https://github.com/uuidjs/uuid/releases)
- [Changelog](https://github.com/uuidjs/uuid/blob/master/CHANGELOG.md)
- [Commits](https://github.com/uuidjs/uuid/compare/v7.0.3...v8.3.2)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-13 08:08:46 -07:00
Julio López
0d12cdc541 cleanup a few nits (#980)
* nit: remove unneeded assignment

* nit: remove unnecessary parameter from optionsFromFlags

Rename function as well.
Remove `opts` parameter since it was always nil.

* nit: remove unused opts parameter from openRepository

* cleanup: remove redundant translateError

* cleanup remove unused blob/providers package
2021-04-13 08:01:29 -07:00
Jarek Kowalski
2c3dfb7846 encryption: removed old, non-authenticated encryption methods (#979) 2021-04-12 21:24:19 -07:00
Jarek Kowalski
85aa5e67f2 build: added freebsd build (untested) with FUSE mounting disabled (#964)
* build: added freebsd build (untested) with mounting disabled until go-fuse has it

* renamed freebsd package names to include 'experimental'
2021-04-12 20:16:00 -07:00
dependabot[bot]
721c04c95d build(deps): bump google.golang.org/grpc from 1.36.1 to 1.37.0 (#965)
Bumps [google.golang.org/grpc](https://github.com/grpc/grpc-go) from 1.36.1 to 1.37.0.
- [Release notes](https://github.com/grpc/grpc-go/releases)
- [Commits](https://github.com/grpc/grpc-go/compare/v1.36.1...v1.37.0)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 20:12:49 -07:00
Julio López
51ca0189fa build(deps): bump github.com/aws/aws-sdk-go from 1.38.17 to 1.38.18 (#973)
Bumps [github.com/aws/aws-sdk-go](https://github.com/aws/aws-sdk-go) from 1.38.17 to 1.38.18.
- [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.38.17...v1.38.18)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 19:11:26 -07:00
Julio López
52240b7772 build(deps): bump @fortawesome/free-regular-svg-icons in /htmlui (#971)
Bumps [@fortawesome/free-regular-svg-icons](https://github.com/FortAwesome/Font-Awesome) from 5.15.2 to 5.15.3.
- [Release notes](https://github.com/FortAwesome/Font-Awesome/releases)
- [Changelog](https://github.com/FortAwesome/Font-Awesome/blob/master/CHANGELOG.md)
- [Commits](https://github.com/FortAwesome/Font-Awesome/compare/5.15.2...5.15.3)

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2021-04-12 18:57:47 -07:00