-
Notifications
You must be signed in to change notification settings - Fork 1.3k
CSHARP-5788: Replace cake with dotnet cli scripts #1821
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
Conversation
Removing cake from smoke tests.
There was a problem hiding this 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 removes Cake build tool dependencies from smoke tests and replaces them with dotnet CLI scripts. The smoke tests now use environment variables for package version management and have dedicated shell scripts for execution.
Key changes:
- Replaced Cake-based smoke test execution with a dedicated
run-smoke-tests.shscript - Introduced
ValidatePackagesVersionTestsclass to verify package versions using environment variables - Refactored package reference configuration to use
DRIVER_PACKAGE_VERSIONenvironment variable
Reviewed Changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| ValidatePackagesVersionTests.cs | New test class that validates package versions using environment variables instead of Cake |
| MongoDB.Driver.SmokeTests.Sdk.csproj | Updated package/project references to use DRIVER_PACKAGE_VERSION environment variable |
| LoggingTests.cs | Removed obsolete ValidateMongoDBPackageVersion() call |
| LibmongocryptTests.cs | Removed obsolete ValidateMongoDBPackageVersion() call |
| InfrastructureUtilities.cs | Removed ValidateMongoDBPackageVersion() method and unused imports |
| run-tests.sh | Removed smoke test-specific NuGet configuration logic |
| run-smoke-tests.sh | New script dedicated to running smoke tests with package version parameter |
| run-external-script.sh | Refactored to use shared append-myget-package-source.sh script |
| evergreen.yml | Updated smoke test task to use new script with simplified parameters |
| compile-sources.sh | Added support for compiling specific projects via parameter |
| append-myget-package-source.sh | New shared script for managing MyGet package source configuration |
| build.cake | Removed SmokeTests Cake task |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
BorisDog
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, but please validate the smoke tests
| git clone -b "${GIT_BRANCH:-main}" --single-branch "${GIT_REPO}" . | ||
|
|
||
| # add/adjust nuget.config pointing to myget so intermediate versions could be restored | ||
| if [ -f "./nuget.config" ]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
| @@ -0,0 +1,16 @@ | |||
| #!/usr/bin/env bash | |||
|
|
|||
| SMOKE_TESTS_PROJECT="./tests/SmokeTests/MongoDB.Driver.SmokeTests.Sdk/MongoDB.Driver.SmokeTests.Sdk.csproj" | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'll probably need few smoke tests projects, so need to be ready for that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The idea is: we should not build another projects (like a driver or bson library). For now we have only one project, in case we will have more then one - we can make a loop in bash script, and maintain either list of projects, or we can do a glob-filter by folder.
Removing cake from smoke tests.