* Enable line width linter
Set to 120 which should be long enough to not be annoying but keep
things from getting "too long." Adding to get rid of the subjectiveness
of what is "too long." Tabs count as a single character.
Explicitly check for the linter version as different versions can return
different results. Currently the desired version is hard-coded, but may
be sourced from the github workflow file in the future.
`exchange`.Contacts added to Collection retrieval option base through the use of a selector.
The ExchangeDataCollection Function to be updated to make the function `Live` to be called externally
* Remove artificial limit on kopia directories
Originally did not allow a directory to have both child directories and
items. Remove that limit and move logic to execute callbacks on static
items to the iteration function.
* Update tests for new kopia directory structure
Backup function `DataExchangeCollections` supports the ability to backup a single file using the `selectors` package. Support files and documentation updated accordingly
* Turn on revive linter, ignore only a few things
* Fix lint errors
Ignore shadowing of 'suite' in tests for now. Also move some constants
that had the same value to tester.
Makes the necessary changes, including adding helper
funcs, to bring the CLI up to an integration-testable
state. The changes made in this commit should be
sufficient for most other CLI tests. Includes a single
test as verification.
* Add import order linter
Error messages aren't the most clear/helpful, but they will point you to
the lines that need modifying.
* Adjust max errors reported
* Fix lint errors
Selectors and scope information are used to create the correct populate methods. Populate methods changed to fit type abstractions definitions for iteration, querying, and collection population.
Kopia maintainer mentioned this was a better way to deal with it than
the old version. Mostly superficial changes to logic.
Always safe to flush the write session during an upload. That will
ensure write sessions are closed. Validity of the uploaded data will
be via reachability of the data in the repo.
Drawback is if there's a problem flushing the write session it will
return that error instead of the original error (if there was one)
In order to both maintain control of test env data, as
well as ensure open-source users are able to run the
integration tests on personal account data, the test
user must be derived from the test configuration, rather
than hardcoded within the tests.
The alias of testing to ctesting prevented auto-importing
of the testing library. This change (arbitrarily) renames
the package so that it doesn't collide with the core pkg
for "testing".
`Items()` starts populate method for collection for the `exchange.Collection` package. Test packages expanded to verify the functionality of this feature.
Cobra's RunE causes every error response to display the
CLI help menu for the current command, after printing the
original error itself. This made error outputs difficult to
read, and was generally unhelpful in most cases. The exit
func in Print now prints the error and closes the CLI without
showing the help menu.
In order for sdk users to build an operation using a repo,
without importing /inernal packages, the operation
options needs to be available via a /pkg package.
* return errors if selectors reduce all entries
During a `backup details` or `restore` command, if the
selectors produce 0 results, return an error rather than
running a no-op process.
* add jsonDebug, MinimumPrintable to interface
We want to optionally print print either debugging
(containing all internal data) or user-friendly json
outputs. This requires a new flag: json-debug, and
an extension to the Print interface: minimumPrintable.