You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Instructions in CONTRIBUTING.md lead to an incomplete environment #2760
A string of small issues that leads from tests failing to even start to incompatible dependencies version to failures that should not be there.
linter-requirements.txt installs pymongo, which unmasks pymongo integration tests. They rely on mockupdb being installed, but it's only mentioned in tox.ini => pytest blows up on collection.
After installing mockupdb, I get 4 errors and 18 warnings (linux aarch64).
Majority of warnings are due to pytest-asyncio not being installed by anything except for tox (and installing it without version constraints from tox.ini causes exciting issues)
None of the issues above are serious, but combined they add quite a bit of annoyance to the (ideally) first step of contributing to the project: developer environment setup.
Given the number of additional constraints mentioned in tox.ini, I almost wonder if suggesting using it instead of just pytest might be a good idea (btw tox just worked for me — great job setting it up!)
There is a quick (but brittle) solution, which is to introduce a Yet Another Requirements File for dev env bringup (and maybe make it pull others internally), but if anyone on the team has Thoughts on dependency management management but no time to implement them I'd be happy to lend a hand.
A couple other things related to the test suite that do not warrant separate issues (yet):
eventlet tests appear to be dead since they're never ran in CI, so explicitly marking them as such (or removing them from conftest) might be a good call. I spent way too much time wondering why my interpreter is segfaulting and/or hanging while I was unskipping non-integration tests.
GCP tests are not excluded from common test suite, which is a shame since they are by far the slowest part of it:
Both excluding them from common and optimising tests themselves (maybe rebuilding the project for each test is not strictly necessary?) should shave off some seconds from several CI jobs. Unless current behaviour is by design, I can take a stab at it.
Hey @arr-ee, thanks for opening this -- this is all very valuable feedback. Setting up the test suite is currently far from ideal to the point where it's sometimes easier to just submit a PR and have the CI run the tests instead. 🙈
Feel free to suggest improvements to the contributing guide -- I agree that suggesting to use tox directly is a good idea since that's the closest you get to a "standardized" environment that sets almost everything up for you.
As for your other two points:
eventlet tests not being run: I noticed this before but didn't investigate if that was intentional or just an oversight -- thanks for finding the relevant commit. We might as well remove the tests and remove eventlet from any fixtures.
Excluding gcp tests from common: also sounds good to me. As for not rebuilding the project for each test, haven't looked into this so not sure if reusing stuff can't have some side effects, but if not, also sounds good.
At the moment the biggest bottleneck is #2721 though -- so any smaller gains won't be super noticeable. (Not that we shouldn't do them though. :))
Activity
Add `devenv-requirements.txt` and update env setup instructions
Add devenv-requirements.txt and update env setup instructions
arr-ee commentedon Feb 25, 2024
A couple other things related to the test suite that do not warrant separate issues (yet):
eventlettests appear to be dead since they're never ran in CI, so explicitly marking them as such (or removing them fromconftest) might be a good call. I spent way too much time wondering why my interpreter is segfaulting and/or hanging while I was unskipping non-integration tests.GCP tests are not excluded from
commontest suite, which is a shame since they are by far the slowest part of it:Both excluding them from
commonand optimising tests themselves (maybe rebuilding the project for each test is not strictly necessary?) should shave off some seconds from several CI jobs. Unless current behaviour is by design, I can take a stab at it.sentrivana commentedon Feb 27, 2024
Hey @arr-ee, thanks for opening this -- this is all very valuable feedback. Setting up the test suite is currently far from ideal to the point where it's sometimes easier to just submit a PR and have the CI run the tests instead. 🙈
Feel free to suggest improvements to the contributing guide -- I agree that suggesting to use
toxdirectly is a good idea since that's the closest you get to a "standardized" environment that sets almost everything up for you.As for your other two points:
eventlettests not being run: I noticed this before but didn't investigate if that was intentional or just an oversight -- thanks for finding the relevant commit. We might as well remove the tests and removeeventletfrom any fixtures.gcptests fromcommon: also sounds good to me. As for not rebuilding the project for each test, haven't looked into this so not sure if reusing stuff can't have some side effects, but if not, also sounds good.At the moment the biggest bottleneck is #2721 though -- so any smaller gains won't be super noticeable. (Not that we shouldn't do them though. :))
Add devenv-requirements.txt and update env setup instructions
szokeasaurusrex commentedon Jun 3, 2024
This issue should be fixed by #2761