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

[AppConfiguration] Add system metadata #13320

Closed
wants to merge 5 commits into from
Closed

[AppConfiguration] Add system metadata #13320

wants to merge 5 commits into from

Conversation

x9xu
Copy link
Contributor

@x9xu x9xu commented Mar 8, 2021

Update existing preview version for new feature for resource system metadata as required in ARM RPC.

@openapi-workflow-bot
Copy link

Hi, @x9xu 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. [email protected]

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Mar 8, 2021

    Swagger Validation Report

    ️❌BreakingChange: 2 Errors, 0 Warnings failed [Detail]

    Rule Message
    1041 - AddedPropertyInResponse The new version has a new property 'systemData' in response that was not found in the old version.
    New: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1048:7
    Old: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1048:7
    1045 - AddedOptionalProperty The new version has a new optional property 'systemData' that was not found in the old version.
    New: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1048:7
    Old: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1048:7
    ️️✔️LintDiff succeeded [Detail] [Expand]
    Validation passes for LintDiff.

    ️️✔️Avocado succeeded [Detail] [Expand]
    Validation passes for Avocado.
    ️❌ModelValidation: 26 Errors, 0 Warnings failed [Detail] Only 10 items are listed, please refer to log for more details.
    Rule Message
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: tags
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    JsonUrl: preview/2020-07-01-preview/examples/ConfigurationStoresList.json
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: location
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    JsonUrl: preview/2020-07-01-preview/examples/ConfigurationStoresList.json
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: tags
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    JsonUrl: preview/2020-07-01-preview/examples/ConfigurationStoresListByResourceGroup.json
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: location
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    JsonUrl: preview/2020-07-01-preview/examples/ConfigurationStoresListByResourceGroup.json
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: location
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    JsonUrl: preview/2020-07-01-preview/examples/ConfigurationStoresGet.json#L10
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: tags
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    JsonUrl: preview/2020-07-01-preview/examples/ConfigurationStoresGet.json#L10
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: location
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: tags
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: location
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    JsonUrl: preview/2020-07-01-preview/examples/ConfigurationStoresCreate.json#L19
    OBJECT_ADDITIONAL_PROPERTIES Additional properties not allowed: tags
    Url: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    JsonUrl: preview/2020-07-01-preview/examples/ConfigurationStoresCreate.json#L19
    ️❌SemanticValidation: 1 Errors, 0 Warnings failed [Detail]
    Rule Message
    OBJECT_MISSING_REQUIRED_PROPERTY_DEFINITION Missing required property definition: location
    JsonUrl: Microsoft.AppConfiguration/preview/2020-07-01-preview/appconfiguration.json#L1036
    ️️✔️[Staging] Cross Version BreakingChange (Base on preview version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️[Staging] Cross Version BreakingChange (Base on stable version) succeeded [Detail] [Expand]
    There are no breaking changes.
    ️️✔️CredScan succeeded [Detail] [Expand]
    There is no credential detected.
    ️⚠️[Staging] SDK Track2 Validation: 4 Warnings warning [Detail]

    Rule Message
    ⚠️ PreCheck/SchemaMissingType "readme":"appconfiguration/resource-manager/readme.md",
    "tag":"package-2020-07-01-preview",
    "details":"The schema 'ErrorDetails' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'"
    ⚠️ PreCheck/SchemaMissingType "readme":"appconfiguration/resource-manager/readme.md",
    "tag":"package-2020-07-01-preview",
    "details":"The schema 'ErrorAdditionalInfo' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'"
    ⚠️ PreCheck/SchemaMissingType "readme":"appconfiguration/resource-manager/readme.md",
    "tag":"package-2020-07-01-preview",
    "details":"The schema 'Resource' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'"
    ⚠️ PreCheck/CheckDuplicateSchemas "readme":"appconfiguration/resource-manager/readme.md",
    "tag":"package-2020-07-01-preview",
    "details":"Checking for duplicate schemas,
    this could take a (long) while. Run with --verbose for more detail."
    ️️✔️[Staging] PrettierCheck succeeded [Detail] [Expand]
    Validation passes for PrettierCheck.
    ️️✔️[Staging] SpellCheck succeeded [Detail] [Expand]
    Validation passes for SpellCheck.
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Mar 8, 2021

    Swagger Generation Artifacts

    ️️✔️[Staging] ApiDocPreview succeeded [Detail] [Expand]
     Please click here to preview with your @microsoft account. 
    ️️✔️ azure-powershell succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from cde7b7f810beb5eeee7e8f31dfcd74707378972a. SDK Automation 14.0.0
      command	sh ./tools/SwaggerCI/init.sh ../azure-powershell_tmp/initInput.json ../azure-powershell_tmp/initOutput.json
      command	pwsh ./tools/SwaggerCI/psci.ps1 ../azure-powershell_tmp/generateInput.json ../azure-powershell_tmp/generateOutput.json
    • ️✔️Az.AppConfiguration [View full logs]  [Preview SDK Changes]
    ️️✔️ azure-sdk-for-js succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from cde7b7f810beb5eeee7e8f31dfcd74707378972a. SDK Automation 14.0.0
      warn	Skip initScript due to not configured
      command	autorest --version=V2 --typescript --license-header=MICROSOFT_MIT_NO_VERSION [email protected]/[email protected] --typescript-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-js/azure-sdk-for-js ../../azure-rest-api-specs/specification/appconfiguration/resource-manager/readme.md
    • ️✔️@azure/arm-appconfiguration [View full logs]  [Preview SDK Changes]
      cmderr	[npmPack] loaded rollup.config.js with warnings
      cmderr	[npmPack] (!) Unused external imports
      cmderr	[npmPack] default imported from external module 'rollup' but never used
      cmderr	[npmPack] ./esm/appConfigurationManagementClient.js → ./dist/arm-appconfiguration.js...
      cmderr	[npmPack] created ./dist/arm-appconfiguration.js in 333ms
    ️⚠️ azure-sdk-for-python-track2 warning [Detail]
    • ⚠️Warning [Logs] Generate from cde7b7f810beb5eeee7e8f31dfcd74707378972a. 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
    • ️✔️track2_azure-mgmt-appconfiguration [View full logs]  [Preview SDK Changes] Breaking Change Detected
      info	[Changelog] **Features**
      info	[Changelog]
      info	[Changelog]   - Model ConfigurationStore has a new parameter system_data
      info	[Changelog]   - Model KeyValue has a new parameter id
      info	[Changelog]   - Model KeyValue has a new parameter type
      info	[Changelog]   - Model KeyValue has a new parameter name
      info	[Changelog]   - Model OperationDefinition has a new parameter is_data_action
      info	[Changelog]   - Model OperationDefinition has a new parameter properties
      info	[Changelog]   - Model OperationDefinition has a new parameter origin
      info	[Changelog]   - Added operation group KeyValuesOperations
      info	[Changelog]
      info	[Changelog] **Breaking changes**
      info	[Changelog]
      info	[Changelog]   - Model ConfigurationStoreUpdateParameters no longer has parameter public_network_access
      info	[Changelog]   - Removed operation ConfigurationStoresOperations.list_key_value
    ️⚠️ azure-sdk-for-java warning [Detail]
    • ⚠️Warning [Logs] Generate from cde7b7f810beb5eeee7e8f31dfcd74707378972a. SDK Automation 14.0.0
      command	./eng/mgmt/automation/init.sh ../azure-sdk-for-java_tmp/initInput.json ../azure-sdk-for-java_tmp/initOutput.json
      command	./eng/mgmt/automation/generate.py ../azure-sdk-for-java_tmp/generateInput.json ../azure-sdk-for-java_tmp/generateOutput.json
      cmderr	[generate.py] 2021-03-15 17:15:36 INFO [VERSION][Not Found] cannot find version for "com.azure.resourcemanager:azure-resourcemanager-appconfiguration"
      cmderr	[generate.py] 2021-03-15 17:15:36 INFO [VERSION][Not Found] cannot find stable version, current version "1.0.0-beta.1"
      cmderr	[generate.py] 2021-03-15 17:15:36 INFO autorest --version=3.1.3 --use=@autorest/[email protected] --java.azure-libraries-for-java-folder=/home/vsts/work/1/s/azure-sdk-for-java --java.output-folder=/home/vsts/work/1/s/azure-sdk-for-java/sdk/appconfiguration/azure-resourcemanager-appconfiguration --java.namespace=com.azure.resourcemanager.appconfiguration   --java --pipeline.modelerfour.additional-checks=false --pipeline.modelerfour.lenient-model-deduplication=true --azure-arm --verbose --sdk-integration --fluent=lite --java.fluent=lite --java.license-header=MICROSOFT_MIT_SMALL ../azure-rest-api-specs/specification/appconfiguration/resource-manager/readme.md
      cmderr	[generate.py] 2021-03-15 17:16:16 INFO [CI][Success] Write to ci.yml
      cmderr	[generate.py] 2021-03-15 17:16:16 INFO [POM][Process] dealing with pom.xml
      cmderr	[generate.py] 2021-03-15 17:16:16 INFO [POM][Success] Write to pom.xml
      cmderr	[generate.py] 2021-03-15 17:16:16 INFO [POM][Process] dealing with root pom
      cmderr	[generate.py] 2021-03-15 17:16:16 INFO [POM][Skip] pom already has module sdk/appconfiguration
      cmderr	[generate.py] 2021-03-15 17:16:16 INFO [POM][Success] Write to root pom
    • ️✔️azure-resourcemanager-appconfiguration [View full logs]  [Preview SDK Changes]
      cmderr	[Inst] 2021-03-15 17:18:43 DEBUG Got artifact_id: azure-resourcemanager-appconfiguration
      cmderr	[Inst] 2021-03-15 17:18:43 DEBUG Got artifact: pom.xml
      cmderr	[Inst] 2021-03-15 17:18:43 DEBUG Got artifact: azure-resourcemanager-appconfiguration-1.0.0-beta.1-sources.jar
      cmderr	[Inst] 2021-03-15 17:18:43 DEBUG Got artifact: azure-resourcemanager-appconfiguration-1.0.0-beta.1-javadoc.jar
      cmderr	[Inst] 2021-03-15 17:18:43 DEBUG Got artifact: azure-resourcemanager-appconfiguration-1.0.0-beta.1.jar
      cmderr	[Inst] 2021-03-15 17:18:43 DEBUG Match jar package: azure-resourcemanager-appconfiguration-1.0.0-beta.1.jar
      cmderr	[Inst] 2021-03-15 17:18:43 DEBUG output: {"full": "```sh\ncurl -L \"https://portal.azure-devex-tools.com/api/sdk-dl-pub?p=Azure/13320/azure-sdk-for-java/azure-resourcemanager-appconfiguration/azure-resourcemanager-appconfiguration-1.0.0-beta.1.jar\" -o azure-resourcemanager-appconfiguration-1.0.0-beta.1.jar\nmvn install:install-file -DgroupId=com.azure.resourcemanager -DartifactId=azure-resourcemanager-appconfiguration -Dversion=1.0.0-beta.0 -Dfile=azure-resourcemanager-appconfiguration-1.0.0-beta.1.jar -Dpackaging=jar -DgeneratePom=true
      ```"}
    ️⚠️ azure-sdk-for-python warning [Detail]
    • ⚠️Warning [Logs] Generate from cde7b7f810beb5eeee7e8f31dfcd74707378972a. 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
    • ️✔️azure-mgmt-appconfiguration [View full logs]  [Preview SDK Changes] Breaking Change Detected
      info	[Changelog] **Features**
      info	[Changelog]
      info	[Changelog]   - Model OperationDefinition has a new parameter properties
      info	[Changelog]   - Model OperationDefinition has a new parameter is_data_action
      info	[Changelog]   - Model OperationDefinition has a new parameter origin
      info	[Changelog]   - Model ConfigurationStore has a new parameter system_data
      info	[Changelog]   - Model KeyValue has a new parameter id
      info	[Changelog]   - Model KeyValue has a new parameter type
      info	[Changelog]   - Model KeyValue has a new parameter name
      info	[Changelog]   - Added operation group KeyValuesOperations
      info	[Changelog]
      info	[Changelog] **Breaking changes**
      info	[Changelog]
      info	[Changelog]   - Model ConfigurationStoreUpdateParameters no longer has parameter public_network_access
      info	[Changelog]   - Removed operation ConfigurationStoresOperations.list_key_value
    ️️✔️ azure-sdk-for-go succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from cde7b7f810beb5eeee7e8f31dfcd74707378972a. SDK Automation 14.0.0
      command	sh ./initScript.sh ../../../../../azure-sdk-for-go_tmp/initInput.json ../../../../../azure-sdk-for-go_tmp/initOutput.json
      command	go run ./tools/generator/main.go ../../../../../azure-sdk-for-go_tmp/generateInput.json ../../../../../azure-sdk-for-go_tmp/generateOutput.json
    • ️✔️appconfiguration/mgmt/2020-06-01/appconfiguration [View full logs]  [Preview SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️appconfiguration/mgmt/2019-10-01/appconfiguration [View full logs]  [Preview SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️preview/appconfiguration/mgmt/2020-07-01-preview/appconfiguration [View full logs]  [Preview SDK Changes]
      info	[Changelog] ### New Content
      info	[Changelog]
      info	[Changelog] - New const `Application`
      info	[Changelog] - New const `Key`
      info	[Changelog] - New const `ManagedIdentity`
      info	[Changelog] - New const `User`
      info	[Changelog] - New function `PossibleCreatedByTypeValues() []CreatedByType`
      info	[Changelog] - New struct `SystemData`
      info	[Changelog] - New field `SystemData` in struct `ConfigurationStore`
      info	[Changelog]
      info	[Changelog] Total 0 breaking change(s), 8 additive change(s).
      info	[Changelog]
    • ️✔️preview/appconfiguration/mgmt/2019-11-01-preview/appconfiguration [View full logs]  [Preview SDK Changes]
      info	[Changelog] No exported changes
    • ️✔️preview/appconfiguration/mgmt/2019-02-01-preview/appconfiguration [View full logs]  [Preview SDK Changes]
      info	[Changelog] No exported changes
    ️️✔️ azure-sdk-for-net succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from cde7b7f810beb5eeee7e8f31dfcd74707378972a. SDK Automation 14.0.0
      warn	Skip initScript due to not configured
      command	sudo apt-get install -y dotnet-sdk-5.0
      command	autorest --version=V2 --csharp --reflect-api-versions --license-header=MICROSOFT_MIT_NO_VERSION [email protected]/[email protected] --csharp-sdks-folder=/home/vsts/work/1/s/azure-sdk-for-net/sdk ../azure-rest-api-specs/specification/appconfiguration/resource-manager/readme.md
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
      cmderr	[Autorest] realpath(): Permission denied
    • ️✔️Microsoft.Azure.Management.AppConfiguration [View full logs]  [Preview SDK Changes]
      warn	Skip artifact folder because it doesn't exist: artifacts/packages
    ️️✔️ azure-resource-manager-schemas succeeded [Detail] [Expand]
    • ️✔️Succeeded [Logs] Generate from cde7b7f810beb5eeee7e8f31dfcd74707378972a. Schema Automation 14.0.0
      warn	Skip initScript due to not configured
      command	npx n 12
      command	autorest --use=@autorest/[email protected] --version=3.0.6374 --azureresourceschema --multiapi --title=none --pass-thru:subset-reducer --azureresourceschema-folder=/home/vsts/work/1/s/azure-resource-manager-schemas/azure-resource-manager-schemas ../../azure-rest-api-specs/specification/appconfiguration/resource-manager/readme.md
    • ️✔️appconfiguration [View full logs]  [Preview Schema Changes]
      cmderr	[resource-manager] node-pre-gyp
      cmderr	[resource-manager] WARN Using request for node-pre-gyp https download
      cmderr	[resource-manager] WARN [email protected] No repository field.
      cmderr	[resource-manager]  SKIPPING OPTIONAL DEPENDENCY: [email protected] (node_modules/fsevents):
      cmderr	[resource-manager] npm WARN notsup SKIPPING OPTIONAL DEPENDENCY: Unsupported platform for [email protected]: wanted {"os":"darwin","arch":"any"} (current: {"os":"linux","arch":"x64"})
    Posted by Swagger Pipeline | How to fix these errors?

    @openapi-workflow-bot
    Copy link

    Hi @x9xu, 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.

    @ruowan
    Copy link
    Member

    ruowan commented Mar 12, 2021

    Hi, could you pls refer this type

    .

    @openapi-workflow-bot
    Copy link

    NewApiVersionRequired reason:

    A service’s API is a contract with customers and is represented by using the api-version query parameter. Changes such as adding an optional property to a request/response or introducing a new operation is a change to the service’s contract and therefore requires a new api-version value. This is critically important for documentation, client libraries, and customer support.

    EXAMPLE: if a customer calls a service in the public cloud using api-version=2020-07-27, the new property or operation may exist but if they call the service in a government cloud, air-gapped cloud, or Azure Stack Hub cloud using the same api-version, the property or operation may not exist. Because there is no clear relationship between the service api-version and the new property/operation, customers can’t trust the documentation and Azure customer have difficulty helping customers diagnose issues. In addition, each client library version documents the service version it supports. When an optional property or new operation is added to a service and its Swagger, new client libraries must be produced to expose this functionality to customers. Without updating the api-version, it is unclear to customers which version of a client library supports these new features.

    @openapi-workflow-bot
    Copy link

    Hi @x9xu, Your PR has some issues. Please fix the CI sequentially by following the order of Avocado, semantic validation, model validation, breaking change, lintDiff.

    TaskHow to fixPrioritySupport (Microsoft alias)
    AvocadoFix-AvocadoHighruowan
    Semantic validationFix-SemanticValidation-ErrorHighraychen, jianyxi
    Model validationFix-ModelValidation-ErrorHighraychen,jianyxi
    LintDiffFix-LintDiffhighjianyxi, ruoxuan
    If you need further help, please feedback via swagger feedback."

    @ruowan
    Copy link
    Member

    ruowan commented Mar 16, 2021

    It's known issue for model validation and semantic validation. This is caused by duplicated model name defined in local swagger and referenced types.json from common-types folder (usually 'Resource' model).

    Because you are updating existing api-version. Could you add suppression for this api-version?

    How to add suppression in readme.md
    - model validation or semantic validation like this:
    ## Suppression
    ``` yaml
    directive:
    - suppress: READONLY_PROPERTY_NOT_ALLOWED_IN_REQUEST
    where:
    - $.definitions.EnvironmentUpdateParameters.properties.kind
    - $.definitions.EventSourceUpdateParameters.properties.kind
    from: timeseriesinsights.json
    reason: This property is the discriminator for polymorph, but it cannot be in request body.

    @jimmyca15
    Copy link
    Member

    Replaced by #13490

    @jimmyca15 jimmyca15 closed this Mar 24, 2021
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    4 participants