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

Discussion: how do we handle the deletion of organisations? #3966

Open
jpbruinsslot opened this issue Dec 12, 2024 · 1 comment
Open

Discussion: how do we handle the deletion of organisations? #3966

jpbruinsslot opened this issue Dec 12, 2024 · 1 comment

Comments

@jpbruinsslot
Copy link
Contributor

Background

Discussion

How will we handle the deletion of organisations.

  • Messaging/signals
  • Deletion / Disabling of Task and Schedule objects
@jpbruinsslot jpbruinsslot added this to KAT Dec 12, 2024
@github-project-automation github-project-automation bot moved this to Incoming features / Need assessment in KAT Dec 12, 2024
@jpbruinsslot jpbruinsslot moved this from Incoming features / Need assessment to To be discussed in KAT Dec 12, 2024
@jpbruinsslot
Copy link
Contributor Author

jpbruinsslot commented Dec 30, 2024

From the scheduler point of view (when taking the changes of #3839 into account). We have the following models that are bound to an organisation:

  1. Task models that currently on queue

    The likely scenario of when an organisation gets deleted is that all current tasks that are on the queue are being set to CANCELLED. Meaning tasks will not be eligible for pickup by task runners.

  2. Task models that are being executed, or have been executed

    For tasks that have been executed before, we can opt for leaving them as is. Their status are likely COMPLETED, or FAILED these tasks serve as a log of tasks that have been executed before. However if the preference is to delete all the data of an organisation we need to delete these tasks as well. For tasks that are being executed at that particular moment, their status is RUNNING however the change of its status depends on the task runner. The task has been picked up by it and when it has finished the task will be set either to FAILED or COMPLETED. We can also leave this as is when we don't want to delete all the data associated with an organisation.

  3. Schedule (task that needs to be executed repeatedly)

    Again the question is whether to delete the schedulers or to disable them. A Schedule has the enable attribute that can be set.

So in all, all models that depend on or are associated with an organisation, can either be deleted or disabled. However, we need to determine how the scheduler knows about an organisation that gets deleted. The preferable course of action would be a signal that gets sent to the scheduler or that the scheduler subscribes to a message queue. This depends on other services that need to know if an organisation is deleted and their preferred way of getting that information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: To be discussed
Development

No branches or pull requests

1 participant