Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only run deletion reconciler on repo deleted events #3036

Merged
merged 2 commits into from
Apr 11, 2024

Conversation

JAORMX
Copy link
Contributor

@JAORMX JAORMX commented Apr 11, 2024

Summary

The trigger for the reconciler was too greedy and would issue deletion events
on more entities than just repos. e.g. when a branch is deleted. This is not ideal.

Instead, this trims down the triggering of the event to just repo deletion events coming from GitHub.

Change Type

Mark the type of change your PR introduces:

  • Bug fix (resolves an issue without affecting existing features)
  • Feature (adds new functionality without breaking changes)
  • Breaking change (may impact existing functionalities or require documentation updates)
  • Documentation (updates or additions to documentation)
  • Refactoring or test improvements (no bug fixes or new functionality)

Testing

Review Checklist:

  • Reviewed my own code for quality and clarity.
  • Added comments to complex or tricky code sections.
  • Updated any affected documentation.
  • Included tests that validate the fix or feature.
  • Checked that related changes are merged.

@JAORMX JAORMX requested a review from a team as a code owner April 11, 2024 06:00
Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@JAORMX JAORMX force-pushed the only-delete-repos-installations branch from 5e9e123 to 01c471d Compare April 11, 2024 06:01
@JAORMX JAORMX changed the title Only run deletion reconciler on repo and installation deleted events Only run deletion reconciler on **repo** deleted events Apr 11, 2024
@JAORMX JAORMX changed the title Only run deletion reconciler on **repo** deleted events Only run deletion reconciler on repo deleted events Apr 11, 2024
@coveralls
Copy link

coveralls commented Apr 11, 2024

Coverage Status

coverage: 48.228% (+0.001%) from 48.227%
when pulling 5256cc1 on only-delete-repos-installations
into 350aa0f on main.

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
@JAORMX JAORMX merged commit c13a861 into main Apr 11, 2024
20 checks passed
@JAORMX JAORMX deleted the only-delete-repos-installations branch April 11, 2024 06:59
dmjb pushed a commit that referenced this pull request Apr 11, 2024
* Only run deletion reconciler on repo deleted events

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>

* React to webhook deletions as well

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>

---------

Signed-off-by: Juan Antonio Osorio <ozz@stacklok.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants