-
Type:
Bug
-
Resolution: Unresolved
-
Priority:
Major - P3
-
None
-
Affects Version/s: None
-
Component/s: None
-
Query Integration
-
ALL
-
None
-
None
-
None
-
None
-
None
-
None
-
None
getExtensionStubParserDirectory() currently resolves the test stub-parser directory from std::filesystem::current_path(). This is correct only while the server retains the test runner’s working directory.
When a test server is started with --fork, MongoDB’s daemonization path explicitly changes the process working directory to / before the daemon continues initialization. The test-only lookup can therefore resolve to /src/mongo/db/extension/test_examples instead of the server’s startup directory, causing aggregation_stage_fallback_parsers.json to be missed and preventing the expected fallback stub parsers from being registered.
Change the test-mode path resolution to use the startup cwd captured in serverGlobalParams.cwd as the base directory.
Note, this is not a bug in production, since production code paths resolve stub parsers from extensionsConfigPath.