Azure / Azure/azure-functions-host

Exposing EnvironmentExtensions class as part of WebJobs SDK

Open
#9,547 0 comments 2 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
2k
Forks
482
Avg merge
2d 12h
Merged PRs (30d)
38

Description

#### What problem would the feature you're requesting solve? Please describe.
Recently we added checks for Azure Functions SKUs as part of Azure Functions Dapr Extension and we copied many methods from[ WebJobs.Script repo ](https://github.com/Azure/azure-functions-host/blob/50788a70d720400dd0cbbd34aba0a06f60c941e6/src/WebJobs.Script/Environment/EnvironmentExtensions.cs#L16) to [Dapr Extension](https://github.com/Azure/azure-functions-dapr-extension/blob/d8ab3c7f27cf7f1b46dad8c5f3e0a327335867de/src/Microsoft.Azure.WebJobs.Extensions.Dapr/Utils/EnvironmentUtils.cs#L11-L76). Copy pasting could be error prone and we are re-writing the same code again in different Repo.

#### Describe the solution you'd like
It would be better to expose [EnvironmentExtensions class](https://github.com/Azure/azure-functions-host/blob/50788a70d720400dd0cbbd34aba0a06f60c941e6/src/WebJobs.Script/Environment/EnvironmentExtensions.cs#L16) as part of WebJobs SDK, so that SKU checks API could called directly from extensions.

#### Describe alternatives you've considered
Right now, we have copied the methods we need from [this class](https://github.com/Azure/azure-functions-host/blob/50788a70d720400dd0cbbd34aba0a06f60c941e6/src/WebJobs.Script/Environment/EnvironmentExtensions.cs#L16) and added in [Dapr extension Repo](https://github.com/Azure/azure-functions-dapr-extension/blob/d8ab3c7f27cf7f1b46dad8c5f3e0a327335867de/src/Microsoft.Azure.WebJobs.Extensions.Dapr/Utils/EnvironmentUtils.cs#L11-L76).

Contributor guide

Open the contributing guide

Research direction

Review EnvironmentExtensions.cs in the WebJobs.Script repository and the copied methods in the Dapr extension's EnvironmentUtils.cs. Start by comparing the required SKU checks and determine how the class could be exposed through the WebJobs SDK. Done means extensions can call the shared API without maintaining copied implementations.

Written by the indexing model from the issue text.

Assessment

Tech stack
azure, csharp
Domain
api, backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.