Skip to content
This repository was archived by the owner on Sep 30, 2024. It is now read-only.

chore/msp: blindly retry Notion page deletion#63052

Merged
bobheadxi merged 6 commits into
mainfrom
sg-msp-notion-retry
Jun 3, 2024
Merged

chore/msp: blindly retry Notion page deletion#63052
bobheadxi merged 6 commits into
mainfrom
sg-msp-notion-retry

Conversation

@bobheadxi

@bobheadxi bobheadxi commented Jun 3, 2024

Copy link
Copy Markdown
Member

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   

@cla-bot cla-bot Bot added the cla-signed label Jun 3, 2024
@bobheadxi bobheadxi requested a review from a team June 3, 2024 21:22
@bobheadxi bobheadxi enabled auto-merge (squash) June 3, 2024 22:27
@bobheadxi bobheadxi merged commit 908d711 into main Jun 3, 2024
@bobheadxi bobheadxi deleted the sg-msp-notion-retry branch June 3, 2024 22:32
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants