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

Proposal for Scaler APIs discovery in extension #3027

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

alrod
Copy link
Member

@alrod alrod commented Oct 16, 2023

No description provided.

@alrod alrod changed the title Alrod/startup for extensions1 Proposal for Scaler APIs discovery in exteniosn Oct 16, 2023
@alrod alrod changed the title Proposal for Scaler APIs discovery in exteniosn Proposal for Scaler APIs discovery in extension Oct 16, 2023
@alrod alrod requested a review from mathewc October 17, 2023 23:40
@alrod alrod requested a review from mathewc October 23, 2023 17:01
Configuration = context.Configuration,
EnvironmentName = context.HostingEnvironment.EnvironmentName
};
webJobsBuilderContext.Properties["IsAzureWebJobsScaleHost"] = true;
Copy link
Member

Choose a reason for hiding this comment

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

Still considering the best way to flow this property. An alternative might be to add the "context" HostBuilderContext in this scope as a property on WebJobsBuilderContext. We could then leverage the Property collection of that type, and could also set this flag automatically in ConfigureWebJobsScale.

public TestExtensionScalerProvider(IConfiguration config, IOptions<ScaleOptions> scaleOptions, TriggerMetadata triggerMetadata)
public void Configure(WebJobsBuilderContext context, IWebJobsBuilder builder)
{
if (context.Properties.ContainsKey("IsAzureWebJobsScaleHost"))
Copy link
Member

Choose a reason for hiding this comment

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

Still thinking what helper we could add to simplify this Properties check - e.g. an IsScaleHost extension method somewhere

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