Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ jobs:
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ jobs:
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ jobs:
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true

Expand Down
1 change: 1 addition & 0 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ jobs:
- name: Install poetry
uses: snok/install-poetry@v1
with:
version: 1.8.2
virtualenvs-create: true
virtualenvs-in-project: true

Expand Down
4,680 changes: 2,698 additions & 1,982 deletions poetry.lock

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ license = "BSD-3-Clause"
readme = "README.md"

[tool.poetry.dependencies]
python = "^3.9"
python = ">=3.9.2,<4.0.0"
prefect = "^2.8.2"
boto3 = "^1.24.59"
numpy = "^1.24.2"
Expand All @@ -32,7 +32,7 @@ myst-parser = "^2.0.0"
sphinx-copybutton = "^0.5.2"
tox = "^4.5.1"
ruff = "^0.6.3"
moto = {extras = ["ec2", "batch", "logs"], version = "^5.0.11"}
moto = "^5.1.21"

[tool.isort]
profile = "black"
Expand Down
14 changes: 14 additions & 0 deletions tests/container_collection/fargate/test_submit_fargate_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@
CLUSTER = "cluster-name"


def _patch_moto_private_dns_name():
# Moto ECS expects ENIs to have a private_dns_name attribute.
# Some Moto versions don't define it on the EC2 NetworkInterface model.
# This helper makes a private_dns_name attribute if the EC2 NetworkInterface model doesn't define one.
from moto.ec2.models.elastic_network_interfaces import NetworkInterface

if not hasattr(NetworkInterface, "private_dns_name"):
NetworkInterface.private_dns_name = property(
lambda self: f"ip-{self.private_ip_address.replace('.', '-')}.ec2.internal"
)


@mock.patch.dict(
os.environ,
{
Expand Down Expand Up @@ -45,6 +57,8 @@ def setUp(self):

@mock_aws
def test_submit_fargate_task(self):
_patch_moto_private_dns_name()

name = "task-name"
user = "user"
command = ["command", "string"]
Expand Down