-
Notifications
You must be signed in to change notification settings - Fork 457
Implement changes needed in the Host to decouple workers from the Host release #11111
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
base: dev
Are you sure you want to change the base?
Conversation
@@ -144,30 +176,16 @@ internal void AddProvider(string workerDir) | |||
|
|||
_logger.LogDebug("Found worker config: {workerConfigPath}", workerConfigPath); | |||
|
|||
var workerConfig = GetWorkerConfigJsonElement(workerConfigPath); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No change in logic for this line. Just moved the method GetWorkerConfigJsonElement()
to class WorkerConfigurationHelper
@@ -144,30 +176,16 @@ internal void AddProvider(string workerDir) | |||
|
|||
_logger.LogDebug("Found worker config: {workerConfigPath}", workerConfigPath); | |||
|
|||
var workerConfig = GetWorkerConfigJsonElement(workerConfigPath); | |||
var workerDescriptionElement = workerConfig.GetProperty(WorkerConstants.WorkerDescription); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All these lines (148-150 and 152-170) are moved to a method WorkerConfigurationHelper.GetWorkerDescription()
@@ -213,61 +231,6 @@ internal void AddProvider(string workerDir) | |||
} | |||
} | |||
|
|||
private static JsonElement GetWorkerConfigJsonElement(string workerConfigPath) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These methods are also moved to class WorkerConfigurationHelper
as we will need to call these methods from class WorkerConfigurationResolver
as part of compatibility check.
namespace Microsoft.Azure.WebJobs.Script.Workers.Rpc.Configuration | ||
{ | ||
internal static class WorkerConfigurationHelper | ||
{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All the methods in this class are taken from RPCWorkerConfigFactory
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.in-proc
branch is not requiredrelease_notes.md
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 -
WorkerConfigurationResolver
and passes probingPaths to that. Sends the instance ofWorkerConfigurationResolver
when creating an instance ofRPCWorkerConfigFactory
GetWorkerConfigs()
method ofWorkerConfigurationResolver
, otherwise look for worker configs within Host.WorkerConfigurationHelper.cs
to enable reusing of workers profile evaluation logic.FeatureFlagEnableWorkerProbingPaths
andFeatureFlagDisableWorkerProbingPaths
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.