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

Fix nox test failure #1899

Merged
merged 1 commit into from
Jun 14, 2024
Merged

Conversation

rooftopcellist
Copy link
Member

@rooftopcellist rooftopcellist commented Jun 12, 2024

SUMMARY

We are seeing nox test failures across PR's...

nox > Running session build
nox > Creating virtual environment (virtualenv) using python in .nox/build
nox > Command /opt/pipx/venvs/nox/bin/python -m virtualenv /home/runner/work/awx-operator/awx-operator/.nox/build failed with exit code 1:
TypeError: object.__init__() takes exactly one argument (the instance to initialize)
Exception ignored in: <function BaseFileLock.__del__ at 0x7f8ac7275f80>
Traceback (most recent call last):
  File "/opt/pipx/venvs/nox/lib/python3.11/site-packages/filelock/_api.py", line 365, in __del__
    self.release(force=True)
  File "/opt/pipx/venvs/nox/lib/python3.11/site-packages/virtualenv/util/lock.py", line 34, in release
    with self.thread_safe:
         ^^^^^^^^^^^^^^^^
AttributeError: '_CountedFileLock' object has no attribute 'thread_safe'
ISSUE TYPE
  • Bug, Docs Fix or other nominal change
ADDITIONAL INFORMATION

@rooftopcellist
Copy link
Member Author

This works locally when using Python 3.12, we are trying bumping the python version in CI runs.

nox > Running session build
nox > Creating virtual environment (virtualenv) using python3 in .nox/build
nox > python -m pip install -r docs/requirements.in -c docs/requirements.txt
nox > mkdocs build --strict
INFO    -  Cleaning site directory
INFO    -  Building documentation to directory: /home/chadams/awx-operator/site
INFO    -  The following pages exist in the docs directory, but are not included in the "nav" configuration:
             - installation/kind-install.md
             - user-guide/advanced-configuration/container-probes.md
             - user-guide/advanced-configuration/horizontal-pod-autoscaler.md
             - user-guide/advanced-configuration/security-context.md
INFO    -  Documentation built in 3.51 seconds
nox > Session build was successful.

[chadams@awx awx-operator]$ nox --version
2024.3.2
[chadams@awx awx-operator]$ code .
[chadams@awx awx-operator]$ python --version
Python 3.12.3

@rooftopcellist rooftopcellist force-pushed the fix-nox-test branch 2 times, most recently from 5b88e83 to 9c4feb5 Compare June 12, 2024 18:34
@rooftopcellist
Copy link
Member Author

cc @oraNod Any ideas what is going wrong here?

@oraNod
Copy link
Contributor

oraNod commented Jun 13, 2024

cc @oraNod Any ideas what is going wrong here?

@rooftopcellist Hey, I'm at DevConf at the Ansible booth and don't have my usual laptop with me so it's a little hard to check for sure. But it looks like an old version of something is causing the problem.

Sorry I can't send the PR right now myself but we could probably bump the nox action version here:

uses: wntrblm/nox@2024.03.02

The latest nox action should be this one: https://nox.thea.codes/en/stable/CHANGELOG.html#id1

Maybe we should also bump the python version in the matrix to 3.12 here too:

python-versions: "3.11"

It might be worth just simplifying that reusable-nox workflow by removing the matrix and doing a plain "nox -s build" - the matrix is probably overkill and causing problems with clashing python versions.

@oraNod
Copy link
Contributor

oraNod commented Jun 13, 2024

@rooftopcellist hey @TheRealHaoLiu pointed out that this fixes the issue: pypa/virtualenv#2735 (comment)

@rooftopcellist rooftopcellist merged commit 23a3266 into ansible:devel Jun 14, 2024
8 checks passed
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.

2 participants