Skip to content

add diagnostics warning log for deprecating extension bundles #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

Draft
wants to merge 17 commits into
base: dev
Choose a base branch
from

Conversation

manvkaur
Copy link

Issue describing the changes in this PR

resolves #issue_for_this_pr

Pull request checklist

IMPORTANT: Currently, changes must be backported to the in-proc branch to be included in Core Tools and non-Flex deployments.

  • 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
  • My changes do not need to be backported to a previous version
    • Otherwise: Backport tracked by issue/PR #issue_or_pr
  • 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)
  • I have added all required tests (Unit tests, E2E tests)

Additional information

This pull request introduces functionality to detect and log warnings for outdated extension bundle versions in Azure Functions. It also includes updates to diagnostics, resource strings, and tests to support this new feature. Additionally, there is a correction to a bitness mapping in a PowerShell script.

New functionality for outdated bundle detection:

  • Added a new method CompareWithLatestMajorVersion in IExtensionBundleManager and its implementation in ExtensionBundleManager to compare the current bundle version with the latest major version and log warnings if outdated. [1] [2]
  • Introduced new diagnostic constants OutdatedBundlesVersionErrorCode and OutdatedBundlesVersionHelpLink in DiagnosticEventConstants.
  • Updated FunctionAppValidationService to invoke CompareWithLatestMajorVersion during its execution. [1] [2]

Resource and diagnostics updates:

  • Added a localized resource string OutdatedExtensionBundlesVersionInfoFormat to provide a detailed warning message for outdated bundles. [1] [2]

Test enhancements:

  • Extended FunctionAppValidationServiceTests to include unit tests for the new CompareWithLatestMajorVersion method, verifying the logging behavior for outdated bundles.
  • Updated test stubs in ExtensionBundleContentProviderTests and ExtensionManagerTests to include a no-op implementation of CompareWithLatestMajorVersion. [1] [2]

Miscellaneous changes:

  • Corrected the bitness mapping in New-PrivateSiteExtension.ps1 to map 'x86' to '32bit' instead of '64bit'.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant