Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Upload evergreen test results to codecov.io #1736

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
alcaeus merged 5 commits into mongodb:v2.x from alcaeus:evergreen-codecov-test-upload
Aug 6, 2025

Conversation

@alcaeus
Copy link
Member

@alcaeus alcaeus commented Jul 24, 2025

In order to better use the flaky test feature of codecov.io, this PR adds a step to upload the test result file to codecov.io, as is already done for GitHub Actions.

@alcaeus alcaeus requested a review from jmikola July 24, 2025 11:56
@alcaeus alcaeus requested a review from a team as a code owner July 24, 2025 11:56
Copy link

codecov-commenter commented Jul 24, 2025
edited
Loading

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 87.54%. Comparing base (ad6442c) to head (89b2127).
⚠️ Report is 1 commits behind head on v2.x.

Additional details and impacted files
@@ Coverage Diff @@
## v2.x #1736 +/- ##
=========================================
 Coverage 87.54% 87.54% 
 Complexity 3182 3182 
=========================================
 Files 423 423 
 Lines 6336 6336 
=========================================
 Hits 5547 5547 
 Misses 789 789 
Flag Coverage Δ
6.0-replica_set 85.65% <ø> (ø)
6.0-server 81.66% <ø> (ø)
6.0-sharded_cluster 85.24% <ø> (ø)
8.0-replica_set 87.46% <ø> (ø)
8.0-server 82.54% <ø> (ø)
8.0-sharded_cluster 87.13% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@alcaeus alcaeus force-pushed the evergreen-codecov-test-upload branch from 3a4b6e4 to 9ad2fff Compare July 24, 2025 12:15
working_dir: src
script: |
${PREPARE_SHELL}
curl -Os https://cli.codecov.io/latest/linux/codecov
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since this isn't be pulled from a repository, it'd be prudent to integrity check the binary. I noted this didn't apply to the earlier GitHub Action integration (ae31f00) since you just reference their action (codecov/test-results-action).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added the shasum check for the time being. I can add the gpg signature check for the checksum file as well, but with evergreen sharing hosts between runs I'm not sure if we should be messing with the keychain.

jmikola reacted with thumbs up emoji
printf "\n" >> mo-expansion.yml
printf "MONGODB_VERSION: '%s'\n" "${MONGODB_VERSION}" >> mo-expansion.yml
printf "TOPOLOGY: '%s'\n" "${TOPOLOGY}" >> mo-expansion.yml
cat mo-expansion.yml
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why was this necessary? $MONGODB_VERSION and $TOPOLOGY should already be available in the environment, since they're referenced in the previous shell.exec command. The inclusion of cat here also looks like it may be leftover debugging.

Based on the comment below, expansions.update was only necessary to add
MONGODB_URI and CRYPT_SHARED_LIB_PATH, which are written in drivers_orchestration.py.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

MONGODB_VERSION and TOPOLOGY are passed as variables to the bootstrap mongo-orchestration function only, so they are no longer available later in the run. Adding them to the expansion file created by the script allows us to reuse the values later.

jmikola reacted with thumbs up emoji
--report-type test_results \
--disable-search \
--fail-on-error \
--token ${CODECOV_TOKEN} \
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this reference a variable from the Evergreen project config? I didn't see this when taking a look at the PHPLIB 2.x project settings.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For some reason uploading the test result file worked even without a token. I have added it to the repo variables nonetheless.

jmikola reacted with thumbs up emoji
Copy link
Member

@jmikola jmikola Aug 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK. I think it's worth defining the variable, especially since the argument isn't quoted. If it resolves to nothing that could lead to some unexpected behavior for the --token option.

@alcaeus alcaeus requested a review from jmikola July 29, 2025 07:03
@alcaeus alcaeus merged commit 888d383 into mongodb:v2.x Aug 6, 2025
31 checks passed
@alcaeus alcaeus deleted the evergreen-codecov-test-upload branch August 6, 2025 11:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jmikola jmikola jmikola approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

AltStyle によって変換されたページ (->オリジナル) /