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

Add option for initial offset #17727

Merged
10 commits merged into from
Jan 5, 2021
Merged

Conversation

JoshLove-msft
Copy link
Member

Fixes #17521

@JoshLove-msft
Copy link
Member Author

/azp run net - eventhub - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@@ -19,7 +21,7 @@ public static IWebJobsBuilder AddEventHubs(this IWebJobsBuilder builder)
throw new ArgumentNullException(nameof(builder));
}

builder.AddEventHubs(p => {});
builder.AddEventHubs(ConfigureOptions);
Copy link
Contributor

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.

Copy link
Member Author

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

Copy link
Member

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.

Copy link
Contributor

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.

Copy link
Member Author

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.

@JoshLove-msft
Copy link
Member Author

/azp run net - eventhub - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - eventhub - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - eventhub - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - eventhub - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft JoshLove-msft force-pushed the webjobs-initial-offset branch from 9074966 to 4f751c9 Compare January 5, 2021 06:51
@JoshLove-msft
Copy link
Member Author

/azp run net - eventhub - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@JoshLove-msft
Copy link
Member Author

/azp run net - eventhub - tests

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ghost
Copy link

ghost commented Jan 5, 2021

Hello @JoshLove-msft!

Because this pull request has the auto-merge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

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 (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 2ad2c21 into Azure:master Jan 5, 2021
annelo-msft pushed a commit to annelo-msft/azure-sdk-for-net that referenced this pull request Feb 17, 2021
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[WebJobs/EventHubs] Migrate initial offset configuration feature
4 participants