Axway-API-Management-Plus / apim-cli

Axway API-Management CLI - Manage your platform from the command line or with your CI/CD pipeline
Apache License 2.0
46 stars 17 forks source link

Deployment of API from Azure Devops agent #518

Open olitho74 opened 2 weeks ago

olitho74 commented 2 weeks ago

APIM-CLI version

1.14.1

API-Management version

7.7.0.2022

Bug description

Hi,

I get an error sometines on our Test environment when deploying an API. I restart the pipeline, and then it works fine. The error message is :

2024-11-05 08:48:19,938 [APIManagerAPIMethodAdapter] WARN : No operations found for API with id: 0a3625de-cc5f-4e64-b3a1-c1c99f882766 2024-11-05 08:48:19,938 [APIManagerAPIMethodAdapter] WARN : No operations found for API with id: 0a3625de-cc5f-4e64-b3a1-c1c99f882766 2024-11-05 08:48:20,482 [APIManagerAPIAdapter] ERROR: Failed to download original API-Specification. You may use the toggle -useFEAPIDefinition to download the Frontend-API specification instead.

It looks like the swagger file has no operation. Just before the deployment with the CLI, there is a curl test on the /healthcheck endpoint of the backend API, and it works fine. I wonder what could cause this error.

The backend API is a REST API deployed in Openshift.

The message says to use the toggle useFEAPIDefinition . Is it something recommended ? Never used this before

Steps to reproduce

deploy API from CLI in Azure Devops

Relevant log output

2024-11-05 08:48:19,938 [APIManagerAPIMethodAdapter] WARN : No operations found for API with id: 0a3625de-cc5f-4e64-b3a1-c1c99f882766
2024-11-05 08:48:19,938 [APIManagerAPIMethodAdapter] WARN : No operations found for API with id: 0a3625de-cc5f-4e64-b3a1-c1c99f882766
2024-11-05 08:48:20,403 [APIManagerAPIAdapter] INFO : Loading application quotas for 3 subscribed applications.
2024-11-05 08:48:20,482 [APIManagerAPIAdapter] ERROR: Failed to download original API-Specification. You may use the toggle -useFEAPIDefinition to download the Frontend-API specification instead.
rathnapandi commented 2 weeks ago

Hi @olitho74,

Can you test with the latest version of CLI with debug enabled and share the logs? Also, share the following

  1. CLI command executed
  2. Total number of APIs in Test environment.
  3. Total number of org and apps.

I will try to test with that to reproduce the issue.

olitho74 commented 1 week ago

Hi, Ok, debug is activated. Next time I get the error, I come back here with the informations. thanks, Olivier