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

mule-deployer not waiting for app to start #286

Open
jam01 opened this issue Mar 28, 2019 · 1 comment
Open

mule-deployer not waiting for app to start #286

jam01 opened this issue Mar 28, 2019 · 1 comment

Comments

@jam01
Copy link

jam01 commented Mar 28, 2019

The deploy goal for plugin 2.3.2 does not correctly verify that the application has been deployed and started.

https://github.com/mulesoft/mule-maven-plugin/blob/2.x/mule-deployer/src/main/java/org/mule/tools/verification/cloudhub/CloudHubDeploymentVerification.java#L52

includes a check for the json field deploymentUpdateStatus which seemingly creates a race condition. The field may not be available soon enough after requesting the deployment and subsequently requesting the status of the application.

Here's an example of the behavior

[INFO] Checking if application: app-name has started
[DEBUG] HTTP Request
GET https://anypoint.mulesoft.com/cloudhub/api/v2/applications/app-name
Accept: application/json
User-Agent: mule-deployer
Authorization: bearer ***
X-ANYPNT-ENV-ID: ***
X-ANYPNT-ORG-ID: ***


[DEBUG] HTTP response
200 OK
transfer-encoding: chunked
Server: nginx
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: GET, POST, DELETE, PUT, OPTIONS, HEAD
Connection: keep-alive
Date: Thu, 28 Mar 2019 21:06:07 GMT
Access-Control-Allow-Headers: Origin, Authorization, Accept, X-Requested-With, Content-Type, Access-Control-Request-Method, Access-Control-Request-Headers, x-anypnt-env-id, x-anypnt-org-id
Content-Type: application/json
{
  "versionId": "5c940db2d14c5813dac8f9c7",
  "domain": "app-name",
  "fullDomain": "app-name.us-e2.cloudhub.io",
  "properties": {
    "anypoint.platform.client_id": "****",
    "mule.env": "dev",
    "anypoint.platform.client_secret": "******************",
    "vault.secret": "****************"
  },
  "propertiesOptions": {
    "anypoint.platform.client_secret": {
      "secure": true
    },
    "vault.secret": {
      "secure": true
    }
  },
  "status": "STARTED",
  "workers": {
    "type": {
      "name": "Micro",
      "weight": 0.1,
      "cpu": "0.1 vCores",
      "memory": "500 MB memory"
    },
    "amount": 1,
    "remainingOrgWorkers": 1.9000000000000001,
    "totalOrgWorkers": 2.4
  },
  "workerStatuses": [
    {
      "id": "***",
      "host": "***",
      "port": 0,
      "status": "STARTED",
      "deployedRegion": "us-east-2",
      "staticIPEnabled": false
    }
  ],
  "lastUpdateTime": 1553806955134,
  "fileName": "mule-agent-tester-1.4.0-SNAPSHOT.zip",
  "muleVersion": {
    "version": "3.9.1",
    "updateId": "***",
    "endOfSupportDate": 1633737600000
  },
  "region": "us-east-2",
  "persistentQueues": false,
  "persistentQueuesEncryptionEnabled": false,
  "persistentQueuesEncrypted": false,
  "monitoringEnabled": true,
  "monitoringAutoRestart": true,
  "staticIPsEnabled": false,
  "hasFile": true,
  "secureDataGatewayEnabled": false,
  "loggingNgEnabled": true,
  "loggingCustomLog4JEnabled": false,
  "insightsReplayDataRegion": "us-east-2",
  "deploymentGroup": {
    "id": "***",
    "name": "US East (Ohio)"
  },
  "updateRuntimeConfig": false,
  "trackingSettings": {
    "trackingLevel": "DISABLED"
  },
  "logLevels": [    
  ],
  "ipAddresses": [    
  ]
}
[INFO] Artifact app-name deployed

@jam01
Copy link
Author

jam01 commented May 23, 2019

@julianpascualMuleSoft any news?

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

1 participant