14 Commits

Author SHA1 Message Date
Hitesh Pattanayak
43ca43910f
fixes lists delete in CI during sites purge (#4935)
fixes lists delete in CI during sites purge

manual testing commad used:
```
pwsh ./onedrivePurge.ps1 -Site "https://10rqc2.sharepoint.com/sites/CorsoCI" -LibraryNameList "Shared Documents","More Documents" -FolderPrefixPurgeList Corso_Restore_,TestRestore,testfolder,incrementals_ci_,Alcion_Restore_,Corso_Test -LibraryPrefixDeleteList Corso_Restore_,TestRestore,testfolder,incrementals_ci_,Alcion_Restore_,Corso_Test -PurgeBeforeTimestamp 2023-12-24T06:03:24Z
```

output
```
Authenticating and connecting to https://10rqc2.sharepoint.com/sites/CorsoCI
Connected to https://10rqc2.sharepoint.com/sites/CorsoCI


Purging library: Shared Documents
Found 0 folders to purge

Purging library: More Documents
Found 0 folders to purge

Deleting library: Corso_Restore_,TestRestore,testfolder,incrementals_ci_,Alcion_Restore_,Corso_Test
Found 8 lists to delete
Deleting list:  Corso_Restore_23-Dec-2023_14-54-05_Sharing Links
List: Corso_Restore_23-Dec-2023_14-54-05_Sharing Links is hidden. Skipping...
Deleting list:  Corso_Restore_23-Dec-2023_15-50-29_Corso_Restore_23-Dec-2023_14-54-05_Sharing Links
List: Corso_Restore_23-Dec-2023_15-50-29_Corso_Restore_23-Dec-2023_14-54-05_Sharing Links is hidden. Skipping...
Deleting list:  Corso_Restore_23-Dec-2023_15-50-29_Sharing Links
List: Corso_Restore_23-Dec-2023_15-50-29_Sharing Links is hidden. Skipping...
Deleting list:  Corso_Test_24-Dec-2023_04-24-09.117728_MockListing
Deleting list:  Corso_Test_24-Dec-2023_05-05-31.706634_MockListing
Deleting list:  Corso_Test_list_api_post_drive_23-Dec-2023_16-50-05.901602
Deleting list:  Corso_Test_list_api_post_drive_24-Dec-2023_04-44-48.244327
Deleting list:  Corso_Test_list_api_post_drive_24-Dec-2023_05-25-51.302396
```

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)
https://github.com/alcionai/corso/actions/runs/7313019888/job/19924151485

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2023-12-24 07:37:52 +00:00
Hitesh Pattanayak
95dab16f67
skip cleanup of hidden list (#4934)
skips cleanup of hidden list considering them system generated and delete attempt for them would result in graph error `General exception while processing` 

list details response for list `Corso_Restore_23-Dec-2023_14-54-05_Sharing Links` of 'hidden' type
```
{
    "@odata.context": "https://graph.microsoft.com/v1.0/$metadata#sites('4892edf5-2ebf-46be-a6e5-a40b2cbf1c1a')/lists/$entity",
    "@odata.etag": "\"35697c04-415d-44ad-b328-527e32a20126,1\"",
    "createdDateTime": "2023-12-23T14:54:36Z",
    "description": "Use this list to track documents which have internal or anonymous sharing links in the site.",
    "eTag": "\"35697c04-415d-44ad-b328-527e32a20126,1\"",
    "id": "35697c04-415d-44ad-b328-527e32a20126",
    "lastModifiedDateTime": "2023-12-23T14:55:07Z",
    "name": "Corso_Restore_23Dec2023_145405_Sharing Links",
    "webUrl": "https://10rqc2.sharepoint.com/sites/CorsoCI/Corso_Restore_23Dec2023_145405_Sharing%20Links",
    "displayName": "Corso_Restore_23-Dec-2023_14-54-05_Sharing Links",
    "createdBy": {
        "user": {
            "displayName": "SharePoint App"
        }
    },
    "parentReference": {
        "siteId": "10rqc2.sharepoint.com,4892edf5-2ebf-46be-a6e5-a40b2cbf1c1a,38ab6d06-fc82-4417-af93-22d8733c22be"
    },
    "list": {
        "contentTypesEnabled": false,
        "hidden": true,
        "template": "sharingLinks"
    }
}
```

#### Does this PR need a docs update or release note?
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [x] 💻 CI/Deployment

#### Issue(s)
https://github.com/alcionai/corso/actions/runs/7312141926/job/19922423733

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💚 E2E
2023-12-24 04:55:10 +00:00
Keepers
5215e907b0
Revert "Revert "move drive pagers to pager pattern (#4316)" (#4412)" (#4456)
This reverts commit 3d78183651289e2051b8690850069c9b41df6bd0.

Replacement for https://github.com/alcionai/corso/pull/4316 after revert in https://github.com/alcionai/corso/pull/4412.

---

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🌻 Feature
2023-10-09 19:46:18 +00:00
Keepers
3d78183651
Revert "move drive pagers to pager pattern (#4316)" (#4412)
This reverts commit c3f94fd7f76f377e4728c715abbb8c7846e9fb25.

The specified commit is working fine for CI and development, but contains performance
degredation (solved in a follow-up pr) that we want to avoid for the next release.  This
rever is temporary, and the changes will be re-instated after release.

---

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🤖 Supportability/Tests

#### Test Plan

- [x]  Unit test
- [x] 💚 E2E
2023-10-02 16:19:39 +00:00
Keepers
c3f94fd7f7
move drive pagers to pager pattern (#4316)
Drive pager usage currently showcases strong coupling between two layers: drive collection logic processing and drive api.  This PR separates that coupling by moving the full item enumeration process into the
API, and letting the collection logic process the
results. This acs as both a simplification of complex code, and a clearer separation of ownership between the two layers.

A detrimental side effect of this change is that drive item enumeration has moved from page-streaming
(ie: each page is fully processed before moving on to the next) and onto batch processing (ie: all items are stored in memory and processed in a single pass). Acknowledging that this is an unacceptable regression, a follow-up PR will appear shortly with better handling for stream-processing enumeration from the API layer as a standard part of the pattern for all pager
implementations.

---

#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🧹 Tech Debt/Cleanup

#### Test Plan

- [x]  Unit test
- [x] 💚 E2E
2023-09-28 21:23:26 +00:00
Keepers
5c80d76455
give library prefix delete list a default val (#3872)
#### Type of change

- [x] 🐛 Bugfix
2023-07-21 16:56:26 +00:00
Keepers
d555501093
add integration tests for missing drives (#3847)
#### Does this PR need a docs update or release note?

- [x]  No

#### Type of change

- [x] 🤖 Supportability/Tests

#### Issue(s)

* #3652

#### Test Plan

- [x]  Unit test
- [x] 💚 E2E
2023-07-21 01:13:09 +00:00
Georgi Matev
708ef23ac5
Reverting hack since the new incarnation of user is back to proper URL (#3514)
Reverting hack since the new incarnation of user is back to proper URL
---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [ ]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

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

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2023-05-26 00:58:14 +00:00
Georgi Matev
3b1a71902b
Handle special case OD site name after recreating user (#3361)
Special case Primary CI user LynneR for OneDrive CI cleanup

<!-- PR description-->

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [ ]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [ ] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

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

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2023-05-09 19:44:44 +00:00
Abhishek Pandey
ec064e539b
Add misc typo fixes (#3006)
<!-- PR description-->

---

#### Does this PR need a docs update or release note?


- [ ]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->

- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

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

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [ ] 💪 Manual
2023-04-12 23:30:38 +00:00
Georgi Matev
de3554d869
Quick ci fix (#3084)
The defensive flattening of the inputs was at the wrong place.

---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [ ]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [x] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

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

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2023-04-11 02:19:27 +00:00
Keepers
6a36255b29
split in pwsh, not gh action (#3065)
Couldn't figure out why the inputs in my local purges weren't working.
It's because we split the input in gh, not in powershell.
2023-04-10 22:41:38 +00:00
Georgi Matev
a28871c4c0
Parametrize libraries (#2942)
Add a secret for configuring SP libraries to purge
---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

<!--- Please check the type of change your PR introduces: --->
- [ ] 🌻 Feature
- [ ] 🐛 Bugfix
- [ ] 🗺️ Documentation
- [ ] 🤖 Supportability/Tests
- [x] 💻 CI/Deployment
- [ ] 🧹 Tech Debt/Cleanup

#### Issue(s)

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

#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E
2023-03-24 23:36:24 +00:00
Georgi Matev
6c989dbd78
Adding new OneDrive and Sharepoint CI cleanup (#2870)
New script for OneDrive and Sharepoint cleanup 

Commit by commit review is encouraged for readability since this involves renames of older scripts.


---

#### Does this PR need a docs update or release note?

- [ ]  Yes, it's included
- [ ] 🕐 Yes, but in a later PR
- [x]  No

#### Type of change

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

#### Issue(s)


#### Test Plan

<!-- How will this be tested prior to merging.-->
- [x] 💪 Manual
- [ ]  Unit test
- [ ] 💚 E2E

Tested this with `nektos/act `so action logic should be mostly sound. There is one issue with the script installed for exchange that I believe is just a difference the container image used by GHA and the local I could use for `act`
2023-03-20 20:36:27 +00:00