sourcegraph/dev/managedservicesplatform/operationdocs
Robert Lin 908d7119ea
chore/msp: blindly retry Notion page deletion (#63052)
Deleting Notion pages takes a very long time, and is prone to breaking in the page deletion step, where we must delete blocks one at a time because Notion does not allow for bulk block deletions. The errors seem to generally just be random Notion internal errors. This is very bad because it leaves go/msp-ops pages in an unusable state.

To try and mitigate, we add several places to blindly retry:

1. At the Notion SDK level, where a config option is available for retrying 429 errors
2. At the "reset page" helper level, where a failure to reset a page will prompt a retry of the whole helper
3. At the "delete blocks" helper level, where individual block deletion failures will be retried

Attempt to mitigate https://linear.app/sourcegraph/issue/CORE-119

While here, I also made some other QOL tweaks:

- Fix timing of sub-tasks in CLI output
- Bump default concurrency to 5 (our retries will handle if this is too aggressive, hopefully)
- Fix a missing space in generated docs

## Test plan

```
sg msp ops generate-handbook-pages   
```
2024-06-03 22:32:06 +00:00
..
diagram sg/msp: fix nil domain and EnvironmentDomainTypeNone in diagram gen (#62982) 2024-05-30 17:58:00 +01:00
internal/markdown bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
terraform bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
testdata chore/msp: blindly retry Notion page deletion (#63052) 2024-06-03 22:32:06 +00:00
BUILD.bazel bazel: transcribe test ownership to bazel tags (#62664) 2024-05-16 15:51:16 +01:00
index_test.go msp: support README.md in managed-services repo as mixins for generated docs (#61409) 2024-03-27 21:01:30 +08:00
index.go msp/operationdocs: add incident response starter guide, Notion-specific formatting (#62607) 2024-05-10 23:56:41 +00:00
links.go sg/msp: add alert policy documentation to generated ops pages (#61939) 2024-04-18 19:46:19 +00:00
notion.go msp/operationdocs: write to Notion instead of Markdown (#62325) 2024-05-03 21:17:16 +00:00
operationdocs_test.go msp/operationdocs: add incident response starter guide, Notion-specific formatting (#62607) 2024-05-10 23:56:41 +00:00
operationdocs.go chore/msp: blindly retry Notion page deletion (#63052) 2024-06-03 22:32:06 +00:00