21 Commits

Author SHA1 Message Date
Keepers
8a29c52cdc
move graphService to graph as Service (#1790)
## Description

Relocates the graphService struct to graph as
the Service struct.  Replaces GC's embedded
graphService with a graph.Servicer reference.

## Type of change

- [x] 🐹 Trivial/Minor

## Issue(s)

* #1725

## Test Plan

- [x]  Unit test
- [x] 💚 E2E
2022-12-14 01:39:00 +00:00
Keepers
fc5f42545f
rename graph.Service to Servicer (#1787)
## Description

`graph.Service -> graph.Servicer`,  no other changes.

More compliant with golang naming standards,
and will allow us to eventually migrate the
Service struct out of connector and into graph.

## Type of change

- [x] 🐹 Trivial/Minor

## Issue(s)

* #1725
2022-12-13 17:37:03 +00:00
Keepers
07a8d13d1e
adds tenant site lookup on new graph conn (#1540)
## Description

Adds a lookup for all tenant site ids when a new
graph connector is created.  Also adds an enum
to flag which resource set (users, sites, or all)
that the connector should initialize.

## Type of change

- [x] 🌻 Feature

## Issue(s)

* #1506

## Test Plan

- [x] 💚 E2E
2022-11-18 00:31:41 +00:00
Keepers
67265a8c32
remove unused purge code (#1521)
## Description

Now that pwsh scripts do the purging, we can
get rid of the faultier graphapi exchange purge
code, along with the functions supporting it.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #1520

## Test Plan

- [x] 💪 Manual
2022-11-16 22:37:25 +00:00
Keepers
a31b01458c
flush logs on cmd failure (#1338)
## Description

The secondary scripts in corso (factory, purge, etc) are not currently flushing their logs if an error occurrs since os.Exit(1) kills the current process without alloting time for deferred funcs to run.

## Type of change

- [x] 🐛 Bugfix

## Issue(s)

* #902

## Test Plan

- [x] 💚 E2E
2022-10-27 22:57:05 +00:00
Keepers
1aa2d987e1
log failure cause on purge (#1307)
## Description

Load tests fail on the post-test cleanup using the purge script,
but are not currently logging the cause.  Local repro has not
been successful.  This change adds additional error logging
output for review in case of failure.

## Type of change

- [x] 🤖 Test

## Issue(s)

* #902

## Test Plan

- [x] 💪 Manual
2022-10-24 21:54:48 +00:00
Danny
5cd2583466
GC: Purge: Updates to use graph.ContainerResolver (#1190)
## Description
purge.go to use the ContainerResolvers to collect containers from the Graph Connector.

NOTE: CollectFolders in service_query.go unchanged. `CollectFolderrs()` is stubbed for another PR. This will reduce the amount of line changes to be used in the future. 
<!-- 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  #1189<issue>

## Test Plan

- [x]  Unit test
2022-10-19 14:08:03 +00:00
Keepers
a32f86e40d
migrate naming of azure env vars (#1176)
## Description

migrates the client_id, client_secret, and tenant_id
environment variables to versions prepended with
azure_*.

⚠️  Your local environment will need to change in the following ways:  ⚠️ 
1. prepend `AZURE_` to your clientID, clientSecret, and tenantID env vars.
2. update those same env references in any `.corso.env` files used for copying envs to docker containers.
3. in `.corso.toml` (and any variants such as .corso_test.toml), replace `tenantid` with `azure_tenantid`.

## Type of change

- [x] 🐹 Trivial/Minor

## Issue(s)

* #558

## Test Plan

- [x] 💪 Manual
- [x]  Unit test
- [x] 💚 E2E
2022-10-17 20:47:04 +00:00
Keepers
f737f58a0f
generate emails in factory script (#1162)
## Description

Adds scripted production of mock emails for building out
large/rolling datasets for load testing.

## Type of change

- [x] 🌻 Feature
- [x] 🤖 Test

## Issue(s)

* #902

## Test Plan

- [x] 💪 Manual
2022-10-14 18:48:00 +00:00
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
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
Danny
3f3c8217a3
GC: Component: Version 40.0 (#917)
## Description
Upgrades Graph API to the newest version. Breaking change from the previous version, all functionality needs to be inspected to ensure operation.  
<!-- 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 #828<issue>

## Test Plan

- [x]  Unit test
- [x] 💚 E2E
2022-09-22 18:59:51 +00:00
Keepers
1203fd2b6a
extract timestamp from arbitrary string (#883)
## Description

In order for purge to gracefully handle the variety of timestring values that may appear within a
folder name, the common/time.go file has added
a func to extract a time substring from a string.
Purge is switched to that extractor instead of
a len-based suffix check.

## Type of change

- [x] 🐛 Bugfix

## Issue(s)

* #805

## Test Plan

- [x] 💪 Manual
2022-09-19 20:35:49 +00:00
Keepers
1d24d575ca
fix folder deletion failures (#867)
## Description

Graph clips time values ending in :00 from folder
names.  In order for the purge handler to check
the time values correctly, we need to identify
those folders and reinstate the 00 seconds tail.

## Type of change

- [x] 🐛 Bugfix

## Issue(s)

* #805

## Test Plan

- [x] 💪 Manual
2022-09-15 19:44:52 +00: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
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
ashmrtn
88a318a7c0
Fix wsl errors in cmd and cli packages (#651) 2022-08-26 09:13:39 -07:00
Keepers
b524053e96
resolve lint errors (#638) 2022-08-23 20:22:25 +00:00
Keepers
a1b9f876ae
add final basic cli tests (#578)
Adds the base CLI integration tests for backup, list, details,
and restore.  Also refactors out the global root command
value in favor of a ctx-bound reference so that tests may
control safely overwriting stdout to scrutinize output.
2022-08-17 18:13:55 +00:00
Keepers
192c69c68f
add backup cli integration test (#517)
Adds the basic cli-based backup integration test.
Due to discovering some corner cases about panic
conditions and other error handling in bad runtime
state, updates many other packages for safety.
2022-08-12 20:04:44 +00:00
Keepers
a586512b42
add command to purge user's folders by prefix/date (#480) 2022-08-04 15:28:28 -06:00