Skip to content

Commit

Permalink
Pin prefect version for integrations packages (#13408)
Browse files Browse the repository at this point in the history
Co-authored-by: nate nowack <[email protected]>
  • Loading branch information
desertaxle and zzstoatzz authored May 16, 2024
1 parent eea75eb commit 504d269
Show file tree
Hide file tree
Showing 18 changed files with 81 additions and 109 deletions.
62 changes: 30 additions & 32 deletions src/integrations/prefect-aws/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ name = "prefect-aws"
description = "Prefect integrations for interacting with Amazon Web Services."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "Apache License 2.0"}
license = { text = "Apache License 2.0" }
keywords = ["prefect"]
authors = [
{name = "Prefect Technologies, Inc.", email = "[email protected]"}
]
authors = [{ name = "Prefect Technologies, Inc.", email = "[email protected]" }]
classifiers = [
"Natural Language :: English",
"Intended Audience :: Developers",
Expand All @@ -26,38 +24,38 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
dependencies = [
"boto3>=1.24.53",
"botocore>=1.27.53",
"mypy_boto3_s3>=1.24.94",
"mypy_boto3_secretsmanager>=1.26.49",
"prefect>=2.16.4",
"pyparsing>=3.1.1",
"tenacity>=8.0.0",
"boto3>=1.24.53",
"botocore>=1.27.53",
"mypy_boto3_s3>=1.24.94",
"mypy_boto3_secretsmanager>=1.26.49",
"prefect >=2.16.4, <3.0.0",
"pyparsing>=3.1.1",
"tenacity>=8.0.0",
]
dynamic = ["version"]

[project.optional-dependencies]
dev = [
"black",
"boto3-stubs >= 1.24.39",
"coverage",
"flake8",
"interrogate",
"isort",
"mkdocs",
"mkdocs-gen-files",
"mkdocs-material",
"mkdocstrings-python-legacy",
"mock; python_version < '3.8'", # moto 4.2.5 broke something fairly deep in our test suite https://github.com/PrefectHQ/prefect-aws/issues/318
"moto >= 3.1.16, < 4.2.5",
"mypy",
"pillow",
"pre-commit",
"pytest",
"pytest-asyncio >= 0.18.2, != 0.22.0, < 0.23.0", # Cannot override event loop in 0.23.0. See https://github.com/pytest-dev/pytest-asyncio/issues/706 for more details.
"pytest-cov",
"pytest-xdist",
"types-boto3 >= 1.0.2",
"black",
"boto3-stubs >= 1.24.39",
"coverage",
"flake8",
"interrogate",
"isort",
"mkdocs",
"mkdocs-gen-files",
"mkdocs-material",
"mkdocstrings-python-legacy",
"mock; python_version < '3.8'", # moto 4.2.5 broke something fairly deep in our test suite https://github.com/PrefectHQ/prefect-aws/issues/318
"moto >= 3.1.16, < 4.2.5",
"mypy",
"pillow",
"pre-commit",
"pytest",
"pytest-asyncio >= 0.18.2, != 0.22.0, < 0.23.0", # Cannot override event loop in 0.23.0. See https://github.com/pytest-dev/pytest-asyncio/issues/706 for more details.
"pytest-cov",
"pytest-xdist",
"types-boto3 >= 1.0.2",
]

[project.urls]
Expand Down Expand Up @@ -88,4 +86,4 @@ fail_under = 80
show_missing = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_mode = "auto"
16 changes: 5 additions & 11 deletions src/integrations/prefect-azure/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ name = "prefect-azure"
description = "Prefect integrations with Microsoft Azure services"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "Apache License 2.0"}
license = { text = "Apache License 2.0" }
keywords = ["prefect"]
authors = [
{name = "Prefect Technologies, Inc.", email = "[email protected]"}
]
authors = [{ name = "Prefect Technologies, Inc.", email = "[email protected]" }]
classifiers = [
"Natural Language :: English",
"Intended Audience :: Developers",
Expand All @@ -30,19 +28,15 @@ dependencies = [
"azure_identity>=1.10",
"azure_mgmt_containerinstance>=10.0",
"azure-mgmt-resource>=21.2",
"prefect>=2.14.10",
"prefect>=2.14.10, < 3.0.0",
]
dynamic = ["version"]

[project.optional-dependencies]
blob_storage = ["azure-storage-blob"]
cosmos_db = ["azure-cosmos"]
ml_datastore = ["azureml-core"]
all_extras = [
"azure-cosmos",
"azure-storage-blob",
"azureml-core",
]
all_extras = ["azure-cosmos", "azure-storage-blob", "azureml-core"]
dev = [
"aiohttp",
"azure-cosmos",
Expand Down Expand Up @@ -91,4 +85,4 @@ fail_under = 80
show_missing = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_mode = "auto"
10 changes: 4 additions & 6 deletions src/integrations/prefect-bitbucket/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ name = "prefect-bitbucket"
description = "Prefect integrations for working with Bitbucket repositories."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "Apache License 2.0"}
license = { text = "Apache License 2.0" }
keywords = ["prefect"]
authors = [
{name = "Prefect Technologies, Inc.", email = "[email protected]"}
]
authors = [{ name = "Prefect Technologies, Inc.", email = "[email protected]" }]
classifiers = [
"Natural Language :: English",
"Intended Audience :: Developers",
Expand All @@ -26,7 +24,7 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
dependencies = [
"prefect>=2.14.10",
"prefect>=2.14.10, < 3.0.0",
"atlassian-python-api>=3.32.1,!=3.41.5,!=3.41.6,!=3.41.7,!=3.41.8",
]
dynamic = ["version"]
Expand Down Expand Up @@ -77,4 +75,4 @@ fail_under = 80
show_missing = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_mode = "auto"
2 changes: 1 addition & 1 deletion src/integrations/prefect-dask/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ build-backend = "setuptools.build_meta"
name = "prefect-dask"
dependencies = [
"anyio >= 3.7.1, < 4.0.0",
"prefect>=2.13.5",
"prefect>=2.13.5, < 3.0.0",
"distributed==2022.2.0; python_version < '3.8'",
"distributed>=2022.5.0,!=2023.3.2,!=2023.3.2.1,!=2023.4.*,!=2023.5.*; python_version >= '3.8'", # don't allow versions from 2023.3.2 to 2023.5 (inclusive) due to issue with get_client starting in 2023.3.2 (fixed in 2023.6.0) - https://github.com/dask/distributed/issues/7763
]
Expand Down
12 changes: 4 additions & 8 deletions src/integrations/prefect-databricks/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ name = "prefect-databricks"
description = "Prefect integrations with Databricks"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "Apache License 2.0"}
license = { text = "Apache License 2.0" }
keywords = ["prefect"]
authors = [
{name = "Prefect Technologies, Inc.", email = "[email protected]"}
]
authors = [{ name = "Prefect Technologies, Inc.", email = "[email protected]" }]
classifiers = [
"Natural Language :: English",
"Intended Audience :: Developers",
Expand All @@ -25,9 +23,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"prefect>=2.14.10",
]
dependencies = ["prefect>=2.14.10, < 3.0.0"]
dynamic = ["version"]

[project.optional-dependencies]
Expand Down Expand Up @@ -76,4 +72,4 @@ fail_under = 80
show_missing = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_mode = "auto"
2 changes: 1 addition & 1 deletion src/integrations/prefect-dbt/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
dependencies = [
"prefect>=2.16.6",
"prefect>=2.16.6, < 3.0.0",
"dbt-core>=1.7.0",
"prefect_shell>=0.1.4",
"sgqlc>=16.0.0",
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/prefect-docker/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
]
dependencies = ["prefect>=2.13.5", "docker>=6.1.1"]
dependencies = ["prefect>=2.13.5, < 3.0.0", "docker>=6.1.1"]
dynamic = ["version"]

[project.optional-dependencies]
Expand Down
12 changes: 4 additions & 8 deletions src/integrations/prefect-email/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ name = "prefect-email"
description = "Prefect integrations for interacting with email."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "Apache License 2.0"}
license = { text = "Apache License 2.0" }
keywords = ["prefect"]
authors = [
{name = "Prefect Technologies, Inc.", email = "[email protected]"}
]
authors = [{ name = "Prefect Technologies, Inc.", email = "[email protected]" }]
classifiers = [
"Natural Language :: English",
"Intended Audience :: Developers",
Expand All @@ -25,9 +23,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"prefect>=2.14.10",
]
dependencies = ["prefect>=2.14.10, < 3.0.0"]
dynamic = ["version"]

