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

Incompatibility with tox 4.0.0rc1 #39

Open
alexey-pelykh opened this issue Dec 2, 2022 · 6 comments
Open

Incompatibility with tox 4.0.0rc1 #39

alexey-pelykh opened this issue Dec 2, 2022 · 6 comments

Comments

@alexey-pelykh
Copy link

pluggy._manager.PluginValidationError: unknown hook 'tox_testenv_install_deps' in plugin <module 'google_artifactregistry_auth.tox_bootstrap' from '/venv/lib/python3.11/site-packages/google_artifactregistry_auth/tox_bootstrap.py'>
@sconstable
Copy link

sconstable commented Dec 7, 2022

4.0.0 is stable and released now, so my CI pipeline broke due to this. manually holding back to tox < 4.0.0 until there is a fix in place for this package.

for anyone else dealing with this: tox will "automagically" update itself at runtime so it's not enough to simply install an earlier version. we had to add a line to our tox.ini like so:

[tox]
requires = tox < 4.0.0

@megan-kuo
Copy link
Contributor

thanks for the report!

i haven't had the time to take a look into the issue but if you have the time and interest a pull request would be much appreciated :)

@oshmoun
Copy link
Contributor

oshmoun commented Jan 2, 2023

Another workaround I found is to simply not have this package installed in the environment where tox is called, but instead only add it to requires in tox config.
Since the failing hook is only there to ensure that the package is installed in the target venv, it seems to me that it can be removed completely, and replaced instead with requires = keyrings.google-artifactregistry-auth in tox config, which basically does the same thing far as I can see.
Please let me know if this is a viable option so I can make a PR.
UPDATE: actually nevermind, seems tox's requires does not work the way I expected (packages are only installed to .tox/.tox env, not necessarily the target envs)

@oshmoun
Copy link
Contributor

oshmoun commented Jan 7, 2023

Should be resolved in #41

@megan-kuo
Copy link
Contributor

Thanks for the contribution @oshmoun!
I've merged the pull request and bumped the version to 1.1.2

Please update to latest version and close this issue if there are no problems :)

@sconstable
Copy link

Confirmed working for me, thanks for the fix!

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

No branches or pull requests

4 participants