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

Make the job handler generic #2670

Merged
merged 4 commits into from
Jul 11, 2023
Merged

Make the job handler generic #2670

merged 4 commits into from
Jul 11, 2023

Conversation

danail-branekov
Copy link
Member

Is there a related GitHub Issue?

#2606

What is this change about?

In order to support other resource types in the job handler we introduce a map from resource type to a DeletionRegistry implementation. Repositories are expected to implement that interface.

Does this PR introduce a breaking change?

No

Acceptance Steps

N/A

Tag your pair, your PM, and/or team

@gcapizzi

gcapizzi and others added 4 commits July 10, 2023 15:42
This makes the job handler more generic
The handler now receives a map from job type to a `DeletionRepository`,
which is all it needs to implement the deletion job logic. Supporting
deletion jobs for new resources is now only a matter of implementing the
`DeletionRepository` interface for the resource repository, and then add
an entry to the map.
This makes it easy to create a nested logger starting from the one in
the context *and* re-inject it into the context so that it can be easily
passed on.

Co-authored-by: Giuseppe Capizzi <[email protected]>
@gcapizzi gcapizzi merged commit 763151e into main Jul 11, 2023
6 checks passed
@gcapizzi gcapizzi deleted the issues/2606-app-deletion-job branch July 11, 2023 11:59
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