[SERVER-70713] No module named 'jsonschema' when compiling mongod Created: 19/Oct/22  Updated: 29/Oct/23  Resolved: 04/Nov/22

Status: Closed
Project: Core Server
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Bug Priority: Major - P3
Reporter: Dylan Richardson Assignee: Trevor Guidry
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Related
related to SERVER-70767 improve warning message from tool opt... Closed
Backwards Compatibility: Fully Compatible
Operating System: ALL
Participants:

 Description   

I followed the instructions for compiling the server here: https://github.com/mongodb/mongo/blob/master/docs/building.md

And ran

python3 -m pip install -r etc/pip/compile-requirements.txt

Followed by

python3 buildscripts/scons.py install-mongod

And I get the following error:

scons: Reading SConscript files ...
scons: running with /usr/bin/python buildscripts/scons.py install-mongod
Failed import while loading options for tool: build_metrics
No module named 'jsonschema'

From a quick glance it seems like SERVER-67044 may have added a dependency that's only defined in toolchain-requirements.txt (via build_metrics.req) and not installed as part of compile-requirements.txt. I am also a bit curious how this hasn't broken any tests yet, perhaps we aren't testing just compile-requirements in isolation?



 Comments   
Comment by Trevor Guidry [ 04/Nov/22 ]

I have made the warning more clear about what it affects. See SERVER-70767

Comment by Dylan Richardson [ 19/Oct/22 ]

Ah, I see - I had assumed that this was causing subsequent errors and didn't realize this was just a warning

Comment by Daniel Moody [ 19/Oct/22 ]

It's a warning. In this case its only an issue if you try to use build-metrics. We could suppress the message and let it fail naturally when the tool actually gets put to use.

Generated at Thu Feb 08 06:16:54 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.