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

build(ingest): remove markupsafe dep and bump pytest-docker #6201

Merged
merged 2 commits into from
Oct 15, 2022
Merged
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
7 changes: 1 addition & 6 deletions metadata-ingestion/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@ def get_long_description():
"types-termcolor>=1.0.0",
"psutil>=5.8.0",
"ratelimiter",
# Markupsafe breaking change broke Jinja and some other libs
# Pinning it to a version which works even though we are not using explicitly
# https://github.com/aws/aws-sam-cli/issues/3661
# Airflow compatibility: https://github.com/apache/airflow/blob/2.2.2/setup.cfg#L125
"markupsafe>=1.1.1,<=2.0.1",
"Deprecated",
"types-Deprecated",
"humanfriendly",
Expand Down Expand Up @@ -371,7 +366,7 @@ def get_long_description():
"pytest>=6.2.2",
"pytest-asyncio>=0.16.0",
"pytest-cov>=2.8.1",
"pytest-docker>=0.10.3,<0.12",
"pytest-docker[docker-compose-v1]>=1.0.1",
"deepdiff",
"requests-mock",
"freezegun",
Expand Down
12 changes: 8 additions & 4 deletions metadata-ingestion/tests/test_helpers/docker_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,15 +43,19 @@ def wait_for_port(


@pytest.fixture(scope="module")
def docker_compose_runner(docker_compose_project_name, docker_cleanup):
def docker_compose_runner(
docker_compose_command, docker_compose_project_name, docker_setup, docker_cleanup
):
@contextlib.contextmanager
def run(
compose_file_path: Union[str, list], key: str
) -> pytest_docker.plugin.Services:
with pytest_docker.plugin.get_docker_services(
compose_file_path,
f"{docker_compose_project_name}-{key}",
docker_cleanup,
docker_compose_command=docker_compose_command,
docker_compose_file=compose_file_path,
docker_compose_project_name=f"{docker_compose_project_name}-{key}",
docker_setup=docker_setup,
docker_cleanup=docker_cleanup,
) as docker_services:
yield docker_services

Expand Down