-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
Add option for initial offset #17727
Conversation
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/WebJobsEventHubTestBase.cs
Show resolved
Hide resolved
/azp run net - eventhub - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubOptions.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubOptions.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/InitialOffsetOptions.cs
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/InitialOffsetOptions.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubOptions.cs
Outdated
Show resolved
Hide resolved
@@ -19,7 +21,7 @@ public static IWebJobsBuilder AddEventHubs(this IWebJobsBuilder builder) | |||
throw new ArgumentNullException(nameof(builder)); | |||
} | |||
|
|||
builder.AddEventHubs(p => {}); | |||
builder.AddEventHubs(ConfigureOptions); |
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.
What if someone calls the other overload?
There is already configuration parsing code in the AddEventHubs(this IWebJobsBuilder builder, Action<EventHubOptions> configure)
overload, let's chain the new code there.
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.
Yeah, I wasn't sure about this, but this is how it works in the currently released library. I assumed that if someone called the lower level method, they are assuming responsibility for how the configuration should work. /cc @sidkri
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.
Yeah, this is the default behavior. If someone calls "AddEventHubs(IWebJobsBuilder, Action)" I'm assuming they want to have full control over the behavior including changing default behavior.
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.
I think it's a bit unintuitive that trying to change some unrelated setting would stop loading the starting point configuration especially considering that the rest of the settings are being bound unconditionally.
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.
Agreed, at the very least it feels inconsistent that some settings are still defaulted, and some are not.
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/WebJobsEventHubTestBase.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/WebJobsEventHubTestBase.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/WebJobsEventHubTestBase.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubOptions.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/WebJobsEventHubTestBase.cs
Outdated
Show resolved
Hide resolved
.../Microsoft.Azure.WebJobs.Extensions.EventHubs/src/Config/EventHubWebJobsBuilderExtensions.cs
Outdated
Show resolved
Hide resolved
...Jobs.Extensions.EventHubs/api/Microsoft.Azure.WebJobs.Extensions.EventHubs.netstandard2.0.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs
Outdated
Show resolved
Hide resolved
/azp run net - eventhub - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run net - eventhub - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run net - eventhub - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
/azp run net - eventhub - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
9074966
to
4f751c9
Compare
/azp run net - eventhub - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/EventHubEndToEndTests.cs
Outdated
Show resolved
Hide resolved
sdk/eventhub/Microsoft.Azure.WebJobs.Extensions.EventHubs/tests/WebJobsEventHubTestBase.cs
Outdated
Show resolved
Hide resolved
/azp run net - eventhub - tests |
Azure Pipelines successfully started running 1 pipeline(s). |
Hello @JoshLove-msft! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Fixes #17521