fix(deps): add missing prometheus-client to dev lockfile - #408
Conversation
Signed-off-by: rajnisht7 <rajnishtiwari9787@gmail.com>
imran-siddique
left a comment
There was a problem hiding this comment.
Merging. This is the repository's red, not a nicety: test_docs_first_manifest.py::test_followup_tutorial[operations/monitoring.md] is failing on ModuleNotFoundError: No module named 'prometheus_client' on main and on every open PR here, across all five platform jobs. I checked main's own run rather than inferring it from a PR.
The diagnosis in your body is exactly right and worth restating because the failure mode is easy to reintroduce. pyproject.toml's dev extra declares prometheus-client>=0.20,<1, requirements/dev.in never listed it, and CI installs requirements/dev.txt with --require-hashes. So the declared development dependency and the installed one are two different facts, and nothing in the pipeline compares them: a dependency can be declared and simply never installed, and the only symptom is a test that imports it.
The fix follows the repository's own pattern rather than shortcutting it: the constraint goes in dev.in, dev.txt is regenerated with both hashes and the # via -r requirements/dev.in provenance line kept. A hand-added pin without a regenerated hash block would have failed --require-hashes on the next resolve.
Worth naming for whoever picks this up next: #407 is yours too, and its five red Test jobs are entirely this, nothing to do with its own diff. That is the cost of a shared failure sitting under a queue, and it is why this one goes first.
What
Adds
prometheus-clienttorequirements/dev.inand regeneratesrequirements/dev.txt.Why
pyproject.toml'sdevextra declaresprometheus-client>=0.20,<1(needed for theoperations/monitoring.mdtutorial test), butrequirements/dev.innever had it sorequirements/dev.txt, the file CI actually installs viapip install --require-hashes, was missing it too.Due to this
test_followup_tutorial[operations/monitoring.md-expected0]to fail with `ModuleNotFoundError: No module named 'prometheus_client.Spec impact
None
Test plan
pytest -vpassesmypy src/agent_manifestpassesruff check src/ tests/passesCHANGELOG.mdupdatedDCO
All commits in this PR are signed off (
git commit -s). By submitting this PR I certify the Developer Certificate of Origin.