See: [1] https://review.openstack.org/89935
When we create a new heat stack, we create a component to represent it within the assembly. On git push, the trigger workflow gets called. It then then calls the deployer service which currently tries to redeploy the assembly by creating a new heat stack instead of updating the existing one. The review[1] above works around a "stack already exists" error by using the Heat API to look up the Heat stack, and if it exists, to update it.
We should not query Heat. Instead we should store the stack_id in the component resource that is part of the assembly being updated. We should do a select on assembly+components (joined on assembly_id) to determine if we know the stack id, and if we do, then update it. If there is no stack_id yet, then create one.
Fix proposed to branch: master /review. openstack. org/96928
Review: https:/