Skip to content

Conversation

@ambrahma
Copy link
Member

@ambrahma ambrahma commented Apr 3, 2023

This is a PR generated at OpenAPI Hub. You can view your work branch via this link.

ARM API Information (Control Plane)

Changes included in this PR:

  1. New api version (2023-03-01-preview) added from the base GA version (2022-12-01) using Open API Hub.
  2. Add support for CMK with geo backup (FlexibleServers.json). New properties added.
  3. Add support for storage autoGrow (FlexibleServers.json). New properties added.
  4. Add support for IOPS scaling properties (FlexibleServers.json). New properties added.
  5. Add API for Advanced Threat protection (ThreatProtection.json).
  6. Add swagger for Migrations API for this new API version (Migrations.json).
  7. Add API for Server Logs (ServerLogs.json).
  8. Add API for Long Term Retention Backup (LongTermRetention.json and LongTermRetentionOperation.json).
  9. Add server capabilities API and update the response for the existing location capabilities API (Capabilities.json). Both these APIs will be used internally by CLI to fetch the desired information for the location capability / server capability and accordingly allow operations to be performed for the Postgres Flexible Server. Swagger is being exposed for these APIs for SDK to be generated which in turn can be used by CLI. There are breaking changes for these APIs to be more ARM compliant and follow ARM API design guidelines.

Breaking change request => https://msazure.visualstudio.com/One/_workitems/edit/17984930

Azure 1st Party Service can try out the Shift Left experience to initiate API design review from ADO code repo. If you are interested, may request engineering support by filling in with the form https://aka.ms/ShiftLeftSupportForm.

Changelog

Add a changelog entry for this PR by answering the following questions:

  1. What's the purpose of the update?
    • new service onboarding
    • new API version
    • update existing version for new feature
    • update existing version to fix swagger quality issue in s360
    • Other, please clarify
  2. When are you targeting to deploy the new service/feature to public regions? Please provide the date or, if the date is not yet available, the month.
  3. When do you expect to publish the swagger? Please provide date or, the the date is not yet available, the month.
  4. By default, Azure SDKs of all languages (.NET/Python/Java/JavaScript for both management-plane SDK and data-plane SDK, Go for management-plane SDK only ) MUST be refreshed with/after swagger of new version is published. If you prefer NOT to refresh any specific SDK language upon swagger updates in the current PR, please leave details with justification here.

Contribution checklist (MS Employees Only):

If any further question about AME onboarding or validation tools, please view the FAQ.

ARM API Review Checklist

Applicability: ⚠️

If your changes encompass only the following scenarios, you should SKIP this section, as these scenarios do not require ARM review.

  • Change to data plane APIs
  • Adding new properties
  • All removals

Otherwise your PR may be subject to ARM review requirements. Complete the following:

  • Check this box if any of the following apply to the PR so that the label "ARMReview" and "WaitForARMFeedback" will be added by bot to kick off ARM API Review. Missing to check this box in the following scenario may result in delays to the ARM manifest review and deployment.

    • Adding a new service
    • Adding new API(s)
    • Adding a new API version
      -[ ] To review changes efficiently, ensure you copy the existing version into the new directory structure for first commit and then push new changes, including version updates, in separate commits. You can use OpenAPIHub to initialize the PR for adding a new version. For more details refer to the wiki.
  • Ensure you've reviewed following guidelines including ARM resource provider contract and REST guidelines. Estimated time (4 hours). This is required before you can request review from ARM API Review board.

  • If you are blocked on ARM review and want to get the PR merged with urgency, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.

Breaking Change Review Checklist

If you have any breaking changes as defined in the Breaking Change Policy, request approval from the Breaking Change Review Board.

Action: to initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Additional details on the process and office hours are on the Breaking Change Wiki.

NOTE: To update API(s) in public preview for over 1 year (refer to Retirement of Previews)

Please follow the link to find more details on PR review process.

Breaking change request => https://msazure.visualstudio.com/One/_workitems/edit/17984930

@openapi-workflow-bot
Copy link

