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

Review Event Grid Reaction #134

Merged
merged 5 commits into from
Jan 3, 2025

Conversation

ruokun-niu
Copy link
Contributor

@ruokun-niu ruokun-niu commented Dec 23, 2024

Description

Updated the EventGrid Reaction to use the nuget Reaction SDK and enabled authentication via managed identity. Currently the reaction only supports EventGrids that have the input schema of CloudEventSchemaV1_0.

Configuration

The reaction takes the following configuration properties:

Property Description
eventGridUri Topic Endpoint for your Azure EventGrid topic
eventGridKey Access key to the EventGrid topic. This field is optional if using managed identity

Example with Access Key

kind: Reaction
apiVersion: v1
name: eventgrid
spec:
  kind: EventGrid
  queries:
    <query-id>:
  properties: 
    eventGridUri: <endpoint>
    eventGridKey: <access-key>

Example with Managed identity

kind: Reaction
apiVersion: v1
name: eventgrid
spec:
  kind: EventGrid
  queries:
    <query-id>:
  identity:
    kind: MicrosoftEntraWorkloadID
    clientId: <client-id>
  properties: 
    eventGridUri: <endpoint>

Type of change

  • This pull request adds or changes features of Drasi and has an approved issue (issue link required).

Fixes: #issue_number

Choose a reason for hiding this comment

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

Copilot reviewed 6 out of 16 changed files in this pull request and generated no comments.

Files not reviewed (10)
  • reactions/azure/eventgrid-reaction/.dockerignore: Language not supported
  • reactions/azure/eventgrid-reaction/.gitignore: Language not supported
  • reactions/azure/eventgrid-reaction/Dockerfile: Language not supported
  • reactions/azure/eventgrid-reaction/Makefile: Language not supported
  • reactions/azure/eventgrid-reaction/Properties/.gitignore: Language not supported
  • reactions/azure/eventgrid-reaction/eventgrid-reaction.csproj: Language not supported
  • reactions/azure/eventgrid-reaction/eventgrid-reaction.sln: Language not supported
  • reactions/azure/storagequeue-reaction/Dockerfile: Language not supported
  • reactions/azure/eventgrid-reaction/Models/ChangeNotification.cs: Evaluated as low risk
  • reactions/azure/eventgrid-reaction/Program.cs: Evaluated as low risk
Comments suppressed due to low confidence (1)

reactions/azure/eventgrid-reaction/Services/ControlSignalHandler.cs:57

  • Verify that 'ControlSignalNotificationOp.X' is the correct value for the 'Op' property in 'ControlSignalNotification'.
Op = ControlSignalNotificationOp.X,
foreach (var notification in formattedResults)
{
CloudEvent currEvent = new CloudEvent(evt.QueryId, "Drasi.ChangeEvent", notification);
var currResp = await _publisherClient.SendEventAsync(currEvent);
Copy link
Contributor

Choose a reason for hiding this comment

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

Does EventGrid have a batch send call? So they could all fail/pass together?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just committed this change

@ruokun-niu ruokun-niu merged commit d8f41cb into drasi-project:main Jan 3, 2025
30 checks passed
@ruokun-niu ruokun-niu deleted the review-eventgrid-reaction branch January 3, 2025 20:47
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.

3 participants