[project.optional-dependencies]
Expand Down Expand Up @@ -76,4 +72,4 @@ fail_under = 80
show_missing = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_mode = "auto"
2 changes: 1 addition & 1 deletion src/integrations/prefect-gcp/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
dependencies = [
"prefect>=2.16.4",
"prefect>=2.16.4, < 3.0.0",
"google-api-python-client>=2.20.0",
"google-cloud-storage>=2.0.0",
"tenacity>=8.0.0",
Expand Down
15 changes: 7 additions & 8 deletions src/integrations/prefect-gcp/tests/test_cloud_run_worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@

import pytest
from googleapiclient.errors import HttpError
from jsonschema.exceptions import ValidationError
from prefect_gcp.credentials import GcpCredentials
from prefect_gcp.utilities import slugify_name
from prefect_gcp.workers.cloud_run import (
Expand All @@ -23,6 +22,9 @@
from prefect.client.schemas import FlowRun
from prefect.exceptions import InfrastructureNotFound
from prefect.server.schemas.actions import DeploymentCreate
from prefect.utilities.schema_tools.validation import (
ValidationError as PrefectValidationError,
)


@pytest.fixture(autouse=True)
Expand Down Expand Up @@ -313,12 +315,12 @@ def test_invalid_cpu_string(self, cpu):
flow_id=uuid.uuid4(),
infra_overrides={"region": "test-region1", "cpu": cpu},
)
with pytest.raises(ValidationError) as excinfo:
with pytest.raises(PrefectValidationError) as exc:
deployment.check_valid_configuration(
CloudRunWorker.get_default_base_job_template()
)

assert excinfo.value.message == f"'{cpu}' does not match '^(\\\\d*000)m$'"
assert f"'{cpu}' does not match '^(\\\\d*000)m$'" in str(exc.value)

@pytest.mark.parametrize("cpu", ["1000m", "2000m", "3000m"])
def test_valid_cpu_string(self, cpu):
Expand All @@ -338,14 +340,11 @@ def test_invalid_memory_string(self, memory):
flow_id=uuid.uuid4(),
infra_overrides={"region": "test-region1", "memory": memory},
)
with pytest.raises(ValidationError) as excinfo:
with pytest.raises(PrefectValidationError) as exc:
deployment.check_valid_configuration(
CloudRunWorker.get_default_base_job_template()
)
assert (
excinfo.value.message
== f"'{memory}' does not match '^\\\\d+(?:G|Gi|M|Mi)$'"
)
assert f"'{memory}' does not match '^\\\\d+(?:G|Gi|M|Mi)$'" in str(exc.value)

