Coverage#3034
Draft
comandeo-mongo wants to merge 16 commits intomongodb:masterfrom
Draft
Conversation
Other test functions unset TOPOLOGY and re-export it from MLAUNCH_TOPOLOGY before invoking run-tests.sh, because the matrix axis sets TOPOLOGY=replica_set (underscore) while spec/shared/shlib/server.sh expects replica-set (hyphen). The new run coverage tests function was missing this remap, causing "Unknown topology: replica_set" on Evergreen.
run-tests.sh already launches MongoDB via mlaunch. Running bootstrap-mongo-orchestration first started a second cluster on the same ports, causing mlaunch to fail with "ports 27017/27018/27019 not available". Other tasks like test-otel and test-csot only invoke their run-tests function for the same reason.
run-tests.sh installs and activates rbenv inside its own subshell, so the second shell.exec block had no bundle on PATH and exited 127. Add the same two-line rbenv bootstrap that run-tests.sh uses; the toolchain is already on disk and rbenv global is set, so this just makes it visible to the second shell.
rake spec:ci runs ~9 sequential rspec processes via spec_organizer. With SimpleCov.command_name set to a static 'rspec' in every process, each bucket overwrote the previous one's session in coverage/.resultset.json and only the last process's coverage survived. On Evergreen the last bucket is connection-pool-stress, all of whose examples are pending, so the resultset ended up with 0% coverage on every tracked file. Make command_name unique per PID so each bucket stores a separate session, and merge line hits across all sessions in CoverageGate.
SimpleCov's track_files placeholder uses a parser-based heuristic to mark executable lines in files no process loaded. Ruby's Coverage module is authoritative when the file was loaded. The previous merge combined nil and 0 into 0, which inflated total by counting heuristic "executable" lines that the real Coverage run had marked non-executable. Switch to nil-wins so the authoritative classification overrides the heuristic.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.