Skip to content

Feature/event triggers#4692

Merged
Json-Andriopoulos merged 42 commits intodevelopfrom
feature/event-triggers
Apr 17, 2026
Merged

Feature/event triggers#4692
Json-Andriopoulos merged 42 commits intodevelopfrom
feature/event-triggers

Conversation

@Json-Andriopoulos
Copy link
Copy Markdown
Contributor

@Json-Andriopoulos Json-Andriopoulos commented Apr 7, 2026

Describe changes

This feature introduces the concept of platform event triggers.

Platform event triggers are a type of triggers that users can set to "trigger" downstream execution based on a ZenML event (for instance a pipeline run completes).

This PR introduces the full backend management of this new trigger type functionality (CLI, SDK, etc.)

Pre-requisites

Please ensure you have done the following:

  • I have read the CONTRIBUTING.md document.
  • I have added tests to cover my changes.
  • I have based my new branch on develop and the open PR is targeting develop. If your branch wasn't based on develop read Contribution guide on rebasing branch to develop.
  • IMPORTANT: I made sure that my changes are reflected properly in the following resources:
    • ZenML Docs
    • Dashboard: Needs to be communicated to the frontend team.
    • Templates: Might need adjustments (that are not reflected in the template tests) in case of non-breaking changes and deprecations.
    • Projects: Depending on the version dependencies, different projects might get affected.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Other (add details above)

@github-actions github-actions Bot added the enhancement New feature or request label Apr 7, 2026
@bcdurak bcdurak linked an issue Apr 7, 2026 that may be closed by this pull request
Comment thread src/zenml/client.py
Comment thread src/zenml/enums.py Outdated
Comment thread src/zenml/models/v2/core/triggers.py Outdated
Comment thread src/zenml/zen_server/utils.py Outdated
Comment thread src/zenml/config/server_config.py Outdated
Comment thread src/zenml/zen_server/dispatcher/utils.py Outdated
Comment thread src/zenml/zen_server/utils.py Outdated
Comment thread src/zenml/zen_server/dispatcher/dispatcher.py Outdated
Comment thread src/zenml/dispatcher/handler.py
Comment thread src/zenml/pub_sub/models.py Outdated
trigger_type: Literal["REST", "SCHEDULE", "WEBHOOK", "PLATFORM_EVENT"]
trigger_id: UUID | None = None
scheduled_at: datetime | None = None
metadata: dict[str, Any] | None = None
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it also seem logical to you that the scheduled_at field could also be part of this more generic metadata ? Or is it just me ?

Comment thread src/zenml/zen_server/routers/trigger_endpoints.py
Comment thread src/zenml/models/v2/core/triggers.py Outdated
@Json-Andriopoulos Json-Andriopoulos force-pushed the feature/event-triggers branch 2 times, most recently from b5dc2e3 to edc621a Compare April 15, 2026 07:10
Comment thread src/zenml/config/server_config.py
Comment thread src/zenml/dispatcher/dispatcher.py Outdated
Comment thread src/zenml/dispatcher/dispatcher.py Outdated
return request_manager().current_request


async def register_event_handlers() -> None:
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be register_platform_event_handler instead. It should create the platform event handler instance based on the source path in the server config and (maybe) register it with the dispatcher. Even better if the class registers itself with the dispatcher singleton when created.

Comment thread src/zenml/dispatcher/handler.py Outdated
Comment thread src/zenml/models/v2/core/triggers.py Outdated
Comment thread src/zenml/zen_stores/schemas/trigger_assoc.py Outdated
Comment thread src/zenml/zen_stores/sql_zen_store.py Outdated
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
# or implied. See the License for the specific language governing
# permissions and limitations under the License.
"""Utility functions to manage platform event triggers."""
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Loving this !!!! This is the kind of UX that makes my heart melt.

Comment thread src/zenml/zen_server/zen_server_api.py Outdated
@stefannica stefannica added the run-slow-ci Tag that is used to trigger the slow-ci label Apr 15, 2026
@stefannica stefannica marked this pull request as ready for review April 15, 2026 18:38
@stefannica
Copy link
Copy Markdown
Contributor

@claude /full-review

@claude
Copy link
Copy Markdown

claude Bot commented Apr 15, 2026

Claude finished @stefannica's task in 0s —— View job


I'll analyze this and get back to you.

@Json-Andriopoulos Json-Andriopoulos added the release-notes Release notes will be attached and used publicly for this PR. label Apr 16, 2026
@stefannica
Copy link
Copy Markdown
Contributor

@claude /full-review

1 similar comment
@strickvl
Copy link
Copy Markdown
Contributor

@claude /full-review

@claude
Copy link
Copy Markdown

claude Bot commented Apr 16, 2026

Claude finished @stefannica's task in 0s —— View job


I'll analyze this and get back to you.

@claude
Copy link
Copy Markdown

claude Bot commented Apr 16, 2026

Claude finished @strickvl's task in 0s —— View job


I'll analyze this and get back to you.

@Json-Andriopoulos Json-Andriopoulos force-pushed the feature/event-triggers branch 2 times, most recently from 590c67d to aab06c4 Compare April 16, 2026 09:41
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

Documentation Link Check Results

Absolute links check failed
There are broken absolute links in the documentation. See workflow logs for details
Relative links check failed
There are broken relative links in the documentation. See workflow logs for details
Last checked: 2026-04-17 10:32:25 UTC

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 16, 2026

🔍 Broken Links Report

Summary

  • 📁 Files with broken links: 2
  • 🔗 Total broken links: 4
  • 📄 Broken markdown links: 4
  • 🖼️ Broken image links: 0
  • ⚠️ Broken reference placeholders: 0

Details

File Link Type Link Text Broken Path
zenml-pro/resource-pools-core-concepts.md 📄 "How preemption works" resource-pools-preemption.md
zenml-pro/resource-pools-examples.md 📄 "How preemption works" resource-pools-preemption.md
zenml-pro/resource-pools-examples.md 📄 "How preemption works" resource-pools-preemption.md
zenml-pro/resource-pools-examples.md 📄 "How preemption works" resource-pools-preemption.md
📂 Full file paths
  • /home/runner/work/zenml/zenml/scripts/../docs/book/getting-started/zenml-pro/resource-pools-core-concepts.md
  • /home/runner/work/zenml/zenml/scripts/../docs/book/getting-started/zenml-pro/resource-pools-examples.md
  • /home/runner/work/zenml/zenml/scripts/../docs/book/getting-started/zenml-pro/resource-pools-examples.md
  • /home/runner/work/zenml/zenml/scripts/../docs/book/getting-started/zenml-pro/resource-pools-examples.md

@Json-Andriopoulos Json-Andriopoulos force-pushed the feature/event-triggers branch 2 times, most recently from 49a42ac to 8d7e63d Compare April 17, 2026 09:04
default=None,
title="Extra information for trigger execution like upstream_run_id etc.",
)
pipeline_id: UUID | None = Field(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is this needed? There is resources.pipeline.id, which should always be included if the metadata is included?

@Json-Andriopoulos Json-Andriopoulos merged commit 2c84f71 into develop Apr 17, 2026
64 of 79 checks passed
@Json-Andriopoulos Json-Andriopoulos deleted the feature/event-triggers branch April 17, 2026 12:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request release-notes Release notes will be attached and used publicly for this PR. run-slow-ci Tag that is used to trigger the slow-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Pipeline Event Hooks

4 participants