Skip to main content

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, 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>/ Stop a workflow (body: {"state": "canceled"}). Removes the workflow's schedule so no further runs are created and cancels any of its runs still in progress. Idempotent: always returns 200. Only "canceled" is accepted as the target state.
GET /pulp/api/v3/workflow/workflow-runs/ List all runs across every workflow (filter by workflow to scope to a single workflow's run history). A flat convenience collection; each run's pulp_href points to its canonical nested URL below.
GET /pulp/api/v3/workflow/workflows/<workflow_pk>/runs/ List a workflow's runs
GET /pulp/api/v3/workflow/workflows/<workflow_pk>/runs/<pk>/ Retrieve a workflow run
PATCH /pulp/api/v3/workflow/workflows/<workflow_pk>/runs/<pk>/ Cancel a workflow run (body: {"state": "canceled"}). Works while the run is waiting or running; returns 409 if the run 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, or the synthetic finished event that fires on any non-canceled terminal state). Callbacks are not currently supported for cancellation.

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.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pulp_workflow-0.3.0.tar.gz (46.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pulp_workflow-0.3.0-py3-none-any.whl (57.5 kB view details)

Uploaded Python 3

File details

Details for the file pulp_workflow-0.3.0.tar.gz.

File metadata

  • Download URL: pulp_workflow-0.3.0.tar.gz
  • Upload date:
  • Size: 46.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pulp_workflow-0.3.0.tar.gz
Algorithm Hash digest
SHA256 3d5c09a45e431151b1230af1653797f0f6f1a8fd352cd88e04d3ed02425a4d84
MD5 cb537bfef9adfcf3ee133cb2ac6b905b
BLAKE2b-256 48d5bbf40961c159982235486feb96a50b80671872e77cf2f9e46dcd44cd43e5

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_workflow-0.3.0.tar.gz:

Publisher: publish.yml on pulp/pulp_workflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file pulp_workflow-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: pulp_workflow-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 57.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.14

File hashes

Hashes for pulp_workflow-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 8e78ae58d84979455586d253908e346ab0fa52abbea00e4736611e63c79907c5
MD5 7c03e6721c5fa68aff7a76616bdf2ede
BLAKE2b-256 6a62f7d05292b4cf9515043e0b6b943f519cddccb7c836ffa7e1d5d965cd1fb9

See more details on using hashes here.

Provenance

The following attestation bundles were made for pulp_workflow-0.3.0-py3-none-any.whl:

Publisher: publish.yml on pulp/pulp_workflow

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

0.4.0

2 files

This release

0.3.0 This release

2 files

0.2.1

2 files

0.2.0

2 files

0.1.1

2 files

0.1.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page