Add deprecation warning for extension bundles during publish #4746
+272
−0
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.
Core Tools now warns when publishing function apps using deprecated extension bundle versions, matching VS Code extension behavior.
Issue describing the changes in this PR
resolves #4700
Changes
ExtensionBundleHelper.cs
GetDeprecatedExtensionBundleWarning()to detect deprecated bundles by comparing localhost.jsonversion against Azure's recommended range fromhttps://aka.ms/funcStaticPropertiesParseVersionRange,VersionRangesIntersect,CompareVersions)[X.Y.Z]in addition to range formats[X.*, Y.Y.Y)and[X.Y.Z, A.B.C)HttpClientwith 10s timeout; all errors handled gracefully to never block publishPublishFunctionAppAction.cs
ValidateFunctionAppPublish()after existing validations"Your app is using a deprecated version [X.X.X, X.X.X) of extension bundles. Upgrade to [X.*, X.X.X)."ExtensionBundleHelperTests.cs
[3.40.0]and[4.28.0]Version Format Support
The implementation supports three formats:
[4.*, 5.0.0)→ parsed as(4.0.0, 5.0.0)[3.3.0, 4.0.0)→ parsed as(3.3.0, 4.0.0)[4.28.0]→ parsed as(4.28.0, 4.28.1)(treated as point range)Example
During publish with deprecated bundle:
Pull request checklist
Additional information
The warning message format and behavior matches the VS Code Azure Functions extension to provide a consistent user experience across deployment tools.
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.