Skip to content
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

Update EventGrid SDK to T2 #18

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

v-yilinhu
Copy link

@v-yilinhu v-yilinhu commented May 17, 2022

  1. Update EventGrid SDK to T2

  2. Update files:

    • ../src/Blazor.EventGridViewer.Core/Blazor.EventGridViewer.Core.csproj
    • ../src/Blazor.EventGridViewer.Core/Models/CloudEvent.cs
    • ../src/Blazor.EventGridViewer.Core/Models/EventGridEventModel.cs
    • ../src/Blazor.EventGridViewer.Core/Models/EventGridViewerEventModel.cs
    • ../src/Blazor.EventGridViewer.ServerApp/Blazor.EventGridViewer.ServerApp.csproj
    • ../src/Blazor.EventGridViewer.ServerApp/Controllers/EventGridController.cs
    • ../src/Blazor.EventGridViewer.ServerApp/Pages/Index.razor
    • ../src/Blazor.EventGridViewer.ServerApp/Startup.cs
    • ../src/Blazor.EventGridViewer.Services/Adapters/EventGridSchemaAdapter.cs
    • ../src/Blazor.EventGridViewer.Services/Blazor.EventGridViewer.Services.csproj
    • ../src/Blazor.EventGridViewer.Services/Interfaces/IEventGridService.cs
    • ../src/Blazor.EventGridViewer.Unit.Tests/Data.cs
    • ../src/Blazor.EventGridViewer.Unit.Tests/EventGridEventModelAdapterTests.cs
    • ../src/Blazor.EventGridViewer.Unit.Tests/EventGridSchemaAdapterTests.cs

@scottaddie, @ellismg and @ahamad-MS for notification.

@v-yilinhu v-yilinhu marked this pull request as ready for review May 18, 2022 02:23
@v-xuto
Copy link

v-xuto commented Jul 29, 2022

@scottaddie, @ellismg and @ahamad-MS Could you help review this PR? Thanks a lot.

@v-xuto
Copy link

v-xuto commented Aug 3, 2022

@scottaddie, @ellismg and @ahamad-MS Could you help review this PR? Thanks a lot.

1 similar comment
@v-xuto
Copy link

v-xuto commented Aug 30, 2022

@scottaddie, @ellismg and @ahamad-MS Could you help review this PR? Thanks a lot.

@@ -72,7 +72,7 @@ private List<EventGridEventModel> AdaptCloudEvent(string t)
private List<EventGridEventModel> AdaptEventGridEvent(string t)

Choose a reason for hiding this comment

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

Why do we need EventGridEventModel - can we just use EventGridEvent?

@@ -21,7 +22,7 @@ public class CloudEvent
public string Id { get; set; }

[JsonProperty("time")]
public string Time { get; set; }
public DateTimeOffset Time { get; set; }

Choose a reason for hiding this comment

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

// EventGrid validation message
if (model.EventType == EventTypes.EventGridSubscriptionValidationEvent)
if (eventGrid.TryGetSystemEventData(out object systemEvent))

Choose a reason for hiding this comment

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

The systemEvent we get back would still need to be checked to make sure it is the correct type, i.e. SubscriptionValidationEventData. Or we can continue checking the event type, and then do eventGrid.Data.ToObjectFromJson().

<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
<PackageReference Include="System.Memory.Data" Version="6.0.0" />

Choose a reason for hiding this comment

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

This package will get pulled in by Azure.Messaging.EventGrid. Unless we need 6.0.0, I'd just remove this.

@@ -84,7 +84,7 @@ private List<EventGridEventModel> AdaptEventGridEvent(string t)
Subject = string.IsNullOrEmpty(eventGridEvent.Subject) ? eventGridEvent.EventType : eventGridEvent.Subject,
Data = json,
EventData = eventGridEvent.Data,
EventTime = eventGridEvent.EventTime.ToString("o") // https://docs.microsoft.com/en-us/dotnet/api/system.datetime.tostring?view=netcore-3.1
EventTime = eventGridEvent.EventTime // https://docs.microsoft.com/en-us/dotnet/api/system.datetime.tostring?view=netcore-3.1
};

Choose a reason for hiding this comment

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

Why do we remove this?

@@ -9,7 +9,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Microsoft.Azure.EventGrid" Version="3.2.0" />
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.10.0" />

Choose a reason for hiding this comment

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

Suggested change
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.10.0" />
<PackageReference Include="Azure.Messaging.EventGrid" Version="4.11.0" />

@zedy-wj
Copy link

zedy-wj commented Sep 5, 2022

@JoshLove-msft - Updated according to your comments, could you please re-review it? Thanks!

@v-xuto
Copy link

v-xuto commented Nov 4, 2022

@JoshLove-msft - We have updated according to your comments, please help re-review it. Thanks a lot.

1 similar comment
@v-xuto
Copy link

v-xuto commented Mar 10, 2023

@JoshLove-msft - We have updated according to your comments, please help re-review it. Thanks a lot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants