Skip to content

Commit

Permalink
Fix release build and prep for new version (#3153)
Browse files Browse the repository at this point in the history
  • Loading branch information
David R. Williamson authored Mar 13, 2023
1 parent 89ae08b commit f7bec7d
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 20 deletions.
4 changes: 4 additions & 0 deletions SDK v2 migration guide.md
Original file line number Diff line number Diff line change
Expand Up @@ -286,12 +286,16 @@ What was a loose affiliation of separate clients is now a consolidated client wi
- The `Message` class no longer requires disposal!
- `FeedbackReceiver` is now a callback assigned to the `MessageFeedbackProcessor` property.
- `GetFileNotificationReceiver(...)` is now a callback assigned to `FileUploadNotificationProcessor` property. These methods return a callback value.
- `FileUploadNotification.BlobUriPath` was a string and is now of type `System.Uri`.

#### Notable additions

- The library now includes `IIotHubServiceRetryPolicy` implementations: `IotHubServiceExponentialBackoffRetryPolicy`, `IotHubServiceFixedDelayRetryPolicy`, `IotHubServiceIncrementalDelayRetryPolicy` and `IotHubServiceNoRetry`,
which can be set via `IotHubServiceClientOptions.RetryPolicy`.
- `DirectMethodClientResponse` now has a method `TryGetValue<T>` to deserialize the payload to a type of your choice.
- Added `ImportJobError` class to help deserialize errors from device/module/configuration import job.
- Use the `ImportErrorsBlobName` to load the output errors file, if it exists, in the blob container specified in `ImportJobProperties.InputBlobContainerUri`.
- `IsFinished` convenience property now exists on `CloudToDeviceMethodScheduledJob`, `ScheduledJob`, and `TwinScheduledJob` which is **true** when `Status` is `Completed`, `Failed`, or `Cancelled`.

#### API mapping

Expand Down
2 changes: 1 addition & 1 deletion iothub/device/src/Microsoft.Azure.Devices.Client.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>2.0.0-preview003</Version>
<Version>2.0.0-preview004</Version>
<Title>Microsoft Azure IoT Device Client SDK</Title>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,6 @@
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" />
</ItemGroup>

<ItemGroup>
<None Update="csharp_devices_list.csv">
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
</None>
</ItemGroup>

<!--<ItemGroup Condition="'$(Configuration)' == 'Release'">
<PackageReference Include="Microsoft.Azure.Devices" Version="2.0.0-preview001" />
</ItemGroup>-->
Expand Down
2 changes: 2 additions & 0 deletions iothub/service/src/Amqp/AmqpCbsSessionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ namespace Microsoft.Azure.Devices.Amqp
/// Handles a single CBS session (for SAS token renewal) including the inital authentication and scheduling all subsequent
/// authentication attempts.
/// </summary>
#pragma warning disable CA1852 // used in debug for unit test mocking
internal class AmqpCbsSessionHandler : IDisposable
#pragma warning restore CA1852
{
// There is no AmqpSession object to track here because it is encapsulated by the AmqpCbsLink class.
private readonly IotHubConnectionProperties _credential;
Expand Down
2 changes: 2 additions & 0 deletions iothub/service/src/Amqp/AmqpConnectionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,9 @@ namespace Microsoft.Azure.Devices.Amqp
/// <remarks>
/// This class intentionally abstracts away details about sessions and links for simplicity at the service client level.
/// </remarks>
#pragma warning disable CA1852 // used in debug for unit test mocking
internal class AmqpConnectionHandler : IDisposable
#pragma warning restore CA1852
{
private static readonly AmqpVersion s_amqpVersion_1_0_0 = new(1, 0, 0);

Expand Down
2 changes: 2 additions & 0 deletions iothub/service/src/Amqp/AmqpSessionHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,9 @@ namespace Microsoft.Azure.Devices.Amqp
/// Handles a single AMQP session that holds the sender or receiver link that does the "work"
/// for the AMQP connection (receiving file upload notification, sending cloud to device messages, etc).
/// </summary>
#pragma warning disable CA1852 // used in debug for unit test mocking
internal class AmqpSessionHandler
#pragma warning restore CA1852
{
private readonly AmqpSendingLinkHandler _sendingLinkHandler;
private readonly AmqpReceivingLinkHandler _receivingLinkHandler;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ namespace Microsoft.Azure.Devices
/// <summary>
/// The properties required for authentication to IoT hub using a token credential.
/// </summary>
#pragma warning disable CA1852 // used in debug for unit test mocking
internal class IotHubTokenCredentialProperties : IotHubConnectionProperties
#pragma warning restore CA1852
{
private const string TokenType = "Bearer";
private static readonly string[] s_iotHubAadTokenScopes = new string[] { "https://iothubs.azure.net/.default" };
Expand Down
2 changes: 1 addition & 1 deletion iothub/service/src/Microsoft.Azure.Devices.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>2.0.0-preview003</Version>
<Version>2.0.0-preview004</Version>
<Title>Microsoft Azure IoT Service Client SDK</Title>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
Expand Down
2 changes: 1 addition & 1 deletion iothub/service/src/Registry/Models/ImportJobError.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ namespace Microsoft.Azure.Devices
/// Any errors that occur during a bulk import job can be deserialized with this class from a blob file named "importErrors.log"
/// in the container specified during import.
/// </remarks>
public class ImportJobError
public sealed class ImportJobError
{
/// <summary>
/// The name of the blob file that contains the import errors.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>2.0.0-preview003</Version>
<Version>2.0.0-preview004</Version>
<Title>Microsoft Azure IoT Provisioning Device Client SDK</Title>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
</PropertyGroup>

<PropertyGroup>
<Version>2.0.0-preview003</Version>
<Version>2.0.0-preview004</Version>
<Title>Microsoft Azure IoT Provisioning Service Client SDK</Title>
<IncludeSource>True</IncludeSource>
<IncludeSymbols>True</IncludeSymbols>
Expand Down
7 changes: 2 additions & 5 deletions tools/diffscripts/diffapi.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -178,17 +178,15 @@ $assemblyRootNames = @(
"Microsoft.Azure.Devices.Client",
"Microsoft.Azure.Devices",
"Microsoft.Azure.Devices.Provisioning.Client",
"Microsoft.Azure.Devices.Provisioning.Service",
"Microsoft.Azure.Devices.Authentication"
"Microsoft.Azure.Devices.Provisioning.Service"
)

# All of the files from the build
$assemblyFilePath = @(
(Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\iothub\device\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[0] + ".dll"))),
(Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\iothub\service\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[1] + ".dll"))),
(Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\provisioning\device\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[2] + ".dll"))),
(Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\provisioning\service\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[3] + ".dll"))),
(Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\authentication\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[4] + ".dll")))
(Join-Path -Path $repoRootPath -ChildPath (Join-Path -Path "\provisioning\service\src\bin\Release\netstandard2.0\" -ChildPath ($assemblyRootNames[3] + ".dll")))
)

# Get the last tag from the git repository and do the comparison
Expand Down Expand Up @@ -296,7 +294,6 @@ Set-Location -Path $compareDirectory
#
# 9 3 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.Client.md
# 2 0 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.Provisioning.Client.md
# 2 0 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.Authentication.md
# 2 0 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.Provisioning.Service.md
# 7 9 sdk_design_docs/CSharp/main/Microsoft.Azure.Devices.md
$gitDiffOutput = git diff --ignore-all-space --numstat
Expand Down
8 changes: 4 additions & 4 deletions versions.csv
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
AssemblyPath, Version
iothub\device\src\Microsoft.Azure.Devices.Client.csproj, 2.0.0-preview003
iothub\service\src\Microsoft.Azure.Devices.csproj, 2.0.0-preview003
provisioning\device\src\Microsoft.Azure.Devices.Provisioning.Client.csproj, 2.0.0-preview003
provisioning\service\src\Microsoft.Azure.Devices.Provisioning.Service.csproj, 2.0.0-preview003
iothub\device\src\Microsoft.Azure.Devices.Client.csproj, 2.0.0-preview004
iothub\service\src\Microsoft.Azure.Devices.csproj, 2.0.0-preview004
provisioning\device\src\Microsoft.Azure.Devices.Provisioning.Client.csproj, 2.0.0-preview004
provisioning\service\src\Microsoft.Azure.Devices.Provisioning.Service.csproj, 2.0.0-preview004

0 comments on commit f7bec7d

Please sign in to comment.