[SERVER-72349] Create mongo ninja python package Created: 21/Dec/22  Updated: 21/Jan/23  Resolved: 10/Jan/23

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

Type: Task Priority: Major - P3
Reporter: Tausif Rahman (Inactive) Assignee: Tausif Rahman (Inactive)
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-72348 Use the new mongo-tooling-metrics lib... Closed
depends on SERVER-72660 Add ninja metrics datatype to mongo-t... Closed
is depended on by SERVER-69637 Switch to new mongo-ninja-python library Closed
Gantt Dependency
has to be done before SERVER-49502 ninja and/or scons should prompt for ... Closed
Backwards Compatibility: Fully Compatible
Participants:

 Description   

TLDR: It is very ugly to try and get metrics when the system's ninja installation is used to compile. Also, the existing python ninja package does not provide an easy way to hook-in. We should fork the existing ninja package – which should be identical to the original except that it uses the new mongo-tooling-metrics library to setup metrics collection.

This needed to be done because as we were working on ninja metrics collection in SERVER-69637 we realized that the system's ninja installation does not provide a reasonable way to run logic before or after the build (without significantly mangling the build). To accommodate ninja metrics collection, we decided to fork https://github.com/scikit-build/ninja-python-distributions . The fork essentially builds ninja and puts it in the python package wheel. Whenever `ninja` is invoked from within a virtualenv, the python package's ninja installation is used instead of the system's ninja installation. The python package ninja is called from a python script, which gives us the opportunity to plug-in. https://github.com/scikit-build/ninja-python-distributions/blob/4a464e6ced4126a4718713262fb7dd72f5c06ade/src/ninja/__init__.py#L54. We should make our own ninja python package and plug-in.


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