cloudfoundry / cli

The official command line client for Cloud Foundry
https://docs.cloudfoundry.org/cf-cli
Apache License 2.0
1.75k stars 927 forks source link

Cant push an app with symlinks #1934

Closed david-klug-sap closed 1 week ago

david-klug-sap commented 4 years ago

Please fill out the issue checklist below and provide ALL the requested information.

Describe the bug and the command you saw an issue with I tried pushing a simple app to my space. (cf push) The app contains a symlink to an folder in the root. Problem is only on Windows. Mac users can push the application without any problems.

What happened While pushing an error occurs: Error staging application: App staging failed in the buildpack compile phase

Expected behavior Push the app to my space without errors and write the expected console.log with the string 'my-dependency'.

To Reproduce Steps to reproduce the behavior; include the exact CLI commands and verbose output:

  1. run npm install
  2. run cf push
  3. See error

Provide more context

simpleApp.zip

cf-gitbot commented 4 years ago

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

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

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

JenGoldstrich commented 4 years ago

Hey @david-frey1410 !

Can you please provide the full stack trace of this error?

Thanks! Jenna

david-klug-sap commented 4 years ago

$ cf push Pushing from manifest to org MY-ORG / space MY-SPACE as MY-USERNAME... Getting app info... Updating app with these attributes... name: cf-my-node-app path: C:\Users\MY-USERNAME\repositories\simpleApp buildpacks: https://github.com/cloudfoundry/nodejs-buildpack.git#v1.7.8 health check type: port instances: 1 memory: 512M stack: cflinuxfs3 routes: cf-my-node-app-generous-buffalo-vw.MY-DOMAIN

Updating app cf-my-node-app... Mapping routes... Comparing local files to remote cache... Packaging files to upload... Uploading files... 1.66 KiB / 1.66 KiB [======================================================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs... Cell 9fecef4c-d146-4df0-9a59-f7281a3981a6 successfully created container for instance 775fbbda-dc7d-44c8-ad97-6de94633a307 Downloading app package... Downloading build artifacts cache... Downloaded app package (1.7K) Downloaded build artifacts cache (23.8M) -----> Download go 1.12.4 -----> Running go build supply /tmp/buildpackdownloads/9284b6a79b4f8b822d6a37da819efac6 ~ ~ -----> Nodejs Buildpack version 1.7.8 -----> Installing binaries engines.node (package.json): ^12.14.0 engines.npm (package.json): unspecified (use default) -----> Installing node 12.14.0 Copy [/tmp/cache/final/dependencies/53d0d79ef6b12b53b89897960e91aa1bc159f3f4e3427b1f858320d894de9962/node-12.14.0-linux-x64-cflinuxfs3-09b879d7.tgz] Error staging application: App staging failed in the buildpack compile phase FAILED

david-klug-sap commented 4 years ago

Any updates here ?

JenGoldstrich commented 4 years ago

Hey, @david-frey1410

We tested your simpleApp on Mac OS using iTerm and Windows using GitBash and PowerShell, and got the same result.

The app logs "my dependancy" if you scan through cf logs (you wouldn't see log output in cf push) and then closes, looking at the app this makes sense as all it does is console.log and exit, we are unable to replicate your issue with the app staging failed in the buildpack compile phase on Windows, what version of the cf API are you using as this might cause an issue.

Its possible the app closes mid staging and causes the build pack to complain but I am not sure is a Windows specific issue.

Thanks @nickjameswebb and Jenna

david-klug-sap commented 4 years ago

$ cf -v cf.exe version 6.51.0+2acd15650.2020-04-07

JenGoldstrich commented 4 years ago

Hey @david-frey1410 thats your cf CLI version, which you already provided above we need your cf API version, you can find this by typing cf api

example:

cf api
API endpoint:   https://api.run.pivotal.io
API version:    3.86.0

Thanks! Jenna

david-klug-sap commented 4 years ago

Ah sorry that was my mistake... My cf api version is: 2.146.0

david-klug-sap commented 4 years ago

Any updates ?

github-actions[bot] commented 1 week ago

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

a-b commented 1 week ago

Thank you for your submission. If you still run into this issue with the latest CLI v8, please open a new ticket with the necessary information mentioned in our issue template.