summarylogtreecommitdiffstats
path: root/ceph-18.2.2-mgr-ceph-module-stub.patch
AgeCommit message (Collapse)Author
2024-05-25pkgbuild: rm mgr-ceph-module-stub.patchBazaah
This doesn't work. Or rather it does, but badly and for reasons I didn't understand. To set the stage. 1. All mgr modules in src/pybind/mgr/*/module.py import a 'mgr_module' 2. This module is located at src/pybind/mgr_module.py 3. It imports a module, 'ceph_module' that **does not exist.** I didn't understand how this could work, as the file even remotely similiar is src/pybind/mgr/ceph_module.pyi -- note the 'i'. This is what is called a "python interface file" and basically isn't something the python runtime is aware of. It's only use is by static code checkers like mypy (and presumably the IDEs of people that work in this code). I, naively assumed that somehow previous python versions had mistaken this file for a real module hence the previous patch, where I just define the various symbols referenced from other modules. This isn't the case. Instead, the C++ mgr daemon _at runtime_ injects what is effectively a bridge module into the C++ defined ceph data structures. This, obviously doesn't work during testing, but the upstream does have some interesting machinery in src/pybind/mgr/tests/__init__.py, though I don't understand how it would propagate to other test suites, and very clearly it hasn't worked for at least since 18.2.0 for our builds. A future commit will properly fix this issue
2024-03-23repo: add ceph-18.2.2-mgr-ceph-module-stub.patchBazaah
This mocks out a module for mgr_module.py to 'import' during mypy type analysis. Previously the ceph_module.pyi was enough for this to work, but I guess something in the tooling changed. I cannot figure out why this ever worked before, and why it doesn't now. Maybe related to https://github.com/python/mypy/issues/16987 ?