Carry app staging failure reason into ccdb

Improve the end user experience by providing a detailed message when
no buildpack detected an application.

* Add staging_failed_reason column to app to hold error key for well
  known staging errors.
* Populate staging failed reason with information from the staging
  response and use it when raising api errors from the instances
  endpoint.

[#68122384]
Improve expectations in service_instances_controller_spec to be less flakey

Signed-off-by: Nicholas Calugar <ncalugar@pivotallabs.com>
Revert commits that increased CC flakes.

Revert "Remove ModelManager in spec_helper"

This reverts commit 5d1bde0b0962065aeb933136fd9993a164e1ba79.

Revert "Added create hook to ModelManager"

This reverts commit 14dd29ed54fb58dbb066f6e5bebcf5ba7481cd5a.

Revert "Added cleanup of some leaky tests"

This reverts commit 9ea3b2f338eaa8bf116fcaeaab08467b8c51f4ef.

Revert "Fix broken spec"

This reverts commit 187640fffdec7b23460406a4ecc8b33b3999dbcf.

Revert "Re-enable non_transactional for a spec that broke"

This reverts commit f151c6512c41d7cc6d3713d085f4236e91c21172.

Revert "Mark a test that broke as non_transactional"

This reverts commit 53a993d92e287c83c7cd90b3cfc96735a2ca3436.

Revert "Reduce the amount of non-transactional tests"

This reverts commit 11665ccdbc21cc3e8bdf9c9dcf3d61ce4b5bb598.

Revert "Added buildpack test db cleanup"

This reverts commit ce65f7f8d580411caa5d69a7bf73958afc4face4.

Revert "Destroying Stacks instead of deleting them"

This reverts commit 10d0f59a36543acfc82c7b5ff6d59d033375ac4f.

Revert "Added ModelManager to handle cleaning up models"

This reverts commit 6bc264a8b8d453f87f1c608f35934d754467a133.

Revert "Refactored restage test to be transactional"

This reverts commit 33da98da3612c4fc304fb3e26aa7990fedf5d5c3.

Revert "Implement unauthenticated logic for /v2/service_plans and /v2/services"

This reverts commit 8729816ca32a5f9b72658fd234915ec498c97ebf.
Protect space spec from flakes

* Compare arrays ignoring order as we were seeing instances in which the order
  would be swapped

Signed-off-by: Nicholas Calugar <ncalugar@pivotallabs.com>
BlobstoreUrlGenerator stub is more resilient.

Signed-off-by: Nicholas Calugar <ncalugar@pivotallabs.com>
Use auto_savepoint rather than savepoint

* Recommended by Sequel. AutoSavepoint will ensure that every transaction will
* automatically use savepoints.

Signed-off-by: Nicholas Calugar <ncalugar@pivotallabs.com>
include routes in desire app message

Signed-off-by: Eric Malm <emalm@pivotallabs.com>
include health check timeout in diego desire msg

Signed-off-by: Eric Malm <emalm@pivotallabs.com>
Bump ruby version to 1.9.3-p545

[#71367862]

Signed-off-by: Michael Fraenkel <fraenkel@us.ibm.com>
Backfill tests for service_instance_access
Protect /v2/app/:guid/env to only allow SpaceDev

-Endpoint now only allows Admin and SpaceDeveloper access
-Create read_env action on AppAccess class
Fixed an app_access_spec test description

[#63076292]
App endpoint now returns redacted environment

[#63076292]
Validate system env contains only VCAP_SERVICES

[#71347276]
Reverted bump on API version
Allow service instances to be queried by organization guid.

using q=organization_guid:guid-id-123, the enumeration endpoint will
return all service instances that belong to that organization, even if
they are in different spaces, as long as the requestor has SpaceDeveloper
role for that space.

[#71185584]
Bump cc api version.

For allowing service instances to be queried by org guid.

[#71185584]
Change redaction value from string to key val

-Now { "redaction_message": "[PRIVATE DATA HIDDEN]"}

[finishes #63076292]
API version bump after rebase
Merge pull request #241 from sykesm/detect-failure-message

Carry app staging failure reason into ccdb