azure-functions-host
azure-functions-host copied to clipboard
Implement changes needed in the Host to decouple workers from the Host release
Issue describing the changes in this PR
resolves #10944
Pull request checklist
IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.
- [x] Backporting to the
in-procbranch is not required- Otherwise: Link to backporting PR
- [ ] My changes do not require documentation changes
- [ ] Otherwise: Documentation issue linked to PR
- [ ] My changes should not be added to the release notes for the next release
- [ ] Otherwise: I've added my notes to
release_notes.md
- [ ] Otherwise: I've added my notes to
- [x] My changes do not need to be backported to a previous version
- [ ] Otherwise: Backport tracked by issue/PR #issue_or_pr
- [x] My changes do not require diagnostic events changes
- Otherwise: I have added/updated all related diagnostic events and their documentation (Documentation issue linked to PR)
- [x] I have added all required tests (Unit tests, E2E tests)
Additional information
Additional PR information
This PR implements initial changes to decouple language workers from the Host release payload.
Backlog issues - Link Design doc - Link
Flows covered in this PR -
- LanguageWorkerOptionsSetup -
- Checks if the feature is enabled. If yes, gets probingPaths from the environment.
- Creates an instance of
WorkerConfigurationResolverand passes probingPaths to that. Sends the instance ofWorkerConfigurationResolverwhen creating an instance ofRPCWorkerConfigFactory
- RPCWorkerConfigFactory -
- If feature is enabled, call
GetWorkerConfigs()method ofWorkerConfigurationResolver, otherwise look for worker configs within Host. - Moved some methods to
WorkerConfigurationHelper.csto enable reusing of workers profile evaluation logic.
- If feature is enabled, call
- WorkerConfigurationResolver -
- Host-Worker compatibility check
- Leveraging Release channel concept to point to a previous version of worker
- Fallback to the old flow if worker is not found at the probing path level
- Feature Flags -
- Added new feature flags
FeatureFlagEnableWorkerProbingPathsandFeatureFlagDisableWorkerProbingPathsto enable or disable worker probing paths.
- Added new feature flags
Note: The decoupling workers flow is disabled by default in this PR. We will enable the flow after completing other relevant backlog items which will be included in follow-up PRs.