Conversation
There was a problem hiding this comment.
Pull request overview
Adds “redundancy groups” to the Azure Pipelines CI so the overall pipeline fails only when all jobs within a platform group (Windows/macOS/Linux/Cosmos) fail.
Changes:
- Set
continueOnError: trueon major jobs so individual job failures don’t immediately fail the stage. - Add a
Validate_Job_Groupsjob to aggregate job results by platform group and fail the pipeline only when an entire group fails.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
| azure-pipelines-public.yml | Marks major jobs continueOnError and adds Validate_Job_Groups to evaluate grouped outcomes. |
| azure-pipelines-internal-tests.yml | Same grouping approach as public, including additional Cosmos coverage via Linux_Cosmos. |
| for /f %%a in ('curl -k -s -o nul -w "%%{http_code}" https://localhost:8081/ 2^>nul') do set HTTP_CODE=%%a | ||
|
|
||
| if "!HTTP_CODE!"=="401" ( | ||
| echo Cosmos DB Emulator is running ^(HTTP 401 received^). |
There was a problem hiding this comment.
HTTP_CODE is never cleared before running curl. If the environment already has HTTP_CODE set (or if curl fails to emit a status code), the previous value can be reused and the script may incorrectly treat the emulator as ready. Consider resetting HTTP_CODE at the start of each loop iteration (e.g., set it to empty) and optionally handling the 'no output' case explicitly.
| <XUnitProject Remove="$(SqlServerTests)"/> | ||
| <XUnitProject Remove="$(CosmosTests)"/> | ||
| <XUnitProject Update="@(XUnitProject)"> | ||
| <EnvironmentVariables>$(EnvironmentVariables);Test__SqlServer__DefaultConnection=""</EnvironmentVariables> |
There was a problem hiding this comment.
Test__SqlServer__DefaultConnection is being set to "" via EnvironmentVariables. Unlike shell quoting, this will likely pass the literal two-quote string through as the environment variable value, not an empty string. If the goal is to clear the variable, set it to an empty value (e.g. Test__SqlServer__DefaultConnection=) or remove it entirely.
| <EnvironmentVariables>$(EnvironmentVariables);Test__SqlServer__DefaultConnection=""</EnvironmentVariables> | |
| <EnvironmentVariables>$(EnvironmentVariables);Test__SqlServer__DefaultConnection=</EnvironmentVariables> |
| - powershell: SqlLocalDB start | ||
| displayName: Start LocalDB | ||
| - script: eng\common\cibuild.cmd -configuration $(_BuildConfig) -prepareMachine /bl:artifacts\log\$(_BuildConfig)\Build.binlog $(_InternalBuildArgs) | ||
| $(_InternalRuntimeDownloadArgs) | ||
| env: | ||
| Test__Cosmos__DefaultConnection: $(_CosmosConnectionUrl) | ||
| name: Build | ||
| - task: PublishBuildArtifacts@1 | ||
| displayName: Upload TestResults | ||
| condition: always() | ||
| continueOnError: true | ||
| inputs: | ||
| pathtoPublish: artifacts/TestResults/$(_BuildConfig)/ | ||
| artifactName: $(Agent.Os)_$(Agent.JobName) TestResults | ||
| artifactType: Container | ||
| parallel: true | ||
|
|
||
| - job: Windows_SqlServer | ||
| displayName: 'Windows SQL Server' | ||
| enablePublishTestResults: true | ||
| timeoutInMinutes: 120 | ||
| pool: | ||
| name: $(DncEngPublicBuildPool) | ||
| demands: ImageOverride -equals 1es-windows-2022-open | ||
| variables: | ||
| - skipComponentGovernanceDetection: true | ||
| - Codeql.SkipTaskAutoInjection: true | ||
| steps: | ||
| - powershell: SqlLocalDB start | ||
| displayName: Start LocalDB | ||
| - script: eng\common\build.cmd -restore -build -test -ci -configuration $(_BuildConfig) -prepareMachine $(_InternalRuntimeDownloadArgs) | ||
| /p:Projects="$(Build.SourcesDirectory)/test/EFCore.SqlServer.FunctionalTests/EFCore.SqlServer.FunctionalTests.csproj;$(Build.SourcesDirectory)/test/EFCore.SqlServer.HierarchyId.Tests/EFCore.SqlServer.HierarchyId.Tests.csproj;$(Build.SourcesDirectory)/test/EFCore.CrossStore.FunctionalTests/EFCore.CrossStore.FunctionalTests.csproj;$(Build.SourcesDirectory)/test/EFCore.OData.FunctionalTests/EFCore.OData.FunctionalTests.csproj;$(Build.SourcesDirectory)/test/EFCore.AspNet.SqlServer.FunctionalTests/EFCore.AspNet.SqlServer.FunctionalTests.csproj;$(Build.SourcesDirectory)/test/EFCore.VisualBasic.FunctionalTests/EFCore.VisualBasic.FunctionalTests.vbproj;$(Build.SourcesDirectory)/test/EFCore.FSharp.FunctionalTests/EFCore.FSharp.FunctionalTests.fsproj" | ||
| displayName: Test SQL Server |
There was a problem hiding this comment.
The main Windows job still starts LocalDB and runs the full CIBuild.cmd test suite, while a new Windows_SqlServer job was added to run SQL Server tests explicitly. This can double-run SQL Server coverage and also makes the redundancy grouping less reliable (Windows group may fail due to SQL tests even though SQL is meant to be validated by the SqlServer group). Consider removing the LocalDB start (and/or otherwise excluding SqlServer test projects) from the Windows job so SQL Server coverage is owned by Windows_SqlServer + Helix SqlServer jobs.
continueOnError: trueto all major jobs in bothazure-pipelines-internal-tests.ymlandazure-pipelines-public.yml, allowing the pipeline to continue running even if individual jobs fail.Validate_Job_Resultsjob in both pipeline files that runs after all test jobs, collecting the results for each group and failing the pipeline only if all jobs in a group fail.