Repository navigation
packages/django-postgres-dramatiq: add support for task dependencies - #23064
Conversation
✅ Deploy Preview for authentik-docs ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23064 +/- ##
=======================================
Coverage 93.26% 93.27%
=======================================
Files 1035 1035
Lines 60314 60324 +10
Branches 400 400
=======================================
+ Hits 56254 56265 +11
+ Misses 4060 4059 -1
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
d7abd7e to
1c63bb4
Compare
✅ Deploy Preview for authentik-integrations ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
cc3b6cc to
fec0c5b
Compare
fec0c5b to
7954771
Compare
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
✅ Deploy Preview for authentik-storybook ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
|
authentik PR Installation instructions Instructions for docker-composeAdd the following block to your AUTHENTIK_IMAGE=ghcr.io/goauthentik/dev-server
AUTHENTIK_TAG=gh-a94c6196ebe6021a310ad4f3e158dfbaf113e155
AUTHENTIK_OUTPOSTS__CONTAINER_IMAGE_BASE=ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)sAfterwards, run the upgrade commands from the latest release notes. Instructions for KubernetesAdd the following block to your authentik:
outposts:
container_image_base: ghcr.io/goauthentik/dev-%(type)s:gh-%(build_hash)s
global:
image:
repository: ghcr.io/goauthentik/dev-server
tag: gh-a94c6196ebe6021a310ad4f3e158dfbaf113e155Afterwards, run the upgrade commands from the latest release notes. |
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
BeryJu
left a comment
There was a problem hiding this comment.
LGTM but I think @gergosimonyi would prefer a concrete m2m through model
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Signed-off-by: Marc 'risson' Schmitt <[email protected]>
Details
What does this PR change?
Introduce a
dependenciesfield on tasks, and a new task statewaiting_for_dependencies, so that tasks may depend on other tasks finishing before running.When enqueuing a task, a new option called
dependencieshas been added, which can be set to a list of tasks (or pks, or whatever django accepts). If that list is not empty, the task state is set towaiting_for_dependenciesinstead ofqueued.When a task is done, it now looks for dependent tasks, and for each dependent task, checks if all its dependencies are done. If so, the dependent is marked as
queued. When rejecting a task, all its dependents are marked as rejected.Also, when the broker is grabbing new tasks, there is a new subroutine that runs when no tasks are found (to avoid blocking the broker when there is work to do) to find
waiting_for_dependenciestasks that might have been missed when (n)ack-ing a task. The same logic as above applies here.Why is this change needed?
To get rid of top-level tasks for synchronization processes, and to all for new processes for tracking the status of syncs. See #23126 for an example use case.
How was this tested?
With #23126
Linked issues
Checklist
make all)make docs)