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

Change storagecache name max length from 31 to 80 #8606

Merged
merged 5 commits into from
Jul 20, 2020

Conversation

jsmartt
Copy link
Contributor

@jsmartt jsmartt commented Mar 5, 2020

Related to Azure/azure-sdk-for-ruby#2759

This updates the storagecache name regex to support a maximum length of 80, not 31. This is consistent with the Azure console validation messages, and with my own experience creating caches with names up to 80 characters long. This confusion may have originated from cache storage target name restrictions of 31 characters, which is correct.

Latest improvements:

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

Contribution checklist:

  • I have reviewed the documentation for the workflow.
  • Validation tools were run on swagger spec(s) and have all been fixed in this PR.
  • The OpenAPI Hub was used for checking validation status and next steps.

ARM API Review Checklist

  • Service team MUST add the "WaitForARMFeedback" label if the management plane API changes fall into one of the below categories.
  • adding/removing APIs.
  • adding/removing properties.
  • adding/removing API-version.
  • adding a new service in Azure.

Failure to comply may result in delays for manifest application. Note this does not apply to data plane APIs.

  • If you are blocked on ARM review and want to get the PR merged urgently, please get the ARM oncall for reviews (RP Manifest Approvers team under Azure Resource Manager service) from IcM and reach out to them.
    Please follow the link to find more details on API review process.

@AutorestCI
Copy link

You don't have permission to trigger SDK Automation.
Please add yourself to Azure group from opensource portal if you are MSFT employee,
or please ask reviewer to add comment *** /openapibot sdkautomation ***.
Please ask tih@microsoft.com (or NullMDR in github) for additional help.

@azuresdkci
Copy link
Contributor

Can one of the admins verify this patch?

@njuCZ
Copy link
Contributor

njuCZ commented Mar 6, 2020

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 3 pipeline(s).

@openapi-sdkautomation
Copy link

openapi-sdkautomation bot commented Mar 6, 2020

azure-sdk-for-net - Release

⚠️ warning [Logs] [Expand Details]
  • ⚠️ Generate from 360699b with merge commit d88c95d. SDK Automation 13.0.17.20200619.4
    [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 Mar 6, 2020

azure-sdk-for-java - Release

⚠️ warning [Logs] [Expand Details]
  • ⚠️ Generate from 360699b with merge commit d88c95d. SDK Automation 13.0.17.20200619.4
  • ⚠️sdk/storagecache/mgmt-v2019_08_01 [View full logs]  [Release SDK Changes]
      [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
    • ️✔️sdk/storagecache/mgmt-v2019_11_01 [View full logs]  [Release SDK Changes]
    • ️✔️sdk/storagecache/mgmt-v2020_03_01 [View full logs]  [Release SDK Changes]

    @openapi-sdkautomation
    Copy link

    openapi-sdkautomation bot commented Mar 6, 2020

    azure-sdk-for-js - Release

    ️✔️ succeeded [Logs] [Expand Details]
    • ️✔️ Generate from 360699b with merge commit d88c95d. SDK Automation 13.0.17.20200619.4
    • ️✔️@azure/arm-storagecache [View full logs]  [Release SDK Changes]
      Only show 100 items here, please refer to log for details.
      [npmPack] npm WARN deprecated rollup-plugin-node-resolve@5.2.0: This package has been deprecated and is no longer maintained. Please use @rollup/plugin-node-resolve.
      [npmPack] npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
      [npmPack] npm WARN deprecated urix@0.1.0: 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 389ms
      [npmPack] npm notice 
      [npmPack] npm notice package: @azure/arm-storagecache@2.0.0
      [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 Mar 6, 2020

    azure-sdk-for-python - Release

    ️✔️ succeeded [Logs] [Expand Details]
    • ️✔️ Generate from 360699b with merge commit d88c95d. SDK Automation 13.0.17.20200619.4
    • ️✔️azure-mgmt-storagecache [View full logs]  [Release SDK Changes]
      [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'
      [breaking_change_setup] Ignoring mock: markers 'python_version <= "2.7"' don't match your environment
      [ChangeLog] Size of delta 5.800% size of original (original: 20519 chars, delta: 1190 chars)
      [ChangeLog] **Features**
      [ChangeLog] 
      [ChangeLog]   - Added operation group AscOperations

    @openapi-sdkautomation
    Copy link

    openapi-sdkautomation bot commented Mar 6, 2020

    azure-sdk-for-go - Release

    ️✔️ succeeded [Logs] [Expand Details]

    @njuCZ
    Copy link
    Contributor

    njuCZ commented Mar 11, 2020

    hello @jsmartt , becasue of the new CI rule, field with discriminator must be required. we should add required for field StorageTarget. Of course this is a problem of the original file, could you please fix this in your PR?

    @jsmartt
    Copy link
    Contributor Author

    jsmartt commented Mar 11, 2020

    @njuCZ, I think I found where to add the required field... but please verify. If it's not correct, please let me know a line number.

    @romahamu
    Copy link
    Contributor

    @jsmartt, @njuCZ
    There is a new version coming which has this change.
    #8403

    @jsmartt
    Copy link
    Contributor Author

    jsmartt commented Mar 12, 2020

    Great, thanks @romahamu. It looks like that PR has a new 2020-03-01 API version definition, but doesn't fix this one (2019-11-01). Unless I'm missing something...

    @njuCZ
    Copy link
    Contributor

    njuCZ commented Jul 14, 2020

    @jsmartt May I know the status of current PR? It seems long time no update and there is still a Semantic CI error needs to be addressed. If this PR is outdate, I am going to close it

    @jsmartt
    Copy link
    Contributor Author

    jsmartt commented Jul 14, 2020

    @njuCZ, yes, this is still valid. I can't speak to your testing process though. I see no reason that these changes would break any tests, so maybe there's an issue with the testing process, not this PR?

    @jsmartt jsmartt force-pushed the storagecache_name_max_length branch from 9b79acc to d9c9201 Compare July 14, 2020 14:54
    @openapi-pipeline-app
    Copy link

    openapi-pipeline-app bot commented Jul 14, 2020

    [Staging] Swagger Validation Report

    BreakingChange: 33 Errors, 0 Warnings [Detail] [Expand] Only 10 items are listed, please refer to log for more details.
    Rule Message
    1030 - DifferentDiscriminator The new version has a different discriminator 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
    1030 - DifferentDiscriminator The new version has a different discriminator than the previous one.
    New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1453:9
    Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1454:9
    1030 - DifferentDiscriminator The new version has a different discriminator than the previous one.
    New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1453:9
    Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1454:9
    1030 - DifferentDiscriminator The new version has a different discriminator 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
    1030 - DifferentDiscriminator The new version has a different discriminator than the previous one.
    New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1453:9
    Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1454:9
    1030 - DifferentDiscriminator The new version has a different discriminator 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
    1030 - DifferentDiscriminator The new version has a different discriminator than the previous one.
    New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1453:9
    Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1454:9
    1030 - DifferentDiscriminator The new version has a different discriminator 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
    1030 - DifferentDiscriminator The new version has a different discriminator than the previous one.
    New: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1453:9
    Old: Microsoft.StorageCache/stable/2019-11-01/storagecache.json#L1454:9
    1030 - DifferentDiscriminator The new version has a different discriminator 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
    ️✔️LintDiff [Detail]
     Validation passes for LintDiff. 
    ️✔️Avocado [Detail]
     Validation passes for Avocado. 
    Posted by Swagger Pipeline | How to fix these errors?

    @jsmartt
    Copy link
    Contributor Author

    jsmartt commented Jul 14, 2020

    @njuCZ, I've tried a few different ways to fix the semantic check, but I can't figure it out, and I don't think it's something that this PR introduces, but rather an existing issue with the file, or a change to the testing process after this file was created. Feel free to add a commit to fix those issues if you'd like, but I don't have the time to figure out the intricacies of the expected format. That gets a bit outside of the purpose of this PR, which is to fix a different issue that is affecting validations in the SDKs.

    @njuCZ
    Copy link
    Contributor

    njuCZ commented Jul 15, 2020

    @jsmartt just having a look at the pipeline, it says targetType in StorageTarget is a discriminator field, discriminator must be a required property, which cause this Semantic error. Could you please mark it as required in this swagger file?

    @jsmartt
    Copy link
    Contributor Author

    jsmartt commented Jul 15, 2020

    @njuCZ, can you provide a line number and the code to do so? I've tried a few different times to no avail.

    @njuCZ
    Copy link
    Contributor

    njuCZ commented Jul 16, 2020

    @jsmartt we could find error message here: https://dev.azure.com/azure-sdk/public/_build/results?buildId=457263&view=logs&jobId=95dbed5b-845d-57ba-33d3-f6c5e69afcf4&j=95dbed5b-845d-57ba-33d3-f6c5e69afcf4&t=44f1510e-a822-56b0-2e0b-241e0a387c6a

    which says

    ##[error]Semantically validating  specification/storagecache/resource-manager/Microsoft.StorageCache/stable/2019-11-01/storagecache.json:
    
     error : 
    code: OAV131
    error: DISCRIMINATOR_NOT_REQUIRED
    name: discriminator
    params:
      - targetType
    message: discriminator must be a required property.
    path:
      - 'definitions,StorageTarget'
    

    please check targetType field in this file, then mark it as required.

    it's not related with your PR, but the problem of the original file.

    to proceed with this PR, we need to fix it.

    @jsmartt
    Copy link
    Contributor Author

    jsmartt commented Jul 16, 2020

    @njuCZ, I've added a commit, but it's clearly not the correct fix. As I mentioned above, I've tried a few different ways to fix the semantic check, but I can't figure it out. Feel free to add a commit to fix those issues if you'd like, but I don't have the time to figure out the intricacies of the expected format. If you would like me to add fixes to this PR for other issues, please include the code you'd like me to add and the line number to add it to. This all is outside of the purpose of this PR, which is to fix a different issue that is affecting validations in the SDKs.

    @njuCZ
    Copy link
    Contributor

    njuCZ commented Jul 17, 2020

    @jsmartt jsmartt force-pushed the storagecache_name_max_length branch from db16136 to 4461db4 Compare July 17, 2020 17:41
    @jsmartt jsmartt force-pushed the storagecache_name_max_length branch from 4461db4 to 360699b Compare July 17, 2020 17:54
    @jsmartt
    Copy link
    Contributor Author

    jsmartt commented Jul 17, 2020

    @njuCZ, ok, I've added the requested change, and the semantic check is passing now. I had to move the location of the discriminator because it was in the wrong location; this places it in the same location as the updated spec.

    @njuCZ njuCZ added the Approved-BreakingChange DO NOT USE! OBSOLETE label. See https://github.com/Azure/azure-sdk-tools/issues/6374 label Jul 20, 2020
    @njuCZ
    Copy link
    Contributor

    njuCZ commented Jul 20, 2020

    /azp run

    @azure-pipelines
    Copy link

    Azure Pipelines successfully started running 3 pipeline(s).

    @openapi-sdkautomation
    Copy link

    openapi-sdkautomation bot commented Jul 20, 2020

    azure-sdk-for-python-track2 - Release

    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 Jul 20, 2020

    Trenton Generation - Release

    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 Jul 20, 2020

    Azure CLI Extension Generation - Release

    • Installation instruction for service storagecache [Preview Changes]
      az extension add --source=https://sdkautomation.blob.core.windows.net/sdkautomation-pipeline/Azure/azure-rest-api-specs/8606/azure-cli-extensions/Azure/azure-cli-extensions/storagecache/storagecache-0.1.0-py3-none-any.whl
    ️✔️ succeeded [Logs] [Expand Details]
    • ️✔️ Generate from 360699b with merge commit d88c95d. Azure CLI Automation 13.0.17.20200619.4
      [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]  [Release Azure CLI Changes]

    @njuCZ njuCZ merged commit d88c95d into Azure:master Jul 20, 2020
    ArcturusZhang added a commit to ArcturusZhang/azure-rest-api-specs that referenced this pull request Aug 14, 2020
    innosam pushed a commit to innosam/azure-rest-api-specs that referenced this pull request Aug 17, 2020
    00Kai0 pushed a commit to 00Kai0/azure-rest-api-specs that referenced this pull request Oct 12, 2020
    * Change storagecache name max length from 31 to 80
    
    * Require storagetarget param to create storagetarget for storagecache
    
    * Require StorageCache discriminator: targetType
    
    * Undo require StorageCache discriminator: targetType
    
    * Require StorageCache StorageTarget discriminator: targetType
    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
    Projects
    None yet
    Development

    Successfully merging this pull request may close these issues.

    5 participants