feat(sdk): emit AZFW0110 warning when FunctionsEnableWorkerIndexing is set#3449
Open
jviau wants to merge 2 commits into
Open
feat(sdk): emit AZFW0110 warning when FunctionsEnableWorkerIndexing is set#3449jviau wants to merge 2 commits into
jviau wants to merge 2 commits into
Conversation
…s set The FunctionsEnableWorkerIndexing property is deprecated with Azure.Functions.Sdk. Worker indexing is always enabled, so setting the property has no effect. Emit a new AZFW0110 warning when it is set and document the rule.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds a new SDK diagnostic (AZFW0110) to warn users that FunctionsEnableWorkerIndexing is deprecated and has no effect when using Azure.Functions.Sdk, and updates documentation and integration tests accordingly.
Changes:
- Introduces AZFW0110 warning text +
LogMessagewiring for the new diagnostic. - Emits the warning from MSBuild targets when
FunctionsEnableWorkerIndexingis set. - Adds rule documentation and an end-to-end integration test validating the warning behavior.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| test/Azure.Functions.Sdk.Tests/Integration/SdkEndToEndTests.Build.cs | Adds an integration test asserting AZFW0110 is emitted when the deprecated property is set. |
| src/Azure.Functions.Sdk/Targets/Azure.Functions.Sdk.targets | Emits AZFW0110 via FuncSdkLog during validation when FunctionsEnableWorkerIndexing is non-empty. |
| src/Azure.Functions.Sdk/Strings.resx | Adds the AZFW0110 warning message resource string. |
| src/Azure.Functions.Sdk/release_notes.md | Notes the new AZFW0110 warning in release notes. |
| src/Azure.Functions.Sdk/README.md | Adds a migration note pointing users to AZFW0110 and advising removal of the property. |
| src/Azure.Functions.Sdk/LogMessage.cs | Adds Warning_FunctionsEnableWorkerIndexingDeprecated and maps it in FromId. |
| docs/sdk-rules/index.md | Adds AZFW0110 to the SDK rules index table. |
| docs/sdk-rules/AZFW0110.md | Adds a new rule documentation page describing cause, impact, and fix. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Summary
Closes #3395.
Adds a new
AZFW0110SDK warning that is emitted when theFunctionsEnableWorkerIndexingproperty is set in a project using the newAzure.Functions.Sdk. Worker indexing is always enabled with this SDK, so the property no longer has any effect — the warning announces its deprecation and tells the user to remove it.Changes
Warning implementation (follows the existing
AZFW01xxdiagnostic pattern):Strings.resx— added theAZFW0110_Warning_FunctionsEnableWorkerIndexingDeprecatedmessage.LogMessage.cs— added theWarning_FunctionsEnableWorkerIndexingDeprecatedfield and wired it intoFromId.Targets/Azure.Functions.Sdk.targets— emit the warning viaFuncSdkLogin_ValidateFunctionsVersionwhen'$(FunctionsEnableWorkerIndexing)' != ''. The SDK never sets this property itself, so a non-empty value means the user set it.Docs:
docs/sdk-rules/AZFW0110.md— new rule page (cause, description, how-to-fix, suppression guidance).docs/sdk-rules/index.md— added the AZFW0110 row.src/Azure.Functions.Sdk/README.md— migration note that the property is deprecated.release_notes.md— feat entry.Test:
SdkEndToEndTests.Build.cs—Build_FunctionsEnableWorkerIndexing_Deprecated_Warning, following the existingBuild_NoRestoreHook_Warningpattern.Testing
Strings.AZFW0110_...resource resolves.LogMessageTests— 62/62 pass. These reflection-driven tests automatically assert the new resource string andLogMessagefield are correctly wired.