Add Callbacks for Workflow lifecycle events - #11
Merged
Merged
Conversation
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
May 8, 2026 18:18
9dcf218 to
0df1898
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
May 8, 2026 18:21
0df1898 to
0111ee0
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a workflow lifecycle callback extension point to pulp_workflow by introducing an API-managed CallbackService (an admin-registered executable script) and WorkflowCallback attachments on Workflow that dispatch callback invocations as Pulp tasks when workflows transition states.
Changes:
- Added
CallbackServiceandWorkflowCallbackmodels (plus migration) and exposed them via serializers/viewsets. - Dispatched callback tasks on workflow state transitions (
running,completed,failed,canceled, plusfinishedwildcard). - Added functional/unit test coverage, documentation updates, and a changelog entry.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| README.md | Updates README overview to mention callbacks. |
| CHANGES/+10.feature | Documents the new callback feature and environment variables. |
| pulp_workflow/app/migrations/0003_callbackservice_workflowcallback.py | Adds DB tables for CallbackService and WorkflowCallback. |
| pulp_workflow/app/models.py | Introduces callback-related models/constants and script execution logic. |
| pulp_workflow/app/serializers.py | Adds serializers for callback services and nested workflow callbacks. |
| pulp_workflow/app/tasks.py | Dispatches callback tasks on workflow state transitions and implements run_callback. |
| pulp_workflow/app/viewsets.py | Adds CallbackServiceViewSet and fires cancel-related callbacks. |
| pulp_workflow/pytest_plugin.py | Adds factories and monitor_workflow helper fixture for functional tests. |
| pulp_workflow/tests/unit/test_viewsets.py | Adds access policy and locked-role tests for CallbackServiceViewSet. |
| pulp_workflow/tests/functional/api/test_crud_callback_services.py | Adds CRUD functional tests for callback services. |
| pulp_workflow/tests/functional/api/test_workflow_callbacks.py | Adds end-to-end lifecycle callback dispatch tests. |
| pulp_workflow/tests/functional/api/test_execute_workflow.py | Refactors workflow execution test to use shared helpers (extract_pk, monitor_workflow). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
May 8, 2026 18:24
0111ee0 to
a550750
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
May 8, 2026 18:30
a550750 to
af65e61
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
May 11, 2026 13:13
af65e61 to
fef70cb
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
May 11, 2026 13:26
fef70cb to
5111435
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
May 11, 2026 13:35
5111435 to
d784c71
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
May 11, 2026 13:57
d784c71 to
624cfb9
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
May 14, 2026 13:34
624cfb9 to
2d1bfa4
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 13:23
7ccb10a to
e325799
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 14:39
e325799 to
b4703aa
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 14:40
b4703aa to
da7586d
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 14:42
da7586d to
73bd1c1
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 14:49
73bd1c1 to
64240a8
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 14:56
64240a8 to
62e8080
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 14:57
62e8080 to
ef6888b
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 15:08
ef6888b to
8b2ff58
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 15:18
8b2ff58 to
caab655
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 15:55
caab655 to
8241c94
Compare
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 16:04
8241c94 to
88a5fe3
Compare
Introduces CallbackService (an admin-registered executable script, modeled after pulpcore's SigningService) and WorkflowCallback (a join table to Workflow with a callback_type drawn from the workflow lifecycle states plus a 'finished' option). When a Workflow transitions states, matching callbacks are dispatched as Pulp tasks that invoke the script. closes #10 Assisted-By: GitHub Copilot (Claude)
daviddavis
force-pushed
the
add-workflow-callbacks
branch
from
June 2, 2026 20:02
88a5fe3 to
50d2746
Compare
acheng-01
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Introduces CallbackService (an admin-registered executable script, modeled after pulpcore's SigningService but fully API-managed) and WorkflowCallback (a join table to Workflow with a callback_type drawn from the workflow lifecycle states plus a 'finished' wildcard). When a Workflow transitions states, matching callbacks are dispatched as Pulp tasks that invoke the script with PULP_WORKFLOW_NAME / STATE / PK / LABELS / LABEL_ in the environment.
closes #10
Assisted-By: GitHub Copilot (Claude)