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

cf update-buildpack takes negative value for position and gives success result #298

Closed
asifdxtreme opened this issue Nov 17, 2014 · 4 comments

Comments

@asifdxtreme
Copy link
Contributor

htipl@cf1:~/workspace/bosh-lite$ cf buildpacks
Getting buildpacks...

buildpack          position   enabled   locked   filename
java_buildpack     1          true      false    java-buildpack-v2.4.zip
ruby_buildpack     2          true      false    ruby_buildpack-offline-v1.1.0.zip
java_off           3          true      false    java-buildpack-offline-647c0bd.zip
nodejs_buildpack   4          true      false    nodejs_buildpack-offline-v1.0.1.zip
go_buildpack       5          true      false    go_buildpack-offline-v1.0.1.zip
python_buildpack   6          true      false    python_buildpack-offline-v1.0.1.zip
php_buildpack      7          true      false    php_buildpack-offline-v1.0.1.zip
htipl@cf1:~/workspace/bosh-lite$ cf update-buildpack java_off -i -6
Updating buildpack java_off...
OK
htipl@cf1:~/workspace/bosh-lite$ cf buildpacks
Getting buildpacks...

buildpack          position   enabled   locked   filename
java_off           1          true      false    java-buildpack-offline-647c0bd.zip
java_buildpack     2          true      false    java-buildpack-v2.4.zip
ruby_buildpack     3          true      false    ruby_buildpack-offline-v1.1.0.zip
nodejs_buildpack   4          true      false    nodejs_buildpack-offline-v1.0.1.zip
go_buildpack       5          true      false    go_buildpack-offline-v1.0.1.zip
python_buildpack   6          true      false    python_buildpack-offline-v1.0.1.zip
php_buildpack      7          true      false    php_buildpack-offline-v1.0.1.zip

cf update-buildpack java_off -i -6

cf update-buildpack takes the -i[POSITION] parameter as (-6) and gives successful result.

Expected Behaviour : - It should throw an error as an invalid position

@cf-gitbot
Copy link

We have created an issue in Pivotal Tracker to manage this. You can view the current status of your issue at: https://www.pivotaltracker.com/story/show/82828946.

@asifdxtreme
Copy link
Contributor Author

@goehmen

I think this issue should be handled by proper validation in the code so that cli can detect the negative input for POSITION and can warn the user about the invalid position.

@goehmen
Copy link
Contributor

goehmen commented Nov 20, 2014

Hi Asif:

Yes. The CLI team debated this last night at some length. We came to the conclusion that this is not a bug and that as a feature, it is something that members of the user community could be leveraging today. Thus rather than treating it as a bug and removing the ability to pass in any non-positive integer and expecting to have the buildpack assume the #1 position, we are going to simply word the messaging around this more strongly .

That story is currently in the pipeline so I'm going to close this issue. please reopen if the need arises.

@goehmen goehmen closed this as completed Nov 20, 2014
@asifdxtreme
Copy link
Contributor Author

@goehmen thanks for the clear explanation, I got your point

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

3 participants