-
Notifications
You must be signed in to change notification settings - Fork 464
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
Draft
surgupta-msft
wants to merge
69
commits into
feature/decouple-workers
Choose a base branch
from
surgupta/decoupling-workers
base: feature/decouple-workers
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Draft
Changes from 62 commits
Commits
Show all changes
69 commits
Select commit
Hold shift + click to select a range
987fad0
Changes for Decoupling workers implementation
surgupta-msft 734b029
Added test data for unit tests
surgupta-msft cefdb92
Code cleanup and adding comments
surgupta-msft 021ac3e
Code refactoring to check probing paths enabled only once
surgupta-msft 36abb61
Code refactoring
surgupta-msft 8929697
Tests cleanup
surgupta-msft 1588711
Added test for LanguageWorkerOptionsSetup
surgupta-msft 2606f37
Adding Tests for Utility class
surgupta-msft 08850c9
Adding more tests
surgupta-msft 10d2e52
Changes in Tests
surgupta-msft 95af17e
Updating LanguageWorkerOptionsSetupTests
surgupta-msft 150aaf3
Minor refactoring and code cleanup
surgupta-msft 0def600
Fixing build warning
surgupta-msft cc3e044
Fixing build issue in tests
surgupta-msft 26e8580
Unit test fixing
surgupta-msft 9b6a945
Stylecop fixes
surgupta-msft e90ddda
Merge branch 'dev' into surgupta/decoupling-workers
surgupta-msft ee60ec4
Test data cleanup
surgupta-msft 1495f31
Test data cleanup
surgupta-msft c2628bb
Merge branch 'dev' into surgupta/decoupling-workers
surgupta-msft 4ee497b
Updated release notes
surgupta-msft c85ced3
Merge branch 'surgupta/decouple-workers-feature' into surgupta/decoup…
surgupta-msft 5168090
Renaming feature name
surgupta-msft 1ad3d14
Updated tests
surgupta-msft d67a254
logging update
surgupta-msft 5844053
Logging update
surgupta-msft 3bf3f79
Placeholder mode check
surgupta-msft 1171fe8
Handling DefaultWorkerPath update scenario
surgupta-msft bf573b5
Rebasing with dev branch
surgupta-msft 3bdc8e1
Tests update after logs changes
surgupta-msft f4a162a
Rebase with main
surgupta-msft d49ace8
Merge with main
surgupta-msft ed80fd1
Logs and Tests updates
surgupta-msft dd70dfc
Addressed PR feedback
surgupta-msft bd009fd
Merge with main
surgupta-msft 2a56550
Corrected method return value
surgupta-msft 2c7b9ef
Addressing PR feedback
surgupta-msft 1d29846
Merge branch 'dev' into surgupta/decoupling-workers
surgupta-msft 03d49c0
Addressed PR feedback
surgupta-msft 6a94387
Using IFileSystem instead of System.Directory
surgupta-msft 275831c
Addressing PR feedback. Updating method to get versions in descending…
surgupta-msft f0a30ae
Getting parent directory for windows probing path
surgupta-msft f92c521
Refactored code and introduced static and dynamic worker config resol…
surgupta-msft ace597c
Merge with main branch
surgupta-msft bf3d126
code cleanup
surgupta-msft 9e4b960
Code cleanup and added more comments
surgupta-msft 2585946
Adding condition if worker.config is empty
surgupta-msft 3c55d1d
Addressed PR feedback and code refactoring
surgupta-msft c5a1b0f
Creating WorkerConfigurationResolverFactory
surgupta-msft 6449065
code cleanup
surgupta-msft 5ad1699
Minor code refactoring
surgupta-msft d15984c
Code cleanup and addressing PR feedback
surgupta-msft c6b9e93
Test folder update
surgupta-msft be527c4
Test folder name update
surgupta-msft aaf5243
Merge with main
surgupta-msft e0cb000
Added some code comments
surgupta-msft 738cea9
Addressing PR feedback
surgupta-msft 710ae35
Log improvement
surgupta-msft 90e0ad2
Condition update to include placeholder mode
surgupta-msft b3a4045
Merge with main
surgupta-msft fbb3c10
Test fix
surgupta-msft 2936fa8
Merge with main
surgupta-msft 9f1a9af
Improve WorkerConfigurationResolver to leverage Options pattern (#11203)
surgupta-msft 3825893
Rebase with main
surgupta-msft 3681e57
Merge branch 'surgupta/decoupling-workers' of https://github.com/Azur…
surgupta-msft 2c2e8e3
code cleanup and added comments in resolver options class
surgupta-msft 779fd2d
Using Options to check if Dynamic worker resolution is enabled
surgupta-msft 4e03f80
Tests cleanup
surgupta-msft e184c4f
Added WorkerConfigurationResolverOptionsSetupTests
surgupta-msft File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/WebJobs.Script/Workers/Rpc/Configuration/DefaultWorkerConfigurationResolver.cs
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (c) .NET Foundation. All rights reserved. | ||
// Licensed under the MIT License. See License.txt in the project root for license information. | ||
|
||
using System; | ||
using System.Collections.Generic; | ||
using System.IO; | ||
using Microsoft.Extensions.Configuration; | ||
using Microsoft.Extensions.Logging; | ||
|
||
namespace Microsoft.Azure.WebJobs.Script.Workers.Rpc.Configuration | ||
{ | ||
// This class resolves worker configurations by scanning the "workers" directory within the Host for worker config files. | ||
internal sealed class DefaultWorkerConfigurationResolver : IWorkerConfigurationResolver | ||
{ | ||
private readonly ILogger _logger; | ||
private readonly IConfiguration _configuration; | ||
|
||
public DefaultWorkerConfigurationResolver(IConfiguration configuration, ILogger logger) | ||
surgupta-msft marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
_logger = logger ?? throw new ArgumentNullException(nameof(logger)); | ||
_configuration = configuration ?? throw new ArgumentNullException(nameof(configuration)); | ||
} | ||
|
||
public List<string> GetWorkerConfigPaths() | ||
{ | ||
var workersDirPath = WorkerConfigurationHelper.GetWorkersDirPath(_configuration); | ||
_logger.LogDebug("Workers Directory set to: {workersDirPath}", workersDirPath); | ||
|
||
List<string> workerConfigs = new(); | ||
|
||
foreach (var workerDir in Directory.EnumerateDirectories(workersDirPath)) | ||
{ | ||
string workerConfigPath = Path.Combine(workerDir, RpcWorkerConstants.WorkerConfigFileName); | ||
surgupta-msft marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
if (File.Exists(workerConfigPath)) | ||
{ | ||
workerConfigs.Add(workerDir); | ||
} | ||
} | ||
|
||
return workerConfigs; | ||
} | ||
} | ||
} |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.