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

Functions bug fix: New-AzFunctionApp cmdlet should write a warning message when setting default values for parameters that are not provided #18193

Conversation

Francisco-Gamino
Copy link
Contributor

Description

This PR contains the following changes:

New-AzFunctionApp cmdlet should write a warning message when setting default values for parameters that are not provided

Previous verbose messages:

  1. RuntimeVersion not specified. Setting default runtime version for '$Runtime' to '$RuntimeVersion'

  2. FunctionsVersion not specified. Setting default FunctionsVersion to '$FunctionsVersion'

  3. OSType for $Runtime is '$OSType'

New warning messages:

  1. RuntimeVersion not specified. Setting default value to '< currentDefaultValue >'. This default value is subject to change over time. Please set this value explicitly to ensure the be behavior is not accidentally impacted by future changes.

  2. FunctionsVersion not specified. Setting default value to '< currentDefaultValue >'. This default value is subject to change over time. Please set this value explicitly to ensure the be behavior is not accidentally impacted by future changes.

  3. OSType not specified. Setting default value to '< currentDefaultValue >'. This default value is subject to change over time. Please set this value explicitly to ensure the be behavior is not accidentally impacted by future changes.

Checklist

  • I have read the Submitting Changes section of CONTRIBUTING.md
  • The title of the PR is clear and informative
  • The appropriate ChangeLog.md file(s) has been updated:
    • For any service, the ChangeLog.md file can be found at src/{{SERVICE}}/{{SERVICE}}/ChangeLog.md
    • A snippet outlining the change(s) made in the PR should be written under the ## Upcoming Release header -- no new version header should be added
  • The PR does not introduce breaking changes
  • If applicable, the changes made in the PR have proper test coverage
  • For public API changes to cmdlets:
    • a cmdlet design review was approved for the changes in this repository (Microsoft internal only)
      • {Please put the link here}
    • the markdown help files have been regenerated using the commands listed here

@Francisco-Gamino
Copy link
Contributor Author

isra-fel added a commit that referenced this pull request May 17, 2022
* Build from the main branch

* Write a warning message when setting values for parameters that are not provided

* Update tests

* try fix ci issue by sync Az.props and shared

Co-authored-by: Francisco-Gamino <[email protected]>
@isra-fel
Copy link
Member

The updates in this PR were copied to #18195 (to fix issues in CI) and merged.
I'm closing this one.

@isra-fel isra-fel closed this May 17, 2022
@@ -65,7 +65,7 @@ directive:
```

``` yaml
branch: powershell-function
branch: main
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Francisco-Gamino There are 2000+ generated files get updated because of this PR (see #18209). Does it make sense to you? Is swagger of main branch that different from powershell-function branch?

Another thing, I'm going to put "Fixed an issue that New-AzFunctionApp cmdlet should write a warning message when setting default values for parameters that are not provided." into changelog. Let me you if you want to add anything else.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hello @isra-fel -- No, that does not make sense. Switching from one branch to another should not generate these many files. What I think it could be happening here is that more Swagger definitions have been added to the API version 2019-08-01 that I am using, so I will need to remove the extra cmdlets that get generated. The Swagger files from the powershell-function branch are at least two years old and have not been updated.

Should we revert back to the powershell-function? After this release I can work on removing the extra generated cmdlets to move to the main branch. Please advice. Thank you.

/cc @wyunchi-ms

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.

2 participants