Azure / azure-rest-api-specs

The source for REST API specifications for Microsoft Azure.
MIT License
2.61k stars 5.02k forks source link

Cognitive services has invalid readme that causes pipeline failures #18479

Open weshaggard opened 2 years ago

weshaggard commented 2 years ago

Example see https://github.com/Azure/azure-rest-api-specs/pull/18465 or the jobs at https://dev.azure.com/azure-sdk//internal/_build/results?buildId=1468888&view=logs&j=93811faa-026e-5426-72ec-2dc2b400fa28

Begin compare specification/cognitiveservices/data-plane/Language/readme.md : release_2022_03_01_preview
TypeError: Cannot read property 'startsWith' of undefined
    at Object.ResolveUri (/home/vsts/.autorest/@autorest_core@3.0.6375/node_modules/@autorest/core/dist/vendors-common_temp_node_modules_pnpm_azure-tools_eventing_3_0_252_node_modules_azure-tools_e-1bb884.js:2247:19)
    at Object.getBaseFolderUri (/home/vsts/.autorest/@autorest_core@3.0.6375/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:417:89)
##[error]Fatal error: {}
    at createConfigFromRawConfig (/home/vsts/.autorest/@autorest_core@3.0.6375/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:374:35)
    at Object.extendAutorestConfiguration (/home/vsts/.autorest/@autorest_core@3.0.6375/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:395:23)
    at AutorestContext.extendWith (/home/vsts/.autorest/@autorest_core@3.0.6375/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:661:55)
    at AutorestContext.getNestedConfiguration (/home/vsts/.autorest/@autorest_core@3.0.6375/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:652:28)
    at getNestedConfiguration.next (<anonymous>)
    at resolveExtensions (/home/vsts/.autorest/@autorest_core@3.0.6375/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:1275:67)
    at async ConfigurationLoader.CreateView (/home/vsts/.autorest/@autorest_core@3.0.6375/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:1379:13)
    at async AutoRest.RegenerateView (/home/vsts/.autorest/@autorest_core@3.0.6375/node_modules/@autorest/core/dist/src_lib_autorest-core_ts.js:94:30)

I believe this error is caused by some invalid formatting inside of the readme. While we need to also try and make this error message better and fix the tool (separate issue for that https://github.com/Azure/azure-sdk-tools/issues/3013) we also need to fix the readme.

@heaths @johanste can you guys please help figure out how to fix this readme?

@josefree this is an example of some new services coming in that we should work on getting their readme setup to follow the guidelines you are writing up.

johanste commented 2 years ago

Also, @mikekistler may be interested in the readme kerfuffle.

heaths commented 2 years ago

I have a few ideas what it could be I've been calling out in yet-unmerged PRs, but I can figure out what command that task is running and try it on iterations.

/cc @abhahn