Update all NuGet dependencies to latest versions#1316
Conversation
Updated packages in Directory.Packages.props to latest compatible versions: - Azure.Core 1.44.1→1.51.1, Azure.Storage.Blobs 12.24→12.27, Queues 12.22→12.25 - Microsoft.Bcl.AsyncInterfaces, Extensions.DI, Collections.Immutable, DiagnosticSource, Text.Json → 10.0.5 - Microsoft.Extensions.Logging/Configuration/Hosting → 10.0.5 (unified net8.0 and non-net8.0 conditional versions) - Microsoft.ServiceFabric 6.4→11.3, Data/Services 3.3→8.3 - Microsoft.SourceLink.GitHub 1.0→10.0.201 - System.Linq.Async 6.0→7.0, System.Reactive 4.4→6.1 - MSTest 3.5→3.11.1, Moq 4.10→4.20.72 - Azure.Identity 1.12→1.19, OpenTelemetry exporters 1.1→1.15 - Azure.Monitor.OpenTelemetry.Exporter 1.0-beta.4→1.6.0 (now stable) - ImpromptuInterface 6.2/7.0→8.0.6 (unified, no conditional needed) - Newtonsoft.Json 13.0.1→13.0.4, Moq 4.10→4.20.72 - Various other minor/patch bumps Code fixes for breaking API changes: - OrchestrationSessionManager: Fix ToDictionaryAsync for System.Linq.Async 7.0 - Test files: [DataTestMethod]→[TestMethod], ThrowsException→ThrowsExactly (MSTest 3.11) - Azure Storage tests: Fix GetBlobsAsync/GetBlobsByHierarchyAsync required params - DeploymentHelper: Suppress CS0618 for deprecated ServiceFabric API - ApplicationInsightsSample: Remove DiagnosticSource VersionOverride - AzureStorageScenarioTests: Fix incorrect 4-arg Assert.AreEqual Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Pull request overview
Updates centrally-managed NuGet package versions across the repo and adjusts a few production/test callsites to compile against updated APIs (Azure SDK, System.Linq.Async, MSTest, Service Fabric, telemetry packages).
Changes:
- Bump dependency versions in
Directory.Packages.propsand remove a couple of per-project overrides. - Update code for breaking API changes (e.g.,
ToDictionaryAsync, Azure Blob enumeration APIs, Service Fabric deprecation). - Update tests to newer MSTest assertion APIs and adjust a few test assertions.
Reviewed changes
Copilot reviewed 21 out of 21 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| Directory.Packages.props | Central package version upgrades across product/tests/samples. |
| src/DurableTask.AzureStorage/OrchestrationSessionManager.cs | Update ToDictionaryAsync call to match new signature. |
| test/DurableTask.ServiceBus.Tests/SampleScenarioTests.cs | MSTest assertion update (ThrowsExactlyAsync). |
| test/DurableTask.Emulator.Tests/EmulatorFunctionalTests.cs | MSTest assertion update (ThrowsExactlyAsync). |
| test/DurableTask.Core.Tests/TraceContextBaseTest.cs | MSTest assertion update (ThrowsExactly). |
| test/DurableTask.Core.Tests/RetryInterceptorTests.cs | MSTest updates: assertion + test attribute changes on data-driven tests. |
| test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs | MSTest attribute changes on data-driven tests. |
| test/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs | MSTest attribute change on a data-driven test. |
| test/DurableTask.AzureStorage.Tests/StressTests.cs | MSTest attribute change on a data-driven test. |
| test/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs | MSTest attribute change on a data-driven test. |
| test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs | MSTest attribute changes + assertion update (ThrowsExactly). |
| test/DurableTask.AzureStorage.Tests/KeySanitationTests.cs | MSTest attribute change on a data-driven test. |
| test/DurableTask.AzureStorage.Tests/Correlation/StringExtensionsTest.cs | MSTest assertion update (ThrowsExactly). |
| test/DurableTask.AzureStorage.Tests/Correlation/CorrelationScenarioTest.cs | MSTest attribute changes on multiple data-driven tests. |
| test/DurableTask.AzureStorage.Tests/AzureStorageScenarioTests.cs | MSTest attribute changes; Azure Blob listing API signature updates; assertion fix. |
| test/DurableTask.AzureStorage.Tests/AzureStorageScaleTests.cs | Azure Blob listing API signature update; MSTest attribute change on a data-driven test. |
| test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.cs | MSTest attribute change on a data-driven test. |
| Test/DurableTask.AzureStorage.Tests/Storage/DurableTaskStorageExceptionTests.cs | MSTest attribute change on a data-driven test. |
| test/DurableTask.AzureServiceFabric.Integration.Tests/DurableTask.AzureServiceFabric.Integration.Tests.csproj | Remove a package version override to use central management. |
| test/DurableTask.AzureServiceFabric.Integration.Tests/DeploymentUtil/DeploymentHelper.cs | Suppress deprecated Service Fabric API warning via pragma. |
| samples/DistributedTraceSample/ApplicationInsights/ApplicationInsightsSample.csproj | Remove DiagnosticSource version override to use central management. |
Comments suppressed due to low confidence (12)
test/DurableTask.Core.Tests/RetryInterceptorTests.cs:39
- This test uses [TestMethod] together with [DataRow] and a parameterized signature. MSTest requires [DataTestMethod] for data-driven tests; otherwise discovery will fail (or the test will be skipped/errored). Switch back to [DataTestMethod] (or replace with DynamicData) for these parameterized cases.
[TestMethod]
[DataRow(1)]
[DataRow(2)]
[DataRow(3)]
[DataRow(10)]
public async Task Invoke_WithFailingRetryCall_ShouldHaveCorrectNumberOfCalls(int maxAttempts)
test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs:30
- This method is parameterized and uses [DataRow], but it is marked [TestMethod]. MSTest requires [DataTestMethod] for DataRow-based tests; otherwise discovery fails. Change this to [DataTestMethod] (or another data-driven mechanism).
[TestMethod]
[DataRow("System.Collections.Generic.Dictionary`2[[System.String, System.Private.CoreLib],[System.String, System.Private.CoreLib]]")]
[DataRow("System.Collections.Generic.Dictionary`2[[System.String, mscorlib],[System.String, mscorlib]]")]
public void DeserializesStandardTypes(string dictionaryType)
{
test/DurableTask.AzureStorage.Tests/MessageManagerTests.cs:76
- This is a parameterized test ([DataRow] + parameters) but uses [TestMethod]. MSTest requires [DataTestMethod] for DataRow-driven tests. Please switch back to [DataTestMethod] here.
[TestMethod]
[DataRow("blob.bin", "blob.bin")]
[DataRow("@#$%!", "%40%23%24%25%21")]
[DataRow("foo/bar/b@z.tar.gz", "foo/bar/b%40z.tar.gz")]
public void GetBlobUrlEscaped(string blob, string blobUrl)
test/DurableTask.AzureStorage.Tests/KeySanitationTests.cs:47
- This test uses [DataRow] with a parameterized signature, but the attribute was changed to [TestMethod]. MSTest requires [DataTestMethod] for DataRow-based tests. Update this back to [DataTestMethod] to avoid test discovery failures.
[TestMethod]
[DataRow("\r")]
[DataRow("")]
[DataRow("hello")]
[DataRow("\uFFFF")]
[DataRow("\u0000")]
[DataRow("#")]
[DataRow("%")]
[DataRow("/")]
[DataRow("\\")]
[DataRow("?")]
[DataRow("^")]
[DataRow("^^")]
[DataRow("^^^")]
[DataRow("!@#$%^&*()_+=-0987654321d")]
[DataRow("\'\"\\\r\n\t")]
[DataRow("\u001F\u007F\u009F")]
[DataRow(null)]
public void TestRoundTrip(string original)
{
test/DurableTask.AzureStorage.Tests/Correlation/CorrelationScenarioTest.cs:40
- This is a data-driven test ([DataRow] + parameters) but it is marked [TestMethod]. MSTest requires [DataTestMethod] for DataRow-based tests; otherwise the test won’t be discovered/executed correctly. Please use [DataTestMethod] for this and the other DataRow-annotated tests in this file.
[TestMethod]
[DataRow(Protocol.W3CTraceContext, false)]
[DataRow(Protocol.HttpCorrelationProtocol, false)]
[DataRow(Protocol.W3CTraceContext, true)]
[DataRow(Protocol.HttpCorrelationProtocol, true)]
public async Task SingleOrchestratorWithSingleActivityAsync(Protocol protocol, bool enableExtendedSessions)
{
test/DurableTask.AzureStorage.Tests/AsyncAutoResetEventTests.cs:28
- This is a parameterized test (DataRow + method parameters) but uses [TestMethod]. MSTest requires [DataTestMethod] for DataRow-driven tests. Change to [DataTestMethod] to keep test discovery working.
[TestMethod]
[DataRow(false, false)]
[DataRow(true, true)]
public async Task InitialState(bool initiallySignaled, bool expectedResult)
{
Test/DurableTask.AzureStorage.Tests/Storage/DurableTaskStorageExceptionTests.cs:38
- This method is parameterized and uses [DataRow], but it is marked [TestMethod]. MSTest requires [DataTestMethod] for DataRow-based tests; otherwise it won’t be discovered/executed correctly. Switch back to [DataTestMethod].
[TestMethod]
[DataRow(true, HttpStatusCode.Conflict, nameof(BlobErrorCode.LeaseLost))]
[DataRow(false, HttpStatusCode.Conflict, nameof(BlobErrorCode.LeaseNotPresentWithBlobOperation))]
[DataRow(false, HttpStatusCode.NotFound, nameof(BlobErrorCode.BlobNotFound))]
public void ValidRequestFailedException(bool expectedLease, HttpStatusCode statusCode, string errorCode)
{
test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs:56
- This method is parameterized and uses [DataRow], but the attribute was changed to [TestMethod]. MSTest requires [DataTestMethod] for [DataRow]-driven tests; with [TestMethod] this won’t be discovered correctly. Please revert to [DataTestMethod] (or change to another supported data-driven pattern).
[TestMethod]
[DataRow(ErrorPropagationMode.SerializeExceptions)]
[DataRow(ErrorPropagationMode.UseFailureDetails)]
public async Task CatchInvalidOperationException(ErrorPropagationMode mode)
{
test/DurableTask.AzureStorage.Tests/Net/UriPathTests.cs:34
- This test is parameterized and uses [DataRow], but the attribute was changed to [TestMethod]. MSTest requires [DataTestMethod] for DataRow-driven tests; otherwise it won’t execute as intended. Use [DataTestMethod] here.
[TestMethod]
[DataRow("", "", "")]
[DataRow("", "bar/baz", "bar/baz")]
[DataRow("foo", "", "foo")]
[DataRow("foo", "/", "foo/")]
[DataRow("foo", "bar", "foo/bar")]
[DataRow("foo", "/bar", "foo/bar")]
[DataRow("foo/", "", "foo/")]
[DataRow("foo/", "/", "foo/")]
[DataRow("foo/", "bar", "foo/bar")]
[DataRow("foo/", "/bar", "foo/bar")]
[DataRow("/foo//", "//bar/baz", "/foo///bar/baz")]
public void Combine(string path1, string path2, string expected)
{
test/DurableTask.Core.Tests/ExceptionHandlingIntegrationTests.cs:130
- Same issue as above: this is a parameterized test (DataRow + method parameter) but uses [TestMethod]. Use [DataTestMethod] for DataRow-driven tests to keep MSTest discovery/execution working.
[TestMethod]
[DataRow(ErrorPropagationMode.SerializeExceptions)]
[DataRow(ErrorPropagationMode.UseFailureDetails)]
public async Task FailureDetailsOnUnhandled(ErrorPropagationMode mode)
{
test/DurableTask.Core.Tests/DispatcherMiddlewareTests.cs:347
- This test method takes a parameter and uses [DataRow], but the attribute was changed to [TestMethod]. MSTest requires [DataTestMethod] for data-driven tests; otherwise the test will not run correctly. Please use [DataTestMethod] here.
[TestMethod]
[DataRow(OrchestrationStatus.Completed)]
[DataRow(OrchestrationStatus.Failed)]
[DataRow(OrchestrationStatus.Terminated)]
public async Task MockOrchestrationCompletion(OrchestrationStatus forcedStatus)
{
test/DurableTask.AzureStorage.Tests/StressTests.cs:56
- This is a parameterized test (bool parameter + [DataRow]) but it now uses [TestMethod]. MSTest requires [DataTestMethod] for [DataRow]-based tests; otherwise discovery/execution fails. Switch back to [DataTestMethod].
[TestMethod]
[DataRow(true)]
[DataRow(false)]
public async Task ConcurrentOrchestrationStarts(bool useSameInstanceId)
{
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| /// End-to-end test which validates a simple orchestrator function which doesn't call any activity functions. | ||
| /// </summary> | ||
| [DataTestMethod] | ||
| [TestMethod] |
| IAsyncEnumerable<InstanceStatus> instances = this.trackingStore.FetchInstanceStatusAsync(instanceIds, cancellationToken); | ||
| IDictionary<string, InstanceStatus> remoteOrchestrationsById = | ||
| await instances.ToDictionaryAsync(o => o.State.OrchestrationInstance.InstanceId, cancellationToken); | ||
| await instances.ToDictionaryAsync(o => o.State.OrchestrationInstance.InstanceId, comparer: null, cancellationToken); |
| /// REQUIREMENT: No two workers will ever process the same control queue. | ||
| /// </summary> | ||
| [DataTestMethod] | ||
| [TestMethod] |
| Assert.IsTrue(await container.ExistsAsync(), $"Blob container {containerName} is expected to exist."); | ||
| BlobItem blob = await container | ||
| .GetBlobsByHierarchyAsync(BlobTraits.Metadata, prefix: sanitizedInstanceId) | ||
| .GetBlobsByHierarchyAsync(BlobTraits.Metadata, BlobStates.None, default, sanitizedInstanceId, default) |
|
@copilot open a new pull request to apply changes based on the comments in this thread |
… and explicit blob delimiter (#1317)
Summary
Update all NuGet dependencies in
Directory.Packages.propsto latest compatible versions.Key package upgrades
Code changes for breaking APIs
OrchestrationSessionManager.cs: FixToDictionaryAsyncsignature (System.Linq.Async 7.0)[DataTestMethod]→[TestMethod],ThrowsException→ThrowsExactly(MSTest 3.11)GetBlobsAsync/GetBlobsByHierarchyAsyncrequired parametersDeploymentHelper.cs: Suppress CS0618 for deprecated ServiceFabric APIAzureStorageScenarioTests.cs: Fix incorrect 4-argAssert.AreEqual→ 3 separate assertionsNot updated (already latest or constraints)
Microsoft.NET.Test.Sdkkept at 17.10.0 (17.11+ dropped net6.0 support)