Hi, @ambrahma Thanks for your PR. I am workflow bot for review process. Here are some small tips.

  • Please ensure to do self-check against checklists in first PR comment.
  • PR assignee is the person auto-assigned and responsible for your current PR reviewing and merging.
  • For specs comparison cross API versions, Use API Specs Comparison Report Generator
  • If there is CI failure(s), to fix CI error(s) is mandatory for PR merging; or you need to provide justification in PR comment for explanation. How to fix?

  • Any feedback about review process or workflow bot, pls contact swagger and tools team. vscswagger@microsoft.com

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 3, 2023

    Swagger Validation Report

    ️⌛BreakingChange pending [Detail]
    ️⌛Breaking Change(Cross-Version) pending [Detail]
    ️⌛CredScan pending [Detail]
    ️⌛LintDiff pending [Detail]
    ️🔄Avocado inProgress [Detail]
    ️🔄ApiReadinessCheck inProgress [Detail]
    ️⌛~[Staging] ServiceAPIReadinessTest pending [Detail]
    ️⌛SwaggerAPIView pending [Detail]
    ️⌛CadlAPIView pending [Detail]
    ️🔄TypeSpecAPIView inProgress [Detail]
    ️⌛ModelValidation pending [Detail]
    ️⌛SemanticValidation pending [Detail]
    ️⌛PoliCheck pending [Detail]
    ️⌛PrettierCheck pending [Detail]
    ️⌛SpellCheck pending [Detail]
    ️⌛Lint(RPaaS) pending [Detail]
    ️⌛CadlValidation pending [Detail]
    ️⌛TypeSpec Validation pending [Detail]
    ️⌛PR Summary pending [Detail]
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 3, 2023

    Swagger Generation Artifacts

    ️️✔️ApiDocPreview succeeded [Detail] [Expand]
     Please click here to preview with your @microsoft account. 
    ️️✔️SDK Breaking Change Tracking succeeded [Detail] [Expand]

    Breaking Changes Tracking



    ️❌ azure-sdk-for-net-track2 failed [Detail]
    • Failed [Logs]Release - Generate from d946e46. SDK Automation 14.0.0
      command	pwsh ./eng/scripts/Automation-Sdk-Init.ps1 ../azure-sdk-for-net_tmp/initInput.json ../azure-sdk-for-net_tmp/initOutput.json
      command	pwsh ./eng/scripts/Invoke-GenerateAndBuildV2.ps1 ../azure-sdk-for-net_tmp/generateInput.json ../azure-sdk-for-net_tmp/generateOutput.json
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1mGeneratePackage: �[0m/mnt/vss/_work/1/s/azure-sdk-for-net/eng/scripts/automation/GenerateAndBuildLib.ps1:712
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1mLine |
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m 712 | �[0m         �[36;1mGeneratePackage -projectFolder $projectFolder -sdkRootPath $s�[0m …
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[36;1m     | �[31;1m         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[31;1m�[36;1m     | �[31;1mFailed to build sdk. exit code: False
      cmderr	[Invoke-GenerateAndBuildV2.ps1] �[0m
    • Azure.ResourceManager.PostgreSql [View full logs]  [Release SDK Changes] Breaking Change Detected
      info	[Changelog] Breaking Changes: /home/cloudtest/.nuget/packages/microsoft.dotnet.apicompat/5.0.0-beta.20467.1/build/Microsoft.DotNet.ApiCompat.targets(82,5): error : MembersMustExist : Member 'public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole.GeoSyncReplica.get()' does not exist in the implementation but it does exist in the contract. [/mnt/vss/_work/1/s/azure-sdk-for-net/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj::TargetFramework=netstandard2.0],
      info	[Changelog] /home/cloudtest/.nuget/packages/microsoft.dotnet.apicompat/5.0.0-beta.20467.1/build/Microsoft.DotNet.ApiCompat.targets(82,5): error : MembersMustExist : Member 'public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole.Secondary.get()' does not exist in the implementation but it does exist in the contract. [/mnt/vss/_work/1/s/azure-sdk-for-net/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj::TargetFramework=netstandard2.0],
      info	[Changelog] /home/cloudtest/.nuget/packages/microsoft.dotnet.apicompat/5.0.0-beta.20467.1/build/Microsoft.DotNet.ApiCompat.targets(82,5): error : MembersMustExist : Member 'public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole.SyncReplica.get()' does not exist in the implementation but it does exist in the contract. [/mnt/vss/_work/1/s/azure-sdk-for-net/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj::TargetFramework=netstandard2.0],
      info	[Changelog] /home/cloudtest/.nuget/packages/microsoft.dotnet.apicompat/5.0.0-beta.20467.1/build/Microsoft.DotNet.ApiCompat.targets(82,5): error : MembersMustExist : Member 'public Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole Azure.ResourceManager.PostgreSql.FlexibleServers.Models.PostgreSqlFlexibleServerReplicationRole.WalReplica.get()' does not exist in the implementation but it does exist in the contract. [/mnt/vss/_work/1/s/azure-sdk-for-net/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj::TargetFramework=netstandard2.0],
      info	[Changelog] /home/cloudtest/.nuget/packages/microsoft.dotnet.apicompat/5.0.0-beta.20467.1/build/Microsoft.DotNet.ApiCompat.targets(96,5): error : ApiCompat failed for '/mnt/vss/_work/1/s/azure-sdk-for-net/artifacts/bin/Azure.ResourceManager.PostgreSql/Debug/netstandard2.0/Azure.ResourceManager.PostgreSql.dll' [/mnt/vss/_work/1/s/azure-sdk-for-net/sdk/postgresql/Azure.ResourceManager.PostgreSql/src/Azure.ResourceManager.PostgreSql.csproj::TargetFramework=netstandard2.0]
    ️❌ azure-sdk-for-python-track2 failed [Detail]
    • Code Generator Failed [Logs]Release - Generate from d946e46. SDK Automation 14.0.0
      command	sh scripts/automation_init.sh ../azure-sdk-for-python_tmp/initInput.json ../azure-sdk-for-python_tmp/initOutput.json
      cmderr	[automation_init.sh] WARNING: Skipping azure-nspkg as it is not installed.
      command	sh scripts/automation_generate.sh ../azure-sdk-for-python_tmp/generateInput.json ../azure-sdk-for-python_tmp/generateOutput.json
      cmderr	[automation_generate.sh]
      cmderr	[automation_generate.sh] npm notice New minor version of npm available! 9.5.1 -> 9.6.7
      cmderr	[automation_generate.sh] npm notice Changelog: <https://github.com/npm/cli/releases/tag/v9.6.7>
      cmderr	[automation_generate.sh] npm notice Run `npm install -g npm@9.6.7` to update!
      cmderr	[automation_generate.sh] npm notice
      cmdout	[automation_generate.sh] [Autorest] warning | PreCheck/PropertyRedeclarationWarning | Schema 'FirewallRule' has a property 'systemData' that is already declared the parent schema 'Resource' but isn't significantly different. The property has been removed from FirewallRule
      cmdout	[automation_generate.sh] [Autorest] warning | PreCheck/PropertyRedeclarationWarning | Schema 'Server' has a property 'systemData' that is already declared the parent schema 'Resource' but isn't significantly different. The property has been removed from Server
      cmdout	[automation_generate.sh] [Autorest] fatal   | Error: 1 errors occured -- cannot continue.
      cmdout	[automation_generate.sh] [Autorest] fatal   | Process() cancelled due to failure
      cmdout	[automation_generate.sh] [Autorest] error   | Batch/Error | Failure during batch task - {"tag":"package-flexibleserver-2023-03-01-preview"}  -- Error: Plugin prechecker reported failure.
      cmdout	[automation_generate.sh] [Autorest] error   |   Error: Plugin prechecker reported failure.
      cmdout	[automation_generate.sh] [Autorest] error   | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
      cmdout	[automation_generate.sh] [Autorest] warning | PreCheck/PropertyRedeclarationWarning | Schema 'FirewallRule' has a property 'systemData' that is already declared the parent schema 'Resource' but isn't significantly different. The property has been removed from FirewallRule
      cmdout	[automation_generate.sh] [Autorest] warning | PreCheck/PropertyRedeclarationWarning | Schema 'Server' has a property 'systemData' that is already declared the parent schema 'Resource' but isn't significantly different. The property has been removed from Server
      cmdout	[automation_generate.sh] [Autorest] fatal   | Error: 1 errors occured -- cannot continue.
      cmdout	[automation_generate.sh] [Autorest] fatal   | Process() cancelled due to failure
      cmdout	[automation_generate.sh] [Autorest] error   | Batch/Error | Failure during batch task - {"tag":"package-flexibleserver-2023-03-01-preview"}  -- Error: Plugin prechecker reported failure.
      cmdout	[automation_generate.sh] [Autorest] error   |   Error: Plugin prechecker reported failure.
      cmdout	[automation_generate.sh] [Autorest] error   | Autorest completed with an error. If you think the error message is unclear, or is a bug, please declare an issues at https://github.com/Azure/autorest/issues with the error message you are seeing.
      cmdout	[automation_generate.sh] [Autorest]/mnt/vss/_work/1/s/azure-sdk-for-python_tmp/venv-sdk/auto_temp.json does not exist!!!Error happened during codegen
      error	Script return with result [failed] code [1] signal [null] cwd [azure-sdk-for-python]: sh scripts/automation_generate.sh
      warn	Skip package processing as generation is failed
    ️⚠️ azure-sdk-for-java warning [Detail]
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs]Release - Generate from d946e46. SDK Automation 14.0.0
      command	sh ./eng/scripts/automation_init.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
      command	generator automation-v2 ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    • ️✔️sdk/resourcemanager/postgresql/armpostgresql [View full logs]  [Release SDK Changes]
      info	[Changelog] ### Other Changes
      info	[Changelog]
      info	[Changelog] Total 0 breaking change(s), 0 additive change(s).
    • ️✔️sdk/resourcemanager/postgresql/armpostgresqlflexibleservers [View full logs]  [Release SDK Changes] Breaking Change Detected
      info	[Changelog] ### Breaking Changes
      info	[Changelog]
      info	[Changelog] - `IdentityTypeSystemAssigned` from enum `IdentityType` has been removed
      info	[Changelog]
      info	[Changelog] ### Features Added
      info	[Changelog]
      info	[Changelog] - New field `Network` in struct `ServerPropertiesForUpdate`
      info	[Changelog]
      info	[Changelog] Total 1 breaking change(s), 1 additive change(s).
    ️⚠️ azure-sdk-for-js warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from d946e46. SDK Automation 14.0.0
      command	sh .scripts/automation_init.sh ../azure-sdk-for-js_tmp/initInput.json ../azure-sdk-for-js_tmp/initOutput.json
      warn	File azure-sdk-for-js_tmp/initOutput.json not found to read
      command	sh .scripts/automation_generate.sh ../azure-sdk-for-js_tmp/generateInput.json ../azure-sdk-for-js_tmp/generateOutput.json
      warn	No file changes detected after generation
      warn	No package detected after generation
    ️⚠️ azure-resource-manager-schemas warning [Detail]
    • ⚠️Warning [Logs]Release - Generate from d946e46. Schema Automation 14.0.0
      command	.sdkauto/initScript.sh ../azure-resource-manager-schemas_tmp/initInput.json ../azure-resource-manager-schemas_tmp/initOutput.json
      cmderr	[initScript.sh] WARN old lockfile
      cmderr	[initScript.sh] npm WARN old lockfile The package-lock.json file was created with an old version of npm,
      cmderr	[initScript.sh] npm WARN old lockfile so supplemental metadata must be fetched from the registry.
      cmderr	[initScript.sh] npm WARN old lockfile
      cmderr	[initScript.sh] npm WARN old lockfile This is a one-time fix-up, please be patient...
      cmderr	[initScript.sh] npm WARN old lockfile
      warn	File azure-resource-manager-schemas_tmp/initOutput.json not found to read
      command	.sdkauto/generateScript.sh ../azure-resource-manager-schemas_tmp/generateInput.json ../azure-resource-manager-schemas_tmp/generateOutput.json
    • ️✔️postgresql [View full logs]  [Release Schema Changes]
    ️❌ azure-powershell failed [Detail]
    • Code Generator Failed [Logs]Release - Generate from d946e46. SDK Automation 14.0.0
      command	sh ./tools/SwaggerCI/init.sh ../azure-powershell_tmp/initInput.json ../azure-powershell_tmp/initOutput.json
      error	Script return with result [failed] code [2] signal [null] cwd [azure-powershell]: sh ./tools/SwaggerCI/init.sh
      warn	File azure-powershell_tmp/initOutput.json not found to read
      error	Fatal error: ENOENT: no such file or directory, open 'azure-powershell_tmp/generateInput.json'
      ENOENT: no such file or directory, open 'azure-powershell_tmp/generateInput.json'
      Error: ENOENT: no such file or directory, open 'azure-powershell_tmp/generateInput.json'
          at Object.openSync (node:fs:590:3)
          at Object.writeFileSync (node:fs:2202:35)
          at Object.exports.writeTmpJsonFile (/mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/utils/fsUtils.js:121:18)
          at workflowCallGenerateScript (/mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/automation/workflow.js:474:15)
          at workflowHandleReadmeMdOrTypeSpecProject (/mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/automation/workflow.js:205:46)
          at async Object.exports.workflowMain (/mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/automation/workflow.js:94:9)
          at async Object.exports.sdkAutoMain (/mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/automation/entrypoint.js:191:13)
          at async /mnt/vss/_work/1/a/unified-pipeline-runtime/private/openapi-sdk-automation/lib/cli/cli.js:20:18
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Apr 3, 2023

    Generated ApiView

    Language Package Name ApiView Link
    Go sdk/resourcemanager/postgresql/armpostgresql https://apiview.dev/Assemblies/Review/c38f2fc7a4fa439780e480d2d6b3e0b7
    Go sdk/resourcemanager/postgresql/armpostgresqlflexibleservers https://apiview.dev/Assemblies/Review/cab99b10d84f42aeb21054bd04c258c2
    Java azure-resourcemanager-postgresqlflexibleserver https://apiview.dev/Assemblies/Review/08d377b8b39e437795778f7984d9b014
    .Net Azure.ResourceManager.PostgreSql https://apiview.dev/Assemblies/Review/9a0354a5cd114ad2b2e0ed02242d3c46

    @ghost ghost added the PostgreSQL label Apr 3, 2023
    @AzureRestAPISpecReview AzureRestAPISpecReview added the BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required label Apr 12, 2023
    @openapi-workflow-bot
    Copy link

    Hi @ambrahma, one or multiple breaking change(s) is detected in your PR. Please check out the breaking change(s), and provide business justification in the PR comment and @ PR assignee why you must have these change(s), and how external customer impact can be mitigated. Please ensure to follow breaking change policy to request breaking change review and approval before proceeding swagger PR review.
    Action: To initiate an evaluation of the breaking change, create a new intake using the template for breaking changes. Addition details on the process and office hours are on the Breaking change Wiki.
    If you want to know the production traffic statistic, please see ARM Traffic statistic.
    If you think it is false positive breaking change, please provide the reasons in the PR comment, report to Swagger Tooling Team via https://aka.ms/swaggerfeedback.
    Note: To avoid breaking change, you can refer to Shift Left Solution for detecting breaking change in early phase at your service code repository.

    @chunyu3
    Copy link
    Member

    chunyu3 commented May 19, 2023

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @Wzb123456789
    Copy link
    Contributor

    Hi @ambrahma please fix the LintDiff failure.

    @ambrahma
    Copy link
    Member Author

    Hi @ambrahma please fix the LintDiff failure.

    This is now fixed

    @chunyu3 chunyu3 merged commit d946e46 into main May 22, 2023
    @chunyu3 chunyu3 deleted the ambrahma-postgresql-Microsoft.DBforPostgreSQL-2023-03-01-preview branch May 22, 2023 06:59
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Labels

    Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 Approved-LintDiff Approved-SdkBreakingChange-Go Approve the breaking change tracking for azure-sdk-for-go Approved-SdkBreakingChange-Python ARMReview ARMSignedOff <valid label in PR review process>add this label when ARM approve updates after review BreakingChangeReviewRequired <valid label in PR review process>add this label when breaking change review is required CI-BreakingChange-Go new-api-version PostgreSQL ReadyForApiTest <valid label in PR review process>add this label when swagger and service APIs are ready for test resource-manager

    Projects

    None yet

    Development

    Successfully merging this pull request may close these issues.