@pytest.mark.parametrize("memory", ["512G", "512Gi", "512M", "512Mi"])
def test_valid_memory_string(self, memory):
Expand Down
2 changes: 1 addition & 1 deletion src/integrations/prefect-github/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "prefect-github"
dependencies = ["sgqlc>=15.0", "prefect>=2.13.5"]
dependencies = ["sgqlc>=15.0", "prefect>=2.13.5, < 3.0.0"]
dynamic = ["version"]
description = "Prefect integrations interacting with GitHub"
readme = "README.md"
Expand Down
14 changes: 6 additions & 8 deletions src/integrations/prefect-gitlab/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ name = "prefect-gitlab"
description = "A Prefect collection for working with GitLab repositories."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "Apache License 2.0"}
license = { text = "Apache License 2.0" }
keywords = ["prefect"]
authors = [
{name = "Prefect Technologies, Inc.", email = "[email protected]"}
]
authors = [{ name = "Prefect Technologies, Inc.", email = "[email protected]" }]
classifiers = [
"Natural Language :: English",
"Intended Audience :: Developers",
Expand All @@ -26,9 +24,9 @@ classifiers = [
"Topic :: Software Development :: Libraries",
]
dependencies = [
"prefect>=2.13.5",
"python-gitlab>=3.12.0",
"tenacity>=8.2.3",
"prefect>=2.13.5, < 3.0.0",
"python-gitlab>=3.12.0",
"tenacity>=8.2.3",
]
dynamic = ["version"]

Expand Down Expand Up @@ -78,4 +76,4 @@ fail_under = 80
show_missing = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_mode = "auto"
6 changes: 5 additions & 1 deletion src/integrations/prefect-kubernetes/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,11 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
]
dependencies = ["prefect>=2.13.5", "kubernetes>=24.2.0", "tenacity>=8.2.3"]
dependencies = [
"prefect>=2.13.5, < 3.0.0",
"kubernetes>=24.2.0",
"tenacity>=8.2.3",
]
dynamic = ["version"]

[project.optional-dependencies]
Expand Down
13 changes: 4 additions & 9 deletions src/integrations/prefect-ray/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,9 @@ name = "prefect-ray"
description = "Prefect integrations with the Ray execution framework."
readme = "README.md"
requires-python = ">=3.8"
license = {text = "Apache License 2.0"}
license = { text = "Apache License 2.0" }
keywords = ["prefect"]
authors = [
{name = "Prefect Technologies, Inc.", email = "[email protected]"}
]
authors = [{ name = "Prefect Technologies, Inc.", email = "[email protected]" }]
classifiers = [
"Natural Language :: English",
"Intended Audience :: Developers",
Expand All @@ -25,10 +23,7 @@ classifiers = [
"Programming Language :: Python :: 3.12",
"Topic :: Software Development :: Libraries",
]
dependencies = [
"prefect>=2.14.10",
"ray[default]>=2.0.0"
]
dependencies = ["prefect>=2.14.10, < 3.0.0", "ray[default]>=2.0.0"]
dynamic = ["version"]

[project.optional-dependencies]
Expand Down Expand Up @@ -78,4 +73,4 @@ fail_under = 80
show_missing = true

[tool.pytest.ini_options]
asyncio_mode = "auto"
asyncio_mode = "auto"
Loading

0 comments on commit 504d269

Please sign in to comment.