-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate DurableTask.ServiceBus Table and Blob store SDK from WindowsAzure.Storage to Azure.Data.Tables and Azure.Storage.Blobs #1112
Changes from all commits
4d94610
762bed2
330a14f
34d969d
77d393d
314ac25
40d95e9
9e7786c
6f7be80
acf82a4
6f2b039
2f136b8
f924496
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,8 +15,8 @@ namespace DurableTask.ServiceBus.Tracking | |
{ | ||
using System; | ||
using System.Collections.Generic; | ||
using Microsoft.WindowsAzure.Storage; | ||
using Microsoft.WindowsAzure.Storage.Table; | ||
using Azure; | ||
using Azure.Data.Tables; | ||
|
||
/// <summary> | ||
/// Abstract class for composite entities for Azure table | ||
|
@@ -41,40 +41,13 @@ public abstract class AzureTableCompositeTableEntity : ITableEntity | |
/// <summary> | ||
/// Gets or sets the row timestamp | ||
/// </summary> | ||
public DateTimeOffset Timestamp { get; set; } = DateTimeOffset.Now; | ||
public DateTimeOffset? Timestamp { get; set; } = DateTimeOffset.Now; | ||
|
||
/// <summary> | ||
/// Gets or sets the entity etag | ||
/// </summary> | ||
public string ETag { get; set; } | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. dropping these (and other public fields) is technically a breaking change. Just jotting this down for down, still unsure what replaces this (or if functionality was dropped) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is being replaced with an ETag class provided by Azure Core, and a required part of the new Azure SDK. While unfortunate this is a breaking change, this should not change functionality in a substantial manner. |
||
|
||
/// <summary> | ||
/// Read an entity properties based on the supplied dictionary or entity properties | ||
/// </summary> | ||
/// <param name="properties">Dictionary of properties to read for the entity</param> | ||
/// <param name="operationContext">The operation context</param> | ||
public abstract void ReadEntity(IDictionary<string, EntityProperty> properties, OperationContext operationContext); | ||
|
||
/// <summary> | ||
/// Write an entity to a dictionary of entity properties | ||
/// </summary> | ||
/// <param name="operationContext">The operation context</param> | ||
public abstract IDictionary<string, EntityProperty> WriteEntity(OperationContext operationContext); | ||
public ETag ETag { get; set; } | ||
|
||
internal abstract IEnumerable<ITableEntity> BuildDenormalizedEntities(); | ||
|
||
/// <summary> | ||
/// | ||
/// </summary> | ||
protected T GetValue<T>(string key, IDictionary<string, EntityProperty> properties, | ||
Func<EntityProperty, T> extract) | ||
{ | ||
if (!properties.TryGetValue(key, out EntityProperty ep)) | ||
{ | ||
return default(T); | ||
} | ||
|
||
return extract(ep); | ||
} | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just confirming - does this mean that only managed identity (i.e token credentials, right?) would be supported now?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To preserve previous functionality, we are maintaining support for connection strings. The breaking change is to introduce support for token credentials and removing support for the "cloud storage account" as that class no longer exists in the new Azure SDK.