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

6.52: Unable to run cf push: "No API endpoint set. Use 'cf login' or 'cf api' to target an endpoint" #2033

Closed
3 of 4 tasks
vpicone opened this issue Aug 27, 2020 · 13 comments
Closed
3 of 4 tasks
Labels

Comments

@vpicone
Copy link

vpicone commented Aug 27, 2020

  • I reviewed open and closed github issues that may be related to my problem.
  • I tried updating to the latest version of the CF CLI to see if it fixed my problem.
  • I attempted to run the command with CF_TRACE=1 to help debug the issue.
  • I am reporting a bug that others will be able to reproduce.

Describe the bug and the command you saw an issue with
Our CI deployment action suddenly started failing once 6.52 was released. Nothing else has changed with our deployment config in months. Pinning to 6.51 fixed the issue for us: successful run after pinning CF to 6.51

Expected behavior
Should be able to login with the same credentials as 6.51

Screen Shot 2020-08-27 at 4 26 11 PM

@cf-gitbot
Copy link

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

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

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

@jeffchew
Copy link

@vpicone I wish I found this issue 5 hours ago (when you reported it), our team ran into this same issue and discovered that downgrading to v6.51.0 fixed the issue. Came here to report our findings but you beat me to it!

asudoh added a commit to asudoh/action-ibmcloud-cf that referenced this issue Aug 28, 2020
This change locks down the CF CLI version to `6.51.0`, due to
cloudfoundry/cli#2033.

Adds support for the following options:

* `cf-api` The CloudFoundry API entrypoint
* `cf-group`: The resource group name
@heyjcollins
Copy link
Contributor

Hey there @vpicone - thanks for reporting this issue.
I'm not absolutely sure, but have a hunch that your issue may be related to the fact that we bumped the config as part of the work we did to enable Legacy plugins use Log Cache.

As per the v6.52.0 release notes, CLI users that previously targeted and logged into their foundations before updating to the v6.52.0 CLI version may be required to to re-login & target in order to initialize the updated config.

Is this happening outside of your ci pipelines as well - even after re-login & target?

Please let us know once you've got more info.

@neumannrf
Copy link

@heyjcollins Yes, the error described above happens even if I login and target again. Apparently it erases the config created by these two commands.

l2fprod added a commit to l2fprod/bxshell that referenced this issue Aug 31, 2020
@damache
Copy link

damache commented Sep 2, 2020

we had this issue when running builds in travis. We had to force 6.51 when installing as a plugin to the the ibmcloud cli... ibmcloud cf install -v 6.51.0 -f. any update on a fix?

@marek5050
Copy link

Hello all,
We are having the same problems here when using our automated CI/CD pipeline.

@heyjcollins
Copy link
Contributor

Thanks for the responses @marek5050 @damache @l2fprod @neumannrf @jeffchew @vpicone,

Could you please provide us with the exact commands you're running which lead to this error?

Also - in each of your cases, is there a wrapper on the cf CLI?
We suspect that may have something to do with the logging out and logging back in and retargeting solution NOT solving the problem.

@l2fprod
Copy link

l2fprod commented Sep 3, 2020

@heyjcollins

In my case, I'm calling ibmcloud cf apps -- so yes ibmcloud here acts as a wrapper for the CF CLI.

@damache
Copy link

damache commented Sep 4, 2020

@heyjcollins

below is our Travis build script and the corresponding log. the before_deploy block is where it fails.

travis_fail.txt
travis_fail2.log

Logging back in after every command keep it going until I executed an external script to run a blue green deploy to CF. Then it failed there for the same issue. Adding the restriction to the 6.51 install fixed the build.

@nickjameswebb
Copy link
Contributor

Hi IBM friends, we haven't been able to reproduce this with v6.52.0. It's worth noting though that we are using the cf cli directly, and not using the ibmcloud wrapper. We are unfamiliar with ibmcloud so we are wondering if anyone has been able to reproduce this issue with direct CF CLI commands? Also, if anyone could reproduce with CF_TRACE=true environment variable set that would help us with debugging.

cc @a-b

@archerzz
Copy link

The root cause is that staring in CF CLI 6.52.0 the version of config data has been bumped to v4. But IBM Cloud CLI is still saving the config data as v3. So the config data will be cleared by CF CLI afterwards, thus resulting in No API endpoint set error.
We'll fix this by detecting and loading the correct version of config data. Here is the item filed: IBM-Cloud/ibm-cloud-cli-sdk#218

@archerzz
Copy link

Meanwhile, I suggest CF CLI should consider add a warning message when clearing the config, for user experience perspective.

@JenGoldstrich
Copy link
Contributor

@archerzz This is really good feedback, I think whenever in the future we update the config between versions we'll try and make that a bit less painful, its also good to know that in the future this will break the ibmcloud CLI when we bump config versions, (we should capture that feedback @heyjcollins) For now I am closing this issue since it seems we have a resolution. Please feel free to re-open it if you feel that I've closed it in error.

Thanks for reporting this y'all!!

Jenna

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests