Skip to content

Conversation

@sanych-sun
Copy link
Member

No description provided.

@sanych-sun sanych-sun requested a review from BorisDog November 17, 2025 18:54
@sanych-sun sanych-sun requested a review from a team as a code owner November 17, 2025 18:54
@sanych-sun sanych-sun added the chore Non–user-facing code changes (tests, build scripts, etc.). label Nov 17, 2025
@sanych-sun sanych-sun requested a review from Copilot November 17, 2025 21:08
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR implements retry logic for dotnet restore operations in the Evergreen CI environment to handle transient network failures. The main changes include introducing a new compilation script with retry logic and updating the build pipeline configuration.

  • Introduces retry mechanism for dotnet restore with exponential backoff (up to 5 attempts)
  • Refactors build pipeline to separate compilation from test execution
  • Removes unused build configuration files and Cake build tasks
  • Wraps DEBUG-only test assertions with conditional compilation directives for CSOT feature

Reviewed Changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
evergreen/compile-sources.sh New script implementing dotnet restore with retry logic and exponential backoff
evergreen/evergreen.yml Adds compile-sources function and integrates it into all test tasks; removes upload-working-dir function
evergreen/run-unit-tests.sh Updates test command to use Release configuration and removes separate build step
tests/MongoDB.Driver.Tests/MongoUrlTests.cs Wraps CSOT Timeout property tests with DEBUG conditional compilation
tests/MongoDB.Driver.Tests/MongoUrlBuilderTests.cs Wraps CSOT Timeout property tests with DEBUG conditional compilation
tests/MongoDB.Driver.Tests/Core/Configuration/ConnectionStringTests.cs Wraps CSOT Timeout property tests with DEBUG conditional compilation
build.cake Removes Build, Package, and PushToNuGet tasks, keeping only test execution tasks
tools/packages.config Removes Cake dependency configuration file
evergreen/set-virtualenv.sh Removes Python virtual environment setup script
evergreen/install-dotnet.sh Updated path reference in evergreen.yml (not shown in diffs)

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.


dotnet build
dotnet test --no-build --filter "Category!=Integration" -f "$FRAMEWORK" --results-directory ./build/test-results --logger "junit;verbosity=detailed;LogFileName=TEST-{assembly}.xml;FailureBodyFormat=Verbose" --logger "console;verbosity=detailed"
dotnet test -c Release --no-build --filter "Category!=Integration" -f "$FRAMEWORK" --results-directory ./build/test-results --logger "junit;verbosity=detailed;LogFileName=TEST-{assembly}.xml;FailureBodyFormat=Verbose" --logger "console;verbosity=detailed"
Copy link
Contributor

Choose a reason for hiding this comment

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

Should execute compile-sources as well?

Copy link
Member Author

Choose a reason for hiding this comment

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

As it was discussed: I've reworked the scripts to execute compile-sources.sh from the run-tests.sh

fi

DELAY=$((ATTEMPT * RESTORE_RETRY_DELAY_SECONDS_MULTIPLIER))
echo "dotnet restore failed. Retrying in $DELAY seconds..."
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: Add ATTEMPT in the log message.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

chore Non–user-facing code changes (tests, build scripts, etc.).

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants