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

test: unpin pytest #4545

Merged
merged 2 commits into from
Oct 25, 2023
Merged

test: unpin pytest #4545

merged 2 commits into from
Oct 25, 2023

Conversation

aciba90
Copy link
Contributor

@aciba90 aciba90 commented Oct 24, 2023

Proposed Commit Message

test: unpin pytest

After https://github.com/pytest-dev/pytest/pull/11125 being
included in pytest==7.4, pytest can be unpinned.

Additional Context

#4184
pytest-dev/pytest#11104
pytest-dev/pytest#11125 (comment)

Test Steps

tox -re integration-tests -- --collect-only tests/integration_tests/

With pytest==7.3.2 the following traceback appeared:

ImportError while loading conftest '/home/aciba/canonical/cloud-init/tests/unittests/conftest.py'.                                                                                                                 
tests/unittests/conftest.py:11: in <module>                                                                                                                                                                        
    from tests.unittests.helpers import retarget_many_wrapper                                                                                                                                                      
tests/unittests/helpers.py:21: in <module>                                                                                                                                                                         
    import responses                                                                                                                                                                                               
E   ModuleNotFoundError: No module named 'responses'                                                                                                                                                               
ERROR: InvocationError for command '/home/aciba/canonical/cloud-init/.tox/integration-tests/bin/python -m pytest -vv --log-cli-level=INFO --durations 10 --collect-only tests/integration_tests' (exited with code 
4) 

With this change no traceback appears.

Checklist

After pytest-dev/pytest#11125 being included in
pytest==7.4, pytest can be unpinned.
Copy link
Member

@TheRealFalcon TheRealFalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@aciba90
Copy link
Contributor Author

aciba90 commented Oct 24, 2023

It looks like there is some error somewhere in our tooling that does not like pytest!=x.x.x, see python3-pytest! in:

https://github.com/canonical/cloud-init/actions/runs/6626358047/job/17999122947?pr=4545

subprocess.CalledProcessError: Command '['sudo', 'apt', 'install', '-y', 'debhelper', 'dh-python', 'procps', 'python3-configobj', 'python3-debconf', 'python3-jinja2', 'python3-jsonpatch', 'python3-jsonschema', 'python3-netifaces', 'python3-oauthlib', 'python3-passlib', 'python3-pytest!', 'python3-pytest-cov', 'python3-pytest-mock', 'python3-requests', 'python3-responses', 'python3-serial', 'python3-setuptools', 'python3-yaml']' returned non-zero exit status 100.

Marking this as draft until I fix it.

@aciba90 aciba90 marked this pull request as draft October 24, 2023 13:32
@aciba90 aciba90 marked this pull request as ready for review October 24, 2023 14:57
Copy link
Collaborator

@blackboxsw blackboxsw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the followup and separate commit fixing read-dependencies which parses the requirements files.

@blackboxsw blackboxsw merged commit 7f3c2c6 into canonical:main Oct 25, 2023
26 checks passed
@aciba90 aciba90 deleted the unpin-pytest branch October 25, 2023 06:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants