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 discriminator problem introduced by #8606 #10383

Closed

Conversation

ArcturusZhang
Copy link
Member

@ArcturusZhang ArcturusZhang commented Aug 7, 2020

This PR fixes the discriminator problem introduced by #8606 which is blocking the SDK upgrade in terraform-azurerm-provider - an object has a discriminator but does not have any sub-types.

I mimicked the pattern of the swagger in the same RP, introduce three new object: Nfs3TargetProperties, ClfsTargetProperties and UnknownTargetProperties. They have exactly the same properties as StorageTargetProperties and just use to serve the discriminator.

MSFT employees can try out our new experience at OpenAPI Hub - one location for using our validation tools and finding your workflow.

Contribution checklist:

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

ARM API Review Checklist

  • Ensure to check this box if one of the following scenarios meet updates in the PR, so that label “WaitForARMFeedback” will be added automatically to involve ARM API Review. Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs, all “removals” and “adding a new property” no more require ARM API review.

    • Adding new API(s)
    • Adding a new API version
    • Adding a new service
  • 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 there are following updates in the PR, ensure to request an approval from API Review Board as defined in the Breaking Change Policy.

  • Removing API(s) in stable version
  • Removing properties in stable version
  • Removing API version(s) in stable version
  • Updating API in stable version with Breaking Change Validation errors
  • Updating API(s) in preview over 1 year

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

@openapi-pipeline-app
Copy link

openapi-pipeline-app bot commented Aug 7, 2020

[Staging] Swagger Validation Report

BreakingChange: 24 Errors, 0 Warnings [Detail] [Expand] Only 10 items are listed, please refer to log for more details.
Rule Message
1032 - DifferentAllOf The new version has a different 'allOf' property than the previous one.
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L844:13
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L844:13
1032 - DifferentAllOf The new version has a different 'allOf' property than the previous one.
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1434:5
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1434:5
1032 - DifferentAllOf The new version has a different 'allOf' property than the previous one.
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L907:13
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L907:13
1032 - DifferentAllOf The new version has a different 'allOf' property than the previous one.
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1587:11
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1542:11
1032 - DifferentAllOf The new version has a different 'allOf' property than the previous one.
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L915:13
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L915:13
1032 - DifferentAllOf The new version has a different 'allOf' property than the previous one.
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L921:13
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L921:13
1033 - RemovedProperty The new version is missing a property found in the old version. Was 'type' renamed or removed?
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1442:7
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1437:7
1033 - RemovedProperty The new version is missing a property found in the old version. Was 'id' renamed or removed?
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1442:7
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1437:7
1033 - RemovedProperty The new version is missing a property found in the old version. Was 'type' renamed or removed?
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1442:7
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1437:7
1033 - RemovedProperty The new version is missing a property found in the old version. Was 'name' renamed or removed?
New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1442:7
Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1437:7
️✔️LintDiff [Detail]
 Validation passes for LintDiff. 
️✔️Avocado [Detail]
 Validation passes for Avocado. 
Posted by Swagger Pipeline | How to fix these errors?

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@ArcturusZhang ArcturusZhang added the DoNotMerge <valid label in PR review process> use to hold merge after approval label Aug 7, 2020
@ArcturusZhang
Copy link
Member Author

Please do not merge this PR until the corresponding service team had a look at this and approved.

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Aug 7, 2020

azure-sdk-for-go

️✔️ succeeded [Logs] [Expand Details]

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Aug 7, 2020

Azure CLI Extension Generation

  • Installation instruction for service storagecache [Preview Changes]
    az extension add --source=https://sdkautomation.blob.core.windows.net/sdkautomation-pipeline/Azure/azure-rest-api-specs/10383/azure-cli-extensions/Azure/azure-cli-extensions/storagecache/storagecache-0.1.0-py3-none-any.whl
