Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment SLA Definitions #16574

Merged
merged 22 commits into from
Jan 3, 2025
Merged

Deployment SLA Definitions #16574

merged 22 commits into from
Jan 3, 2025

Conversation

dylanbhughes
Copy link
Contributor

@dylanbhughes dylanbhughes commented Jan 2, 2025

This PR adds a new interface to deployments: SLAs. Service Level Agreements (SLAs) describe the intended behavior of the deployment. The first SLA we introduce here is the TimeToCompletionSla, which indicates how long flow runs from the deployment should take. It's possible to configure n SLAs for a given deployment by flow.deploy, prefect deploy ---sla or prefect.yaml. SLAs have different severities, giving users different alerting options for less or more serious violations.

Checklist

  • This pull request references any related issue by including "closes <link to issue>"
    • If no issue exists and your change is not a small fix, please create an issue first.
  • If this pull request adds new functionality, it includes unit tests that cover the changes
  • If this pull request removes docs files, it includes redirect settings in mint.json.
  • If this pull request adds functions or classes, it includes helpful docstrings.

Copy link

codspeed-hq bot commented Jan 2, 2025

CodSpeed Performance Report

Merging #16574 will not alter performance

Comparing dylanbhughes/deployment-sla (c1ec262) with main (e004d6a)

Summary

✅ 3 untouched benchmarks

@zzstoatzz
Copy link
Collaborator

we use

from __future__ import annotations

@dylanbhughes dylanbhughes marked this pull request as ready for review January 3, 2025 16:20
@dylanbhughes dylanbhughes requested a review from aaazzam January 3, 2025 16:20
Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

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

Awesome tests! I have a few small comments, but overall this is looking great!

src/prefect/deployments/runner.py Outdated Show resolved Hide resolved
src/prefect/deployments/runner.py Outdated Show resolved Hide resolved
src/prefect/deployments/runner.py Outdated Show resolved Hide resolved
src/prefect/cli/deploy.py Show resolved Hide resolved
Co-authored-by: Alex Streed <[email protected]>
src/prefect/deployments/runner.py Outdated Show resolved Hide resolved
src/prefect/deployments/runner.py Outdated Show resolved Hide resolved
src/prefect/deployments/runner.py Outdated Show resolved Hide resolved
src/prefect/deployments/runner.py Outdated Show resolved Hide resolved
src/prefect/flows.py Outdated Show resolved Hide resolved
src/prefect/flows.py Outdated Show resolved Hide resolved
src/prefect/flows.py Outdated Show resolved Hide resolved
src/prefect/flows.py Outdated Show resolved Hide resolved
Copy link
Member

@desertaxle desertaxle left a comment

Choose a reason for hiding this comment

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

LGTM!

@dylanbhughes dylanbhughes merged commit 0f2530c into main Jan 3, 2025
39 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants