Skip to content

Conversation

justin-braathen
Copy link
Contributor

information #798

#798

The current implementation of getApplicationInstances handles errors
like CF_BUILDPACK_COMPILED_FAILED and CF_INSTANCES_ERROR that can be
returned from CC if the staging previously failed. However, the general
StagingError (error code 170001) is not handled and will throw an
exception when fetching application instances.

I was able to confirm and verify that this resolves deployment issues (
CF-StagerError(170011) ) when making the following API call.

API Request

GET /v2/apps/<APP-GUID>/instances HTTP/1.1
host: api.pdc.np.sys.paas.lmig.com
authorization: bearer
user-agent: CloudFoundryJavaClient/unknown (Java; Oracle
Corporation/1.8.0_131) ReactorNetty/unknown (Netty/unknown)
accept: application/json
content-length: 0

API Response

HTTP/1.1 400 Bad Request
Content-Length: 133
Content-Type: application/json;charset=utf-8
Date: Tue, 15 Aug 2017 21:29:40 GMT
Server: nginx
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: <ID>
X-Vcap-Request-Id: <ID>
Connection: Keep-alive

{
  "description": "Staging error: cannot get instances since staging
failed",
  "error_code": "CF-StagingError",
  "code": 170001
}

There is a related issue with the Bamboo Cloud Foundry Plugin
(https://gaptap.atlassian.net/browse/CFBAMBOO-236) that is dependent on
this change.

The cf-java-client:2.17.0 doesn't have a target release date, would it
be possible to cut a patch-level release of cf-java-client:2.16.1?

information cloudfoundry#798

cloudfoundry#798

The current implementation of getApplicationInstances handles errors
like CF_BUILDPACK_COMPILED_FAILED and CF_INSTANCES_ERROR that can be
returned from CC if the staging previously failed. However, the general
StagingError (error code 170001) is not handled and will throw an
exception when fetching application instances.


I was able to confirm and verify that this resolves deployment issues (
_CF-StagerError(170011)_ )  when making the following API call.


**API Request**
```
GET /v2/apps/<APP-GUID>/instances HTTP/1.1
host: api.pdc.np.sys.paas.lmig.com
authorization: bearer
user-agent: CloudFoundryJavaClient/unknown (Java; Oracle
Corporation/1.8.0_131) ReactorNetty/unknown (Netty/unknown)
accept: application/json
content-length: 0
```


**API Response**
```
HTTP/1.1 400 Bad Request
Content-Length: 133
Content-Type: application/json;charset=utf-8
Date: Tue, 15 Aug 2017 21:29:40 GMT
Server: nginx
X-Content-Type-Options: nosniff
X-Vcap-Request-Id: <ID>
X-Vcap-Request-Id: <ID>
Connection: Keep-alive

{
  "description": "Staging error: cannot get instances since staging
failed",
  "error_code": "CF-StagingError",
  "code": 170001
}
```



There is a related issue with the Bamboo Cloud Foundry Plugin
(https://gaptap.atlassian.net/browse/CFBAMBOO-236) that is dependent on
this change.

The cf-java-client:2.17.0 doesn't have a target release date, would it
be possible to cut a patch-level release of cf-java-client:2.16.1?
@cfdreddbot
Copy link

Hey justin-braathen!

Thanks for submitting this pull request!

All pull request submitters and commit authors must have a Contributor License Agreement (CLA) on-file with us. Please sign the appropriate CLA (individual or corporate).

When sending signed CLA please provide your github username in case of individual CLA or the list of github usernames that can make pull requests on behalf of your organization.

If you are confident that you're covered under a Corporate CLA, please make sure you've publicized your membership in the appropriate Github Org, per these instructions.

Once you've publicized your membership, one of the owners of this repository can close and reopen this pull request, and dreddbot will take another look.

@nebhale
Copy link
Contributor

nebhale commented Aug 21, 2017

@justin-braathen we’re happy to take the contribution, but we’ll need you to sign the CLA for us to do so. Please let me know once you’ve submitted.

@nebhale nebhale self-requested a review August 21, 2017 14:13
@nebhale nebhale self-assigned this Aug 21, 2017
@nebhale nebhale added this to the 2.17.0.RELEASE milestone Aug 21, 2017
@justin-braathen
Copy link
Contributor Author

Thanks @nebhale! I am a member of the LibertyMutual organization (https://github.com/Libertymutual). I just publicized the relationship now and the organization has an active CLA on file with Cloud Foundry.

@nebhale nebhale closed this Aug 21, 2017
@nebhale nebhale reopened this Aug 21, 2017
@cfdreddbot
Copy link

Hey justin-braathen!

Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA.

nebhale pushed a commit that referenced this pull request Aug 21, 2017
The current implementation of getApplicationInstances handles errors like
CF_BUILDPACK_COMPILED_FAILED and CF_INSTANCES_ERROR that can be returned from
CC if the staging previously failed. However, the general StagingError (error
code 170001) is not handled and will throw an exception when fetching
application instances.

This change adds support for this error

[#799]
@nebhale nebhale closed this in 5bb6100 Aug 21, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants