azure-functions-host icon indicating copy to clipboard operation
azure-functions-host copied to clipboard

Implement changes needed in the Host to decouple workers from the Host release

Open surgupta-msft opened this issue 7 months ago • 0 comments

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-proc branch 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
  • [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 -

  1. LanguageWorkerOptionsSetup -
    • Checks if the feature is enabled. If yes, gets probingPaths from the environment.
    • Creates an instance of WorkerConfigurationResolver and passes probingPaths to that. Sends the instance of WorkerConfigurationResolver when creating an instance of RPCWorkerConfigFactory
  2. RPCWorkerConfigFactory -
    • If feature is enabled, call GetWorkerConfigs() method of WorkerConfigurationResolver, otherwise look for worker configs within Host.
    • Moved some methods to WorkerConfigurationHelper.cs to enable reusing of workers profile evaluation logic.
  3. 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
  4. Feature Flags -
    • Added new feature flags FeatureFlagEnableWorkerProbingPaths and FeatureFlagDisableWorkerProbingPaths to enable or disable worker probing paths.

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.

surgupta-msft avatar Jun 09 '25 19:06 surgupta-msft