Skip to content

Fix PlanInstanceCount applicability for Flex Consumption plans - #3930

Open
Brandon Waterloo [MSFT] (bwateratmsft) wants to merge 1 commit into
Azure:mainfrom
bwateratmsft:bwateratmsft-flex-consumption-rule-fix
Open

Brandon Waterloo [MSFT] (bwateratmsft) wants to merge 1 commit into
Azure:mainfrom
bwateratmsft:bwateratmsft-flex-consumption-rule-fix

Conversation

@bwateratmsft

Copy link
Copy Markdown

🤖

PR Summary

Fixes #3929.

Azure.AppService.PlanInstanceCount incorrectly checks Azure Functions Flex Consumption plans for sku.capacity >= 2. Recognize FC1 SKU names or the FlexConsumption tier in IsConsumptionPlan so these plans are not applicable to the rule, without requiring capacity or changing Dedicated-plan validation.

Adds 17 focused cases covering independent SKU-name and tier detection, omitted and single-instance capacity, both identifiers, case-insensitive matching, existing Y1/Dynamic and Elastic Premium exclusions, and Dedicated plans with omitted/one/two/three-instance capacity. Updates the rule documentation and Unreleased changelog.

Validation: built the module with the repository's .NET build/publish commands; reproduced all seven Flex Consumption failures before the fix; all 44 tests in Azure.AppService.Tests.ps1 pass after the fix. PowerShell parser and git diff --check checks pass. Tests used PSRule 2.9.0 and installed Pester 6.1.0 without test-framework adaptations; the declared Pester 5.9.1 and PSScriptAnalyzer 1.24.0 were unavailable, and no repository trust settings were changed. Full-repository tests and PSScriptAnalyzer were not run.

PR Checklist

  • PR has a meaningful title
  • Summarized changes
  • Change is not breaking
  • This PR is ready to merge and is not Work in Progress
  • Rule changes
    • Unit tests created/ updated
    • Rule documentation created/ updated
    • Link to a filed issue
    • Change log has been updated with change under unreleased section
  • Other code changes (not applicable)
    • Unit tests created/ updated
    • Link to a filed issue
    • Change log has been updated with change under unreleased section

Exclude FC1 and FlexConsumption plans, add regression coverage, and clarify rule documentation.

Fixes Azure#3929

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>

This branch has not been deployed

No deployments
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.

[BUG] Azure.AppService.PlanInstanceCount incorrectly applies to Flex Consumption (FC1) plans

1 participant