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

batches: change criteria for deleting GitHub apps from the database#60460

Merged
BolajiOlajide merged 6 commits into
mainfrom
bo/delete-github-app-on-404-only
Feb 14, 2024
Merged

batches: change criteria for deleting GitHub apps from the database#60460
BolajiOlajide merged 6 commits into
mainfrom
bo/delete-github-app-on-404-only

Conversation

@BolajiOlajide

@BolajiOlajide BolajiOlajide commented Feb 13, 2024

Copy link
Copy Markdown
Contributor

Closes #54066

In the past, when we get an error fetching a GitHub app, we assume the app has been deleted and delete all it's installations from the database. This caused issues for one of our customers.

Test plan

Manual testing.

I added a GitHub app for Commit Signing, manually triggered the worker to ensure it refreshes it's installations. Then I faked an error in the code, to see if the installations got deleted when a refresh occurred (they didn't). They only got deleted when the client returns a 404.

CleanShot 2024-02-12 at 21 30 54@2x

@BolajiOlajide BolajiOlajide requested review from a team and camdencheek February 13, 2024 09:46
@BolajiOlajide BolajiOlajide self-assigned this Feb 13, 2024
@cla-bot cla-bot Bot added the cla-signed label Feb 13, 2024
Comment thread internal/github_apps/store/store.go Outdated
@BolajiOlajide BolajiOlajide merged commit 9230496 into main Feb 14, 2024
@BolajiOlajide BolajiOlajide deleted the bo/delete-github-app-on-404-only branch February 14, 2024 15:34
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.

Enhancement: Worker deletes empty GitHub Apps on execution

2 participants