Skip to content

Conversation

safoinme
Copy link
Contributor

@safoinme safoinme commented Sep 29, 2025

Describe changes

  • extend the deployment domain models and API surface to represent curated deployment visualizations, including request/update/response models and filter support.
  • persist curated visualizations by introducing the corresponding SQLModel schema, Alembic migration, and REST/SQL store logic, and wiring the new routes into the FastAPI server.
  • expose client helpers so SDK users can add, list, update, and delete the curated visualizations associated with a deployment while keeping responses hydrated with attached artifacts.

Why

  • product teams need a first-class way to curate which artifact visualizations show up alongside a deployment so dashboards can surface the right insights without manual filtering.
  • storing these curation decisions in the backend ensures they survive across sessions, are shareable across users, and can participate in RBAC/project scoping.
  • wiring the API through the client and stores keeps the SDK in sync with the server capabilities, enabling immediate consumption by CLI/UI flows.

This is related to #4007 and the Custom visualisation ticket in Notion

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 internal To filter out internal PRs and issues enhancement New feature or request labels Sep 29, 2025
@safoinme safoinme linked an issue Sep 29, 2025 that may be closed by this pull request
1 task
@schustmi
Copy link
Contributor

@safoinme Can you write a description for this PR please, and include why we need all of this?

This change sets the `include_metadata` and `include_resources` parameters to `False` in the `visualization.to_model` method call within the `DeploymentSchema` class. This adjustment ensures that unnecessary metadata and resources are not included in the visualizations.

No functional changes are expected as a result of this update.
Copy link
Contributor

github-actions bot commented Oct 5, 2025

ZenML CLI Performance Comparison (Threshold: 1.0s, Timeout: 60s, Slow: 5s)

❌ Failed Commands on Current Branch (feature/deployment-custom-visualizations)

  • zenml stack list: Command failed on run 2 (exit code: 1)
  • zenml pipeline list: Command failed on run 1 (exit code: 1)
  • zenml model list: Command failed on run 1 (exit code: 1)

🚨 New Failures Introduced

The following commands fail on your branch but worked on the target branch:

  • zenml stack list
  • zenml pipeline list
  • zenml model list

Performance Comparison

Command develop Time (s) feature/deployment-custom-visualizations Time (s) Difference Status
zenml --help 1.467190 ± 0.041593 1.438106 ± 0.053198 -0.029s ✓ No significant change
zenml model list Not tested Failed N/A ❌ Broken in current branch
zenml pipeline list Not tested Failed N/A ❌ Broken in current branch
zenml stack --help 1.428065 ± 0.008660 1.460754 ± 0.016823 +0.033s ✓ No significant change
zenml stack list Not tested Failed N/A ❌ Broken in current branch

Summary

  • Total commands analyzed: 5
  • Commands compared for timing: 2
  • Commands improved: 0 (0.0% of compared)
  • Commands degraded: 0 (0.0% of compared)
  • Commands unchanged: 2 (100.0% of compared)
  • Failed commands: 3 (NEW FAILURES INTRODUCED)
  • Timed out commands: 0
  • Slow commands: 0

Environment Info

  • Target branch: Linux 6.11.0-1018-azure
  • Current branch: Linux 6.11.0-1018-azure
  • Test timestamp: 2025-10-17T10:07:22Z
  • Timeout: 60 seconds
  • Slow threshold: 5 seconds

Copy link
Contributor

@stefannica stefannica left a comment

Choose a reason for hiding this comment

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

This feature has the potential of becoming more than just a deployment association. In fact, I would even say that attaching visualizations to deployments is the least useful of the possible range of associations that can happen at pipeline, pipeline run and pipeline snapshot level.

If it's not too late, I'll still recommend that this be implemented using a more generic and extensible approach, similar to how run metadata is implemented (see RunMetadataResourceSchema).

Copy link
Contributor

github-actions bot commented Oct 9, 2025

Documentation Link Check Results

Absolute links check failed
There are broken absolute links in the documentation. See workflow logs for details
Relative links check passed
Last checked: 2025-10-19 01:00:05 UTC

@stefannica stefannica self-requested a review October 10, 2025 11:39
Copy link
Contributor

@stefannica stefannica left a comment

Choose a reason for hiding this comment

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

This looks mostly great and I love how extensible you've made it. That being said, I do have a couple of high-level comments that will require you to change things a bit:

  1. the CuratedVisualization models and Client methods don't reflect the UX expectations (see my comments)
  2. you still need to add support in the schema for all the various resources

Copy link
Contributor

@stefannica stefannica left a comment

Choose a reason for hiding this comment

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

The RBAC permission checks look good now, but I discovered another problem with how the SQL schemas are implemented: they are over-engineered and the foreign relationships still need some work.

Copy link
Contributor

@stefannica stefannica left a comment

Choose a reason for hiding this comment

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

The last round.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request internal To filter out internal PRs and issues run-slow-ci

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Deployment details: Show custom visualizations

3 participants