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

App env vars and service binding changes aren't reverted for failed rolling deployment #360

Closed
beyhan opened this issue Dec 1, 2023 · 1 comment

Comments

@beyhan
Copy link
Member

beyhan commented Dec 1, 2023

Issue

A rolling update which is canceled because of an application issue (e.g. failed start) will revert to the latest known droplet version but any changes to environment variables or service bindings will not be reverted.

Steps to Reproduce

  1. Deploy a slightly modified version of the spring-music app which introduces a version and a new env var called TEST by following the instructions available on the readme.
  2. Verify that https://<apphost>/appinfo shows {"profiles":["http2"],"services":[],"version":"1.0.0"} and https://<apphost>/envVarTest shows false
  3. Create a service instance from any type with the name test
  4. Deploy with cf push --strategy rolling another version of the spring-music app which can't start and introduces changes to the app version, the value of the TEST env var and a binding to the test service instance.
  5. The cf push --strategy rolling will fail and with cf droplets <my-app> you can check that the latest droplet isn't the current one, but cf env <my-app> will show the updated version of the env var and that the app is bound to the test service.
  6. Restart the app with cf restart <my-app> Verify that https://<apphost>/appinfo shows {"profiles":["http2"],"services":["test"],"version":"1.0.0"} and https://<apphost>/envVarTest shows true.

Expected result

The env var and service binding changes are not applied for failed rolling deployments.

Current result

Currently the env var and service binding changes are applied to the application.

Possible Fix

One option could be to use the Cloud Foundry API app revisions to revert to the last known good version in such a situation.

@beyhan
Copy link
Member Author

beyhan commented Dec 1, 2023

I noticed to late that this is the wrong repository. Closing in favour of cloudfoundry/cloud_controller_ng#3531

@beyhan beyhan closed this as completed Dec 1, 2023
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