Azure / Azure/azure-functions-dotnet-worker

Expose host version and capabilities to extensions

Open
#2,164 0 comments 0 reactions 1 assignee Claimed by @fabiocav View on GitHub
pending-design
Dominant language
C#
Stars
466
Forks
215
Avg merge
3d 10h
Merged PRs (30d)
7

Description

Some worker-implemented features rely on corresponding features to be implemented host side. To prevent silent failures, we should expose host version and capabilities/features in the worker as a publicly accessible extension point. This way worker features can explicitly fail if they detect the host does not have the required support. An example is the RPC mechanism ServiceBus extension uses today to support `ServiceBusMessageActions`. When running on an old host version, this will fail obscurely with a gRPC unimplemented exception.

## Preliminary design

This information is part of the `WorkerInitRequest`, so all we would need to do is expose this in a palatable manner. Authoring a new `FunctionsRuntimeConfigurationSource` and then exposing these capabilities via an options object would be the most straightforward. However, this will need some consideration as we would be always forcing a config refresh on worker init, which may negatively impact performance.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.