-
Notifications
You must be signed in to change notification settings - Fork 313
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
replace circleci docker image #1394
Conversation
Poetry is handling the virtualenv for tests so we no longer need to use a custom docker container for running tests.
I'm a bit lost now among so many PRs. Does this change make the sceptre-circleci repo and the PR we just worked on obsolete? |
Yes, that is correct @iainelder |
It looks like the stock CircleCI container doesn't make available all the Python feature versions we need. Maybe we do still need a custom image after all. Use this command to check the reported version of each target Python feature version. docker run -it cimg/python:3.12 bash -c 'for py in python3.{8,9,10,11,12}; do "$py" --version; done' Python 3.10 and 3.12 report back. Python 3.8, 3.9, and 3.11 are missing.
I discovered it running the unit tests as the CI pipeline would. docker run -it cimg/python:3.12 bash -c '
git clone https://github.com/Sceptre/sceptre .
git fetch origin pull/1394/head:pr
git switch pr
poetry install --all-extras -v
poetry run tox
echo "Tox exit code: $?"
' Tox passes
The worst part is that Tox exits with code 0. The 0 exit code means CircleCI run 11003 for the build-and-unit-test workflow reported success. I would prefer that Tox fails when it can't find the target interpreter. I can make that happen by deleting the Line 4 in 1ad3f30
docker run -it cimg/python:3.12 bash -c '
git clone https://github.com/Sceptre/sceptre .
git fetch origin pull/1394/head:pr
git switch pr
sed -i "/skip_missing_interpreters/d" tox.ini
poetry install --all-extras -v
poetry run tox
echo "Tox exit code: $?"
' Tox still runs all the tests it can, but now it fails because of missing interpreters.
|
i didn’t realize that but you are correct @iainelder. Unit test fails after setting |
Before setting up Poetry for this project we had to create a custom docker container[1] with all the virtualenvs for tests. Poetry is now handling the virtualenv for tests so we no longer need to use the custom docker container for running tests, we can just use the stock circleci container.
[1] https://github.com/Sceptre/sceptre-circleci