Pulp plugin for managing task schedules via CRUD API
Project description
pulp-workflow
Warning: This is a community plugin and is not officially supported. Scheduling tasks incorrectly can cause serious issues in your Pulp instance. Always test in a development environment first before applying changes to production.
A Pulp plugin that introduces the Workflow model. Workflows build on top of
tasks in Pulp allowing users to:
- Schedule tasks to run at any given time
- Run sequences of tasks in a specific order
- Set up callback services to run on workflow lifecycle events (e.g. running, completed, failed, canceled, finished)
A Workflow owns one or more WorkflowTask rows. Each task records the
task_name, task_args, task_kwargs, and any reserved_resources to use
when dispatching it. Workflows are immutable after creation: to change a
workflow, cancel it (if it has not yet started) and create a new one.
Demo
The demo walks through syncing and publishing a file repo via a Workflow, with a callback that notifies a messaging service (e.g. Discord/Slack) on completion. Watch the YouTube demo for a video walkthrough, or follow the written demo guide to run it yourself end-to-end.
CLI
If you're using the pulp-cli, be sure to check out our pulp-workflow plugin.
Endpoints
| Method | URL | Description |
|---|---|---|
| GET | /pulp/api/v3/workflow/workflows/ |
List workflows |
| POST | /pulp/api/v3/workflow/workflows/ |
Create a workflow (with tasks) |
| GET | /pulp/api/v3/workflow/workflows/<pk>/ |
Retrieve a workflow |
| PATCH | /pulp/api/v3/workflow/workflows/<pk>/ |
Cancel a workflow (body: {"state": "canceled"}). Works whether the workflow is waiting or running; returns 409 only if the workflow is already in a terminal state. Only "canceled" is accepted as the target state. |
| GET | /pulp/api/v3/workflow/callback-services/ |
List callback services |
| POST | /pulp/api/v3/workflow/callback-services/ |
Register a callback service (an executable on the worker host) |
| GET | /pulp/api/v3/workflow/callback-services/<pk>/ |
Retrieve a callback service |
| PUT, PATCH | /pulp/api/v3/workflow/callback-services/<pk>/ |
Update a callback service |
| DELETE | /pulp/api/v3/workflow/callback-services/<pk>/ |
Delete a callback service |
Callbacks
A CallbackService is a registered executable on the Pulp worker host that
can be attached to a workflow to run on lifecycle events (running,
completed, failed, canceled, or the synthetic finished event that
fires on any terminal state).
CallbackServices can be registered via the API (see
Endpoints) or via management commands, which is useful for
image-bootstrap scenarios where a callback needs to exist before the API
serves traffic:
pulpcore-manager add-callback-service <name> <script-path>
pulpcore-manager list-callback-services
pulpcore-manager remove-callback-service <name>
add-callback-service resolves the script path, runs the same validation as
the API (absolute path, file exists, executable bit set), and persists the
CallbackService row. Names must be unique within a domain; re-running with
the same name fails with a clear error rather than silently updating.
list-callback-services takes no arguments and prints each registered
CallbackService name on its own line (empty output when none exist).
remove-callback-service deletes the row with the given name, or exits with
an error if no such row exists.
Design
For details on how workflows execute, integrate with pulpcore TaskGroups,
and handle cancellation, see the design doc.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pulp_workflow-0.2.0.tar.gz.
File metadata
- Download URL: pulp_workflow-0.2.0.tar.gz
- Upload date:
- Size: 38.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7555e349bdd0391c1f08e863bdc502aeb1438332b527f0af42252fc1666de8a6
|
|
| MD5 |
edd7ad4ad60d715fef6c370150c5ccae
|
|
| BLAKE2b-256 |
3e9602ee5565e5dbd67630f249bccde01385af773a3b1348b968b81026018ddb
|
Provenance
The following attestation bundles were made for pulp_workflow-0.2.0.tar.gz:
Publisher:
publish.yml on daviddavis/pulp_workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pulp_workflow-0.2.0.tar.gz -
Subject digest:
7555e349bdd0391c1f08e863bdc502aeb1438332b527f0af42252fc1666de8a6 - Sigstore transparency entry: 1929431471
- Sigstore integration time:
-
Permalink:
daviddavis/pulp_workflow@6ad601cc1e052de78aeab37d62a054ae74dd430c -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/daviddavis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6ad601cc1e052de78aeab37d62a054ae74dd430c -
Trigger Event:
push
-
Statement type:
File details
Details for the file pulp_workflow-0.2.0-py3-none-any.whl.
File metadata
- Download URL: pulp_workflow-0.2.0-py3-none-any.whl
- Upload date:
- Size: 47.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c9894bc27e9ab8c4584227849277c5dc27fdaf57712e73959fa76cb98fed7d02
|
|
| MD5 |
1bb985853c17ae4c3a24fab1808fe407
|
|
| BLAKE2b-256 |
4ced9b31966fe8e2756843a3212054269d39a000a56aa57b354241e3115b5213
|
Provenance
The following attestation bundles were made for pulp_workflow-0.2.0-py3-none-any.whl:
Publisher:
publish.yml on daviddavis/pulp_workflow
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pulp_workflow-0.2.0-py3-none-any.whl -
Subject digest:
c9894bc27e9ab8c4584227849277c5dc27fdaf57712e73959fa76cb98fed7d02 - Sigstore transparency entry: 1929431563
- Sigstore integration time:
-
Permalink:
daviddavis/pulp_workflow@6ad601cc1e052de78aeab37d62a054ae74dd430c -
Branch / Tag:
refs/tags/0.2.0 - Owner: https://github.com/daviddavis
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@6ad601cc1e052de78aeab37d62a054ae74dd430c -
Trigger Event:
push
-
Statement type: