Skip to content
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

Release 3.36.0: Fixes Preview Pipeline and Client Config Test #4148

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Text;
using System.Threading;
using System.Threading.Tasks;
Expand Down Expand Up @@ -45,7 +46,11 @@ public async Task ClientConfigTest()
ItemResponse<ToDoActivity> response = await this.Container.CreateItemAsync(testItem, new Cosmos.PartitionKey(testItem.pk));
Assert.IsNotNull(response.Diagnostics);
ITrace trace = ((CosmosTraceDiagnostics)response.Diagnostics).Value;
Assert.AreEqual(trace.Data.Count, 1);
#if PREVIEW
Assert.AreEqual(trace.Data.Count, 2, string.Join(",", trace.Data.Select(a => $"{a.Key}: {a.Value}"))); // Distributed Tracing Id
#else
Assert.AreEqual(trace.Data.Count, 1, string.Join(",", trace.Data.Select(a => $"{a.Key}: {a.Value}")));
#endif
ClientConfigurationTraceDatum clientConfigurationTraceDatum = (ClientConfigurationTraceDatum)trace.Data["Client Configuration"];
Assert.IsNotNull(clientConfigurationTraceDatum.UserAgentContainer.UserAgent);
}
Expand Down
22 changes: 10 additions & 12 deletions azure-pipelines-official.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,30 +4,28 @@ pr: none

variables:
ReleaseArguments: ' --filter "TestCategory!=Quarantine" --verbosity normal '
VmImage: windows-latest # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
BuildConfiguration: Release
Packaging.EnableSBOMSigning: true
OS: 'Windows'
VmImage: windows-latest # https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops

stages:
- stage:
displayName: Gate
jobs:
- template: templates/static-tools.yml
parameters:
BuildConfiguration: $(BuildConfiguration)
VmImage: $(VmImage)
BuildConfiguration: '${{ variables.BuildConfiguration }}'
VmImage: '${{ variables.VmImage }}'

- template: templates/build-test.yml
parameters:
BuildConfiguration: $(BuildConfiguration)
Arguments: $(ReleaseArguments)
VmImage: $(VmImage)
BuildConfiguration: '${{ variables.BuildConfiguration }}'
Arguments: '${{ variables.ReleaseArguments }}'
VmImage: '${{ variables.VmImage }}'

- job:
displayName: TelemetryToService $(BuildConfiguration)
displayName: TelemetryToService ${{ variables.BuildConfiguration }}
timeoutInMinutes: 120
condition: and(succeeded(), eq('$(OS)', 'Windows'))
pool:
vmImage: windows-2019

Expand All @@ -48,7 +46,7 @@ stages:
inputs:
command: test
projects: 'Microsoft.Azure.Cosmos/tests/Microsoft.Azure.Cosmos.EmulatorTests/*.csproj'
arguments: --filter "TestCategory=ClientTelemetryRelease" --verbosity normal --configuration $(BuildConfiguration) /p:OS=$(OS)
arguments: --filter "TestCategory=ClientTelemetryRelease" --verbosity normal --configuration ${{ variables.BuildConfiguration }} /p:OS=Windows
nugetConfigPath: NuGet.config
publishTestResults: true
testRunTitle: Microsoft.Azure.Cosmos.EmulatorTests
Expand All @@ -62,7 +60,7 @@ stages:
- template: templates/nuget-pack.yml
parameters:
BuildConfiguration: Release
VmImage: $(VmImage)
VmImage: '${{ variables.VmImage }}'
ReleasePackage: true
OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/$(BuildConfiguration)/Microsoft.Azure.Cosmos'
OutputPath: '$(Build.ArtifactStagingDirectory)/bin/AnyCPU/Release/Microsoft.Azure.Cosmos'
BlobVersion: $(BlobVersion)
Loading