Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
c5ca5b0
Upgrade analyzer version to 0.1.1-dev.20230613.1
pshao25 Jun 15, 2023
81d6a5d
Update
pshao25 Jun 15, 2023
2a88ad2
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
pshao25 Jul 7, 2023
e1215ed
Update
pshao25 Jul 12, 2023
bf4450e
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
pshao25 Jul 17, 2023
0adff3b
Update
pshao25 Jul 17, 2023
c07d7d1
Update
pshao25 Jul 17, 2023
b0bef5e
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
pshao25 Jul 17, 2023
56d9071
Update
pshao25 Jul 17, 2023
08b896f
Update
pshao25 Jul 18, 2023
90a0baf
Update
pshao25 Jul 18, 2023
4df596e
Update
pshao25 Jul 25, 2023
db0cdb7
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
pshao25 Jul 25, 2023
eada748
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
pshao25 Jul 27, 2023
6e97987
update
pshao25 Jul 27, 2023
20913a8
update
pshao25 Jul 27, 2023
ced9931
Update
pshao25 Jul 27, 2023
42ebc54
Update
pshao25 Jul 27, 2023
23cd6ba
update
pshao25 Jul 27, 2023
5a158ef
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
pshao25 Jul 31, 2023
4a39793
update
pshao25 Aug 2, 2023
d1754a8
Update
pshao25 Aug 2, 2023
07da049
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
pshao25 Aug 2, 2023
4b1c9dc
Update
pshao25 Aug 3, 2023
99e18d5
Update
pshao25 Aug 3, 2023
e43eb1d
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
pshao25 Aug 3, 2023
0b4746d
Merge branch 'main' of https://github.com/Azure/azure-sdk-for-net int…
pshao25 Aug 15, 2023
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
2 changes: 1 addition & 1 deletion eng/Packages.Data.props
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@
-->
<ItemGroup>
<PackageReference Update="Microsoft.Azure.AutoRest.CSharp" Version="3.0.0-beta.20230814.2" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20230131.1" PrivateAssets="All" />
<PackageReference Update="Azure.ClientSdk.Analyzers" Version="0.1.1-dev.20230815.1" PrivateAssets="All" />
<PackageReference Update="coverlet.collector" Version="3.2.0" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.1" PrivateAssets="All" />
<PackageReference Update="Microsoft.CodeAnalysis.BannedApiAnalyzers" Version="3.3.2" PrivateAssets="All" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,4 @@
using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Usage", "AZC0007: A client type should have a public constructor with equivalent parameters that doesn't take a Azure.Core.ClientOptions-derived type as the last argument", Justification = "")]
[assembly: SuppressMessage("Usage", "AZC0006: A client type should have a public constructor with equivalent parameters that takes a Azure.Core.ClientOptions-derived type as the last argument", Justification = "")]
[assembly: SuppressMessage("Usage", "AZC0002: Client method should have cancellationToken as the last optional parameter (both name and it being optional matters", Justification = "")]
[assembly: SuppressMessage("Usage", "AZC0006: A client type should have a public constructor with equivalent parameters that takes a Azure.Core.ClientOptions-derived type as the last argument", Justification = "")]
Comment thread
annelo-msft marked this conversation as resolved.
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ public partial class ChatClient
protected ChatClient() { }
public ChatClient(System.Uri endpoint, Azure.Communication.CommunicationTokenCredential communicationTokenCredential, Azure.Communication.Chat.ChatClientOptions options = null) { }
public virtual Azure.Response<Azure.Communication.Chat.CreateChatThreadResult> CreateChatThread(string topic, System.Collections.Generic.IEnumerable<Azure.Communication.Chat.ChatParticipant> participants, string idempotencyToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Chat.CreateChatThreadResult>> CreateChatThreadAsync(string topic, System.Collections.Generic.IEnumerable<Azure.Communication.Chat.ChatParticipant> participants = null, string idempotencyToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.Chat.CreateChatThreadResult>> CreateChatThreadAsync(string topic, System.Collections.Generic.IEnumerable<Azure.Communication.Chat.ChatParticipant> participants, string idempotencyToken = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this a breaking change to a GA library?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it is OK. See #37037 (comment)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tg-msft, can you confirm this is an acceptable change?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Given that we're effectively replacing a runtime NullRefEx with a compile time break per https://github.com/Azure/azure-sdk-for-net/blob/main/sdk/communication/Azure.Communication.Chat/src/ChatClient.cs#L59-L95, I think we should take this.

+@glorialimicrosoft as an FYI of the change and that we might also want an Argument.AssertNotNull(participants, nameof(participants)) here (which isn't considered breaking to add either).

public virtual Azure.Response DeleteChatThread(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response> DeleteChatThreadAsync(string threadId, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Communication.Chat.ChatThreadClient GetChatThreadClient(string threadId) { throw null; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ protected ChatClient()
/// <param name="idempotencyToken"> If specified, the client directs that the request is repeatable; that is, that the client can make the request multiple times with the same Repeatability-Request-ID and get back an appropriate response without the server executing the request multiple times. The value of the Repeatability-Request-ID is an opaque string representing a client-generated, globally unique for all time, identifier for the request. It is recommended to use version 4 (random) UUIDs. </param>
/// <param name="cancellationToken">The cancellation token for the task.</param>
/// <exception cref="RequestFailedException">The server returned an error. See <see cref="Exception.Message"/> for details returned from the server.</exception>
public virtual async Task<Response<CreateChatThreadResult>> CreateChatThreadAsync(string topic, IEnumerable<ChatParticipant> participants = null, string idempotencyToken = null, CancellationToken cancellationToken = default)
public virtual async Task<Response<CreateChatThreadResult>> CreateChatThreadAsync(string topic, IEnumerable<ChatParticipant> participants, string idempotencyToken = null, CancellationToken cancellationToken = default)
Comment thread
pshao25 marked this conversation as resolved.
{
using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(ChatClient)}.{nameof(CreateChatThread)}");
scope.Start();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ public JobRouterAdministrationClient(System.Uri endpoint, Azure.Core.TokenCreden
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.ClassificationPolicy>> CreateClassificationPolicyAsync(Azure.Communication.JobRouter.CreateClassificationPolicyOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.JobRouter.Models.DistributionPolicy> CreateDistributionPolicy(Azure.Communication.JobRouter.CreateDistributionPolicyOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.DistributionPolicy>> CreateDistributionPolicyAsync(Azure.Communication.JobRouter.CreateDistributionPolicyOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.JobRouter.Models.ExceptionPolicy> CreateExceptionPolicy(Azure.Communication.JobRouter.CreateExceptionPolicyOptions options = null, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Comment thread
pshao25 marked this conversation as resolved.
public virtual Azure.Response<Azure.Communication.JobRouter.Models.ExceptionPolicy> CreateExceptionPolicy(Azure.Communication.JobRouter.CreateExceptionPolicyOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.ExceptionPolicy>> CreateExceptionPolicyAsync(Azure.Communication.JobRouter.CreateExceptionPolicyOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual Azure.Response<Azure.Communication.JobRouter.Models.RouterQueue> CreateQueue(Azure.Communication.JobRouter.CreateQueueOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
public virtual System.Threading.Tasks.Task<Azure.Response<Azure.Communication.JobRouter.Models.RouterQueue>> CreateQueueAsync(Azure.Communication.JobRouter.CreateQueueOptions options, System.Threading.CancellationToken cancellationToken = default(System.Threading.CancellationToken)) { throw null; }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -877,7 +877,7 @@ public virtual async Task<Response<ExceptionPolicy>> CreateExceptionPolicyAsync(
/// <param name="cancellationToken"> (Optional) The cancellation token to use. </param>
/// <exception cref="RequestFailedException">The server returned an error. See <see cref="Exception.Message"/> for details returned from the server.</exception>
public virtual Response<ExceptionPolicy> CreateExceptionPolicy(
CreateExceptionPolicyOptions options = default,
CreateExceptionPolicyOptions options,
CancellationToken cancellationToken = default)
{
using DiagnosticScope scope = _clientDiagnostics.CreateScope($"{nameof(JobRouterAdministrationClient)}.{nameof(CreateExceptionPolicy)}");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
<PackageTags>Azure ContentSafety</PackageTags>
<TargetFrameworks>$(RequiredTargetFrameworks)</TargetFrameworks>
<GenerateAPIListing>true</GenerateAPIListing>
<NoWarn>$(NoWarn);AZC0002</NoWarn>
<IncludeOperationsSharedSource>true</IncludeOperationsSharedSource>
</PropertyGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@

using System.Diagnostics.CodeAnalysis;

[assembly: SuppressMessage("Usage", "AZC0002:DO ensure all service methods, both asynchronous and synchronous, take an optional CancellationToken parameter called cancellationToken.", Justification = "CancellationToken can be passed through RequestOptions")]
[assembly: SuppressMessage("Usage", "AZC0001:Use one of the following pre-approved namespace groups (https://azure.github.io/azure-sdk/registered_namespaces.html): Azure.AI, Azure.Analytics, Azure.Communication, Azure.Data, Azure.DigitalTwins, Azure.IoT, Azure.Learn, Azure.Media, Azure.Management, Azure.Messaging, Azure.ResourceManager, Azure.Search, Azure.Security, Azure.Storage, Azure.Template, Azure.Identity, Microsoft.Extensions.Azure", Justification = "Temporary while awaiting namespace group approval", Scope = "namespace", Target = "~N:Azure.Developer.DevCenter")]
[assembly: SuppressMessage("Usage", "AZC0007:DO provide a minimal constructor that takes only the parameters required to connect to the service.", Justification = "False positives on minimal constructors", Scope = "namespaceanddescendants", Target = "~N:Azure.Developer.DevCenter")]
[assembly: SuppressMessage("Usage", "AZC0006:DO provide constructor overloads that allow specifying additional options.", Justification = "False positives on options constructors", Scope = "namespaceanddescendants", Target = "~N:Azure.Developer.DevCenter")]

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,9 @@ public virtual async Task<Response<AssetConversion>> GetConversionAsync(string c

/// <summary> Gets a list of all conversions.</summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
#pragma warning disable AZC0004 // DO provide both asynchronous and synchronous variants for all service methods.
public virtual Pageable<AssetConversion> GetConversions(CancellationToken cancellationToken = default)
#pragma warning restore AZC0004 // DO provide both asynchronous and synchronous variants for all service methods.
{
Page<AssetConversion> FirstPageFunc(int? pageSizeHint)
{
Expand Down Expand Up @@ -204,7 +206,9 @@ Page<AssetConversion> NextPageFunc(string nextLink, int? pageSizeHint)

/// <summary> Gets a list of all conversions.</summary>
/// <param name="cancellationToken"> The cancellation token to use. </param>
#pragma warning disable AZC0004 // DO provide both asynchronous and synchronous variants for all service methods.
public virtual AsyncPageable<AssetConversion> GetConversionsAync(CancellationToken cancellationToken = default)
#pragma warning restore AZC0004 // DO provide both asynchronous and synchronous variants for all service methods.
{
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a typo here GetConversionsAync should be GetConversionsAsync. Therefore these two async/sync pair cannot find each other. I have to suppress here. This library is GAed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for finding this! It might be helpful to file an issue for this library to let them know - they could introduce a correctly-spelled method and mark the misspelled one with "EditorBrowsableState.Never"

async Task<Page<AssetConversion>> FirstPageFunc(int? pageSizeHint)
{
Expand Down
4 changes: 4 additions & 0 deletions sdk/storage/Azure.Storage.Blobs/src/BlobLeaseClient.cs
Original file line number Diff line number Diff line change
Expand Up @@ -824,12 +824,16 @@ await ReleaseInternal(
/// a failure occurs.
/// </remarks>
[EditorBrowsable(EditorBrowsableState.Never)]
#pragma warning disable AZC0002 // Client method should have an optional CancellationToken (both name and it being optional matters) or a RequestContext as the last parameter.
#pragma warning disable AZC0004 // DO provide both asynchronous and synchronous variants for all service methods.
public virtual async Task<Response<ReleasedObjectInfo>> ReleaseInternal(
RequestConditions conditions,
#pragma warning disable AZC0105 // DO NOT add 'async' parameter to public methods. This method is published, so it can't be modified.
bool async,
#pragma warning restore AZC0105 // DO NOT add 'async' parameter to public methods.
CancellationToken cancellationToken)
#pragma warning restore AZC0004 // DO provide both asynchronous and synchronous variants for all service methods.
#pragma warning restore AZC0002 // Client method should have an optional CancellationToken (both name and it being optional matters) or a RequestContext as the last parameter.
{
EnsureClient();
using (Pipeline.BeginLoggingScope(nameof(BlobLeaseClient)))
Expand Down

This file was deleted.

11 changes: 0 additions & 11 deletions sdk/template/Azure.Template/src/GlobalSuppressions.cs

This file was deleted.

Loading