contraband / autopilot

cf plugin for hands-off, zero downtime application deploys
Apache License 2.0
130 stars 42 forks source link

Fix corner case when /v2/apps returns apps across all spaces. #22

Closed jcscottiii closed 8 years ago

jcscottiii commented 8 years ago

There's a corner case given a developer has access to multiple spaces where there are apps with the same name (despite having different routes). Prior to this patch, it would DoesAppExist would return false because it would see more than one app thus causing the script to deploy as a first time deploy which would really cause downtime if it's pushing to an existing app in the space. This patch will search for the apps and correlate between app and it's space and count them.

cc @adelevie

concourse-bot commented 8 years ago

Hi there!

We use Pivotal Tracker to provide visibility into what our team is working on. A story for this issue has been automatically created.

The current status is as follows:

This comment, as well as the labels on the issue, will be automatically updated as the status in Tracker changes.

evashort commented 8 years ago

Thanks for finding this edge case and figuring out how to fix it! We implemented a more succinct solution based on the pull request you submitted. Please let us know if it does not solve your problem.