445 Commits

Author SHA1 Message Date
ashmrtn
226489c58f
use path struct in kopia DataCollection (#827)
* Use path struct in kopia DataCollection

Does not change the external API of the DataCollection any, just updates
internals in preparation for switching support of
data.Collection.FullPath.

* Expand Path interface slightly

kopia.Wrapper needs some extra functionality from paths, mostly along
the lines of directly manipulating the elements in the path. This gives
access to those functions.

* Use path struct in kopia.Wrapper for restore

Pass path structs to the newly created collections during restore.

* Add tests for new path functionality
2022-09-13 14:18:00 -07:00
ashmrtn
573f55686f
Make ExchangeDataCollection use path.Path internally (#820)
* Have exchange data collection store path.Path

Still complies with the old FullPath() string interface until we update
that.

* Pass path.Path to NewCollection for exchange

Basically fixes up errors introduced by previous commit.

* Fixup exchange recovery path indices

All exchange paths now use the path struct, meaning the service,
category, and user elements are in the standard positions.

* use path package in selector reduction (#822)

Currently, during a reduction process, scopes
compare their values to the raw split on repoRef.
This causes some brittle indexing to retrieve
values from the rr, carrying assumptions that are
difficult to track across changes.  This PR trades
the string split for the paths package to better
integrate identification of the path values.

Adds some mocks and amends some error
behaviors in order to fit paths into the current
testing schema.

Co-authored-by: Keepers <ryanfkeepers@gmail.com>
2022-09-13 13:58:20 -07:00
Vaibhav Kamra
a17d00c65f
Change client timeouts (#834)
Change HTTP client timeout from 30 to 90 seconds
2022-09-13 16:19:08 -04:00
ashmrtn
2b7d3877a4
Remove code to restore directory subtrees (#826)
Not used and don't have the time to figure out the best way to bend the
path struct API to get it to work nicely.
2022-09-13 09:29:17 -07:00
Danny
61f769cc15
812 gc retrieval function tests (#817)
Issue 812: Test Expansion
Retrieval functions added to the test exchange package.

Issue #831:
Retry handler added to message restore pipeline.
2022-09-13 11:33:08 -04:00
Vaibhav Kamra
16ad25f3a1
Implement wrapper around M365 helper methods (#825)
## Description

Exports functionality useful for external services/validators

## Type of change

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

## Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-09-13 10:32:02 +00:00
Keepers
c82dad6e40
flexible restore/details flags (#821)
removes the requriement that higher order data
must be specified in order to specify granular
data ids.  Ex: previously, cli users needed to add
--user and --folder flags in order to use a --mail
flag.  Now the user and folder will default to Any()
if they're not provided.
2022-09-12 18:13:50 -06:00
Keepers
fa489782a3
purge both mail and calendars (#813)
expands the `purge` command to accept args for
purging mail folders, calendars, or both.  This
allows the test cleanup to ensure we aren't over-
populating either mail folders or calendars, thus
blocking CI actions
2022-09-12 17:35:16 -06:00
ashmrtn
0a7954b300
Simplify exchange path constructors (#819)
Allows constructing Contacts and Events category type paths for Exchange.
They all need user and tenant filled in and only differ in the category given.
This makes it easier to call them in more generic situations, so long as the
category is known. It also consolidates code for constructing the paths of those
types.
2022-09-12 14:10:02 -07:00
ashmrtn
dc0c7e49c4
Remove selector pathType const in favor of path package const (#757)
* Remove pathType const

The path package const only provides information on the category, not
the service for the path.

* Fix var name/package name clashes
2022-09-12 13:16:08 -07:00
Keepers
110e874e5b
rename password to passphrase (#796)
General user friendliness renaming.  Will cause a
breaking change in any local environment for
developers and Ark.
2022-09-12 10:09:59 -06:00
Danny
432f984e61
GC: Backup:Event Feature to incorporate event ids for all calendars (#808)
Feature enhancement to include all Calendars in the event `restore-all` feature.
2022-09-12 08:17:04 -04:00
Keepers
964a2fc39e
new format for tabular display of timestamps (#793) 2022-09-09 20:43:18 -06:00
Keepers
a226035c23
clean out scope value chaff (#731) 2022-09-09 19:21:31 -06:00
Keepers
25ce11b2c6
deduplicate shared exchange code in cli (#732) 2022-09-09 18:30:15 -06:00
Keepers
57ddf26007
kill the e2e event restore test (#816) 2022-09-09 17:48:44 -06:00
Keepers
cb467a3e46
correct the transformer used for contact folders (#814) 2022-09-09 15:34:28 -06:00
Danny
697701afeb
Reduce the amount of folders that are checked for serialization checks. (#807) 2022-09-09 14:23:01 -06:00
github-actions[bot]
5f85b6f061
Docs Auto-Generation (#803)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
2022-09-09 14:38:58 +00:00
Keepers
6f7cf00188
add cli integration tests for event/contact (#760)
## Description

Adds foundational cli integration tests for backup/restore
of events and calendars

## Type of change

- [x] 🤖 Test

## Issue(s)

#501 

## Test Plan

- [ ] 💪 Manual
- [ ]  Unit test
- [x] 💚 E2E
2022-09-09 14:15:36 +00:00
Danny
2e3ee15fd4
Sent / Receive DateTime Stamp Incorrect (#792)
## Description
Single Legacy Policies added to allow the values for sent / receive times to correspond to the original content for `exchange.Mail` objects

## 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  #645

## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
Values can be inspected using e2e restore pipelines.
2022-09-09 03:39:52 +00:00
Georgi Matev
f509543856
Custom output template for auto-generated docs (#785)
## Description

Introduces a Corso specific (more desirable) formatting for the auto generated documentation. 

More or less an adaptation or https://github.com/spf13/cobra/blob/main/doc/md_docs.go. Unfortunately the original 
package does not have sufficient hooks to allow for plugging in a new renderer. 

Other approaches considered: 
* [Override the UsageTemplate ](https://github.com/spf13/cobra/blob/main/user_guide.md#defining-your-own-help) - unfortunately does not apply to Markdown generation
* Use a golang template for the docs output - unfortunately the `pflags` package does not have a suitable way of iterating over the flags that can be easily fed into a template. 

Follow on work:
* ~~Styling of flags tables as part of docs rendering - Done~~
* Opens up possibility for flag ordering - need to set `pflags.SortFlags = false` before parsing the flags - https://github.com/alcionai/corso/issues/783
* Can simplify sidebar command maintenance by naming the rendered docs files line similar to `<Num>_corso_command1_command2` where `<Num>` can be set as annotation on the commands. Order in the navbar can be set as part of command authoring - https://github.com/alcionai/corso/issues/784

## Type of change

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

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

* https://github.com/alcionai/corso/issues/536
* https://github.com/alcionai/corso/issues/528

## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-09 03:15:24 +00:00
Danny
ca6331b66e
[Fix] Issue #801: Error during Paging (#802)
## Description
Pagination fix for nill pointer

## 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 #801

## Test Plan

- [x]  Unit test
2022-09-09 02:27:47 +00:00
Danny
c02817ac86
CI: Bug Fix Iterator Tests (#800)
## Description

Fixes mapping alignment during iterator tests

## Type of change


- [x] 🐛 Bugfix
- [x] 💻 CI/Deployment


## Issue(s)

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

- [x]  Unit test
2022-09-09 01:59:46 +00:00
Keepers
22c0bf5c3a
add CI/Deployment to PR template types (#769)
## Description

Add a new type of change to the template: CI/Deployment

## Type of change

- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [ ] 🐹 Trivial/Minor

## Issue(s)

* #744

## Test Plan

- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-08 21:45:30 +00:00
Vaibhav Kamra
57bb229f35
Implement a logging middleware to log Graph requests (#791)
## Description

Enables a logging middleware that will log the Graph http calls if the `LOG_GRAPH_REQUESTS` environment variable
is set

## Type of change

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

## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E

```$ LOG_GRAPH_REQUESTS=true CORSO_CI_TESTS=true go test -v .
...
=== RUN   TestGraphConnectorIntegrationSuite
2022-09-08T13:39:25.556-0700	INFO	graph/service_helper.go:61	REQUEST: GET /v1.0/users?%24select=id%2CuserPrincipalName HTTP/1.1
Host: graph.microsoft.com
Accept: application/json
Authorization: Bearer <REDACTED>


    integration_runners.go:58: TestGraphConnectorIntegrationSuite run at 2022-09-08T20:39:25.967824Z
=== RUN   TestGraphConnectorIntegrationSuite/TestAccessOfInboxAllUsers
2022-09-08T13:39:26.398-0700	INFO	graph/service_helper.go:61	REQUEST: GET /v1.0/users?%24select=id%2CuserPrincipalName HTTP/1.1
Host: graph.microsoft.com
Accept: application/json
Authorization: Bearer <REDACTED>
```
2022-09-08 21:12:13 +00:00
Vaibhav Kamra
1246f51b22
OneDrive Backup Operation (#738)
## Description

Wires up the OneDrive collection logic to `operation.Backup`

Includes an integration test that runs against the test domain

Two bug fixes:
- Skip the "root" item that is returned by the delta query
- Fix incorrect usage of the `filepath.SplitList` function which does
  not split a path into components. Instead use `strings.Split`. This
  is ok because the paths returned here are not OS specific.
  Regardless - this logic will be refactored when we use the `path` pkg.

## Type of change

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

## Issue(s)
#548 

## Test Plan

<!-- How will this be tested prior to merging.-->

- [ ] 💪 Manual
- [x]  Unit test
- [x] 💚 E2E
2022-09-07 23:47:12 +00:00
Keepers
6cdc691c6f
correct the corso module (#749)
swaps the corso go module from github.com/
alcionai/corso to github.com/alcionai/corso/src
to align with the location of the go.mod and
go.sum files inside the repo.

All other changes in the repository update the
package imports to the new module path.
2022-09-07 15:50:54 -06:00
Danny
6640d42aac
GC Restore: Event pipeline not working [FIX] (#780)
Bug Fix to ensure E2E testing. Test suite expanded.
2022-09-07 17:14:40 -04:00
Keepers
35c6f2b6b0
undo auto-success workflow skip (#788) 2022-09-07 14:47:30 -06:00
Keepers
c73ca6a4e5
correct paths in selectors (#789)
The path package changed the standard format
of fullPath and repoRef design.  This should have
failed tests before being pushed to main, but was
able to slip in falsely while github actions were
configured to pass all tests until failed.
2022-09-07 14:14:51 -06:00
Georgi Matev
9602360b5b
Adds docusorus-plugin-sass plugin and enhances the existing theme (#786)
## Description

Enhanced styling for the docs theme. Will be used for the tables for the custom autogenerated cli docs 

## Type of change

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

## Issue(s)

## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-06 23:33:23 +00:00
Niraj Tolia
60bc963ef1
Add vector images for "Why Everyone Loves Corso" (#781)
## Description

Add vector images for "Why Everyone Loves Corso"

Also deletes unused images and gets rid of an incorrectly-named images subfolder

Image URLs:
- https://storyset.com/illustration/group-chat/rafiki
- https://storyset.com/illustration/fingerprint/rafiki
- https://storyset.com/illustration/data-extraction/rafiki
- https://storyset.com/illustration/saving-money/rafiki
2022-09-06 22:15:15 +00:00
Niraj Tolia
5517c1e91c
Tweak the FAQ section (#782)
## Description

Add a new FAQ question placeholder

## Type of change

Please check the type of change your PR introduces:
- [x] 🐹 Trivial/Minor

## Test Plan

- [x] 💪 Manual
2022-09-06 22:14:19 +00:00
Niraj Tolia
37e3dfcdda
Remove business partner section (#778)
## Description

Remove the business partner section

- Also includes some minor tweaks to content

## Type of change

Please check the type of change your PR introduces:
- [x] 🐹 Trivial/Minor

## Test Plan

- [x] 💪 Manual
2022-09-06 18:35:53 +00:00
Georgi Matev
f72b1e9935
Makefile should pick up any changes in /src subfolder not just first level (#777)
## Description

Globs not picking up changes to anything beyond first level of source files and not rebuilding on changes to mdgen.go for example. Switch to `find` which should also be more portable.


## Type of change

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

## Issue(s)


## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-06 17:59:43 +00:00
Niraj Tolia
290080d865
Delete more unused images and templates (#776)
## Description

Delete more unused images and templates

This also copies some of the better parts of the deleted templates
into the main index file. Unfortunately, some content changes crept
in while making these changes
2022-09-06 16:15:07 +00:00
Niraj Tolia
aef88636b8
Update FAQ (#774)
## Description

Add FAQ answers and revise questions
2022-09-06 16:04:48 +00:00
Niraj Tolia
c13863c9c3
Add the Apache v2 license (#775)
## Description

Add the Apache v2 license

## 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 #5
2022-09-03 16:57:33 +00:00
github-actions[bot]
8fe8dfeee6
Docs Auto-Generation (#746)
Automated changes by [create-pull-request](https://github.com/peter-evans/create-pull-request) GitHub action
2022-09-03 01:43:46 +00:00
Niraj Tolia
b1869bf32a
Update website images (#771)
## Description

Update of website images and other related changes

- Add Macbook and Surface laptop mockups with the M365 webpage
- Logo size tweaks
- Delete unused images
- Stop laptop bounce
2022-09-03 01:42:46 +00:00
ashmrtn
d707c22205
Resolve mail exchange folders to their real path in the hierarchy (#752)
## Description

Creates and uses a `ContainerResolver` interface to fetch container paths for items of different categories (when other resolvers are implemented). If the resolver is not available or fails to resolve a folder, defaults to the old implementation of using the folder's ID as its path.

## Type of change

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

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

* #456 

## Test Plan

<!-- How will this be tested prior to merging.-->

- [ ] 💪 Manual
- [x]  Unit test
- [ ] 💚 E2E
2022-09-02 23:18:49 +00:00
Niraj Tolia
a1d3503436
Tweak website header and nav links/icons (#759)
## Description

Tweak website header and nav links/icons
2022-09-02 23:02:48 +00:00
Niraj Tolia
334ceab56c
Remove testimonials (#756)
## Description

Remove user testimonials for now.

Also renames the chosen template to index.html
2022-09-02 23:01:58 +00:00
Georgi Matev
b6c7488c01
Fix Gulp not exiting with Ctrl-C and annoying browsersync warning (#751)
## Description

(1) Fix Gupl not exiting with Ctrl-C and (2) annoying browsersync warning
- (1) make sure `gulp` is not PID 1 in container. Add `--init` option
- (2) set `open: false`

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

## Issue(s)

## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-02 22:59:37 +00:00
ashmrtn
8947164318
Turn issues into bullets so they show titles (#754)
## Description

Minor visual change to how issues for the PR are displayed. Now defaults to the bulleted list which causes GitHub to render the title of each issue instead of just the issue number. Issues are still links

## Type of change

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

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

As an illustration, the below does not use bullets:
#753 

This does use bullets though
* closes #753 

## Test Plan

<!-- How will this be tested prior to merging.-->

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-02 22:56:39 +00:00
ashmrtn
bebe524563
Ignore vim swap files (#755)
## Description

ignore vim swap files

## Type of change

Please check the type of change your PR introduces:
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Test
- [x] 🐹 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-09-02 22:55:59 +00:00
Keepers
e5ca159ad7
use alpine for dockerfile base images (#758)
## Description

Uses alpine in the base docker images, to gain access
to a shell within corso containers.

## Type of change

- [x] 🌻 Feature

## Issue(s)

* #573 

## Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-02 22:46:44 +00:00
Keepers
1f8c3cdb11
only run actions on /src changes (#750)
## Description

Re-opening the PR with a hack (sourced from github
themselves) to skip the required check if we don't run
the standard required jobs.

## Type of change

- [x] 🌻 Feature

## Issue(s)

#744

## Test Plan

- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2022-09-02 22:30:18 +00:00
Niraj Tolia
0227bba7ac
Sample Corso page (#742)
## Description

An example of what the single-page Corso website would look like
2022-09-02 21:15:32 +00:00