apigee / apigee-config-maven-plugin

apigee-config-maven-plugin
Apache License 2.0
55 stars 108 forks source link

Unable to deploy developer apps using maven #165

Closed sundarprince86 closed 1 year ago

sundarprince86 commented 1 year ago

Hi Team, We are trying to deploy apps using the maven plugins but we are getting the following error. We aren't sure whether it is plugin related issue because it was worked earlier. Could you please help on this one. We already raised a support case 1522965 with pom file as a reference. MicrosoftTeams-image

ssvaidyanathan commented 1 year ago

@sundarprince86 - could be a temp issue with the HTTP connection from the Management server. Is this still happening? Does not look like a plugin issue. Can you also try this on Postman or curl?

sundarprince86 commented 1 year ago

@ssvaidyanathan - We don't have any issue with the curl. When we are trying with the Maven plugin, we are able to create developer apps, but we are unable to update the developer apps, and we are still getting the same error as mentioned above.

Even if no changes are made to developerApps.json, it continues to fail due to apigee-config:apps, which is mentioned in the maven command as described below.

mvn -P${EIS_ENV} ${apigeeCredentials} -Dapigee.config.options=update -Dapigee.config.dir=${WORKSPACE}/${SOURCE_CODE_REPO_NAME}/resources/edge process-resources apigee-config:apps

Do we need to alter any POM actions? Please see the attached screenshot for your reference. There's also a POM snippet with the relevant developer actions.


                    <execution>
                        <id>create-config-app</id>
                        <phase>install</phase>
                        <goals>
                            <goal>apps</goal>
                        </goals>
                    </execution>

Jenkins Maven output for creating the developer app:

17:51:01  **** 17:51:01  Apigee App 17:51:01  **** 17:51:01  set proxy to example.org.uk:3128 17:51:01  Retrieving config from org/developerApps.json 17:51:01  Checking if developerApp - SageMaker-App-UAT-Temp exist 17:51:01   17:51:01   17:51:01   17:51:01  Request prepared for the server  17:51:01   ** 17:51:01  GET  https://api.enterprise.apigee.com/v1/organizations/xxxxxxxxx/developers/helloworld@apigee.com/apps/SageMaker-App-UAT-Temp 17:51:01  accept: [application/json] 17:51:01  accept-encoding: [gzip] 17:51:01  authorization: [Bearer [Not shown in log] 17:51:02  Creating App - SageMaker-App-UAT-Temp 17:51:02   17:51:02   17:51:02   17:51:02  Request prepared for the server  17:51:02   ** 17:51:02  POST  https://api.enterprise.apigee.com/v1/organizations/xxxxxxxxx/developers/helloworld@apigee.com/apps 17:51:02  accept: [application/json] 17:51:02  accept-encoding: [gzip] 17:51:02  authorization: [Bearer [Not shown in log] 17:51:02  content-type: application/json 17:51:02   [Request body] 17:51:02  {"displayName":"SageMaker-App-UAT-Temp","name":"SageMaker-App-UAT-Temp","callbackUrl":"https:\/\/xxxxx.example.org.uk\/apps\/login\/callback","scopes":[],"apiProducts":["SDAC-SageMaker-Product"]} 17:51:03  Response application/json 17:51:03  { 17:51:03    "appId" : "29e7157f-1ed1-4162-a47f-239398329892b", 17:51:03    "attributes" : [ ], 17:51:03    "callbackUrl" : "https://xxxxx.example.org.uk/apps/login/callback", 17:51:03    "createdAt" : 1675965062459, 17:51:03    "createdBy" : "xxxxx@example.org.uk", 17:51:03    "credentials" : [ { 17:51:03      "apiProducts" : [ { 17:51:03        "apiproduct" : "SDAC-SageMaker-Product", 17:51:03        "status" : "approved" 17:51:03      } ], 17:51:03      "attributes" : [ ], 17:51:03      "consumerKey" : "xxxxxxxxxxxxxxxxxxxx", 17:51:03      "consumerSecret" : "xxxxxxxxxxxxxxxxxxxx", 17:51:03      "expiresAt" : -1, 17:51:03      "issuedAt" : 1675965062564, 17:51:03      "scopes" : [ ], 17:51:03      "status" : "approved" 17:51:03    } ], 17:51:03    "developerId" : "7234562f-f8b8-49bb-9f96-2323b223v2322b", 17:51:03    "lastModifiedAt" : 1675965062459, 17:51:03    "lastModifiedBy" : "xxxxx@example.org.uk", 17:51:03    "name" : "SageMaker-App-UAT-Temp", 17:51:03    "scopes" : [ ], 17:51:03    "status" : "approved" 17:51:03  } 17:51:03  Create Success. 17:51:03  [INFO] ------------------------------------------------------------------------ 17:51:03  [INFO] BUILD SUCCESS 17:51:03  [INFO] ------------------------------------------------------------------------

ssvaidyanathan commented 1 year ago

can you email me the pom.xml, the mvn command when you try to update the app and the mvn logs?

sundarprince86 commented 1 year ago

Hi Sai, I have shared all the details in an email. Please check and let us know. Thanks

ssvaidyanathan commented 1 year ago

Closing this issue due to inactivity