From 7b4f547358efbcb1b5ece0906cab43d0b3959bd3 Mon Sep 17 00:00:00 2001 From: Tyler Nullmeier Date: Mon, 17 Jul 2023 13:39:55 -0500 Subject: [PATCH] Add workaround for failing pyyaml builds --- Dockerfile | 8 +++++++- test/test-step-10.bash | 6 +++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index bf350ec5..40e2156b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -114,7 +114,13 @@ RUN set -x \ # Install dependencies COPY ./nebuchadnezzar/requirements /workspace/enki/nebuchadnezzar/requirements COPY ./bakery-src/scripts/requirements.txt /workspace/enki/bakery-src/scripts/ -RUN pip3 install -r /workspace/enki/nebuchadnezzar/requirements/main.txt -r /workspace/enki/bakery-src/scripts/requirements.txt + +# More details: https://github.com/aws/aws-cli/issues/8036#issuecomment-1638544754 +# and: https://github.com/yaml/pyyaml/issues/601 +# PyYAML installed as dependency here [awscli](https://github.com/aws/aws-cli/blob/dbbf1ce01acec0116710968bbe5a96680e791c1b/setup.py#L30) +RUN pip3 install "PyYAML==5.3.1" \ + -r /workspace/enki/nebuchadnezzar/requirements/main.txt \ + -r /workspace/enki/bakery-src/scripts/requirements.txt # Install scripts COPY ./nebuchadnezzar/ /workspace/enki/nebuchadnezzar/ diff --git a/test/test-step-10.bash b/test/test-step-10.bash index 777b8777..2bd2c3c2 100755 --- a/test/test-step-10.bash +++ b/test/test-step-10.bash @@ -8,7 +8,11 @@ if [[ $CI = '' && $VIRTUAL_ENV = '' ]]; then exit 1 fi -pip install "../bakery-src/scripts/.[test]" + +# More details: https://github.com/aws/aws-cli/issues/8036#issuecomment-1638544754 +# and: https://github.com/yaml/pyyaml/issues/601 +# PyYAML installed as dependency here [awscli](https://github.com/aws/aws-cli/blob/dbbf1ce01acec0116710968bbe5a96680e791c1b/setup.py#L30) +pip install "PyYAML==5.3.1" "../bakery-src/scripts/.[test]" flake8 "../bakery-src/scripts" --max-line-length=110 pytest --asyncio-mode=strict --cov=bakery_scripts --cov-append --cov-report=xml:cov.xml --cov-report=html:cov.html --cov-report=term-missing ../bakery-src -vvv