test(NODE-7574): use mapping refspec when fetching tag in switch source#4938
Merged
PavelSafronov merged 1 commit intomainfrom May 6, 2026
Merged
test(NODE-7574): use mapping refspec when fetching tag in switch source#4938PavelSafronov merged 1 commit intomainfrom
PavelSafronov merged 1 commit intomainfrom
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes Evergreen’s switch source function so tag-based SOURCE_REV values (e.g., refs/tags/v7.0.0) can be checked out reliably in shallow clones by fetching the ref into a local ref (instead of leaving it only in FETCH_HEAD).
Changes:
- Update
git fetchinswitch sourceto use a mapping refspec (<src>:<dst>) so the fetched tag ref exists locally forgit checkout. - Apply the same change to both the source (
config.in.yml) and generated (config.yml) Evergreen configs.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| .evergreen/config.yml | Updates switch source to fetch SOURCE_REV using a mapping refspec so tag checkouts succeed. |
| .evergreen/config.in.yml | Mirrors the same switch source fetch refspec fix in the input Evergreen configuration. |
PavelSafronov
approved these changes
May 6, 2026
Contributor
PavelSafronov
left a comment
There was a problem hiding this comment.
Changes look good, thanks!
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.
Description
Summary of Changes
The switch source Evergreen function was broken for tag-based SOURCE_REV values (e.g. refs/tags/v7.0.0), causing all four
test-bson-latest-driver-7.0.0-*tasks to fail:Root cause:
git fetch origin <refspec>without a destination stores the result in FETCH_HEAD only - it does not create a local ref at refs/tags/v7.0.0. The subsequent git checkout refs/tags/v7.0.0 then fails because that local ref doesn't exist.This previously worked because the Evergreen initial clone included all remote tags, so refs/tags/v7.0.0 already existed locally before the fetch ran. A change in the runner/agent setup (shallower clone without --tags) removed that implicit dependency.
Double check the following
npm run check:lint)type(NODE-xxxx)[!]: descriptionfeat(NODE-1234)!: rewriting everything in coffeescript