-
Notifications
You must be signed in to change notification settings - Fork 459
add warning log for end of support extension bundles versions #11075
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
src/WebJobs.Script/Host/MissingAzureFunctionsFolderValidator.cs
Outdated
Show resolved
Hide resolved
var manager = new ExtensionBundleManager(options, env, _loggerFactory, config); | ||
|
||
// Set the private _extensionBundleVersion field using reflection | ||
typeof(ExtensionBundleManager) |
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.
You may also consider mocking the http client. Ex:
azure-functions-host/test/WebJobs.Script.Tests/ExtensionBundle/ExtensionBundleManagerTests.cs
Line 338 in 649c38e
var httpclient = new HttpClient(new MockHttpHandler(statusCodeForIndexJson: HttpStatusCode.OK, statusCodeForZipFile: HttpStatusCode.OK, "2.0.0")); |
test/WebJobs.Script.Tests/Description/FunctionAppValidationServiceTests.cs
Show resolved
Hide resolved
{ | ||
_scriptOptions = scriptOptions ?? throw new ArgumentNullException(nameof(scriptOptions)); | ||
_logger = logger ?? throw new ArgumentNullException(nameof(logger)); | ||
_logger = loggerFactory.CreateLogger(ScriptConstants.LogCategoryHostGeneral) ?? throw new ArgumentNullException(nameof(loggerFactory)); |
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.
@surgupta-msft , changing the category of logger to ScriptConstants.LogCategoryHostGeneral as per @RohitRanjanMS 's recommendation.
Let me know if you have any concerns.
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 concerns
Issue describing the changes in this PR
resolves #https://github.com/Azure/azure-functions-pyfx-planning/issues/713

screenshot of working log in app insights -
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
This pull request introduces changes to enhance validation mechanisms for function apps, improve logging for outdated extension bundles.
Validation Enhancements:
IFunctionAppValidator
interface to support modular validation logic for function apps. (src/WebJobs.Script/Host/IFunctionAppValidator.cs
)ExtensionBundleManagerValidator
andMissingAzureFunctionsFolderValidator
classes to validate outdated extension bundles and improper folder structures, respectively. (src/WebJobs.Script/Host/ExtensionBundleManagerValidator.cs
,src/WebJobs.Script/Host/MissingAzureFunctionsFolderValidator.cs
) [1] [2]FunctionAppValidationService
to use a collection of validators for streamlined validation and improved error handling. (src/WebJobs.Script/Host/FunctionAppValidationService.cs
) [1] [2]Logging Improvements:
src/WebJobs.Script/Diagnostics/Extensions/LoggerExtension.cs
,src/WebJobs.Script/Properties/Resources.Designer.cs
,src/WebJobs.Script/Properties/Resources.resx
) [1] [2] [3]ExtensionBundleManager
class to generate warnings based on bundle version and deprecation timelines. (src/WebJobs.Script/ExtensionBundle/ExtensionBundleManager.cs
)Platform Configuration Updates:
x86
bitness mapping inNew-PrivateSiteExtension.ps1
to reflect "32bit" instead of "64bit." (src/WebJobs.Script.SiteExtension/New-PrivateSiteExtension.ps1
)Test Suite Updates:
FunctionAppValidationService
. (test/WebJobs.Script.Tests.Integration/TestFunctionHost.cs
,test/WebJobs.Script.Tests/Description/FunctionAppValidationServiceTests.cs
) [1] [2]Miscellaneous:
release_notes.md
)