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

Event Grid Explorer - Adding Support for Event Grid V2 #737

Merged
merged 27 commits into from
Jun 10, 2024

Conversation

t-wangamy
Copy link
Collaborator

@t-wangamy t-wangamy commented Aug 16, 2023

For my Summer 2023 internship project under the Azure Messaging Event Grid team, I developed the Event Grid Explorer. This is a tool integrated in Service Bus Explorer for viewing and managing Event Grid V2 entities, including namespaces, topics and subscriptions, as well as provide create/delete operations for topics and subscriptions, publish/receive operations for events, and acknowledge/release/reject operations for events.

Currently, the Event Grid Explorer features the functionality that is available for the preview version of Event Grid V2.
This additional support for Event Grid V2 enables users to test event delivery with ease, contributing to the adoption of the new service.

The modifications include creating new Controls and Forms under ServiceBusExplorer as well as implementing an EventGridExplorerLibrary to interact with the Event Grid V2 SDK functions. This library also contains additional files under the Management folder that set up Event Grid related objects.

… Explorer

Implemented Event Grid V2 library and components to view and manage Event Grid V2 entities
Updated Event Grid Explorer README
Updated Event Grid Explorer README
Copy link
Collaborator

@SeanFeldman SeanFeldman left a comment

Choose a reason for hiding this comment

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

Excellent job, @t-wangamy.
I left a few comments, change requests, and questions.

EventGridExplorer_README.md Show resolved Hide resolved
EventGridExplorer_README.md Outdated Show resolved Hide resolved
EventGridExplorer_README.md Outdated Show resolved Hide resolved
src/EventGridExplorerLibrary/EventGridLibrary.cs Outdated Show resolved Hide resolved
Made various fixes, including updating the connect form
Copy link
Collaborator

@SeanFeldman SeanFeldman left a comment

Choose a reason for hiding this comment

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

Almost there. A few comments where missed out.

EventGridExplorer_README.md Outdated Show resolved Hide resolved
src/EventGridExplorerLibrary/EventGridLibrary.cs Outdated Show resolved Hide resolved
Updated EventGridExplorer README and removed Service Bus root node menu strip from Event Grid root node
@t-wangamy
Copy link
Collaborator Author

@SeanFeldman Today is actually the last day of my internship so I pushed the last changes for the Event Grid Explorer README. Thank you for reviewing my work and for your helpful feedback! I think from here my team will help with making any additional changes

@SeanFeldman
Copy link
Collaborator

@SeanFeldman Today is actually the last day of my internship so I pushed the last changes for the Event Grid Explorer README. Thank you for reviewing my work and for your helpful feedback! I think from here my team will help with making any additional changes

@t-wangamy, thank you so much for the contribution. I'll work on bringing it to the merge point. Please let me know who can continue from your team. Maybe tag them here.

Thank you and good luck!

@hillaryc
Copy link

@SeanFeldman Today is actually the last day of my internship so I pushed the last changes for the Event Grid Explorer README. Thank you for reviewing my work and for your helpful feedback! I think from here my team will help with making any additional changes

@t-wangamy, thank you so much for the contribution. I'll work on bringing it to the merge point. Please let me know who can continue from your team. Maybe tag them here.

Thank you and good luck!

Hi @SeanFeldman, I will continue.

@SeanFeldman SeanFeldman self-assigned this Sep 1, 2023
@SeanFeldman
Copy link
Collaborator

@hillaryc, great!

would you be able to review the two remaining questions? Thank you.

Copy link
Collaborator

@SeanFeldman SeanFeldman left a comment

Choose a reason for hiding this comment

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

A few clarifications, @hillaryc

src/EventGridExplorerLibrary/EventGridLibrary.cs Outdated Show resolved Hide resolved
src/EventGridExplorerLibrary/EventGridLibrary.cs Outdated Show resolved Hide resolved
@SeanFeldman
Copy link
Collaborator

@hillaryc, would you be able to assist with the questions/clarifications? I'd like to wrap up the PR. Thank you for your help.

@hillaryc
Copy link

hillaryc commented Sep 22, 2023 via email

@SeanFeldman
Copy link
Collaborator

Yes, I will work on this today. 😊

Thank you, @hillaryc.

@hillaryc
Copy link

hillaryc commented Sep 28, 2023

I believe I replied all questions :) Let me know if anything. @SeanFeldman

@hillaryc
Copy link

hillaryc commented Oct 9, 2023

Hi @SeanFeldman, let me know if there is anything pending to be done to merge this.

