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

[BUG] Could not read OpenAPI specification #423

Closed
lrlemos opened this issue Nov 23, 2023 · 5 comments
Closed

[BUG] Could not read OpenAPI specification #423

lrlemos opened this issue Nov 23, 2023 · 5 comments

Comments

@lrlemos
Copy link

lrlemos commented Nov 23, 2023

Release version

v4.10.1

Describe the bug

This week, my apiops "publish" pipeline stopped working. I have an old process that uses Development Resource Kit, which also stopped working. I believe there was some update to the APIM platform that caused the problem

Expected behavior

Deploy with success

Actual behavior

Error using APIOPs

info: Publisher[0]
Beginning execution...
info: Publisher[0]
Commit ID was not specified, will put all artifact files...
info: Microsoft.Hosting.Lifetime[0]
Application started. Press Ctrl+C to shut down.
info: Microsoft.Hosting.Lifetime[0]
Hosting environment: Production
info: Microsoft.Hosting.Lifetime[0]
Content root path: /home/vsts/work/1/s
info: Publisher[0]
Putting API azure-ai-language...
crit: Publisher[0]
System.IO.IOException: Could not read OpenAPI specification file /home/vsts/work/1/s/artifacts/apis/azure-ai-language/specification.yaml.
at publisher.Api.GetOpenApiV3SpecificationText(OpenApi openApiSpecificationFile)
at publisher.Api.GetApiSpecificationJson(ApiSpecificationFile specificationFile, CancellationToken cancellationToken)
at publisher.Api.GetApiJson(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, CancellationToken cancellationToken)
at publisher.Api.PutApi(ApiName apiName, ApiInformationFile apiInformationFile, ApiSpecificationFile specificationFile, JsonObject configurationApiJson, ServiceUri serviceUri, PutRestResource putRestResource, ILogger logger, CancellationToken cancellationToken)
at publisher.Api.<>c__DisplayClass23_0.<b__4>d.MoveNext()
--- End of stack trace from previous location ---

=================================================================
Error using Development Resource Kit

  • az deployment group create --resource-group --parameters ../parameters/apim-parameters-tst.json --template-file apim-api.template.json --parameters PolicyXMLBaseUrl=/ PolicyXMLSasToken=<token

ERROR: {"status":"Failed","error":{"code":"DeploymentFailed","message":"At least one resource deployment operation failed. Please list deployment operations for details. Please see https://aka.ms/arm-deployment-operations for usage details.","details":[{"code":"BadRequest","message":"{\r\n "error": {\r\n "code": "ValidationError",\r\n "message": "One or more fields contain incorrect values:",\r\n "details": [\r\n {\r\n "code": "ValidationError",\r\n "target": "value",\r\n "message": "Error downloading document from the provided link."\r\n }\r\n ]\r\n }\r\n}"},{"code":"BadRequest","message":"{\r\n "error": {\r\n "code": "ValidationError",\r\n "message": "One or more fields contain incorrect values:",\r\n "details": [\r\n {\r\n "code": "ValidationError",\r\n "target": "value",\r\n "message": "Error downloading document from the provided link."\r\n }\r\n ]\r\n }\r\n}"}]}}

Reproduction Steps

1 - Execute Extrator from DEV environment
2 - Execute publisher to TST environment

Copy link

  Thank you for opening this issue! Please be patient while we will look into it and get back to you as this is an open source project. In the meantime make sure you take a look at the [closed issues](https://github.com/Azure/apiops/issues?q=is%3Aissue+is%3Aclosed) in case your question has already been answered. Don't forget to provide any additional information if needed (e.g. scrubbed logs, detailed feature requests,etc.).
  Whenever it's feasible, please don't hesitate to send a Pull Request (PR) our way. We'd greatly appreciate it, and we'll gladly assess and incorporate your changes.

@lrlemos
Copy link
Author

lrlemos commented Nov 29, 2023

We found local error here. Issue Cancelled

@lrlemos lrlemos closed this as not planned Won't fix, can't repro, duplicate, stale Nov 29, 2023
@leopardorossi
Copy link

leopardorossi commented Feb 9, 2024

Hi @lrlemos, I am experiencing the same issue. Can you please tell me what was your local problem? Maybe it is the same is blocking my pipeline. Thank you very much.

@lrlemos
Copy link
Author

lrlemos commented Feb 9, 2024 via email

@megamax34
Copy link

I had this issue as well but my problem was when I ran the extractor pipeline with API_SPECIFICATION_FORMAT = OpenAPIV2Yaml I got the error above when trying to publish. To fix the issue, I ran the pipeline again with API_SPECIFICATION_FORMAT = OpenAPIV3Yaml and the publisher pipeline worked fine after that.

Error line:
crit: Publisher[0]
System.IO.IOException: Could not read OpenAPI specification file /home/vsts/work/1/s/artifacts/apis/xxxxxxxxx-api/specification.yaml.
at publisher.Api.GetOpenApiV3SpecificationText(OpenApi openApiSpecificationFile)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants