Hybrid deployment hangs when override option is used with apigee-enterprise:deploy

While deploying to hybrid the deploy command seems to continuously poll and never exits. We are using 2.0.3 version of apigee-edge-maven-plugin.

mvn apigee-enterprise:deploy -Ddeployment.suffix=cicd -Papigee -Denv=test1 -Dorg=apigee-hybrid-org1 -Dapigee.config.dir=target/resources/edge -Dapigee.config.options=create -Dapigee.config.exportDir=target/test/integration -Dapigee.api.port=-1 -Dapigee.api.host=apigee.googleapis.com -Dapigee.api.protocol=https -Dbearer=****

When I abort the job I see a bunch of polling requests going to https://apigee.googleapis.com/v1/organizations/apigee-hybrid-org1/environments/test1/apis/testapi/re....

Request prepared for the server

**************************

GET https://apigee.googleapis.com/v1/organizations/apigee-hybrid-org1/environments/test1/apis/testapi/re...

accept: [application/json]

accept-encoding: [gzip]

authorization: [Bearer [Not shown in log]

[DEBUG] returning deployed status: false

[INFO] Getting Deployment Info for Revision: 16

[INFO] Using the bearer token

[DEBUG] **Access Token** ****

[INFO]

If I hit the above deployments URL via Postman directly I get back a Http status 200 with a “Ready” in the state field. Also, if I check the deployment in the hybrid it seems to have deployed fine. Why is the plugin still polling?


Response directly hitting the url through Postman:

GET https://apigee.googleapis.com/v1/organizations/apigee-hybrid-org1/environments/test1/apis/testapi/re...

HTTP/1.1 200 OK Content-Type: application/json; charset=UTF-8

{

"environment": "test1",

"apiProxy": " testapi ",

"revision": "16",

"deployStartTime": "1599159903250",

"basePath": "/",

"state": "READY",

"instances": [

{

"instance": "2699201",

"deployedRevisions": [

{

"revision": "16",

"percentage": 100

}

],

"deployedRoutes": [

{

"basepath": "/.test",

"envgroup": "test1-group",

"environment": "test1",

"percentage": 100

}

]

}

]

}

Solved Solved
0 9 470
1 ACCEPTED SOLUTION

Will take a look into it. Have you pasted the entire response from the API call ? The plugin looks for the pods object within the response to see if its deploymentStatus is "Deployed" for each pod in the cluster. I am checking with the team if anything has changed. In the meanwhile if you don't want the plugin to poll, you can use the "async" option that just fires the deployment call and does not poll. Just update your "overrides" option to "async" option in the maven pom or in your maven command. Check the doc here. Will keep you posted on the polling as soon as I get some updates

View solution in original post

9 REPLIES 9

Will take a look into it. Have you pasted the entire response from the API call ? The plugin looks for the pods object within the response to see if its deploymentStatus is "Deployed" for each pod in the cluster. I am checking with the team if anything has changed. In the meanwhile if you don't want the plugin to poll, you can use the "async" option that just fires the deployment call and does not poll. Just update your "overrides" option to "async" option in the maven pom or in your maven command. Check the doc here. Will keep you posted on the polling as soon as I get some updates

Hybrid 1.3.

Yes, I did paste the entire response I got from the direct call into API.

The async option does work.

Hybrid 1.3.0 to be specific

I just got confirmation that the response has changed. The new response does not include pods. We can rely on the "state" field. I have opened a GitHub issue for the same. Will release a new version of the plugin and let you know. Until then pls use the async option. Thanks for bringing this up.

Deepa - v2.0.4 is out. Please update your pom and test it out.

Let me know if it works

It works. Thanks for the quick response/fix 🙂

Glad its fixed ! Thanks for reporting this

The problem with this solution is that 2.0.4 still not solves the issue of overriding a new revisión on a shared flow taht is used on an APY Proxy, It causes several problems in CI/CD made throws maven plugin and there is a lot diferent revisión of common shared flows on each environment of an organization.

Not sure if this is related to the issue reported. Appreciate if you can post a new question