⚠️ warning [Logs] [Expand Details]
  • ⚠️ Generate from c1d3172 with merge commit 7e80fb80df63a544541db637c7f0e3f62f9fb726. Azure CLI Automation 13.0.17.20200807.2
    [AutoRest] WARNING (PreCheck/AllOfWhenYouMeantRef): Schema 'Nfs3TargetProperties' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
    [AutoRest] WARNING (PreCheck/AllOfWhenYouMeantRef): Schema 'ClfsTargetProperties' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
    [AutoRest] WARNING (PreCheck/AllOfWhenYouMeantRef): Schema 'UnknownTargetProperties' is using an 'allOf' instead of a $ref. This creates a wasteful anonymous type when generating code.
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'ApiOperation-display' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'CacheIdentity' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'CacheNetworkSettings' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'CacheEncryptionSettings' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'CacheSecuritySettings' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'KeyVaultKeyReference' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'KeyVaultKeyReference-sourceVault' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'CacheHealth' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'StorageTargetResource' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'Nfs3Target' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'ClfsTarget' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'UnknownTarget' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'Restriction' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (PreCheck/SchemaMissingType): The schema 'ResourceSkusResult' with an undefined type and decalared properties is a bit ambigious. This has been auto-corrected to 'type:object'
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·100ptyt·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename·delete·responses·200·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·1bvw8on·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename·delete·responses·202·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·24g32l·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename·delete·responses·204·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·1iqfhng·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-flush·post·responses·200·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·1oc8mws·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-flush·post·responses·202·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·1rktvdu·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-flush·post·responses·204·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·td2r3u·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-start·post·responses·200·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·k1iw2·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-start·post·responses·202·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·vl0ni7·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-start·post·responses·204·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·1gqsuuf·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-stop·post·responses·200·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·dmq0s6·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-stop·post·responses·202·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·1xs99h4·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-stop·post·responses·204·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·1jql8zn·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-storagetargets-storagetargetname·delete·responses·200·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·15mgyyl·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-storagetargets-storagetargetname·delete·responses·202·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·1ak6trm·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-storagetargets-storagetargetname·delete·responses·204·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·ugozj·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-upgrade·post·responses·201·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·fiq97y·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-upgrade·post·responses·202·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (Modeler/MissingType): The schema 'paths·ky54tc·subscriptions-subscriptionid-resourcegroups-resourcegroupname-providers-microsoft-storagecache-caches-cachename-upgrade·post·responses·204·content·application-json·schema' has no type or format information whatsoever. Location:
    [AutoRest] WARNING (): cli.auto-parameter-hidden is not true, skip visibility cleaner
    [AutoRest] 
    [AutoRest] NO TEST SCENARIO PROVIDED - DEFAULT WILL BE USED
    [AutoRest] ADD FOLLOWING SECTION TO readme.cli.md FILE TO MODIFY IT
    [AutoRest] --------------------------------------------------------
    [AutoRest]   test-scenario:
    [AutoRest]     - name: /AscOperations/get/AscOperations_Get
    [AutoRest]     - name: /Caches/put/Caches_CreateOrUpdate
    [AutoRest]     - name: /Caches/get/Caches_Get
    [AutoRest]     - name: /Caches/get/Caches_List
    [AutoRest]     - name: /Caches/get/Caches_ListByResourceGroup
    [AutoRest]     - name: /Caches/post/Caches_Flush
    [AutoRest]     - name: /Caches/post/Caches_Start
    [AutoRest]     - name: /Caches/post/Caches_Stop
    [AutoRest]     - name: /Caches/post/Caches_UpgradeFirmware
    [AutoRest]     - name: /Caches/patch/Caches_Update
    [AutoRest]     - name: /Skus/get/Skus_List
    [AutoRest]     - name: /StorageTargets/put/StorageTargets_CreateOrUpdate
    [AutoRest]     - name: /StorageTargets/get/StorageTargets_Get
    [AutoRest]     - name: /StorageTargets/get/StorageTargets_List
    [AutoRest]     - name: /UsageModels/get/UsageModels_List
    [AutoRest]     - name: /Caches/delete/Caches_Delete
    [AutoRest]     - name: /StorageTargets/delete/StorageTargets_Delete
    [AutoRest] --------------------------------------------------------
  • ⚠️storagecache [View full logs
    No file is changed.

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Aug 7, 2020

azure-sdk-for-java

⚠️ warning [Logs] [Expand Details]
  • ⚠️ Generate from c1d3172 with merge commit 7e80fb80df63a544541db637c7f0e3f62f9fb726. SDK Automation 13.0.17.20200807.2
  • ⚠️sdk/storagecache/mgmt-v2019_08_01 [View full logs
      [mvn] [ERROR] COMPILATION ERROR : 
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[235,72] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[236,60] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[237,74] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[238,64] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[239,80] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.1:compile (default-compile) on project azure-mgmt-storagecache: Compilation failure: Compilation failure: 
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[235,72] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[236,60] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[237,74] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[238,64] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] /z/work/azure-sdk-for-java/sdk/storagecache/mgmt-v2019_08_01/src/main/java/com/microsoft/azure/management/storagecache/v2019_08_01/implementation/StorageCacheMgmtClientImpl.java:[239,80] incompatible types: com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheMgmtClientImpl cannot be converted to com.microsoft.azure.management.storagecache.v2019_08_01.implementation.StorageCacheManagementClientImpl
      [mvn] [ERROR] -> [Help 1]
      [mvn] [ERROR] 
      [mvn] [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
      [mvn] [ERROR] Re-run Maven using the -X switch to enable full debug logging.
      [mvn] [ERROR] 
      [mvn] [ERROR] For more information about the errors and possible solutions, please read the following articles:
      [mvn] [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoFailureException
      No file is changed.
    • ️✔️sdk/storagecache/mgmt-v2019_11_01 [View full logs]  [Preview SDK Changes]
    • ⚠️sdk/storagecache/mgmt-v2020_03_01 [View full logs
      No file is changed.

    @openapi-sdkautomation
    Copy link

    openapi-sdkautomation bot commented Aug 7, 2020

    azure-sdk-for-net

    ⚠️ warning [Logs] [Expand Details]
    • ⚠️ Generate from c1d3172 with merge commit 7e80fb80df63a544541db637c7f0e3f62f9fb726. SDK Automation 13.0.17.20200807.2
      [AutoRest] realpath(): Permission denied
      [AutoRest] realpath(): Permission denied
      [AutoRest] realpath(): Permission denied
      [AutoRest] realpath(): Permission denied
      [AutoRest] realpath(): Permission denied
      [AutoRest] realpath(): Permission denied
      Failed to find any diff after autorest so no changed packages was found.

    @openapi-sdkautomation
    Copy link

    openapi-sdkautomation bot commented Aug 7, 2020

    azure-sdk-for-js

    ⚠️ warning [Logs] [Expand Details]
    • ⚠️ Generate from c1d3172 with merge commit 7e80fb80df63a544541db637c7f0e3f62f9fb726. SDK Automation 13.0.17.20200807.2
    • ⚠️@azure/arm-storagecache [View full logs
      Only show 100 items here, please refer to log for details.
      [npmPack] npm WARN deprecated [email protected]: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
      [npmPack] npm WARN deprecated [email protected]: https://github.com/lydell/resolve-url#deprecated
      [npmPack] npm WARN deprecated [email protected]: Please see https://github.com/lydell/urix#deprecated
      [npmPack] npm notice created a lockfile as package-lock.json. You should commit this file.
      [npmPack] loaded rollup.config.js with warnings
      [npmPack] (!) Unused external imports
      [npmPack] default imported from external module 'rollup' but never used
      [npmPack] 
      [npmPack] ./esm/storageCacheManagementClient.js → ./dist/arm-storagecache.js...
      [npmPack] created ./dist/arm-storagecache.js in 367ms
      [npmPack] npm notice 
      [npmPack] npm notice package: @azure/[email protected]
      [npmPack] npm notice === Tarball Contents === 
      [npmPack] npm notice 93.9kB  dist/arm-storagecache.js                        
      [npmPack] npm notice 29.9kB  dist/arm-storagecache.min.js                    
      [npmPack] npm notice 1.9kB   esm/operations/ascOperations.js                 
      [npmPack] npm notice 453B    esm/models/ascOperationsMappers.js              
      [npmPack] npm notice 20.6kB  esm/operations/caches.js                        
      [npmPack] npm notice 735B    esm/models/cachesMappers.js                     
      [npmPack] npm notice 345B    esm/models/index.js                             
      [npmPack] npm notice 529B    esm/operations/index.js                         
      [npmPack] npm notice 30.7kB  esm/models/mappers.js                           
      [npmPack] npm notice 2.3kB   esm/operations/operations.js                    
      [npmPack] npm notice 480B    esm/models/operationsMappers.js                 
      [npmPack] npm notice 2.4kB   esm/models/parameters.js                        
      [npmPack] npm notice 998B    rollup.config.js                                
      [npmPack] npm notice 2.3kB   esm/operations/skus.js                          
      [npmPack] npm notice 511B    esm/models/skusMappers.js                       
      [npmPack] npm notice 2.0kB   esm/storageCacheManagementClient.js             
      [npmPack] npm notice 2.7kB   esm/storageCacheManagementClientContext.js      
      [npmPack] npm notice 10.2kB  esm/operations/storageTargets.js                
      [npmPack] npm notice 747B    esm/models/storageTargetsMappers.js             
      [npmPack] npm notice 2.4kB   esm/operations/usageModels.js                   
      [npmPack] npm notice 472B    esm/models/usageModelsMappers.js                
      [npmPack] npm notice 1.7kB   package.json                                    
      [npmPack] npm notice 457B    tsconfig.json                                   
      [npmPack] npm notice 185.4kB dist/arm-storagecache.js.map                    
      [npmPack] npm notice 26.5kB  dist/arm-storagecache.min.js.map                
      [npmPack] npm notice 791B    esm/operations/ascOperations.d.ts.map           
      [npmPack] npm notice 1.0kB   esm/operations/ascOperations.js.map             
      [npmPack] npm notice 215B    esm/models/ascOperationsMappers.d.ts.map        
      [npmPack] npm notice 228B    esm/models/ascOperationsMappers.js.map          
      [npmPack] npm notice 4.4kB   esm/operations/caches.d.ts.map                  
      [npmPack] npm notice 10.1kB  esm/operations/caches.js.map                    
      [npmPack] npm notice 388B    esm/models/cachesMappers.d.ts.map               
      [npmPack] npm notice 401B    esm/models/cachesMappers.js.map                 
      [npmPack] npm notice 14.6kB  esm/models/index.d.ts.map                       
      [npmPack] npm notice 246B    esm/operations/index.d.ts.map                   
      [npmPack] npm notice 126B    esm/models/index.js.map                         
      [npmPack] npm notice 261B    esm/operations/index.js.map                     
      [npmPack] npm notice 2.0kB   esm/models/mappers.d.ts.map                     
      [npmPack] npm notice 17.5kB  esm/models/mappers.js.map                       
      [npmPack] npm notice 1.0kB   esm/operations/operations.d.ts.map              
      [npmPack] npm notice 1.4kB   esm/operations/operations.js.map                
      [npmPack] npm notice 225B    esm/models/operationsMappers.d.ts.map           
      [npmPack] npm notice 238B    esm/models/operationsMappers.js.map             
      [npmPack] npm notice 588B    esm/models/parameters.d.ts.map                  
      [npmPack] npm notice 1.7kB   esm/models/parameters.js.map                    
      [npmPack] npm notice 1.0kB   esm/operations/skus.d.ts.map                    
      [npmPack] npm notice 1.4kB   esm/operations/skus.js.map                      
      [npmPack] npm notice 236B    esm/models/skusMappers.d.ts.map                 
      [npmPack] npm notice 249B    esm/models/skusMappers.js.map                   
      [npmPack] npm notice 811B    esm/storageCacheManagementClient.d.ts.map       
      [npmPack] npm notice 1.0kB   esm/storageCacheManagementClient.js.map         
      [npmPack] npm notice 523B    esm/storageCacheManagementClientContext.d.ts.map
      [npmPack] npm notice 1.4kB   esm/storageCacheManagementClientContext.js.map  
      [npmPack] npm notice 2.4kB   esm/operations/storageTargets.d.ts.map          
      [npmPack] npm notice 4.4kB   esm/operations/storageTargets.js.map            
      [npmPack] npm notice 404B    esm/models/storageTargetsMappers.d.ts.map       
      [npmPack] npm notice 417B    esm/models/storageTargetsMappers.js.map         
      [npmPack] npm notice 1.0kB   esm/operations/usageModels.d.ts.map             
      [npmPack] npm notice 1.4kB   esm/operations/usageModels.js.map               
      [npmPack] npm notice 227B    esm/models/usageModelsMappers.d.ts.map          
      [npmPack] npm notice 240B    esm/models/usageModelsMappers.js.map            
      [npmPack] npm notice 3.2kB   README.md                                       
      [npmPack] npm notice 1.8kB   esm/operations/ascOperations.d.ts               
      [npmPack] npm notice 3.3kB   src/operations/ascOperations.ts                 
      [npmPack] npm notice 143B    esm/models/ascOperationsMappers.d.ts            
      [npmPack] npm notice 414B    src/models/ascOperationsMappers.ts              
      [npmPack] npm notice 13.1kB  esm/operations/caches.d.ts                      
      [npmPack] npm notice 26.4kB  src/operations/caches.ts                        
      [npmPack] npm notice 425B    esm/models/cachesMappers.d.ts                   
      [npmPack] npm notice 735B    src/models/cachesMappers.ts                     
      [npmPack] npm notice 38.2kB  esm/models/index.d.ts                           
      [npmPack] npm notice 213B    esm/operations/index.d.ts                       
      [npmPack] npm notice 36.3kB  src/models/index.ts                             
      [npmPack] npm notice 497B    src/operations/index.ts                         
      [npmPack] npm notice 2.8kB   esm/models/mappers.d.ts                         
      [npmPack] npm notice 24.6kB  src/models/mappers.ts                           
      [npmPack] npm notice 2.1kB   esm/operations/operations.d.ts                  
      [npmPack] npm notice 4.2kB   src/operations/operations.ts                    
      [npmPack] npm notice 170B    esm/models/operationsMappers.d.ts               
      [npmPack] npm notice 446B    src/models/operationsMappers.ts                 
      [npmPack] npm notice 673B    esm/models/parameters.d.ts                      
      [npmPack] npm notice 2.4kB   src/models/parameters.ts                        
      [npmPack] npm notice 2.1kB   esm/operations/skus.d.ts                        
      [npmPack] npm notice 4.2kB   src/operations/skus.ts                          
      [npmPack] npm notice 201B    esm/models/skusMappers.d.ts                     
      [npmPack] npm notice 487B    src/models/skusMappers.ts                       
      [npmPack] npm notice 1.4kB   esm/storageCacheManagementClient.d.ts           

    @openapi-sdkautomation
    Copy link

    openapi-sdkautomation bot commented Aug 7, 2020

    azure-sdk-for-python

    ⚠️ warning [Logs] [Expand Details]
    • ⚠️ Generate from c1d3172 with merge commit 7e80fb80df63a544541db637c7f0e3f62f9fb726. SDK Automation 13.0.17.20200807.2
    • ⚠️azure-mgmt-storagecache [View full logs
      [build_conf] INFO:packaging_tools:Building template azure-mgmt-storagecache
      [build_conf] INFO:packaging_tools.conf:Skipping default conf since the file exists
      [build_conf] INFO:packaging_tools:Skipping CHANGELOG.md template, since a previous one was found
      [build_conf] INFO:packaging_tools:Template done azure-mgmt-storagecache
      [build_package] /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      [build_package]   warnings.warn(msg)
      [build_package] warning: no files found matching '*.py' under directory 'tests'
      [build_package] warning: no files found matching '*.yaml' under directory 'tests'
      [build_package] /usr/lib/python3.6/distutils/dist.py:261: UserWarning: Unknown distribution option: 'long_description_content_type'
      [build_package]   warnings.warn(msg)
      [build_package] warning: no files found matching '*.py' under directory 'tests'
      [build_package] warning: no files found matching '*.yaml' under directory 'tests'
      No file is changed.

    @openapi-sdkautomation
    Copy link

    openapi-sdkautomation bot commented Aug 7, 2020

    azure-sdk-for-python-track2

    No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

    @openapi-sdkautomation
    Copy link

    openapi-sdkautomation bot commented Aug 7, 2020

    Trenton Generation

    No readme.md specification configuration files were found that are associated with the files modified in this pull request, or swagger_to_sdk section in readme.md is not configured

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 1 pipeline(s).

    @romahamu
    Copy link
    Contributor

    Looks good, thank you.

    Copy link
    Contributor

    @ChenTanyi ChenTanyi left a comment

    Choose a reason for hiding this comment

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

    I think it should be better changed in generator rather than swagger. It is confused to add these three properties, since they are never used.

    @njuCZ
    Copy link
    Contributor

    njuCZ commented Aug 10, 2020

    @ChenTanyi these three fields are polymorphism of StorageTargetProperties in StorageTarget, there is som problem with the grammar of discriminator. we are just fixing them, not add new fields

    @ChenTanyi
    Copy link
    Contributor

    @njuCZ Since these three fields are exactly same, I don't think they bring any polymorphism.

    It is just used for fixing the generator bug, but I think generator bug should be fixed by change generator rather than swagger, since changing swagger will affect all SDK which would generate many useless fields.

    @ArcturusZhang
    Copy link
    Member Author

    Please refer to this PR as reference. This discriminator is by service team's design and exists in all the api-version, not just introduced by this PR.
    Previously this discriminator already exists but since it is not well-formed and ignored by the code generator - in this part I agree the code generator should be updated, it should throw an error rather than silently ignore the malformed discriminator.
    Here I must say that the service team has approved this, which indicates this not-so-reasonable discriminator is the result what the service team would like to see. If you have more questions, please go to the internal email thread and directly raise them to the service team. Thanks

    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    DoNotMerge <valid label in PR review process> use to hold merge after approval
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    5 participants