cli icon indicating copy to clipboard operation
cli copied to clipboard

Feature Request - Support for changing buildpack without pushing new code

Open youngm opened this issue 7 years ago • 5 comments

This issue is a more direct reopen of https://github.com/cloudfoundry/cli/issues/785 most all of the things I requests in https://github.com/cloudfoundry/cli/issues/785 appear to be getting addressed in the v3 set of commands except for setting the buildpack. This issue is a request to add support for changing buildpack without pushing code and without creating a manifest with the new buildpack and applying it.

Example User Story: There is a user of CF who pushes applications named Bob. Bob has a NodeJS application with 2 environments. Test and Production. Bob hasn't pushed code to production for over 2 months. In that time Bob has been working on a major refactor of the application and has been regularly deploying to his Test environment. Bob discovers that the operator of his CF deployment, Mike, has updated the nodejs buildpack with some important security fixes. Bob decides to restage his production environment to include the latest security fixes. When bob restages, he discovers that his production application fails to startup again for some unknown reason. Bob calls Mike and Mike fixes the issue and uploads the fix as a new admin buildpack for Bob to try names "nodejs_buildpack_fix_for_bob". Mike asks Bob to try that buildpack. Bob informs Mike that he cannot change the buildpack because in order to do that he must use cf push. Bob didn't tag his git repository with the code version he is currently running in production so he doesn't know what commit he is running in production making it difficult for Bob try a different buildpack.

This scenario is actually quite common in my environments. If Mike could simply tell Bob to execute something like cf restage bobs_production_app -b nodejs_buildpack_fix_for_bob it would make Mike and Bob much happier users of CF.

Perhaps unlike some environments, my environments often have several different buildpacks for each platform. Here are some examples of multiple buildpacks:

  • In the case of java we have one for each java version (java8, java10, java7, etc) Sometimes users want to switch between them to debug issues or check compatibility.
  • We often deprecate old buildpacks by renaming them and ask users who wish to keep using the deprecated buildpack for a time to set their buildpack to the deprecated one.
  • We sometimes ask users to try a git url buildpack to see if it fixes a bug they are experiencing. Once resolved we ask them to switch back to the admin buildpack.

Scenarios like these are difficult to help users work through if they need to push source code to switch buildpack. Asking users to create manifests and apply a new buildpack that way isn't much easier to instruct users to do.

They CLI supports commands for setting all kinds of values on an application like health checks and such. Why not expose the ability to set the buildpack as well?

youngm avatar Jun 13 '18 15:06 youngm

We have created an issue in Pivotal Tracker to manage this:

https://www.pivotaltracker.com/story/show/158330425

The labels on this github issue will be updated when the story is started.

cf-gitbot avatar Jun 13 '18 15:06 cf-gitbot

cc @sclevine for visibility

abbyachau avatar Dec 11 '18 21:12 abbyachau

Hi @youngm thank you for this feature request. Could you please describe the solution you would ideally like to see for this request? Thanks.

abbyachau avatar Apr 24 '19 20:04 abbyachau

Hi @abbyachau. I'm not too picky. I think I would be happy if I could do it without using cf curl. I proposed adding it to cf restage above. But I really think I'd be happy with anything.

youngm avatar Apr 26 '19 02:04 youngm

This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed.

github-actions[bot] avatar Sep 27 '24 17:09 github-actions[bot]