cli icon indicating copy to clipboard operation
cli copied to clipboard

Regression on CliCommandWithoutTerminalOutput function for plugin creation

Open ArthurHlt opened this issue 10 years ago • 11 comments

The function CliCommandWithoutTerminalOutput send back now an array with only one entry which contains all the result instead of return an array with one entry by line.

That's break any plugin which parse output from this result, i can identify for example plugin open or manifest-generator.

The commit and line which break the previous behaviour came from this: https://github.com/cloudfoundry/cli/commit/c7e946e2527216b9705deeaa871087da5163aaf6#diff-04f2b4dc8b760116bdc10b11eb8c5975R191 My 2 cents will be to replace this line of code by this line of code v := strings.Split(cmd.outputBucket.String(), "\n")

CLI Version

6.17+

ArthurHlt avatar Jun 22 '16 21:06 ArthurHlt

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

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

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

cf-gitbot avatar Jun 22 '16 21:06 cf-gitbot

This has also broken jthomas/copyenv.

jthomas avatar Jun 23 '16 12:06 jthomas

@ArthurHlt @jthomas Thanks for reporting. FYI, the issue is currently scheduled to be addressed in the upcoming cf CLI release.

dkoper avatar Jun 27 '16 00:06 dkoper

@dkoper you're welcome, that's sound good, thank you

ArthurHlt avatar Jun 27 '16 07:06 ArthurHlt

@ArthurHlt @jthomas We have fixed this issue in the latest edge release. Please let us know if you encounter anything else.

n4wei avatar Jun 28 '16 17:06 n4wei

This has been fixed in cf CLI 6.20.0. https://github.com/cloudfoundry/cli#downloads

Thanks for bringing it to our attention!

Regards, Dies Koper CF CLI PM

dkoper avatar Jun 30 '16 00:06 dkoper

I've just upgraded and re-tested my plugin but it's still broken. I'll have to dig into the code and find out why...

jthomas avatar Jun 30 '16 08:06 jthomas

@dkoper you're welcome, everything seems to work fine now, thank you

ArthurHlt avatar Jun 30 '16 09:06 ArthurHlt

Hi @jthomas ,

I'm sorry, I only tested the open and generate-manifest plugins, both on the previous and edge releases. With the latter it was clear our fixed worked. With the open plugin I wasn't sure (didn't see anything happen, but I was ssh'ed into a test machine without a browser so not sure what to expect).

I just tried your plugin and notice it fails with error: missing service credentials for application. There is not enough for information for me to investigate further. Please submit a new issue if you find another issue in the CLI - with our system, comments on closed GH issues linked to accepted stories are easily missed.

Regards, Dies Koper CF CLI PM

dkoper avatar Jun 30 '16 09:06 dkoper

6.20.0 seems to be still broken Please have a look at: https://github.com/bluemixgaragelondon/cf-blue-green-deploy/issues/11 It stops working since 6.17.0 and does not work with 6.20.0.

giner avatar Jul 14 '16 10:07 giner

@giner Please submit a new issue if you find another issue in the CLI - with our system, comments on closed GH issues are easily missed and can't be prioritized.

dkoper avatar Jul 23 '16 00:07 dkoper