Skip to content

Commit

Permalink
[Governance] Fix outdated references (#48495)
Browse files Browse the repository at this point in the history
* [Governance] Fix outdated references

The focus of these changes is to bump outdated
references for packages and in code samples that
were being flagged by governance and/or as obsolete
during runs.
  • Loading branch information
jsquire authored Mar 3, 2025
1 parent 86f4594 commit eaba92b
Show file tree
Hide file tree
Showing 21 changed files with 68 additions and 153 deletions.
15 changes: 8 additions & 7 deletions eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@
<PackageReference Update="System.ClientModel" Version="1.2.1" />
<PackageReference Update="System.IO.Hashing" Version="6.0.0" />
<PackageReference Update="System.Memory" Version="4.5.5" />
<PackageReference Update="System.Memory.Data" Version="6.0.0" />
<PackageReference Update="System.Memory.Data" Version="6.0.1" />
<PackageReference Update="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Update="System.Net.Http" Version="4.3.4" />
<PackageReference Update="System.Diagnostics.DiagnosticSource" Version="6.0.1" />
Expand All @@ -98,8 +98,8 @@
<PackageReference Update="System.Security.Cryptography.Cose" Version="7.0.0" />
<PackageReference Update="System.Threading.Channels" Version="6.0.0" />
<PackageReference Update="System.Threading.Tasks.Extensions" Version="4.5.4" />
<PackageReference Update="System.Text.Json" Version="6.0.10" />
<PackageReference Update="System.Text.Encodings.Web" Version="6.0.0" />
<PackageReference Update="System.Text.Json" Version="6.0.11" />
<PackageReference Update="System.Text.Encodings.Web" Version="6.0.1" />
<PackageReference Update="System.ValueTuple" Version="4.5.0" />
<PackageReference Update="Microsoft.Bcl.AsyncInterfaces" Version="6.0.0" />
<PackageReference Update="Microsoft.CSharp" Version="4.7.0" />
Expand Down Expand Up @@ -383,7 +383,7 @@
<PackageReference Update="System.IO.Compression" Version="4.3.0" />
<PackageReference Update="System.IO.Pipelines" Version="4.5.1" />
<PackageReference Update="System.Linq.Async" Version="5.0.0" />
<PackageReference Update="System.Memory.Data" Version="6.0.0" />
<PackageReference Update="System.Memory.Data" Version="6.0.1" />
<PackageReference Update="System.Net.WebSockets.Client" Version="4.3.2" />
<PackageReference Update="System.Reflection.Emit" Version="4.7.0" />
<PackageReference Update="System.Runtime.InteropServices" Version="4.3.0" />
Expand Down Expand Up @@ -411,9 +411,11 @@
<PackageReference Update="System.ServiceModel.Primitives" Version="6.2.0" />
<PackageReference Update="Azure.Storage.Files.Shares" Version="12.21.0" />
<PackageReference Update="Azure.Storage.Queues" Version="12.21.0" />
<PackageReference Update="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.0" />
<PackageReference Update="Microsoft.Extensions.Configuration.UserSecrets" Version="8.0.1" />
<PackageReference Update="Microsoft.Extensions.Http" Version="8.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Configuration" Version="8.0.0" />
<PackageReference Update="Microsoft.Extensions.Logging.Configuration" Version="8.0.1" />
<PackageReference Update="System.Formats.Asn1" Version="6.0.1" />
<PackageReference Update="System.Security.Cryptography.Pkcs" Version="6.0.5" />
</ItemGroup>
<ItemGroup Condition="('$(IsWcfLibrary)' == 'true') AND ($(TargetFramework.StartsWith('net4')))">
<PackageReference Update="Microsoft.Extensions.Configuration.UserSecrets" Version="2.1.1" />
Expand All @@ -424,5 +426,4 @@
<PropertyGroup>
<TestProxyVersion>1.0.0-dev.20250221.1</TestProxyVersion>
</PropertyGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<PackageReference Include="Microsoft.Extensions.Hosting.Abstractions" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions" />
<PackageReference Include="Microsoft.Bcl.Numerics" />
<PackageReference Include="System.Memory.Data" VersionOverride="8.0.0"/>
<PackageReference Include="System.Memory.Data" VersionOverride="8.0.1"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="System.Memory.Data" VersionOverride="8.0.0" />
<PackageReference Include="System.Memory.Data" VersionOverride="8.0.1" />
<FrameworkReference Include="Microsoft.AspNetCore.App" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<PackageReference Include="Azure.AI.OpenAI" />
<PackageReference Include="Azure.Search.Documents" />
<PackageReference Include="Microsoft.Extensions.Configuration.Abstractions"/>
<PackageReference Include="System.Memory.Data" VersionOverride="8.0.0"/>
<PackageReference Include="System.Memory.Data" VersionOverride="8.0.1"/>
</ItemGroup>

</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@
<ItemGroup>
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Storage.Queues" />
<PackageReference Include="System.Formats.Asn1" />
<PackageReference Include="System.Security.Cryptography.Pkcs" />
<PackageReference Include="System.ServiceModel.Primitives" GeneratePathProperty="true" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@
<ItemGroup Condition="!$(TargetFramework.StartsWith('net4'))">
<FrameworkReference Include="Microsoft.AspNetCore.App" />
<PackageReference Include="System.ServiceModel.Primitives" />
<PackageReference Include="System.Formats.Asn1" />
<PackageReference Include="System.Security.Cryptography.Pkcs" />
<ProjectReference Include="..\src\Microsoft.WCF.Azure.StorageQueues.csproj" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
</ItemGroup>
<ItemGroup>
<PackageReference Include="System.ServiceModel.Primitives" />
<PackageReference Include="System.Formats.Asn1" />
<PackageReference Include="System.Security.Cryptography.Pkcs" />
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\..\Microsoft.WCF.Azure.StorageQueues\src\Microsoft.WCF.Azure.StorageQueues.csproj" />
Expand Down
10 changes: 5 additions & 5 deletions sdk/keyvault/samples/sharelink/ShareLink.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFramework>net6.0</TargetFramework>
<TargetFramework>net8.0</TargetFramework>
<RootNamespace>Azure.Security.KeyVault.Storage</RootNamespace>
<NoWarn>
$(NoWarn);
Expand All @@ -16,7 +16,7 @@
<IncludeOperationsSharedSource>true</IncludeOperationsSharedSource>
</PropertyGroup>

<ItemGroup>
<ItemGroup>
<PackageReference Include="Azure.Identity" />
<PackageReference Include="Azure.Security.KeyVault.Secrets" />
<PackageReference Include="System.CommandLine" VersionOverride="2.0.0-beta1.21216.1" />
Expand All @@ -29,11 +29,11 @@

<ItemGroup Condition="'$(IsSample)' != 'true'">
<!-- Use decentralized package references when building outside https://github.com/Azure/azure-sdk-for-net -->
<PackageReference Include="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230427.2" PrivateAssets="All" />
<PackageReference Update="Azure.Identity" Version="1.12.0" />
<PackageReference Include="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230427.2" PrivateAssets="All" />
<PackageReference Update="Azure.Identity" Version="1.13.2" />
<PackageReference Update="Azure.Security.KeyVault.Secrets" Version="4.6.0" />
<PackageReference Update="System.CommandLine" Version="%(VersionOverride)" />
<PackageReference Update="System.Text.Json" Version="8.0.4" />
<PackageReference Update="System.Text.Json" Version="8.0.5" />
</ItemGroup>

<ItemGroup Condition="'$(IsSample)' == 'true'">
Expand Down
8 changes: 2 additions & 6 deletions sdk/purview/Azure.Analytics.Purview.Workflows/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,9 @@ Since the Workflow service uses an Azure Active Directory (AAD) bearer token for

```C# Snippet:Azure_Analytics_Purview_Workflows_CreateClient
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");
TokenCredential credential = new DefaultAzureCredential();

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId,tenantId, username,password, null);
var client = new WorkflowsClient(endpoint, usernamePasswordCredential);
var client = new WorkflowsClient(endpoint, credential);
```

## Examples
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ You can set `endpoint`, `username`, `password` etc. based on an environment vari

```C# Snippet:Azure_Analytics_Purview_Workflows_CreateClient
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");
TokenCredential credential = new DefaultAzureCredential();

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId,tenantId, username,password, null);
var client = new WorkflowsClient(endpoint, usernamePasswordCredential);
var client = new WorkflowsClient(endpoint, credential);
```

## Create a Workflow
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ You can set `endpoint`, `username`, `password` etc. based on an environment vari

```C# Snippet:Azure_Analytics_Purview_Workflows_CreateClient
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");
TokenCredential credential = new DefaultAzureCredential();

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId,tenantId, username,password, null);
var client = new WorkflowsClient(endpoint, usernamePasswordCredential);
var client = new WorkflowsClient(endpoint, credential);
```

## Submit a user request
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ You can set `endpoint`, `username`, `password` etc. based on an environment vari

```C# Snippet:Azure_Analytics_Purview_Workflows_CreateClient
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");
TokenCredential credential = new DefaultAzureCredential();

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId,tenantId, username,password, null);
var client = new WorkflowsClient(endpoint, usernamePasswordCredential);
var client = new WorkflowsClient(endpoint, credential);
```

## Approve workflow task
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,9 @@ You can set `endpoint`, `username`, `password` etc. based on an environment vari

```C# Snippet:Azure_Analytics_Purview_Workflows_CreateClient
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");
TokenCredential credential = new DefaultAzureCredential();

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId,tenantId, username,password, null);
var client = new WorkflowsClient(endpoint, usernamePasswordCredential);
var client = new WorkflowsClient(endpoint, credential);
```

## Cancel a workflow run
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ public async Task CreateWorkflowClient()
{
#region Snippet:Azure_Analytics_Purview_Workflows_CreateClient
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");
#if SNIPPET
TokenCredential credential = new DefaultAzureCredential();
#else
TokenCredential credential = TestEnvironment.Credential;
#endif

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId,tenantId, username,password, null);
var client = new WorkflowsClient(endpoint, usernamePasswordCredential);
#endregion
var client = new WorkflowsClient(endpoint, credential);
#endregion

//Perform an operation
AsyncPageable<BinaryData> workflowList = client.GetWorkflowsAsync(new RequestContext());
Expand All @@ -47,13 +47,7 @@ public async Task CreateWorkflowClient()
public async Task CreateWorkflow()
{
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId, tenantId, username, password, null);
var client = new WorkflowClient(endpoint, usernamePasswordCredential);
var client = new WorkflowClient(endpoint, TestEnvironment.Credential);

#region Snippet:Azure_Analytics_Purview_Workflows_CreateWorkflow
Guid workflowId = Guid.NewGuid();
Expand All @@ -74,13 +68,7 @@ public async Task CreateWorkflow()
public async Task GetWorkflow()
{
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId, tenantId, username, password, null);
var client = new WorkflowClient(endpoint, usernamePasswordCredential);
var client = new WorkflowClient(endpoint, TestEnvironment.Credential);

#region Snippet:Azure_Analytics_Purview_Workflows_GetWorkflow
// This workflowId represents an existing workflow. The id can be obtained by calling CreateOrReplaceWorkflowAsync API or list workflows by calling GetWorkflowsAsync API.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
// Licensed under the MIT License.

using System;
using System.IO;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Core.TestFramework;
using Azure.Identity;
using NUnit.Framework;

namespace Azure.Analytics.Purview.Workflows.Tests.Samples
Expand All @@ -20,13 +16,7 @@ public class UserRequestsSamples: SamplesBase<WorkflowsClientTestEnvironment>
public async Task SubmitUserRequest()
{
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId,tenantId, username,password, null);
var client = new UserRequestsClient(endpoint, usernamePasswordCredential);
var client = new UserRequestsClient(endpoint, TestEnvironment.Credential);

#region Snippet:Azure_Analytics_Purview_Workflows_SubmitUserRequests

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
// Licensed under the MIT License.

using System;
using System.IO;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Core.TestFramework;
using Azure.Identity;
using NUnit.Framework;

namespace Azure.Analytics.Purview.Workflows.Tests.Samples
Expand All @@ -20,13 +16,7 @@ public class WorkflowsTasksSamples: SamplesBase<WorkflowsClientTestEnvironment>
public async Task ApproveWorkflowTask()
{
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId,tenantId, username,password, null);
var client = new ApprovalClient(endpoint, usernamePasswordCredential);
var client = new ApprovalClient(endpoint, TestEnvironment.Credential);

#region Snippet:Azure_Analytics_Purview_Workflows_ApproveWorkflowTask

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,9 @@
// Licensed under the MIT License.

using System;
using System.IO;
using System.Linq;
using System.Text.Json;
using System.Threading.Tasks;
using Azure.Core;
using Azure.Core.TestFramework;
using Azure.Identity;
using NUnit.Framework;

namespace Azure.Analytics.Purview.Workflows.Tests.Samples
Expand All @@ -20,13 +16,7 @@ public class WorkflowRunsSamples: SamplesBase<WorkflowsClientTestEnvironment>
public async Task CancelWorkflowRun()
{
Uri endpoint = new Uri(Environment.GetEnvironmentVariable("WORKFLOW_ENDPOINT"));
string clientId = Environment.GetEnvironmentVariable("ClientId");
string tenantId = Environment.GetEnvironmentVariable("TenantId");
string username = Environment.GetEnvironmentVariable("Username");
string password = Environment.GetEnvironmentVariable("Password");

TokenCredential usernamePasswordCredential = new UsernamePasswordCredential(clientId,tenantId, username,password, null);
var client = new WorkflowRunClient(endpoint, usernamePasswordCredential);
var client = new WorkflowRunClient(endpoint, TestEnvironment.Credential);

#region Snippet:Azure_Analytics_Purview_Workflows_CancelWorkflowRun
// This workflowRunId represents an existing workflow run. The id can be obtained by calling GetWorkflowRunsAsync API.
Expand Down
Loading

0 comments on commit eaba92b

Please sign in to comment.