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

chore: remove event grid from testing & upgrade az func definitions #893

Conversation

stijnmoreels
Copy link
Member

Remove the unnecessary EventGrid testing from the project template testing and use the file system as target source to send messages from worker templates to.

Copy link

netlify bot commented Jul 2, 2024

Deploy Preview for arcus-templates canceled.

Name Link
🔨 Latest commit 09d6803
🔍 Latest deploy log https://app.netlify.com/sites/arcus-templates/deploys/6683eb2f05ec8500081c3501

@stijnmoreels stijnmoreels changed the title chore: remove event grid from testing chore: remove event grid from testing & upgrade az func definitions Jul 2, 2024
- group: 'Arcus Web Api - Integration Testing'
# We are re-using the Event Grid integration infrastructure
- group: 'Arcus Messaging - Integration Testing'
- group: 'Arcus Background Jobs - Integration Testing'
Copy link
Member

Choose a reason for hiding this comment

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

I don't understand why we're not running these tests anymore ?
The PR title just speaks about removing event-grid from testing ?

Copy link
Member Author

Choose a reason for hiding this comment

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

We're still running the tests, we're just not using EventGrid anymore to run them. Now we use the file system as the event source instead.

/// <summary>
/// Processes Azure EventHubs <paramref name="events"/>.
/// Processes Azure EventHubs <paramref name="datas"/>.
Copy link
Member

Choose a reason for hiding this comment

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

Isn't data already plural ?
events was -imho- correct.

for (var index = 0; index < events.Length; index++)
logger.LogInformation("Azure EventHubs function triggered with {Length} events", datas.Length);

foreach (EventData data in datas)
Copy link
Member

Choose a reason for hiding this comment

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

I think I know why you renamed events to datas.
Is it because event is a keyword in C#, and you cannot write foreach( var event in events)?
You can work around that by 'escaping' the keyword, like this foreach( var @event in events)

Copy link
Member Author

Choose a reason for hiding this comment

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

Might me me that I automatically used the last name of the type as variable name 😅

@stijnmoreels stijnmoreels marked this pull request as draft July 9, 2024 05:03
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.

None yet

2 participants