authentik icon indicating copy to clipboard operation
authentik copied to clipboard

blueprints: find another way to run reconcile than with dir()

Open rissson opened this issue 1 year ago • 3 comments

          Now looking at it again I think there's probably a better way to do this than using `dir()` and then `getattr()`, probably something using a decorator?

Pseudo code:

@self.reconcile
def do_something(self):
    pass

(Not really part of this PR tbh)

Originally posted by @BeryJu in https://github.com/goauthentik/authentik/pull/7590#discussion_r1422312556

rissson avatar Dec 11 '23 12:12 rissson

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@BeryJu I think this has been somewhat resolved with the changes in #8454

rissson avatar Feb 10 '24 02:02 rissson

yeah after playing around a bit with implementing this with a @ManagedAppConfig.reconcile_tenant decorator, that doesn't really help with code readability I think? It might still have an advantage to make it harder to accidentally misname a reconcile function and spend hours debugging why something isn't working

BeryJu avatar Feb 12 '24 11:02 BeryJu