Commit Graph

18 Commits

Author SHA1 Message Date
Jarek Kowalski
8b760b66a8 logging: added memoization of Logger instances per context (#1369) 2021-10-09 05:02:18 -07:00
Jarek Kowalski
928150fe6b linter: upgrade to 1.42.1 (#1292) 2021-09-14 19:11:39 -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
Jarek Kowalski
f4347886b8 logging: simplified log levels (#954)
Removed Warning, Notify and Fatal:

* `Warning` => `Error` or `Info`
* `Notify` => `Info`
* `Fatal` was never used.

Note that --log-level=warning is still supported for backwards
compatibility, but it is the same as --log-level=error.

Co-authored-by: Julio López <julio+gh@kasten.io>
2021-04-09 07:27:35 -07:00
Jarek Kowalski
36fb13d0be fuse: switched to github.com/hanwen/go-fuse/v2 implementation (#829)
* fuse: switched to github.com/hanwen/go-fuse/v2 implementation

This supports latest MacFUSE (tested on 4.0.5 on Intel Mac).

* fuse: disabled direct IO which fixed macOS behavior

See https://github.com/hanwen/go-fuse/issues/390
2021-02-11 22:06:45 -08:00
Jarek Kowalski
e03971fc59 Upgraded linter to v1.33.0 (#734)
* linter: upgraded to 1.33, disabled some linters

* lint: fixed 'errorlint' errors

This ensures that all error comparisons use errors.Is() or errors.As().
We will be wrapping more errors going forward so it's important that
error checks are not strict everywhere.

Verified that there are no exceptions for errorlint linter which
guarantees that.

* lint: fixed or suppressed wrapcheck errors

* lint: nolintlint and misc cleanups

Co-authored-by: Julio López <julio+gh@kasten.io>
2020-12-21 22:39:22 -08:00
Jarek Kowalski
7cdb75ab79 fuse: changed file read implementation to avoid OOM (#620)
Changed file read implementation from ReadAll() to a Handle to avoid OOMing

We don't have automated tests for this but I verified this by restoring
13GB file over fuse and memory usage never exceeded 400MB.
2020-09-16 23:04:22 -07:00
Jarek Kowalski
9a6dea898b Linter upgrade to v1.30.0 (#526)
* fixed godot linter errors
* reformatted source with gofumpt
* disabled some linters
* fixed nolintlint warnings
* fixed gci warnings
* lint: fixed 'nestif' warnings
* lint: fixed 'exhaustive' warnings
* lint: fixed 'gocritic' warnings
* lint: fixed 'noctx' warnings
* lint: fixed 'wsl' warnings
* lint: fixed 'goerr113' warnings
* lint: fixed 'gosec' warnings
* lint: upgraded linter to 1.30.0
* lint: more 'exhaustive' warnings

Co-authored-by: Nick <nick@kasten.io>
2020-08-12 19:28:53 -07:00
Jarek Kowalski
6217df1a87 lint: switched to 1.21 and fixed a ton of whitespace issues discovered
by new wsl linter
2019-11-26 06:49:49 -08:00
Jarek Kowalski
1a7a02ddbe cleanup imports by grouping all local imports together 2019-06-01 10:57:55 -07:00
Jarek Kowalski
63303904e1 switched remaining fmt.Errorf to errors.Wrap() 2019-06-01 10:57:05 -07:00
Jarek Kowalski
242d012a54 removed fs.EntryMetadata and replaced fs.Entry with os.FileInfo + small additions 2018-11-03 11:28:06 -07:00
Jarek Kowalski
d8201229d8 plumbed through ctx in storage.Storage APIs and all uses 2018-04-03 17:39:54 -07:00
Jarek Kowalski
453bab3560 fixed some lint errors, mostly dead code and missing error checks 2018-03-19 12:26:28 -07:00
Jarek Kowalski
b08a35e92b refactored FS cache into reusable wrapper that can be applied on top of any filesystem abstraction 2017-09-04 17:42:50 -07:00
Jarek Kowalski
e8847b65cc mounting webdav works, changed how FS directory caching is implemented to be based solely on ObjectIDs 2017-09-02 08:29:59 -07:00
Jarek Kowalski
2c6213239a added cache expiration to fscache.Cache, so that entries based on ObjectID are cached for a very long time and others expire almost immediately.
This allows 'kopia mount all' to see newly created snapshots.
2017-08-29 21:47:06 -07:00
Jarek Kowalski
d613d99f7e beginnings of WebDAV mounting support, not really working yet, need to do have better caching 2017-08-27 15:02:56 -07:00