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
**************************
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:
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! Go to 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