You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I can't speak to your specific error, but I suspect that you aren't setting up the dependencies as they are now required (since the last update to this repo). FYI the readme (of this repo) needs to be updated - specifically the dependency resolution (upstream now uses poetry rather than pip). See my post here: #11
Ok, although I note that nothing in your post made that obvious to me. I'm not a mind reader! 😁
The error is not related to its absense, for sure
I wasn't necessarily suggesting that you hadn't installed poetry itself (although as I note above, it certainly isn't obvious in your post that you had). I was suggesting that you have missing or outdated dependencies and haven't setup/installed the environment correctly (i.e. poetry install) and/or loaded it properly (i.e. poetry shell or poetry run ...). That's certainly what the error message you posted suggests to me.
Also, looking at the code, there is an explicit comment noting that the env needs to be setup correctly before that method will work. A quick look at the code (the mongo-tooling-metrics package) shows that if you have the correct dependencies installed, then SConsToolingMetrics definitely should have a register_metrics attribute (SConsToolingMetrics is a subclass of MongoMetrics and the MongoMetrics class (in base_metrics.py) has the method register_metrics).
Further, it's working fine here so if you have indeed set up the env correctly (via poetry), I'm not sure what the issue with your system is?
If you're not interested in working out what your local issue is and a previous version was working for you (and you don't care about using an older version), why don't you just revert to that? The latest commit in this repo just pulls in a newer version (of the 'mongo' git submodule) from upstream, so just revert the mongo repo to the previous commit. I.e. (starting in (path/to/mongodb-without-avx):
Thanks, I made a checkout of the submodule and everything went fine. However, I don't understand what commands I should have used with poetry before issuing the main command. Please update the readme to reflect all the necessary steps for beginners :)
Thanks, I made a checkout of the submodule and everything went fine.
Awesome.
However, I don't understand what commands I should have used with poetry before issuing the main command.
That's why I pointed you towards the issue that I opened the other day: #11. That includes the commands needed (or at least needed by me), from start to finish. If you're not using Debian, you may need to make some adjustments, but it should be close (and the poetry related stuff should be the same).
To be really specific, after cloning the repo and installing poetry, whilst in the mongo dir, run poetry install to install the dependencies (instead of the pip install ... command that was required previously).
Then you have 2 options:
either run poetry shell (essentially activating the venv); or
poetry run ... (where ... is the command(s) you wish to run in the venv)
Please update the readme to reflect all the necessary steps for beginners :)
I agree! FWIW that's why I opened that other issue. (FYI I am nothing to do with this repo - I'm just a random person on the internet - who got stuck trying to build mongo, but then managed to work it out and shared my solution).
Activity
JedMeister commentedon Dec 3, 2023
I can't speak to your specific error, but I suspect that you aren't setting up the dependencies as they are now required (since the last update to this repo). FYI the readme (of this repo) needs to be updated - specifically the dependency resolution (upstream now uses
poetry
rather thanpip
). See my post here: #11popov654 commentedon Dec 4, 2023
Of course I did install poetry. The error is not related to its absense, for sure
JedMeister commentedon Dec 4, 2023
Ok, although I note that nothing in your post made that obvious to me. I'm not a mind reader! 😁
I wasn't necessarily suggesting that you hadn't installed poetry itself (although as I note above, it certainly isn't obvious in your post that you had). I was suggesting that you have missing or outdated dependencies and haven't setup/installed the environment correctly (i.e.
poetry install
) and/or loaded it properly (i.e.poetry shell
orpoetry run ...
). That's certainly what the error message you posted suggests to me.Also, looking at the code, there is an explicit comment noting that the env needs to be setup correctly before that method will work. A quick look at the code (the
mongo-tooling-metrics
package) shows that if you have the correct dependencies installed, thenSConsToolingMetrics
definitely should have aregister_metrics
attribute (SConsToolingMetrics
is a subclass ofMongoMetrics
and theMongoMetrics
class (inbase_metrics.py
) has the methodregister_metrics
).Further, it's working fine here so if you have indeed set up the env correctly (via poetry), I'm not sure what the issue with your system is?
If you're not interested in working out what your local issue is and a previous version was working for you (and you don't care about using an older version), why don't you just revert to that? The latest commit in this repo just pulls in a newer version (of the 'mongo' git submodule) from upstream, so just revert the mongo repo to the previous commit. I.e. (starting in (
path/to/mongodb-without-avx
):(Note that mine notes it's "dirty" because I've applied the patch as per this repo).
Good luck.
popov654 commentedon Dec 5, 2023
Thanks, I made a checkout of the submodule and everything went fine. However, I don't understand what commands I should have used with
poetry
before issuing the main command. Please update the readme to reflect all the necessary steps for beginners :)JedMeister commentedon Dec 5, 2023
Awesome.
That's why I pointed you towards the issue that I opened the other day: #11. That includes the commands needed (or at least needed by me), from start to finish. If you're not using Debian, you may need to make some adjustments, but it should be close (and the poetry related stuff should be the same).
To be really specific, after cloning the repo and installing poetry, whilst in the mongo dir, run
poetry install
to install the dependencies (instead of thepip install ...
command that was required previously).Then you have 2 options:
poetry shell
(essentially activating the venv); orpoetry run ...
(where...
is the command(s) you wish to run in the venv)I agree! FWIW that's why I opened that other issue. (FYI I am nothing to do with this repo - I'm just a random person on the internet - who got stuck trying to build mongo, but then managed to work it out and shared my solution).