@SeanFeldman
Copy link
Collaborator

@hillaryc, code-wise, except for the lack of information on how to regenerate the auto-generated code, the rest is OK. These are the issues I've run into while manually testing the branch.

  1. API version - there's no default and no dynamic selector to allow users to choose from something. I suggest putting a default. I've used 2023-06-01-preview.
    image

  2. Multi-tenant users - I have multiple tenants and subscriptions. There's no way to indicate what tenant should be used. I've failed to log into the subscription I've provided the information for in the login/credentials screen.

Error message (redacted)

Exception: The access token is from the wrong issuer 'https://sts.windows.net/xxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxx/'. It must match the tenant 'https://sts.windows.net/yyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyy/' associated with this subscription. Please use the authority (URL) 'https://login.windows.net/yyyyyy-yyyy-yyyy-yyyy-yyyyyyyyyy' to get the token. Note, if the subscription is transferred to another tenant there is no impact to the services, but information about new tenant could take time to propagate (up to an hour). If you just transferred your subscription and see this error message, please try back later.

The last issue is a blocker. Since there's no simple connection string and the only way to connect is to provide resource group, subscription ID, and the EG namespace (in addition to the API version), it's unclear how to troubleshoot the connectivity when an error such as this is encountered.

@SeanFeldman
Copy link
Collaborator

Status update

The PR is returning to a draft mode to address usability and maintainability.
In addition to that, there will be an effort to transition off auto-generated code to the Azure SDK and the ability to add/alter subscription filters, which is essential for working with EG v2.

ErikMogensen and others added 5 commits November 20, 2023 08:46
* Updated UI according to review.
* Set default and cancel buttons. Changed window looks.
* Changed the retry timout parsing

namespace ServiceBusExplorer.Helpers
{
public class EventGridException : Exception
Copy link
Collaborator

Choose a reason for hiding this comment

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

Question - what does this custom exception type bring that is not handled by Exception?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I had to make this custom exception so I can throw them without having to hit the client and have the client throw the exception.

Copy link
Collaborator

@SeanFeldman SeanFeldman May 29, 2024

Choose a reason for hiding this comment

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

I must have missed that use. Could you point to where it's used? Thanks.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Found it here. That use is on the form. When an exception is thrown, the form logs it and swallows the exception. But with EventGrid, you're going to throw? Could you help me understand why it would need to be re-thrown?

Copy link
Collaborator

Choose a reason for hiding this comment

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

My idea for the user experience is that I can check the format of the filter key, operator and value and verify them without depending on the armclient to do the verification.
Yes, the form will log the error, but it will still go ahead and still hit the client.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I might be missing something and would love to meet today to resolve it if possible.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I might be missing something and would love to meet today to resolve it if possible.

Let's continue the discussion at the method level comments, no need for a meeting 🙂

src/ServiceBusExplorer/ServiceBusExplorer.csproj Outdated Show resolved Hide resolved
Copy link
Collaborator

@ErikMogensen ErikMogensen left a comment

Choose a reason for hiding this comment

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

Please make sure it builds without errors and warnings.

src/Common/Common.csproj Outdated Show resolved Hide resolved
Copy link
Collaborator

@SeanFeldman SeanFeldman left a comment

Choose a reason for hiding this comment

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

Much better, @harrieoriowo 🙂
Let me know when you're done-done (out of draft) and I'll give it a final review.

@harrieoriowo harrieoriowo marked this pull request as ready for review May 30, 2024 22:02
@harrieoriowo
Copy link
Collaborator

I believe I am done-done. I have opened it for final review!

@harrieoriowo harrieoriowo dismissed stale reviews from SeanFeldman and ErikMogensen May 31, 2024 17:35

resolved

Copy link
Collaborator

@SeanFeldman SeanFeldman left a comment

Choose a reason for hiding this comment

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

Nullable reference type warnings - either don't use it or apply on the file level. Please don't turn it off at the line-by-line level.

src/ServiceBusExplorer/Forms/CreateEventGridTopicForm.cs Outdated Show resolved Hide resolved
src/ServiceBusExplorer/Forms/PublishEventForm.cs Outdated Show resolved Hide resolved
src/ServiceBusExplorer/Forms/ReceiveEventForm.cs Outdated Show resolved Hide resolved
@SeanFeldman
Copy link
Collaborator

@harrieoriowo, overall, looks good. Once you're done with the last review comments, I'm 👍 to merge. Thank you.

@ErikMogensen ErikMogensen merged commit 95c7742 into main Jun 10, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants