cli icon indicating copy to clipboard operation
cli copied to clipboard

Extend cf push logs to encompass the whole error

Open MerricdeLauney opened this issue 4 years ago • 0 comments

Please provide details on the following items. Failure to do so may result in deletion of your feature request.

What's the user value of this feature request? More actionable errors in cf push

Request: Currently cf push truncates the apps log and makes it harder to debug a failed push.

For example here I push a go app with an old buildpack

±  |main {1} ?:1 ✗| → cf push test_app -b go_buildpack
Pushing app test_app to org org / space space as admin...
Packaging files to upload...
Uploading files...
 150.13 KiB / 150.13 KiB [======================================================================================================================================================================================================================] 100.00% 1s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Downloading go_buildpack...
   Downloaded go_buildpack
   Cell f294008c-3e15-4287-aa1c-5333b2c36d94 creating container for instance de81ee86-6314-4b3d-aa4a-fb7500abcb35
   Cell f294008c-3e15-4287-aa1c-5333b2c36d94 successfully created container for instance de81ee86-6314-4b3d-aa4a-fb7500abcb35
   Downloading app package...
   Downloading build artifacts cache...
   Downloaded app package (1004.5K)
   Downloaded build artifacts cache (156.9M)
   -----> Go Buildpack version 1.8.42
          **WARNING** buildpack version changed from 1.9.35 to 1.8.42
          **WARNING** [DEPRECATION WARNING]:
          **WARNING** Please use AppDynamics extension buildpack for Golang Application instrumentation
          **WARNING** for more details: https://docs.pivotal.io/partners/appdynamics/multibuildpack.html
   -----> Installing godep 80
          Copy [/tmp/cache/final/dependencies/ea2dee71d88cce172a78209425e7d9fa69203481c57c75b313e2408c83b759a7/godep-v80-linux-x64-cflinuxfs3-b60ac947.tgz]
   -----> Installing glide 0.13.3
          Copy [/tmp/cache/final/dependencies/e0175241cc9dda53f333835198167170cda881c2154d211230494738e0e678ae/glide-v0.13.3-linux-x64-cflinuxfs3-ef07acb5.tgz]
   -----> Installing dep 0.5.4
          Copy [/tmp/cache/final/dependencies/67686fc44a190142e7c4d969fd78f5aadbc37080e7de0595c60adbc4d3ad410e/dep-v0.5.4-linux-x64-cflinuxfs3-79b3ab9e.tgz]
   -----> Installing go 1.12.7
          Download [https://buildpacks.cloudfoundry.org/dependencies/go/go1.12.7.linux-amd64-cflinuxfs3-040d6b6f.tar.gz]
          **WARNING** go 1.12.x will no longer be available in new buildpacks released after 2020-02-01.
          See: https://golang.org/doc/devel/release.html
          **WARNING** Installing package '.' (default)
   -----> Running: go install -tags cloudfoundry -buildmode pie .
BuildpackCompileFailed - App staging failed in the buildpack compile phase
FAILED

If I access to the app's logs I get a more actionable error

   2021-09-24T22:42:28.67+0000 [STG/0] OUT -----> Running: go install -tags cloudfoundry -buildmode pie .
   2021-09-24T22:42:40.38+0000 [STG/0] ERR # golang.org/x/net/http2
   2021-09-24T22:42:40.38+0000 [STG/0] ERR vendor/golang.org/x/net/http2/client_conn_pool.go:305:6: undefined: errors.Is
   2021-09-24T22:42:40.40+0000 [STG/0] OUT        **ERROR** Unable to compile application: exit status 2
   2021-09-24T22:42:40.96+0000 [STG/0] ERR Failed to compile droplet: Failed to run finalize script: exit status 12
   2021-09-24T22:42:40.97+0000 [STG/0] OUT Exit status 223
   2021-09-24T22:42:41.12+0000 [STG/0] OUT Cell f294008c-3e15-4287-aa1c-5333b2c36d94 stopping instance de81ee86-6314-4b3d-aa4a-fb7500abcb35
   2021-09-24T22:42:41.12+0000 [STG/0] OUT Cell f294008c-3e15-4287-aa1c-5333b2c36d94 destroying container for instance de81ee86-6314-4b3d-aa4a-fb7500abcb35
   2021-09-24T22:42:41.17+0000 [API/0] ERR Failed to stage build: staging failed

Describe the solution you'd like I would like to see more of the app's log before the cli stop reporting the logs

MerricdeLauney avatar Sep 24 '21 23:09 MerricdeLauney