625 Commits

Author SHA1 Message Date
Abin Simon
9d5c53299d
Fix go mod download in checkout action (#1128)
* Fix go mod download in checkout

* Make CI filechange checker .github/actions

Co-authored-by: Keepers <ryanfkeepers@gmail.com>
2022-10-11 17:30:34 -06:00
Niraj Tolia
8309e3978e
Add cookie policy (#1135) 2022-10-11 12:32:16 -07:00
Abin Simon
658ebec0da
Update gotestfmt package repo in CI (#1103)
The package was moved to gotesttools org with the original one being
deleted soon.
2022-10-11 16:38:57 +05:30
Abin Simon
62c704a786
Fix issue with docs lint (#1102)
* Fix docs lint

* Fix log upload path
2022-10-11 08:50:11 +05:30
ashmrtn
f4befaf849
Allow purge command to delete OneDrive folders (#1094)
* Add functions for OneDrive purge

function is setup to return and take purgable instead of just userID,
itemID for deleter.

* Adjust other functions to take purgable

Adjust interface for deleter so that it allows more information to the
delete function. The called function can cast the purgable it was passed
back to the type that was returned by the getter function.

* Move struct definition

Per reviewer comment move struct definition to OneDrive package instead
of leaving in purge command.

* Fix lint error

Likely slipped through while GitHub actions was having issues.
2022-10-10 18:16:46 -07:00
Georgi Matev
2de54a920c
Replace TODOs with Corso output (#1120) 2022-10-10 16:43:25 -07:00
ashmrtn
ab229ba433
Replace OneDrive reference with Exchange (#1100)
## Description

Wrong service referenced in restore output

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* closes #1099 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-10-10 23:03:25 +00:00
Keepers
2cc9b7bc1d
add progress display handler and api (#1116)
## Description

Adds a new package- Observe- for owning user-
oriented displays like progress bars.  This PR adds
an initial progress bar to onedrive backups as a
proof-of-concept.  The API is more important than
the specific progress bar package at this time.
Future changes may opt for a different pkg.

Display format currently looks like:
```
59% [=============>           ] (6.9/12 kB, 14 MB/s)  |  Item_Name.txt
```

Known Issues:
* the `progressbar` package does not support multiline output, and [the author is not planning to add support](https://github.com/schollz/progressbar/issues/6).  This causes concurrent items to overwrite each other.  We will either need to fork the library, or change to a different one.  

## Type of change

- [x] 🌻 Feature

## Issue(s)

* #1112

## Test Plan

- [x] 💪 Manual
- [x]  Unit test
2022-10-10 22:53:48 +00:00
ashmrtn
ec916bc1b3
Test ensuring shortrefs are unique for edgecase (#1105)
## Description

Some paths can generate identical unescaped strings even though they have different elements. Add a test ensuring they generate unique ShortRefs even under these conditions.

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* closes #1092 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-10 22:47:23 +00:00
Keepers
0b65b20200
attach logger to test ctx, use flusher (#1083)
## Description

Replace all cases of context.Background() and
context.TODO() with the testing ctx, which seeds
a logging instance into the context.  The seed is
less important than the flush action, since errant log.Ctx(ctx) calls will automatically use the log
singleton.  But in order for the logs to show up
within the test, they need to get flushed.

See my comments for focus on non-chaff changes.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #902

## Test Plan

- [x] 💪 Manual
- [x]  Unit test
2022-10-10 21:14:10 +00:00
Danny
211c248f35
GC: Iterative Function: Bug fix (#1110)
## Description
Contact Iterative sequence tests changed to reflect `exchange.Backup` functions used within `SetupExchangeCollectionVars()`. The previous bug was caused by misalignment from the old test configuration and the current implementation.
<!-- Insert PR description-->

## Type of change

- [x] 🐛 Bugfix


## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* closes  #1107<issue>

## Test Plan

- [x]  Unit test
2022-10-10 18:22:31 +00:00
Abin Simon
1793cc3757
Setup CI for release (#1052)
* Setup CI for release

* Initial commit of CHANGELOG.md

* Pin vale and markdownlint-cli to current versions

* Update branch name for CI

* Pull request workflow job
2022-10-10 11:00:55 +05:30
ashmrtn
dd7710ca5b
OneDrive get and delete folder functions (#1093)
## Description

Useful helper functions for the purge script

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* #1090 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-08 01:34:15 +00:00
Danny
a5140d20b2
GC: Backup: CI: Stabilize Iterator test (#1079)
## Description
CI test timing during times of high activity. Reduced test suite to cover Inbox and adjusted outputs accordingly. 
<!-- Insert PR description-->

## Type of change

- [x] 🐛 Bugfix

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
*closes  #1078<issue>

## Test Plan

- [x]  Unit test
2022-10-07 18:55:17 +00:00
Danny
0724db938c
GC: CI: Streamline Tests and Reduction (#1082)
* Reduction of duplicated tests.  Removal of tests that are checked in other functions.
2022-10-07 13:01:37 -04:00
Georgi Matev
e63b31b651
Updated permissions for Azure AD App (#1081)
## Description

Updated permissions for Azure AD App

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [x] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* Fixes #1060  

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [] 💚 E2E
2022-10-07 02:00:07 +00:00
Niraj Tolia
bb3474f083
Trivial: Add missing period in the README (#1076)
## Description

Trivial: Add missing period in the README
2022-10-06 19:20:33 +00:00
Georgi Matev
c4eed04483
Fill in developer/build.md page placeholder (#1065)
## Description

* Fill in developer/build.md page placeholder
* Fix some liniting issues

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [x] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-10-06 17:57:32 +00:00
Keepers
89668ed164
describe time value standards, validate time flags (#1066)
## Description

Adds validation of cli inputs for time-based flags.
All time values that can be parsed by the time
handling in common count as supported, even
though official support includes a smaller set.

Also adds some clean-up to time.go and adds a
design document describing standard time value
formats, and the maintenance thereof, in corso.

## Type of change

- [x] 🌻 Feature
- [x] 🗺️ Documentation
- [x] 🤖 Test

## Issue(s)

* #943
* #924

## Test Plan

- [x]  Unit test
- [x] 💚 E2E
2022-10-06 17:46:21 +00:00
Georgi Matev
cffb00c44b
Fixes an issue with using HTML in autogenerated markdown (#1073) 2022-10-06 10:14:29 -07:00
github-actions[bot]
209a977901
Docs Auto-Generation (#1051)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
2022-10-06 16:44:52 +00:00
Niraj Tolia
9c6b8ec37e
Remove some license boilerplate (#1071)
## Description

Remove some license boilerplate
2022-10-06 16:43:52 +00:00
Niraj Tolia
f3b66aab0b
Update README with LICENSE info (#1070)
## Description

Update README with LICENSE info

## Type of change

- [x] 🗺️ Documentation
2022-10-06 16:42:49 +00:00
Niraj Tolia
1d1e5ed006
Update README and upgrade COC (#1068)
## Description

Update README and upgrade COC

- Adds badges for Discord, License, COC
- Upgrades COC

## Type of change

- [x] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor
2022-10-06 11:10:12 +00:00
Keepers
30f35709be
purge restored load test folders (#1059)
## Description

purge restored folders for all users in the tenant following a load test to ensure we don't over-
produce data that causes future tests to time out.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #1048

## Test Plan

- [x] 💪 Manual
- [x] 💚 E2E
2022-10-06 01:20:17 +00:00
ashmrtn
b9e33901f4
Add versions to models (#1064)
## Description

Currently only the ModelStore populates and checks versions.

Some high-level points:
* fail any sort of get (just metadata or full model) if there's a version mismatch
* update operations automatically set things to the current version
* versions are stored as tags so there's some int->string (and vice versa) munging
* versions stored as tags so they can be repopulated even if only the metadata (BaseModel) for a model is pulled. This is done mostly for consistency

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* closes #284 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-06 00:46:49 +00:00
Keepers
78632f56e7
remove --all flag support, minor cleanup (#1047)
## Description

Removes the -all flag from the exchange cli.  The
same functionality can be gained with the flag
--user *.

Additionally does some minor tidying of other
comments and outputs throughout the cli.

## Type of change

- [x] 🐹 Trivial/Minor

## Issue(s)

* #1032

## Test Plan

- [x]  Unit test
2022-10-06 00:10:56 +00:00
Keepers
cba065ec94
reduce load test to default folders (#1062)
## Description

Load Testing is causing folder growth (fix is underway)
and is already taking > 4 hours only to back-up emails.
This reduces the dataset to only the primary folders for
each exchange type.  We can expand from here when
data production is better under control.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #902

## Test Plan

- [x] 💚 E2E
2022-10-05 23:42:04 +00:00
ashmrtn
4ba8f50c53
Restore/backup test for email attachments (#1057)
## Description

Test to check that attachments are properly populated and fetched during restore and backup

Some notes:
* make slice element comparison function generic so it can compare locations and attachments
* very hacky comparison for attachment content using reflection as it's not easily accessible otherwise. Changes to the underlying struct will cause runtime failures in the test case if/when they occur

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* #913 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-05 23:11:54 +00:00
Niraj Tolia
79f50cad82
Tweak Corso description and add alpha warning (#1058)
## Description

Tweak Corso description and add alpha warning

## Type of change

- [x] 🗺️ Documentation
2022-10-05 22:35:40 +00:00
Niraj Tolia
80ebc2956b
Add Corso logo to the README (#1063)
## Description

Add Corso logo to the README

## Type of change

- [x] 🐹 Trivial/Minor
2022-10-05 22:34:40 +00:00
Danny
7843787cd3
GC: Restore: Mail: Create Subfolder Feature (#1055)
## Description
The feature allows for the subFolders to be created. Test Suite Expanded. 
<!-- Insert PR description-->

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 🌻 Feature
## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
*Closes Issue #1054<issue>

## Test Plan

- [x]  Unit test
2022-10-05 22:33:41 +00:00
Keepers
f4556288a5
add iteminfo to restore details (#1041)
## Description

Extends the restore details with itemInfo from restored items.

## Type of change

- [x] 🌻 Feature

## Issue(s)

* #977

## Test Plan

- [x] 💪 Manual
- [x] 💚 E2E
2022-10-05 21:19:21 +00:00
Georgi Matev
010d8d5df1
Final Examples indent fix to be consistent in docs and inline usage (#1056)
## Description

Previous indent fixed usage but screwed up generated docs. 

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)


## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-10-05 20:33:47 +00:00
Danny
5bcdaef769
GC: Interface: Cache Refactor (#1043)
## Description
Code changed to support caching on the default folder of `exchange.Mail` as well as an independent node within the Inbox.
<!-- Insert PR description-->

## Type of change

- [x] 🌻 Feature

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* related to Issue #1004<issue>

## Test Plan
- [x]  Unit test
2022-10-05 20:04:50 +00:00
Georgi Matev
3a1eb1efd2
Add Examples section to CLI usage and docs (#1050)
## Description

Adds Examples to CLI usage output and the auto-gen docs

Also cleans up:
* OneDrive flags and flags help
* Addition of OneDrive generated files to docs 


## Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 🌻 Feature
- [ ] 🐛 Bugfix
- [x] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* Fixes #529  

## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-10-05 07:06:32 +00:00
ashmrtn
3f0951dea2
Higher resolution on test restore folder names (#1040)
## Description

\~Only affects folders created by tests\~
Create and use helper function that sets the restore destination folders to have microsecond granularity. This is to avoid naming collisions with second granularity (of which I've observed at least once)

Switches all tests for all services/categories to use OneDrive DateTime format+microseconds

Manually verified that a manually created folder with the given timestamp format was removed by the CI purge script

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* closes #1036

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-04 23:52:13 +00:00
Keepers
630d74bee7
add NoData operation status (#1042)
## Description

Adds a NoData status to operations in the event
that a backup (or, possibly in the future, restore)
finishes processing without having any items to
store or restore.

## Type of change

- [x] 🌻 Feature

## Issue(s)

* #1000

## Test Plan

- [x] 💪 Manual
- [x]  Unit test
2022-10-04 23:08:17 +00:00
Niraj Tolia
3a62f7f90c
Upgrade to latest template (#1045)
## Description

v1.5.0 of the template was released. I pulled in the changes.

## Type of change

- [x] 🌻 Feature


## Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
2022-10-04 22:01:15 +00:00
ashmrtn
edd84e690d
Version data stored in kopia (#1028)
## Description

As there's not a 1:1 relationship between backup details items and data stored in kopia as files, version all the data stored in kopia files. This will allow us to change the serialized format of this data in the future independently of the version in the backup details models. This is also less error prone than associating the version in the models with the layout of the kopia file data

See this [comment](https://github.com/alcionai/corso/issues/284#issuecomment-1255346379) for more context on why kopia layout versioning is useful and a sketch of the implemented solution

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* #284 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-04 22:00:03 +00:00
ashmrtn
116d6e9df6
Multi folder backup of contacts and events (#1016)
## Description

Test ability to backup multiple disjoint folders in contacts and events

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* #913

merge after
* #995 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-04 21:18:04 +00:00
Keepers
3719c36bce
print restore details following successful op (#1030)
## Description

Now that GC is tracking the details entries during
a restore procedure, it can display the results in
the cli.  Due to an absence of itemInfo, only the
item shortRef is displayed.  But we can expand
on that from here.

## Type of change

- [x] 🌻 Feature

## Issue(s)

* #977

## Test Plan

- [x] 💪 Manual
- [x] 💚 E2E
2022-10-04 20:43:38 +00:00
Keepers
fa7f505b33
slow load test frequency to every 4 hours (#1039)
## Description

load testing for the dev m356 tenant takes longer
than 3 hours to complete, causing all load tests to
get canceled when github shifts priority to the
next job that gets kicked off.  Backing off the freq to
every 4 hours, and will revisit that as needed. If 4 hour
time doesn't satisfy the boundary, we should shift the
dataset instead of freqnency.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #902

## Test Plan

- [x] 💚 E2E
2022-10-04 20:11:55 +00:00
ashmrtn
f8a6d33466
Add test for idempotent repo creation (#1037)
## Description

Regression test to ensure that hidden --succeed-if-exists flag works.

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* #913 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-04 19:41:41 +00:00
Keepers
67215c9bf1
field NotFound err in kopia, handle in cli (#1027)
## Description

Replace the `manifest.NotFound` error production
in kopia wrapper with a local version of the error. This allows the cli to catch the corso error and
write a clearer response to the end user.

## Type of change

- [x] 🌻 Feature

## Issue(s)

* #976 

## Test Plan

- [x] 💪 Manual
- [x] 💚 E2E
2022-10-04 18:27:23 +00:00
Keepers
d0560500d2
add deets to gc restore ops (#1029)
## Description

In order for a restore operation to accurately print
out the list of items that were restored, it needs to
track item details within the GC restoration like is
done within kopia in backup.   These details will
not be stored in a modelStore.  But they will get
printed out on the CLI for end users.

Part 1 of multiple.

## Type of change

- [x] 🌻 Feature

## Issue(s)

* #977

## Test Plan

- [x] 💪 Manual
- [x] 💚 E2E
2022-10-04 17:56:34 +00:00
ashmrtn
dd34ecd5f7
Test CLI init/connect and without s3 prefix on bucket (#1033)
## Description

Regression test for bucket prefix trimming

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [x] 🤖 Test
- [ ] 💻 CI/Deployment
- [ ] 🐹 Trivial/Minor

## Issue(s)

* #913 
* #975 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-04 16:45:09 +00:00
Vaibhav Kamra
3df3d68a3e
OneDrive details UX improvements (#1034)
## Description

- Rename `LastModified` to `Modified` in OneDrive backup details
- Humanize file size units

## Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 💻 CI/Deployment
- [x] 🐹 Trivial/Minor

## Issue(s)

<!-- Can reference multiple issues. Use one of the following "magic words" - "closes, fixes" to auto-close the Github issue. -->
* #627 

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-10-04 15:44:47 +00:00
github-actions[bot]
8ab5d5c112
Docs Auto-Generation (#1023)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
2022-10-03 23:53:39 +00:00
Keepers
af12fba0c7
attempt local action for cache control (#1003)
## Description

Attempting to fix cache control.

## Type of change

- [x] 💻 CI/Deployment

## Issue(s)

* #790

## Test Plan

- [x] 💪 Manual
2022-10-03 23:52:36 +00:00