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: No direct use of nose #45064
test: No direct use of nose #45064
Conversation
jenkins test api |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM in general, will take a closer look tonight.
|
||
# Local Variables: | ||
# compile-command: "cd ../../..; cmake --build build --target get_command_descriptions -j4 && | ||
# CEPH_BIN=build/bin \ | ||
# PYTHONPATH=src/pybind nosetests --stop \ | ||
# src/test/pybind/test_ceph_argparse.py:TestOSD.test_rm" | ||
# PYTHONPATH=src/pybin python3 \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
s/pybin/pybind/
thanks @s-t-e-v-e-n-k, this is great. dropping nose has been on our "TODO someday maybe" list for a long time, so i'm thrilled that you're taking this on these rgw multisite tests are complicated by the fact that they need to run in two different environments:
i see that you've covered on the teuthology side, we also have some nose-specific logic in the rgw-multisite-tests task. i'm not good with python, so i had a lot of trouble getting this stuff to work. i think i tried using 'pytest' initially, with some guidance from @alfredodeza, but nose was the only thing i could actually get to load and run these test cases. this is further complicated by the need to run test cases from a different suite-branch to support upgrade tests since this part only runs in teuthology, maybe it's fine to leave the leave the nose stuff in |
We are Python people (actually, maintainers of Python packages in openSUSE) so most of what's going on in Ceph goes right above our head. Our primary goal is to eliminate nose from our distribution, so it is all we did. |
if your only goal is to drop the package dependency, then you probably don't need to touch these rgw tests at all - they don't get packaged anywhere |
My recommendation here would be to prioritize the work to remove nose in Ceph as a whole and work closely with the places there it is still needed to port over to Pytest. This is no longer a matter of preference, but Nose is not viable anymore as an unmaintained project. I anticipated that distributions dropping is going to be one of many problems to come if the Ceph teams decides to keep it around. |
d0e9c7d
to
db65589
Compare
You're welcome @cbodley! I've rebased on current master, and corrected the typo that @tchaikov spotted. I have not successfully run the |
qa/tasks/rgw_multisite_tests.py
Outdated
|
||
return LogStream() | ||
argv = [sys.executable, self.module_path + "../test_multi.py"] + extra_args | ||
testsuite = subprocess.run(argv, check=True) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't think this can work. test_multi.py
is creating its own ceph clusters with the vstart.sh script, but this teuthology script is meant to run tests against the clusters that teuthology itself set up
in qa/tasks/rgw_multisite.py
, which runs just before this rgw_multisite_tests.py
task, we do a lot of work to set up the python environment according to teuthology's deployment, and we pass this information into the python module here
so we need to run the test cases in that same environment - i don't think a subprocess can work here
src/test/rgw/test_multi.py
Outdated
from rgw_multi.tests import * | ||
from rgw_multi.tests_es import * | ||
from rgw_multi.tests_ps import * | ||
from rgw_multi.tests_az import * |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i tried running this modified test_multi.py
by hand (according to docs in https://github.com/ceph/ceph/blob/master/src/test/rgw/test_multi.md), and it isn't finding any of the test cases to run. i believe it's because the tests are no longer imported into this module
~/ceph/build $ cat test_multi.conf
[DEFAULT]
num_zones = 2
num_ps_zones = 0
num_zonegroups = 1
gateways_per_zone = 1
~/ceph/build $ RGW_MULTI_TEST_CONF=test_multi.conf MON=1 OSD=1 MGR=0 MDS=0 nosetests ../src/test/rgw/test_multi.py
----------------------------------------------------------------------
Ran 0 tests in 0.000s
OK
since these rgw tests are proving to be difficult, we might consider splitting that piece out to another PR? these other changes outside of rgw look a lot easier to verify and merge in the meantime |
nose has been unmaintained for a long time, and to work on removing it as a dependency, re-work test_ceph_argparse to use bare unittest. Signed-off-by: Steve Kowalik <steven@wedontsleep.org>
nose has been unmaintained for a long time, and to work on removing it as a dependency, re-work test_ceph_daemon to use bare unittest. Signed-off-by: Steve Kowalik <steven@wedontsleep.org>
With the direct calls of nose methods removed, we no longer need to BuildRequire it. Fixes: https://tracker.ceph.com/issues/54252 Signed-off-by: Steve Kowalik <steven@wedontsleep.org>
db65589
to
47fba6f
Compare
What a great idea! I've split out the separate rgw test changes, and I'll create a new PR with that commit directly. |
rgw has been split out to #45759 |
@cbodley ping? I thought after #45064 (comment) and @s-t-e-v-e-n-k 's splitting the this PR, it could get merged. We really need to get rid of nose from our distro, it breaks some of our tools. |
sorry, i'm only familiar with the rgw parts so assumed someone else would follow up on review here but given @tchaikov's "LGTM in general", i'd be willing to approve this so long as it doesn't break anything in CI. i pushed this branch to ceph-ci to test the packaging at https://shaman.ceph.com/builds/ceph/pr-45064/ |
jenkins test make check |
'make check' looks good 👍
waiting on packages to finish building |
Thank you! |
Checklist
With nose being firmly deprecated for quite some time, remove use of it from the test suite directly.
Fixes: https://tracker.ceph.com/issues/54252