Skip to content
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

Fix bug in Publish-AzWebApp to allow params to be toggled off #26167

Merged
merged 2 commits into from
Sep 25, 2024

Conversation

dannysongg
Copy link
Member

Description

Publish-AzWebApp previously did not allow the parameters to be set to false because ParameterName.IsPresent would resolve to false if $false was passed, which would bypass the if statement that set the parameter to ParamName.ToString().

By using IsParameterBound() we can get the desired outcome such that if $false is passed, we will enter the if statement and set the parameter to false. If $true is passed, we will enter the if statement and set the parameter to true. If nothing is passed, the if statement will be skipped and the parameter will not be set, which is the corrected behavior.

Mandatory Checklist

  • SHOULD update ChangeLog.md file(s) appropriately
    • For SDK-based development mode, update src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md.
      • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header in the past tense.
    • For autorest-based development mode, include the changelog in the PR description.
    • Should not change ChangeLog.md if no new release is required, such as fixing test case only.
  • SHOULD regenerate markdown help files if there is cmdlet API change. Instruction
  • SHOULD have proper test coverage for changes in pull request.
  • SHOULD NOT adjust version of module manually in pull request

Copy link

azure-client-tools-bot-prd bot commented Sep 24, 2024

️✔️Az.Accounts
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Network
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Az.Websites
️✔️Build
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Breaking Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Signature Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Help File Existence Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️File Change Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️UX Metadata Check
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows
️✔️Test
️✔️PowerShell Core - Linux
️✔️PowerShell Core - MacOS
️✔️PowerShell Core - Windows
️✔️Windows PowerShell - Windows

@VeryEarly VeryEarly removed their request for review September 25, 2024 02:00
@msJinLei msJinLei changed the base branch from main to release-2024-10-08 September 25, 2024 09:10
@msJinLei msJinLei added the Do Not Squash 🚫 To prevent conflicts, this PR should not be squash merged. label Sep 25, 2024
Copy link

‼️ Do NOT use squash to merge this pull request. All the commits must be merged to the target branch.
‼️ Enable "Allow merge commits" in the pull request settings. Select "Merge Commits" to merge the PR. Then go back to settings and disable the option.

@msJinLei
Copy link
Contributor

/azp run azure-powershell - security-tools

Copy link
Contributor

Azure Pipelines successfully started running 1 pipeline(s).

@msJinLei msJinLei merged commit 368e363 into Azure:release-2024-10-08 Sep 25, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Do Not Squash 🚫 To prevent conflicts, this PR should not be squash merged. Waiting for CI :shipit:
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants