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

Add a condition to disable a task if source or destination is empty #296

Open
coudot opened this issue Jul 3, 2024 · 5 comments
Open

Add a condition to disable a task if source or destination is empty #296

coudot opened this issue Jul 3, 2024 · 5 comments
Milestone

Comments

@coudot
Copy link
Member

coudot commented Jul 3, 2024

The use case is the deletion of all entries in an LDAP directory because the source database were empty.

LSC has done the clean job as configured, but of course this is not what was expected.

Could we find a solution to disable the task if LSC find no entries in source or destination?

@coudot coudot added this to the 2.2 milestone Jul 3, 2024
@davidcoutadeur
Copy link
Contributor

If we make the condition customizable, we could have a more generic feature, that, for instance, could block a task if there is more or less than X modifications to do.

@coudot
Copy link
Member Author

coudot commented Jul 23, 2024

My use case: a LSC deletes entries from Active Directory if they are not present in a database. If the database is empty, all entries are delete from AD.

When launching a clean task, we do not do a "getAllFilter" on source, so we don't know if the source is empty or not.

So maybe the evolution would be to launch in clean phase a "getAllFilter" on source, and stop taks if its empty (or less than X entries)

We may need to create a getAllCleanFilter like we have a cleanFilter different that getOneFilter.

@davidcoutadeur
Copy link
Contributor

davidcoutadeur commented Jul 23, 2024

I find the idea of a getAllFilter interresting.

However, sometimes, we don't have any filter to find all source entries. This would require us to define a very large search filter, that may slow down the clean process.

@coudot
Copy link
Member Author

coudot commented Jul 23, 2024

However, sometimes, we don't have any filter to find all source entries. This would require us to define a very large search filter, that may slow down the clean process.

That's why I propose a getAllCleanFilter, if it is different from the getAllFilter

@davidcoutadeur
Copy link
Contributor

That's why I propose a getAllCleanFilter, if it is different from the getAllFilter

Got that, but my point was sometimes, we can't formalize a precise "getAllCleanFilter", requiring us to put a generic filter, that grabs many more entries than we need.

@coudot coudot modified the milestones: 2.2, Future Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants