From 26153fb4bd744448ae034c944ca5d4302cae0af3 Mon Sep 17 00:00:00 2001 From: Jesse Squire Date: Tue, 15 Aug 2023 14:52:03 -0400 Subject: [PATCH 01/20] [Service Bus] Fix docs typo (#38211) The focus of these changes is to fix a typo in the doc comments for `ServiceBusMessage.CorrelationId` --- .../src/Primitives/ServiceBusMessage.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusMessage.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusMessage.cs index 9df5add29f3f..79c92687127e 100755 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusMessage.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Primitives/ServiceBusMessage.cs @@ -302,7 +302,7 @@ public TimeSpan TimeToLive } } - /// Gets or sets the a correlation identifier. + /// Gets or sets the correlation identifier. /// Correlation identifier. /// /// Allows an application to specify a context for the message for the purposes of correlation, From 86b639f95caae135fbebbef2caeaf8cdd3e36c1b Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Tue, 15 Aug 2023 13:51:39 -0700 Subject: [PATCH 02/20] Prepare for release (#38222) --- sdk/core/Azure.Core.Expressions.DataFactory/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/core/Azure.Core.Expressions.DataFactory/CHANGELOG.md b/sdk/core/Azure.Core.Expressions.DataFactory/CHANGELOG.md index 268772ef08a3..becca40489d3 100644 --- a/sdk/core/Azure.Core.Expressions.DataFactory/CHANGELOG.md +++ b/sdk/core/Azure.Core.Expressions.DataFactory/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 1.0.0-beta.5 (Unreleased) +## 1.0.0-beta.5 (2023-08-15) ### Bugs Fixed From ad896c01e8de07fbefcacbcaaa06b68abcef19b7 Mon Sep 17 00:00:00 2001 From: Scott Addie <10702007+scottaddie@users.noreply.github.com> Date: Tue, 15 Aug 2023 16:21:00 -0500 Subject: [PATCH 03/20] Update CODEOWNERS file for Monitor (#38223) --- .github/CODEOWNERS | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index b44e398ec3e9..58e87fd878d8 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -563,14 +563,13 @@ # ServiceLabel: %Monitor %Service Attention /sdk/monitor/ @SameergMS @dadunl +/sdk/monitor/ci.yml @nisha-bhatia @JoshLove-msft @pallavit @Azure/azure-sdk-write-monitor-data-plane # PRLabel: %Monitor - Ingestion -/sdk/monitor/Azure.Monitor.Ingestion/ @nisha-bhatia @JoshLove-msft @pallavit -/sdk/monitor/ci.yml @nisha-bhatia @JoshLove-msft @pallavit +/sdk/monitor/Azure.Monitor.Ingestion/ @nisha-bhatia @JoshLove-msft @pallavit @Azure/azure-sdk-write-monitor-data-plane # PRLabel: %Monitor - Query -/sdk/monitor/Azure.Monitor.Query/ @nisha-bhatia @JoshLove-msft @pallavit -/sdk/monitor/ci.yml @nisha-bhatia @JoshLove-msft @pallavit +/sdk/monitor/Azure.Monitor.Query/ @nisha-bhatia @JoshLove-msft @pallavit @Azure/azure-sdk-write-monitor-data-plane # PRLabel: %Monitor - ApplicationInsights # ServiceLabel: %Monitor - ApplicationInsights %Service Attention From 43760de6054fdbf128c458a23fe58f2f1421231c Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Tue, 15 Aug 2023 14:49:44 -0700 Subject: [PATCH 04/20] Add benchmark for patch model --- .../perf/Serializations/JsonBenchmark.cs | 14 +++++++- .../SimplePatchModelBenchmark.cs | 33 +++++++++++++++++++ .../SimplePatchModel.Serialization.cs | 7 ++++ 3 files changed, 53 insertions(+), 1 deletion(-) create mode 100644 sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs diff --git a/sdk/core/Azure.Core/perf/Serializations/JsonBenchmark.cs b/sdk/core/Azure.Core/perf/Serializations/JsonBenchmark.cs index 3bf0044b1ae2..7921318f4b82 100644 --- a/sdk/core/Azure.Core/perf/Serializations/JsonBenchmark.cs +++ b/sdk/core/Azure.Core/perf/Serializations/JsonBenchmark.cs @@ -123,11 +123,23 @@ public void Serialize_PublicInterface() [Benchmark] [BenchmarkCategory("Internal")] - public T Deserialize_Internal() + public T Deserialize_Internal_JsonElement() { return Deserialize(_jsonDocument.RootElement); } + protected virtual T Deserialize(BinaryData data) + { + return Deserialize(JsonDocument.Parse(data).RootElement); + } + + [Benchmark] + [BenchmarkCategory("Internal")] + public T Deserialize_Internal_BinaryData() + { + return Deserialize(_data); + } + [Benchmark] [BenchmarkCategory("Cast")] public T Deserialize_ExplicitCast() diff --git a/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs b/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs new file mode 100644 index 000000000000..26f5813514f6 --- /dev/null +++ b/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs @@ -0,0 +1,33 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using System.Text.Json; +using Azure.Core.Tests.PatchModels; + +namespace Azure.Core.Perf.Serializations +{ + public class SimplePatchModelBenchmark : JsonBenchmark + { + protected override string JsonFileName => throw new System.NotImplementedException(); + + protected override SimplePatchModel CastFromResponse() => (SimplePatchModel)_response; + + protected override RequestContent CastToRequestContent() => _model; + + protected override SimplePatchModel Deserialize(JsonElement jsonElement) + { + using Stream stream = new MemoryStream(); + using Utf8JsonWriter writer = new(stream); + jsonElement.WriteTo(writer); + writer.Flush(); + stream.Position = 0; + return Deserialize(BinaryData.FromStream(stream)); + } + + protected override SimplePatchModel Deserialize(BinaryData data) => SimplePatchModel.Deserialize(data); + + protected override void Serialize(Utf8JsonWriter writer) => _model.Serialize(writer); + } +} diff --git a/sdk/core/Azure.Core/tests/public/PatchModels/SimplePatchModel.Serialization.cs b/sdk/core/Azure.Core/tests/public/PatchModels/SimplePatchModel.Serialization.cs index bc278c559567..52ce74b9031f 100644 --- a/sdk/core/Azure.Core/tests/public/PatchModels/SimplePatchModel.Serialization.cs +++ b/sdk/core/Azure.Core/tests/public/PatchModels/SimplePatchModel.Serialization.cs @@ -62,11 +62,18 @@ BinaryData IModelSerializable.Serialize(ModelSerializerOptions return ModelSerializer.SerializeCore(this, options); } + public static implicit operator RequestContent(SimplePatchModel model) + => RequestContent.Create(model, ModelSerializerOptions.DefaultWireOptions); + public static explicit operator SimplePatchModel(Response response) { Argument.AssertNotNull(response, nameof(response)); return Deserialize(response.Content, ModelSerializerOptions.DefaultWireOptions); } + + // TODO: Temp for pef tests + public void Serialize(Utf8JsonWriter writer) => ((IUtf8JsonSerializable)this).Write(writer); + public static SimplePatchModel Deserialize(BinaryData data) => Deserialize(data, ModelSerializerOptions.DefaultWireOptions); } } From f834b2a3b42a4697ed926a83a03d89990ab23539 Mon Sep 17 00:00:00 2001 From: Christopher Scott Date: Tue, 15 Aug 2023 17:15:30 -0500 Subject: [PATCH 05/20] Update CHANGELOG.md for release (#38228) --- sdk/tables/Azure.Data.Tables/CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/tables/Azure.Data.Tables/CHANGELOG.md b/sdk/tables/Azure.Data.Tables/CHANGELOG.md index af9d8a072b00..dfa446711ad7 100644 --- a/sdk/tables/Azure.Data.Tables/CHANGELOG.md +++ b/sdk/tables/Azure.Data.Tables/CHANGELOG.md @@ -1,6 +1,6 @@ # Release History -## 12.8.1 (2023-07-11) +## 12.8.1 (2023-08-15) ### Bugs Fixed - Fixed the URL returned by `TableClient.Uri` when connecting to Azurite From 9e5f17638d0060ab84c443b8e79821f558bdc353 Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Tue, 15 Aug 2023 15:20:07 -0700 Subject: [PATCH 06/20] Initial benchmark --- .../perf/Serializations/SimplePatchModelBenchmark.cs | 4 ++-- .../Azure.Core/tests/common/Azure.Core.Tests.Common.csproj | 3 +++ .../Azure.Core/tests/common/TestData/SimplePatchModel.json | 5 +++++ .../public/PatchModels/SimplePatchModel.Serialization.cs | 4 +++- 4 files changed, 13 insertions(+), 3 deletions(-) create mode 100644 sdk/core/Azure.Core/tests/common/TestData/SimplePatchModel.json diff --git a/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs b/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs index 26f5813514f6..2b95c36074d4 100644 --- a/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs +++ b/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs @@ -10,8 +10,6 @@ namespace Azure.Core.Perf.Serializations { public class SimplePatchModelBenchmark : JsonBenchmark { - protected override string JsonFileName => throw new System.NotImplementedException(); - protected override SimplePatchModel CastFromResponse() => (SimplePatchModel)_response; protected override RequestContent CastToRequestContent() => _model; @@ -29,5 +27,7 @@ protected override SimplePatchModel Deserialize(JsonElement jsonElement) protected override SimplePatchModel Deserialize(BinaryData data) => SimplePatchModel.Deserialize(data); protected override void Serialize(Utf8JsonWriter writer) => _model.Serialize(writer); + + protected override string JsonFileName => "SimplePatchModel.json"; } } diff --git a/sdk/core/Azure.Core/tests/common/Azure.Core.Tests.Common.csproj b/sdk/core/Azure.Core/tests/common/Azure.Core.Tests.Common.csproj index cb8e22f45568..7d09cf11d14f 100644 --- a/sdk/core/Azure.Core/tests/common/Azure.Core.Tests.Common.csproj +++ b/sdk/core/Azure.Core/tests/common/Azure.Core.Tests.Common.csproj @@ -18,6 +18,9 @@ + + Always + Always diff --git a/sdk/core/Azure.Core/tests/common/TestData/SimplePatchModel.json b/sdk/core/Azure.Core/tests/common/TestData/SimplePatchModel.json new file mode 100644 index 000000000000..3bb777e63da3 --- /dev/null +++ b/sdk/core/Azure.Core/tests/common/TestData/SimplePatchModel.json @@ -0,0 +1,5 @@ +{ + "name": "abc", + "count": 1, + "updatedOn": "2023-10-19T10:19:10.0190001Z" +} diff --git a/sdk/core/Azure.Core/tests/public/PatchModels/SimplePatchModel.Serialization.cs b/sdk/core/Azure.Core/tests/public/PatchModels/SimplePatchModel.Serialization.cs index 52ce74b9031f..ffa78f9c896c 100644 --- a/sdk/core/Azure.Core/tests/public/PatchModels/SimplePatchModel.Serialization.cs +++ b/sdk/core/Azure.Core/tests/public/PatchModels/SimplePatchModel.Serialization.cs @@ -8,7 +8,7 @@ namespace Azure.Core.Tests.PatchModels { - public partial class SimplePatchModel : IModelJsonSerializable + public partial class SimplePatchModel : IModelJsonSerializable, IUtf8JsonSerializable { SimplePatchModel IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) { @@ -72,6 +72,8 @@ public static explicit operator SimplePatchModel(Response response) return Deserialize(response.Content, ModelSerializerOptions.DefaultWireOptions); } + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IModelJsonSerializable)this).Serialize(writer, ModelSerializerOptions.DefaultWireOptions); + // TODO: Temp for pef tests public void Serialize(Utf8JsonWriter writer) => ((IUtf8JsonSerializable)this).Write(writer); public static SimplePatchModel Deserialize(BinaryData data) => Deserialize(data, ModelSerializerOptions.DefaultWireOptions); From 19a3a2a9ea51bdbd1bda08d545b2e15ba61a7064 Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Tue, 15 Aug 2023 16:04:27 -0700 Subject: [PATCH 07/20] wip --- .../SimpleStandardModelBenchmark.cs | 31 +++++ .../common/Azure.Core.Tests.Common.csproj | 3 + .../common/TestData/SimpleStandardModel.json | 5 + .../public/PatchModels/PatchModelTests.cs | 92 ++++++++++++++ .../SimpleStandardModel.Serialization.cs | 112 ++++++++++++++++++ .../public/PatchModels/SimpleStandardModel.cs | 25 ++++ 6 files changed, 268 insertions(+) create mode 100644 sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs create mode 100644 sdk/core/Azure.Core/tests/common/TestData/SimpleStandardModel.json create mode 100644 sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.Serialization.cs create mode 100644 sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.cs diff --git a/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs b/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs new file mode 100644 index 000000000000..9ea4ca834004 --- /dev/null +++ b/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs @@ -0,0 +1,31 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.IO; +using System.Text.Json; +using Azure.Core.Tests.PatchModels; + +namespace Azure.Core.Perf.Serializations +{ + public class SimpleStandardModelBenchmark : JsonBenchmark + { + protected override SimpleStandardModel CastFromResponse() => (SimpleStandardModel)_response; + + protected override RequestContent CastToRequestContent() => _model; + + protected override SimpleStandardModel Deserialize(JsonElement jsonElement) + { + using Stream stream = new MemoryStream(); + using Utf8JsonWriter writer = new(stream); + jsonElement.WriteTo(writer); + writer.Flush(); + stream.Position = 0; + return Deserialize(BinaryData.FromStream(stream)); + } + + protected override void Serialize(Utf8JsonWriter writer) => _model.Serialize(writer); + + protected override string JsonFileName => "SimpleStandardModel.json"; + } +} diff --git a/sdk/core/Azure.Core/tests/common/Azure.Core.Tests.Common.csproj b/sdk/core/Azure.Core/tests/common/Azure.Core.Tests.Common.csproj index 7d09cf11d14f..fbd22a68ac2d 100644 --- a/sdk/core/Azure.Core/tests/common/Azure.Core.Tests.Common.csproj +++ b/sdk/core/Azure.Core/tests/common/Azure.Core.Tests.Common.csproj @@ -18,6 +18,9 @@ + + Always + Always diff --git a/sdk/core/Azure.Core/tests/common/TestData/SimpleStandardModel.json b/sdk/core/Azure.Core/tests/common/TestData/SimpleStandardModel.json new file mode 100644 index 000000000000..3bb777e63da3 --- /dev/null +++ b/sdk/core/Azure.Core/tests/common/TestData/SimpleStandardModel.json @@ -0,0 +1,5 @@ +{ + "name": "abc", + "count": 1, + "updatedOn": "2023-10-19T10:19:10.0190001Z" +} diff --git a/sdk/core/Azure.Core/tests/public/PatchModels/PatchModelTests.cs b/sdk/core/Azure.Core/tests/public/PatchModels/PatchModelTests.cs index 47dc0f96c310..bfc6eaf7c4bb 100644 --- a/sdk/core/Azure.Core/tests/public/PatchModels/PatchModelTests.cs +++ b/sdk/core/Azure.Core/tests/public/PatchModels/PatchModelTests.cs @@ -62,6 +62,98 @@ public void CanRoundTripSimpleModel() ValidatePatch("""{"count":2, "name":"xyz"}""", model); } + #region Standard model + + [Test] + public void CanSetIntProperty() + { + JsonDocument doc = JsonDocument.Parse(""" + { + "name": "abc", + "count": 1, + "updatedOn": "2023-10-19T10:19:10.0190001Z" + } + """); + SimpleStandardModel model = SimpleStandardModel.DeserializeSimpleStandardModel(doc.RootElement, new ModelSerializerOptions("J")); + model.Count = 2; + + ValidateSerialize(""" + { + "name": "abc", + "count": 2, + "updatedOn": "2023-10-19T10:19:10.0190001Z" + } + """, model); + } + + [Test] + public void CanSetStringProperty() + { + JsonDocument doc = JsonDocument.Parse(""" + { + "name": "abc", + "count": 1, + "updatedOn": "2023-10-19T10:19:10.0190001Z" + } + """); + SimpleStandardModel model = SimpleStandardModel.DeserializeSimpleStandardModel(doc.RootElement, new ModelSerializerOptions("J")); + model.Name = "xyz"; + + ValidateSerialize(""" + { + "name": "xyz", + "count": 1, + "updatedOn": "2023-10-19T10:19:10.0190001Z" + } + """, model); + } + + [Test] + public void CanSetDateTimeProperty() + { + DateTimeOffset updateTime = DateTimeOffset.Parse("2023-10-20T10:20:10.0190001Z"); + JsonDocument doc = JsonDocument.Parse(""" + { + "name": "abc", + "count": 1, + "updatedOn": "2023-10-19T10:19:10.0190001Z" + } + """); + + SimpleStandardModel model = SimpleStandardModel.DeserializeSimpleStandardModel(doc.RootElement, new ModelSerializerOptions("J")); + model.UpdatedOn = updateTime; + + ValidateSerialize(""" + { + "name": "abc", + "count": 1, + "updatedOn": "2023-10-20T10:20:10.0190001Z" + } + """, model); + } + + [Test] + public void CanRoundTripSimpleStandardModel() + { + BinaryData json = BinaryData.FromString(""" + { + "name": "abc", + "count": 1 + } + """); + + SimplePatchModel model = ModelSerializer.Deserialize(json); + + Assert.AreEqual(1, model.Count); + Assert.AreEqual("abc", model.Name); + + model.Name = "xyz"; + model.Count = 2; + + ValidatePatch("""{"count":2, "name":"xyz"}""", model); + } + #endregion standard model + [Test] public void CanPatchNestedModel() { diff --git a/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.Serialization.cs b/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.Serialization.cs new file mode 100644 index 000000000000..4d08f201685b --- /dev/null +++ b/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.Serialization.cs @@ -0,0 +1,112 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; +using System.Text.Json; +using Azure.Core.Serialization; + +namespace Azure.Core.Tests.PatchModels +{ + public partial class SimpleStandardModel : IModelJsonSerializable, IUtf8JsonSerializable + { + internal static SimpleStandardModel DeserializeSimpleStandardModel(JsonElement element, ModelSerializerOptions options) + { + options ??= ModelSerializerOptions.DefaultWireOptions; + + if (element.ValueKind == JsonValueKind.Null) + { + return null; + } + Optional name = default; + Optional count = default; + Optional updatedOn = default; + + foreach (var property in element.EnumerateObject()) + { + if (property.NameEquals("name"u8)) + { + name = property.Value.GetString(); + continue; + } + if (property.NameEquals("count"u8)) + { + count = property.Value.GetInt32(); + continue; + } + if (property.NameEquals("updatedOn"u8)) + { + updatedOn = property.Value.GetDateTimeOffset(); + continue; + } + } + return new SimpleStandardModel(name, count, updatedOn); + } + + SimpleStandardModel IModelJsonSerializable.Deserialize(ref Utf8JsonReader reader, ModelSerializerOptions options) + { + PatchModelHelper.ValidateFormat(this, options.Format); + + using var doc = JsonDocument.ParseValue(ref reader); + return DeserializeSimpleStandardModel(doc.RootElement, options); + } + + SimpleStandardModel IModelSerializable.Deserialize(BinaryData data, ModelSerializerOptions options) + { + PatchModelHelper.ValidateFormat(this, options.Format); + + JsonDocument doc = JsonDocument.Parse(data); + return DeserializeSimpleStandardModel(doc.RootElement, options); + } + + private void Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + { + writer.WriteStartObject(); + if (Optional.IsDefined(Name)) + { + writer.WritePropertyName("name"u8); + writer.WriteStringValue(Name); + } + if (Optional.IsDefined(Count)) + { + writer.WritePropertyName("count"u8); + writer.WriteNumberValue(Count.Value); + } + if (Optional.IsDefined(UpdatedOn)) + { + writer.WritePropertyName("updatedOn"u8); + writer.WriteStringValue(UpdatedOn.Value.UtcDateTime.ToString("O")); + } + writer.WriteEndObject(); + } + + void IModelJsonSerializable.Serialize(Utf8JsonWriter writer, ModelSerializerOptions options) + { + PatchModelHelper.ValidateFormat(this, options.Format); + + Serialize(writer, options); + } + + BinaryData IModelSerializable.Serialize(ModelSerializerOptions options) + { + PatchModelHelper.ValidateFormat(this, options.Format); + + return ModelSerializer.SerializeCore(this, options); + } + + public static implicit operator RequestContent(SimpleStandardModel model) + => RequestContent.Create(model, ModelSerializerOptions.DefaultWireOptions); + + public static explicit operator SimpleStandardModel(Response response) + { + Argument.AssertNotNull(response, nameof(response)); + + using JsonDocument jsonDocument = JsonDocument.Parse(response.ContentStream); + return DeserializeSimpleStandardModel(jsonDocument.RootElement, ModelSerializerOptions.DefaultWireOptions); + } + + void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) => ((IModelJsonSerializable)this).Serialize(writer, ModelSerializerOptions.DefaultWireOptions); + + // TODO: Temp for pef tests + public void Serialize(Utf8JsonWriter writer) => ((IUtf8JsonSerializable)this).Write(writer); + } +} diff --git a/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.cs b/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.cs new file mode 100644 index 000000000000..e374790584ed --- /dev/null +++ b/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.cs @@ -0,0 +1,25 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +using System; + +namespace Azure.Core.Tests.PatchModels +{ + public partial class SimpleStandardModel + { + public SimpleStandardModel() { } + + internal SimpleStandardModel(string name, int count, DateTimeOffset updatedOn) + { + Name = name; + Count = count; + UpdatedOn = updatedOn; + } + + public string Name { get; set; } + + public int? Count { get; set; } + + public DateTimeOffset? UpdatedOn { get; set; } + } +} From 5683fc0994d631fa9c96051da50125be5729ff1c Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Tue, 15 Aug 2023 16:13:47 -0700 Subject: [PATCH 08/20] updates --- .../perf/Serializations/SimpleStandardModelBenchmark.cs | 7 +------ .../PatchModels/SimpleStandardModel.Serialization.cs | 2 +- 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs b/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs index 9ea4ca834004..9d8327a523d3 100644 --- a/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs +++ b/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs @@ -16,12 +16,7 @@ public class SimpleStandardModelBenchmark : JsonBenchmark protected override SimpleStandardModel Deserialize(JsonElement jsonElement) { - using Stream stream = new MemoryStream(); - using Utf8JsonWriter writer = new(stream); - jsonElement.WriteTo(writer); - writer.Flush(); - stream.Position = 0; - return Deserialize(BinaryData.FromStream(stream)); + return SimpleStandardModel.DeserializeSimpleStandardModel(jsonElement, new("J")); } protected override void Serialize(Utf8JsonWriter writer) => _model.Serialize(writer); diff --git a/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.Serialization.cs b/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.Serialization.cs index 4d08f201685b..7d4fe4396b63 100644 --- a/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.Serialization.cs +++ b/sdk/core/Azure.Core/tests/public/PatchModels/SimpleStandardModel.Serialization.cs @@ -9,7 +9,7 @@ namespace Azure.Core.Tests.PatchModels { public partial class SimpleStandardModel : IModelJsonSerializable, IUtf8JsonSerializable { - internal static SimpleStandardModel DeserializeSimpleStandardModel(JsonElement element, ModelSerializerOptions options) + public static SimpleStandardModel DeserializeSimpleStandardModel(JsonElement element, ModelSerializerOptions options) { options ??= ModelSerializerOptions.DefaultWireOptions; From fb9fc06cd63787c19f730d98f2419958ceb4452b Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Tue, 15 Aug 2023 16:44:03 -0700 Subject: [PATCH 09/20] Hold default serializer options in a static --- sdk/core/Azure.Core/src/Shared/MutableJsonDocument.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sdk/core/Azure.Core/src/Shared/MutableJsonDocument.cs b/sdk/core/Azure.Core/src/Shared/MutableJsonDocument.cs index bb4f539dcb32..28fa7c6c23ee 100644 --- a/sdk/core/Azure.Core/src/Shared/MutableJsonDocument.cs +++ b/sdk/core/Azure.Core/src/Shared/MutableJsonDocument.cs @@ -204,11 +204,12 @@ public void Dispose() _originalDocument.Dispose(); } + private static JsonSerializerOptions DefaultSerializerOptions = new JsonSerializerOptions(); private MutableJsonDocument(JsonDocument document, ReadOnlyMemory utf8Json, JsonSerializerOptions? serializerOptions) { _originalDocument = document; _original = utf8Json; - _serializerOptions = serializerOptions ?? new JsonSerializerOptions(); + _serializerOptions = serializerOptions ?? DefaultSerializerOptions; } private class MutableJsonDocumentConverter : JsonConverter From 125589e15ec44e869c345a6df6aabe8389ceea56 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 15 Aug 2023 16:55:43 -0700 Subject: [PATCH 10/20] Increment package version after release of Azure.Core.Expressions.DataFactory (#38229) --- .../Azure.Core.Expressions.DataFactory/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Core.Expressions.DataFactory.csproj | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/sdk/core/Azure.Core.Expressions.DataFactory/CHANGELOG.md b/sdk/core/Azure.Core.Expressions.DataFactory/CHANGELOG.md index becca40489d3..856fa25dbd73 100644 --- a/sdk/core/Azure.Core.Expressions.DataFactory/CHANGELOG.md +++ b/sdk/core/Azure.Core.Expressions.DataFactory/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.0.0-beta.6 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.0.0-beta.5 (2023-08-15) ### Bugs Fixed diff --git a/sdk/core/Azure.Core.Expressions.DataFactory/src/Azure.Core.Expressions.DataFactory.csproj b/sdk/core/Azure.Core.Expressions.DataFactory/src/Azure.Core.Expressions.DataFactory.csproj index bb2c0bf916c7..c1ac8348217d 100644 --- a/sdk/core/Azure.Core.Expressions.DataFactory/src/Azure.Core.Expressions.DataFactory.csproj +++ b/sdk/core/Azure.Core.Expressions.DataFactory/src/Azure.Core.Expressions.DataFactory.csproj @@ -3,7 +3,7 @@ This is the implementation of the DataFactoryExpressions Microsoft Azure DataFactory Expressions - 1.0.0-beta.5 + 1.0.0-beta.6 azure;datafactory enable $(RequiredTargetFrameworks) From b6af79e647e29ef2c04d4cf9f577377598c1d36d Mon Sep 17 00:00:00 2001 From: Anne Thompson Date: Tue, 15 Aug 2023 17:33:01 -0700 Subject: [PATCH 11/20] Add e2e use case to touch MJD changelist --- .../perf/Serializations/JsonBenchmark.cs | 16 ++++++++++++++++ .../Serializations/SimplePatchModelBenchmark.cs | 6 ++++++ .../SimpleStandardModelBenchmark.cs | 8 ++++++-- 3 files changed, 28 insertions(+), 2 deletions(-) diff --git a/sdk/core/Azure.Core/perf/Serializations/JsonBenchmark.cs b/sdk/core/Azure.Core/perf/Serializations/JsonBenchmark.cs index 7921318f4b82..d3f64eb3c2b0 100644 --- a/sdk/core/Azure.Core/perf/Serializations/JsonBenchmark.cs +++ b/sdk/core/Azure.Core/perf/Serializations/JsonBenchmark.cs @@ -201,5 +201,21 @@ public void JsonDocumentFromBinaryData() { using var doc = JsonDocument.Parse(_data); } + + protected virtual void ModifyValues(T model) { } + + [Benchmark] + [BenchmarkCategory("Usage")] + public void EndToEndUseCase() + { + // Instantiate an input model + T model = ModelSerializer.Deserialize(_data); + + // Set properties on it + ModifyValues(model); + + // Send it over the wire - serialize + RequestContent content = CastToRequestContent(); + } } } diff --git a/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs b/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs index 2b95c36074d4..34e74d3ba48c 100644 --- a/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs +++ b/sdk/core/Azure.Core/perf/Serializations/SimplePatchModelBenchmark.cs @@ -29,5 +29,11 @@ protected override SimplePatchModel Deserialize(JsonElement jsonElement) protected override void Serialize(Utf8JsonWriter writer) => _model.Serialize(writer); protected override string JsonFileName => "SimplePatchModel.json"; + + protected override void ModifyValues(SimplePatchModel model) + { + model.Name = "xyz"; + model.Count = 2; + } } } diff --git a/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs b/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs index 9d8327a523d3..794bda93ec28 100644 --- a/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs +++ b/sdk/core/Azure.Core/perf/Serializations/SimpleStandardModelBenchmark.cs @@ -1,8 +1,6 @@ // Copyright (c) Microsoft Corporation. All rights reserved. // Licensed under the MIT License. -using System; -using System.IO; using System.Text.Json; using Azure.Core.Tests.PatchModels; @@ -22,5 +20,11 @@ protected override SimpleStandardModel Deserialize(JsonElement jsonElement) protected override void Serialize(Utf8JsonWriter writer) => _model.Serialize(writer); protected override string JsonFileName => "SimpleStandardModel.json"; + + protected override void ModifyValues(SimpleStandardModel model) + { + model.Name = "xyz"; + model.Count = 2; + } } } From 5a3f6c0a6c047e8bfa26cdf29ae2f5771ab08b2b Mon Sep 17 00:00:00 2001 From: JoshLove-msft <54595583+JoshLove-msft@users.noreply.github.com> Date: Tue, 15 Aug 2023 18:07:58 -0700 Subject: [PATCH 12/20] Fix race condition involving session processor (#38220) * Fix race condition involving session processor * Fix flaky test --- .../Azure.Messaging.ServiceBus/CHANGELOG.md | 8 ++------ .../src/Azure.Messaging.ServiceBus.csproj | 2 +- .../src/Processor/SessionReceiverManager.cs | 9 ++++++++- .../tests/Processor/SessionProcessorLiveTests.cs | 7 ++++--- .../tests/RuleManager/RuleManagerLiveTests.cs | 12 +++++------- 5 files changed, 20 insertions(+), 18 deletions(-) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md index ba1453cf6533..5e72f33f2822 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md @@ -1,14 +1,10 @@ # Release History -## 7.17.0-beta.1 (Unreleased) - -### Features Added - -### Breaking Changes +## 7.16.1 (2023-08-15) ### Bugs Fixed -### Other Changes +- Fixed race condition that could lead to an `ObjectDisposedException` when using the `ServiceBusSessionProcessor`. ## 7.16.0 (2023-08-07) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj index 6c0cc1ee6041..77692a7051a5 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj @@ -1,7 +1,7 @@ Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. This client library allows for both sending and receiving messages using Azure Service Bus. For more information about Service Bus, see https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview - 7.17.0-beta.1 + 7.16.1 7.16.0 Azure;Service Bus;ServiceBus;.NET;AMQP;$(PackageCommonTags) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/SessionReceiverManager.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/SessionReceiverManager.cs index c26ee7141e1a..35c3a71d0a09 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/SessionReceiverManager.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Processor/SessionReceiverManager.cs @@ -119,6 +119,8 @@ private async Task CreateAndInitializeSessionReceiver(CancellationToken processo await CreateReceiver(processorCancellationToken).ConfigureAwait(false); _sessionCancellationSource = new CancellationTokenSource(); SessionLockLostException = null; + + _sessionLockCancellationTokenSource?.Dispose(); _sessionLockCancellationTokenSource = new CancellationTokenSource(); _sessionLockCancellationTokenSource.CancelAfterLockExpired(_receiver); @@ -253,6 +255,7 @@ await RaiseExceptionReceived( try { await CancelAsync().ConfigureAwait(false); + _sessionLockCancellationTokenSource?.Dispose(); } catch (Exception ex) when (ex is TaskCanceledException) { @@ -451,9 +454,13 @@ public override async Task CancelAsync() await _sessionLockRenewalTask.ConfigureAwait(false); } + // We do not dispose _sessionLockCancellationSource here because it is exposed to users via the SessionLockLostAsync + // event within the ProcessSessionMessageEventArgs. If we dispose it here, there is a race condition where the user + // might get an ObjectDisposedException. Instead, we dispose it when shutting down, and when initializing a new instance + // for a new session. + _sessionCancellationSource?.Dispose(); _sessionLockRenewalCancellationSource?.Dispose(); - _sessionLockCancellationTokenSource?.Dispose(); } internal void RefreshSessionLockToken() diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs index f8e4e86f64e7..e64535d32ee0 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/Processor/SessionProcessorLiveTests.cs @@ -1961,13 +1961,14 @@ async Task ProcessMessage(ProcessSessionMessageEventArgs args) [TestCase(1)] [TestCase(5)] [TestCase(10)] + [TestCase(50)] public async Task CanReleaseSession(int maxCallsPerSession) { await using (var scope = await ServiceBusScope.CreateWithQueue(enablePartitioning: false, enableSession: true)) { await using var client = CreateNoRetryClient(); var sender = client.CreateSender(scope.QueueName); - int messageCount = 10; + int messageCount = 100; await sender.SendMessagesAsync(ServiceBusTestUtilities.GetMessages(messageCount, "sessionId")); @@ -2016,8 +2017,8 @@ Task SessionCloseHandler(ProcessSessionEventArgs args) await tcs.Task; await processor.CloseAsync(); - Assert.AreEqual(10, receivedCount); - if (firstCloseCount < 10) + Assert.AreEqual(messageCount, receivedCount); + if (firstCloseCount < messageCount) { Assert.AreEqual(2, sessionCloseCount); } diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/RuleManager/RuleManagerLiveTests.cs b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/RuleManager/RuleManagerLiveTests.cs index c29d15b17938..09b53c2e0327 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/tests/RuleManager/RuleManagerLiveTests.cs +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/tests/RuleManager/RuleManagerLiveTests.cs @@ -631,13 +631,11 @@ private async Task> ReceiveAndAssertMessages( var remainingMessages = expectedOrders.Count(); while (remainingMessages > 0) { - foreach (var item in await receiver.ReceiveMessagesAsync(Orders.Length).ConfigureAwait(false)) - { - receivedMessages.Add(item); - messageEnum.MoveNext(); - Assert.AreEqual(messageEnum.Current.Color, item.Subject); - remainingMessages--; - } + var item = await receiver.ReceiveMessageAsync(); + receivedMessages.Add(item); + messageEnum.MoveNext(); + Assert.AreEqual(messageEnum.Current.Color, item.Subject); + remainingMessages--; } Assert.AreEqual(0, remainingMessages); From 4c22a9a3311a037a4a9a2ca01d133d4d016186b0 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 15 Aug 2023 19:16:40 -0700 Subject: [PATCH 13/20] Increment package version after release of Azure.Identity (#38213) --- sdk/identity/Azure.Identity/CHANGELOG.md | 10 ++++++++++ sdk/identity/Azure.Identity/src/Azure.Identity.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/identity/Azure.Identity/CHANGELOG.md b/sdk/identity/Azure.Identity/CHANGELOG.md index 6ae95e3995f5..45566fc3395e 100644 --- a/sdk/identity/Azure.Identity/CHANGELOG.md +++ b/sdk/identity/Azure.Identity/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 1.11.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 1.10.0 (2023-08-14) ### Features Added diff --git a/sdk/identity/Azure.Identity/src/Azure.Identity.csproj b/sdk/identity/Azure.Identity/src/Azure.Identity.csproj index 480fdc492456..f82150fb48f1 100644 --- a/sdk/identity/Azure.Identity/src/Azure.Identity.csproj +++ b/sdk/identity/Azure.Identity/src/Azure.Identity.csproj @@ -2,9 +2,9 @@ This is the implementation of the Azure SDK Client Library for Azure Identity Microsoft Azure.Identity Component - 1.10.0 + 1.11.0-beta.1 - 1.9.0 + 1.10.0 Microsoft Azure Identity;$(PackageCommonTags) $(RequiredTargetFrameworks) $(NoWarn);3021;AZC0011 From 07e192597b042e58d7c217734add966b5f5d75e0 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 15 Aug 2023 19:49:05 -0700 Subject: [PATCH 14/20] Update Generator Version 3.0.0-beta.20230814.3 (#38205) Co-authored-by: Arthur Ma --- eng/Packages.Data.props | 2 +- eng/emitter-package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 4588f3ab075c..22173a8cdd7f 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -174,7 +174,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package.json b/eng/emitter-package.json index a96929089de4..5c7e24d59849 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,6 +1,6 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20230814.2" + "@azure-tools/typespec-csharp": "0.2.0-beta.20230814.3" } } From aaaae8af58a8e643257d28df5b75b853fc4b3b17 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Tue, 15 Aug 2023 20:16:59 -0700 Subject: [PATCH 15/20] Update AutoRest C# version to 3.0.0-beta.20230815.1 (#38232) Co-authored-by: Mingzhe Huang --- eng/Packages.Data.props | 2 +- eng/emitter-package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/eng/Packages.Data.props b/eng/Packages.Data.props index 22173a8cdd7f..6c13d44eeb9a 100644 --- a/eng/Packages.Data.props +++ b/eng/Packages.Data.props @@ -174,7 +174,7 @@ All should have PrivateAssets="All" set so they don't become package dependencies --> - + diff --git a/eng/emitter-package.json b/eng/emitter-package.json index 5c7e24d59849..8612559055f9 100644 --- a/eng/emitter-package.json +++ b/eng/emitter-package.json @@ -1,6 +1,6 @@ { "main": "dist/src/index.js", "dependencies": { - "@azure-tools/typespec-csharp": "0.2.0-beta.20230814.3" + "@azure-tools/typespec-csharp": "0.2.0-beta.20230815.1" } } From 98652638264492744aaed836679a50b0d948c288 Mon Sep 17 00:00:00 2001 From: Mingzhe Huang Date: Wed, 16 Aug 2023 11:42:11 +0800 Subject: [PATCH 16/20] fix(ci): prepare-pipelines.xml is broken due to renamed property (#38233) `NugetSecurityAnalysisWarningLevel` is renamed to `nugetMultiFeedWarnLevel`, so we need to follow up the change --- eng/pipelines/prepare-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/eng/pipelines/prepare-pipelines.yml b/eng/pipelines/prepare-pipelines.yml index 988ea6a09315..f55e7f406228 100644 --- a/eng/pipelines/prepare-pipelines.yml +++ b/eng/pipelines/prepare-pipelines.yml @@ -1,7 +1,7 @@ trigger: none variables: - NugetSecurityAnalysisWarningLevel: warn + nugetMultiFeedWarnLevel: warn extends: template: /eng/common/pipelines/templates/jobs/prepare-pipelines.yml From a47fe274dd336f84c87b6901dca86ab1358cc3e2 Mon Sep 17 00:00:00 2001 From: mcgallan <88413158+mcgallan@users.noreply.github.com> Date: Wed, 16 Aug 2023 13:46:23 +0800 Subject: [PATCH 17/20] Fix App Service Type issue (#37978) * update * Updatre-2 * update * Update autorest.md * update * update * update * fixed * Update CHANGELOG.md * Update CHANGELOG.md --- .../CHANGELOG.md | 1 + ...sourceManager.AppService.netstandard2.0.cs | 8 +++++- ...erviceTableStorageApplicationLogsConfig.cs | 26 +++++++++++++++++++ ...rageApplicationLogsConfig.Serialization.cs | 7 +++-- ...erviceTableStorageApplicationLogsConfig.cs | 18 ++++++------- .../src/autorest.md | 2 ++ 6 files changed, 48 insertions(+), 14 deletions(-) create mode 100644 sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs diff --git a/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md b/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md index 528d53820d54..0711997aaad7 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md +++ b/sdk/websites/Azure.ResourceManager.AppService/CHANGELOG.md @@ -10,6 +10,7 @@ - Fixed an issue that exception throws when `Uri` type field is empty during deserialization of `WebAppBackupData`. - Fixed an issue that exception throws when `Uri` type field is empty during deserialization of `WebSiteInstanceStatusData`. +- Fixed an issue that exception throws when `Uri` type field is empty during deserialization of `AppServiceTableStorageApplicationLogsConfig`. ### Other Changes diff --git a/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs b/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs index 69b843b30dbe..f7d06ce416b6 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/api/Azure.ResourceManager.AppService.netstandard2.0.cs @@ -5166,9 +5166,15 @@ public enum AppServiceStorageType } public partial class AppServiceTableStorageApplicationLogsConfig { - public AppServiceTableStorageApplicationLogsConfig(System.Uri sasUri) { } + public AppServiceTableStorageApplicationLogsConfig(string sasUriString) { } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This property has been replaced by ResourceUriString", false)] + public AppServiceTableStorageApplicationLogsConfig(System.Uri SasUri) { } public Azure.ResourceManager.AppService.Models.WebAppLogLevel? Level { get { throw null; } set { } } + [System.ComponentModel.EditorBrowsableAttribute(System.ComponentModel.EditorBrowsableState.Never)] + [System.ObsoleteAttribute("This property has been replaced by ResourceUriString", false)] public System.Uri SasUri { get { throw null; } set { } } + public string SasUriString { get { throw null; } set { } } } public partial class AppServiceTokenStore { diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs new file mode 100644 index 000000000000..08dbff636ef5 --- /dev/null +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Customization/Models/AppServiceTableStorageApplicationLogsConfig.cs @@ -0,0 +1,26 @@ +// Copyright (c) Microsoft Corporation. All rights reserved. +// Licensed under the MIT License. + +#nullable disable + +using System; +using System.ComponentModel; +using Azure.Core; + +namespace Azure.ResourceManager.AppService.Models +{ + public partial class AppServiceTableStorageApplicationLogsConfig + { + /// Uri of the resource. + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This property has been replaced by ResourceUriString",false)] + public System.Uri SasUri { get; set; } + + [EditorBrowsable(EditorBrowsableState.Never)] + [Obsolete("This property has been replaced by ResourceUriString", false)] + public AppServiceTableStorageApplicationLogsConfig(Uri SasUri) + { + Argument.AssertNotNull(SasUri, nameof(SasUri)); + } + } +} diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.Serialization.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.Serialization.cs index db4f825b3b46..bdabef4b4c16 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.Serialization.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.Serialization.cs @@ -5,7 +5,6 @@ #nullable disable -using System; using System.Text.Json; using Azure.Core; @@ -22,7 +21,7 @@ void IUtf8JsonSerializable.Write(Utf8JsonWriter writer) writer.WriteStringValue(Level.Value.ToSerialString()); } writer.WritePropertyName("sasUrl"u8); - writer.WriteStringValue(SasUri.AbsoluteUri); + writer.WriteStringValue(SasUriString); writer.WriteEndObject(); } @@ -33,7 +32,7 @@ internal static AppServiceTableStorageApplicationLogsConfig DeserializeAppServic return null; } Optional level = default; - Uri sasUrl = default; + string sasUrl = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("level"u8)) @@ -47,7 +46,7 @@ internal static AppServiceTableStorageApplicationLogsConfig DeserializeAppServic } if (property.NameEquals("sasUrl"u8)) { - sasUrl = new Uri(property.Value.GetString()); + sasUrl = property.Value.GetString(); continue; } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.cs b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.cs index d06f9e650e86..8705b965f3fb 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.cs +++ b/sdk/websites/Azure.ResourceManager.AppService/src/Generated/Models/AppServiceTableStorageApplicationLogsConfig.cs @@ -14,27 +14,27 @@ namespace Azure.ResourceManager.AppService.Models public partial class AppServiceTableStorageApplicationLogsConfig { /// Initializes a new instance of AppServiceTableStorageApplicationLogsConfig. - /// SAS URL to an Azure table with add/query/delete permissions. - /// is null. - public AppServiceTableStorageApplicationLogsConfig(Uri sasUri) + /// SAS URL to an Azure table with add/query/delete permissions. + /// is null. + public AppServiceTableStorageApplicationLogsConfig(string sasUriString) { - Argument.AssertNotNull(sasUri, nameof(sasUri)); + Argument.AssertNotNull(sasUriString, nameof(sasUriString)); - SasUri = sasUri; + SasUriString = sasUriString; } /// Initializes a new instance of AppServiceTableStorageApplicationLogsConfig. /// Log level. - /// SAS URL to an Azure table with add/query/delete permissions. - internal AppServiceTableStorageApplicationLogsConfig(WebAppLogLevel? level, Uri sasUri) + /// SAS URL to an Azure table with add/query/delete permissions. + internal AppServiceTableStorageApplicationLogsConfig(WebAppLogLevel? level, string sasUriString) { Level = level; - SasUri = sasUri; + SasUriString = sasUriString; } /// Log level. public WebAppLogLevel? Level { get; set; } /// SAS URL to an Azure table with add/query/delete permissions. - public Uri SasUri { get; set; } + public string SasUriString { get; set; } } } diff --git a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md index 4e722c0804b1..9bf51a8b34e5 100644 --- a/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md +++ b/sdk/websites/Azure.ResourceManager.AppService/src/autorest.md @@ -363,6 +363,8 @@ rename-mapping: BillingMeter.properties.billingLocation: -|azure-location AddressResponse.properties.vipMappings: VirtualIPMappings CloningInfo.sourceWebAppLocation: -|azure-location + AzureTableStorageApplicationLogsConfig.sasUrl: SasUriString + # rename resource AppServiceCertificate: AppServiceCertificateProperties AppServiceCertificateResource: AppServiceCertificate From 333a172f2230fdee5cb66c150e2636fc53df6e20 Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 16 Aug 2023 00:49:16 -0700 Subject: [PATCH 18/20] Increment package version after release of Azure.Messaging.ServiceBus (#38234) --- sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md | 10 ++++++++++ .../src/Azure.Messaging.ServiceBus.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md index 5e72f33f2822..03e2f9222a2d 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 7.17.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 7.16.1 (2023-08-15) ### Bugs Fixed diff --git a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj index 77692a7051a5..1db31a4d6d92 100644 --- a/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj +++ b/sdk/servicebus/Azure.Messaging.ServiceBus/src/Azure.Messaging.ServiceBus.csproj @@ -1,9 +1,9 @@ Azure Service Bus is a fully managed enterprise integration message broker. Service Bus can decouple applications and services. Service Bus offers a reliable and secure platform for asynchronous transfer of data and state. This client library allows for both sending and receiving messages using Azure Service Bus. For more information about Service Bus, see https://docs.microsoft.com/en-us/azure/service-bus-messaging/service-bus-messaging-overview - 7.16.1 + 7.17.0-beta.1 - 7.16.0 + 7.16.1 Azure;Service Bus;ServiceBus;.NET;AMQP;$(PackageCommonTags) $(RequiredTargetFrameworks) false From ec8530d3bad6dc32c4739b7d3f8540cf552d45b4 Mon Sep 17 00:00:00 2001 From: mcgallan <88413158+mcgallan@users.noreply.github.com> Date: Wed, 16 Aug 2023 15:56:07 +0800 Subject: [PATCH 19/20] Fix Datafactory Type Issue (#38208) * update * update * Test_Succeed * update * Update CHANGELOG.md * Update CHANGELOG.md * Update CHANGELOG.md --- .../Azure.ResourceManager.DataFactory/CHANGELOG.md | 2 ++ ...re.ResourceManager.DataFactory.netstandard2.0.cs | 2 +- ...fHostedIntegrationRuntimeStatus.Serialization.cs | 13 +++---------- .../Models/SelfHostedIntegrationRuntimeStatus.cs | 10 +++++----- .../src/autorest.md | 4 ++-- 5 files changed, 13 insertions(+), 18 deletions(-) diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/CHANGELOG.md b/sdk/datafactory/Azure.ResourceManager.DataFactory/CHANGELOG.md index 4995847c0057..e6d225c93261 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/CHANGELOG.md +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/CHANGELOG.md @@ -8,6 +8,8 @@ ### Bugs Fixed +- Fixed an issue that exception throws when `Uri` type field is empty during deserialization of `SelfHostedIntegrationRuntimeStatus`. + ### Other Changes ## 1.0.0-beta.3 (2023-08-02) diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs index 097dc506b29e..c2aeabefd549 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/api/Azure.ResourceManager.DataFactory.netstandard2.0.cs @@ -6409,7 +6409,7 @@ internal SelfHostedIntegrationRuntimeStatus() { } public System.Collections.Generic.IReadOnlyList Nodes { get { throw null; } } public string PushedVersion { get { throw null; } } public System.DateTimeOffset? ScheduledUpdateOn { get { throw null; } } - public System.Collections.Generic.IReadOnlyList ServiceUris { get { throw null; } } + public System.Collections.Generic.IReadOnlyList ServiceUriStringList { get { throw null; } } public System.Guid? TaskQueueId { get { throw null; } } public System.TimeSpan? UpdateDelayOffset { get { throw null; } } public string Version { get { throw null; } } diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.Serialization.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.Serialization.cs index fb92a29a8e22..8f02a7619dc4 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.Serialization.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.Serialization.cs @@ -32,7 +32,7 @@ internal static SelfHostedIntegrationRuntimeStatus DeserializeSelfHostedIntegrat Optional updateDelayOffset = default; Optional localTimeZoneOffset = default; Optional> capabilities = default; - Optional> serviceUrls = default; + Optional> serviceUrls = default; Optional autoUpdate = default; Optional versionStatus = default; Optional> links = default; @@ -164,17 +164,10 @@ internal static SelfHostedIntegrationRuntimeStatus DeserializeSelfHostedIntegrat { continue; } - List array = new List(); + List array = new List(); foreach (var item in property0.Value.EnumerateArray()) { - if (item.ValueKind == JsonValueKind.Null) - { - array.Add(null); - } - else - { - array.Add(new Uri(item.GetString())); - } + array.Add(item.GetString()); } serviceUrls = array; continue; diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs index 4574fb58ba3a..f1af80f603cb 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/Generated/Models/SelfHostedIntegrationRuntimeStatus.cs @@ -19,7 +19,7 @@ internal SelfHostedIntegrationRuntimeStatus() { Nodes = new ChangeTrackingList(); Capabilities = new ChangeTrackingDictionary(); - ServiceUris = new ChangeTrackingList(); + ServiceUriStringList = new ChangeTrackingList(); Links = new ChangeTrackingList(); RuntimeType = IntegrationRuntimeType.SelfHosted; } @@ -38,14 +38,14 @@ internal SelfHostedIntegrationRuntimeStatus() /// The time in the date scheduled by service to update the integration runtime, e.g., PT03H is 3 hours. /// The local time zone offset in hours. /// Object with additional information about integration runtime capabilities. - /// The URLs for the services used in integration runtime backend service. + /// The URLs for the services used in integration runtime backend service. /// Whether Self-hosted integration runtime auto update has been turned on. /// Status of the integration runtime version. /// The list of linked integration runtimes that are created to share with this integration runtime. /// The version that the integration runtime is going to update to. /// The latest version on download center. /// The estimated time when the self-hosted integration runtime will be updated. - internal SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeType runtimeType, string dataFactoryName, IntegrationRuntimeState? state, IReadOnlyDictionary additionalProperties, DateTimeOffset? createdOn, Guid? taskQueueId, IntegrationRuntimeInternalChannelEncryptionMode? internalChannelEncryption, string version, IReadOnlyList nodes, DateTimeOffset? scheduledUpdateOn, TimeSpan? updateDelayOffset, TimeSpan? localTimeZoneOffset, IReadOnlyDictionary capabilities, IReadOnlyList serviceUris, IntegrationRuntimeAutoUpdateState? autoUpdate, string versionStatus, IReadOnlyList links, string pushedVersion, string latestVersion, DateTimeOffset? autoUpdateEta) : base(runtimeType, dataFactoryName, state, additionalProperties) + internal SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeType runtimeType, string dataFactoryName, IntegrationRuntimeState? state, IReadOnlyDictionary additionalProperties, DateTimeOffset? createdOn, Guid? taskQueueId, IntegrationRuntimeInternalChannelEncryptionMode? internalChannelEncryption, string version, IReadOnlyList nodes, DateTimeOffset? scheduledUpdateOn, TimeSpan? updateDelayOffset, TimeSpan? localTimeZoneOffset, IReadOnlyDictionary capabilities, IReadOnlyList serviceUriStringList, IntegrationRuntimeAutoUpdateState? autoUpdate, string versionStatus, IReadOnlyList links, string pushedVersion, string latestVersion, DateTimeOffset? autoUpdateEta) : base(runtimeType, dataFactoryName, state, additionalProperties) { CreatedOn = createdOn; TaskQueueId = taskQueueId; @@ -56,7 +56,7 @@ internal SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeType runtimeType, UpdateDelayOffset = updateDelayOffset; LocalTimeZoneOffset = localTimeZoneOffset; Capabilities = capabilities; - ServiceUris = serviceUris; + ServiceUriStringList = serviceUriStringList; AutoUpdate = autoUpdate; VersionStatus = versionStatus; Links = links; @@ -85,7 +85,7 @@ internal SelfHostedIntegrationRuntimeStatus(IntegrationRuntimeType runtimeType, /// Object with additional information about integration runtime capabilities. public IReadOnlyDictionary Capabilities { get; } /// The URLs for the services used in integration runtime backend service. - public IReadOnlyList ServiceUris { get; } + public IReadOnlyList ServiceUriStringList { get; } /// Whether Self-hosted integration runtime auto update has been turned on. public IntegrationRuntimeAutoUpdateState? AutoUpdate { get; } /// Status of the integration runtime version. diff --git a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md index 5368c78b3a54..c54e74715656 100644 --- a/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md +++ b/sdk/datafactory/Azure.ResourceManager.DataFactory/src/autorest.md @@ -16,7 +16,7 @@ skip-csproj: true modelerfour: flatten-payloads: false -#mgmt-debug: +# mgmt-debug: # show-serialized-names: true format-by-name-rules: @@ -210,7 +210,7 @@ rename-mapping: SelfHostedIntegrationRuntimeStatus.typeProperties.createTime: CreatedOn SelfHostedIntegrationRuntimeNode.expiryTime: ExpireOn SelfHostedIntegrationRuntimeStatus.typeProperties.taskQueueId: -|uuid - SelfHostedIntegrationRuntimeStatus.typeProperties.serviceUrls: serviceUris + SelfHostedIntegrationRuntimeStatus.typeProperties.serviceUrls: ServiceUriStringList SubResourceDebugResource: DataFactoryDebugInfo SsisObjectMetadataListResponse: SsisObjectMetadataListResult SsisObjectMetadataStatusResponse: SsisObjectMetadataStatusResult From 4a17dc13a3475dfab7a6bc88db604b3575846d7b Mon Sep 17 00:00:00 2001 From: Azure SDK Bot <53356347+azure-sdk@users.noreply.github.com> Date: Wed, 16 Aug 2023 07:47:39 -0700 Subject: [PATCH 20/20] Increment package version after release of Azure.Data.Tables (#38238) --- sdk/tables/Azure.Data.Tables/CHANGELOG.md | 10 ++++++++++ .../Azure.Data.Tables/src/Azure.Data.Tables.csproj | 4 ++-- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/sdk/tables/Azure.Data.Tables/CHANGELOG.md b/sdk/tables/Azure.Data.Tables/CHANGELOG.md index dfa446711ad7..a38b0ffb69f4 100644 --- a/sdk/tables/Azure.Data.Tables/CHANGELOG.md +++ b/sdk/tables/Azure.Data.Tables/CHANGELOG.md @@ -1,5 +1,15 @@ # Release History +## 12.9.0-beta.1 (Unreleased) + +### Features Added + +### Breaking Changes + +### Bugs Fixed + +### Other Changes + ## 12.8.1 (2023-08-15) ### Bugs Fixed diff --git a/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj b/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj index 6f6ebf7e23e3..1fa7cd5172e1 100644 --- a/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj +++ b/sdk/tables/Azure.Data.Tables/src/Azure.Data.Tables.csproj @@ -2,9 +2,9 @@ This client library enables working with the Microsoft Azure Table service Microsoft Azure.Data.Tables client library - 12.8.1 + 12.9.0-beta.1 - 12.8.0 + 12.8.1 TableSDK;$(DefineConstants) Microsoft Azure Tables;Microsoft;Azure;Tables;Table;$(PackageCommonTags) $(RequiredTargetFrameworks)