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

Creates ConcurrencyOptions pydantic model. #15291

Merged

Conversation

jeanluciano
Copy link
Contributor

@jeanluciano jeanluciano commented Sep 9, 2024

Adds two pydantic models ConcurrencyLimitConfig, ConcurrencyOptions, and updates Deployment.concurrency_limit to be able to use ConcurrencyLimitConfig. Also adds a concurrecy_options column to the deployments table.

Related: #14934, #15340

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.

@jeanluciano jeanluciano added enhancement An improvement of an existing feature concurrency labels Sep 9, 2024
@jeanluciano jeanluciano self-assigned this Sep 9, 2024
Copy link

codspeed-hq bot commented Sep 9, 2024

CodSpeed Performance Report

Merging #15291 will not alter performance

Comparing jean/oss-66-create-a-concurrency-options-pydantic-model (abfcf23) with main (8f159b4)

Summary

✅ 3 untouched benchmarks

@github-actions github-actions bot added the docs label Sep 11, 2024
@jeanluciano jeanluciano marked this pull request as ready for review September 11, 2024 16:24
@jeanluciano jeanluciano marked this pull request as draft September 11, 2024 18:49
@jeanluciano jeanluciano marked this pull request as ready for review September 13, 2024 15:06
src/prefect/server/schemas/actions.py Outdated Show resolved Hide resolved
src/prefect/server/schemas/core.py Outdated Show resolved Hide resolved
@jeanluciano jeanluciano merged commit 387cbe3 into main Sep 17, 2024
32 checks passed
@jeanluciano jeanluciano deleted the jean/oss-66-create-a-concurrency-options-pydantic-model branch September 17, 2024 14:30
@@ -878,7 +878,18 @@ def job_variables(self):
)

concurrency_limit: Mapped[Union[int, None]] = mapped_column(
sa.Integer, default=None, nullable=True
sa.Integer,
server_default=None,
Copy link
Contributor

Choose a reason for hiding this comment

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

did this server default get added w/o a db migration?

or well - why did this get added?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh. TIL alembic doesn't pick up server_default changes by default so I guess this doesn't matter but I think this line isn't doing anything as the DDL has already been generated and the updated DDL to alter the column w/ a db-server-side default isn't tracked via migrations.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
concurrency docs enhancement An improvement of an existing feature migration
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants