cloudfoundry / apt-buildpack

MIT License
31 stars 48 forks source link

Minor (non breaking) build errors during push #16

Closed konstantinblaesi closed 5 years ago

konstantinblaesi commented 5 years ago

Note that the application is pushed successfully and works fine.

What version of Cloud Foundry and CF CLI are you using? cf curl /v2/info

{
   "name": "",
   "build": "",
   "support": "",
   "version": 0,
   "description": "Cloud Foundry at Foobar",
   "authorization_endpoint": "https://login.cf.foobar.com",
   "token_endpoint": "https://uaa.cf.foobar.com",
   "min_cli_version": null,
   "min_recommended_cli_version": null,
   "app_ssh_endpoint": "ssh.cf.foobar.com:2222",
   "app_ssh_host_key_fingerprint": "...",
   "app_ssh_oauth_client": "ssh-proxy",
   "doppler_logging_endpoint": "wss://doppler.cf.foobar.com:443",
   "api_version": "2.128.0",
   "osbapi_version": "2.14",
   "bits_endpoint": "https://bits.cf.foobar.com",
   "user": "..."
}
cf -v
cf version 6.41.0+dd4c76cdd.2018-11-28

What version of the buildpack you are using?

apt.yml

---
packages:
- libx11-xcb1
- libxtst6
- libnss3
- libnspr4
- libxss1
- libgconf-2-4
- libasound2
- chromium-browser

If you were attempting to accomplish a task, what was it you were attempting to do?

What did you expect to happen?

What was the actual behavior?

Full cf push log

 cf push -f manifest-test.yml foobar-app
Pushing from manifest to org Foo Org / space foospace as foouser ...
Using manifest file manifest-test.yml
Getting app info...
Updating app with these attributes...
  name:                foobar-app
  path:                /apps/foobar-app
  buildpacks:
    https://github.com/cloudfoundry/apt-buildpack
    nodejs_buildpack
  command:             npm run test-cf
  disk quota:          1.5G
  health check type:   none
  instances:           1
  memory:              4G
  stack:               cflinuxfs3
  env:
    NODE_ENV
    NPM_CONFIG_PRODUCTION

Updating app foobar-app...
Comparing local files to remote cache...
Packaging files to upload...
Uploading files...
 8.04 MiB / 8.04 MiB [================================================================================================================================================================] 100.00% 2s

Waiting for API to complete processing files...

Staging app and tracing logs...
   Downloading nodejs_buildpack...
   Downloaded nodejs_buildpack
   Cell 06fe6531-6863-4584-9a2e-e6925c074383 creating container for instance f5171059-0028-4477-a53d-01aa77bb6610
   Cell 06fe6531-6863-4584-9a2e-e6925c074383 successfully created container for instance f5171059-0028-4477-a53d-01aa77bb6610
   Downloading app package...
   Downloaded app package (57.4M)
   -----> Download go 1.11.4
   -----> Running go build supply
   /tmp/buildpackdownloads/1986c11e5045899f72e33ebceb13b732 ~
   ~
   -----> Apt Buildpack version 0.1.5
   -----> Updating apt cache
   rm: cannot remove '/var/cache/apt/archives/partial/*.deb': Permission denied
   -----> Downloading apt packages
   W: --force-yes is deprecated, use one of the options starting with --allow instead.
   -----> Installing apt packages
   -----> Nodejs Buildpack version 1.6.38
   -----> Installing binaries
          engines.node (package.json): ~8.x
          engines.npm (package.json): unspecified (use default)
   -----> Installing node 8.14.1
          Download [https://buildpacks.cloudfoundry.org/dependencies/node/node-8.14.1-linux-x64-cflinuxfs3-a4e189cb.tgz]
          Using default npm version: 6.4.1
   -----> Installing yarn 1.12.3
          Download [https://buildpacks.cloudfoundry.org/dependencies/yarn/yarn-1.12.3-any-stack-02cd4b58.tar.gz]
          Installed yarn 1.12.3
   -----> Creating runtime environment
          PRO TIP: It is recommended to vendor the application's Node.js dependencies
          Visit http://docs.cloudfoundry.org/buildpacks/node/index.html#vendoring
          NODE_ENV=development
          NPM_CONFIG_PRODUCTION=false
          NODE_HOME=/tmp/contents452461028/deps/1/node
          NODE_MODULES_CACHE=true
          NODE_VERBOSE=false
          NPM_CONFIG_LOGLEVEL=error
   -----> Building dependencies
          Installing node modules (yarn.lock)
          Found yarn mirror directory /tmp/app/npm-packages-offline-cache
          Running yarn in offline mode
   yarn install v1.12.3
   warning package-lock.json found. Your project contains lock files generated by tools other than Yarn. It is advised not to mix package managers in order to avoid resolution inconsistencies caused by unsynchronized lock files. To clear this warning, remove package-lock.json.
   [1/4] Resolving packages...
   [2/4] Fetching packages...
   [3/4] Linking dependencies...
   [4/4] Building fresh packages...
   Done in 26.38s.
          yarn.lock and package.json match
   Exit status 0
   Uploading droplet, build artifacts cache...
   Uploading droplet...
   Uploading build artifacts cache...
   Uploaded build artifacts cache (187.1M)
   Uploaded droplet (363.9M)
   Uploading complete
   Cell 06fe6531-6863-4584-9a2e-e6925c074383 stopping instance f5171059-0028-4477-a53d-01aa77bb6610
   Cell 06fe6531-6863-4584-9a2e-e6925c074383 destroying container for instance f5171059-0028-4477-a53d-01aa77bb6610

Waiting for app to start...

name:              foobar-app
requested state:   started
routes:
last uploaded:     Fri 01 Feb 07:44:32 UTC 2019
stack:             cflinuxfs3
buildpacks:        https://github.com/cloudfoundry/apt-buildpack, nodejs

type:            web
instances:       1/1
memory usage:    4096M
start command:   npm run test-cf
     state     since                  cpu    memory      disk         details
#0   running   2019-02-01T07:45:14Z   0.0%   44K of 4G   8K of 1.5G

Please confirm where necessary:

cf-gitbot commented 5 years ago

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

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

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

kardolus commented 5 years ago

@konstantinblaesi thanks for bringing this to our attention!

The warning seems to originate here: https://github.com/cloudfoundry/apt-buildpack/blob/302ce5a967a1a175cf7f168470f2ca03006ebaa3/src/apt/apt/apt.go#L193

Not sure if this is something we can fix. Will look at it in more detail later.

ssc-hrep3 commented 5 years ago

This error occurs also in my project. Is it safe to just ignore it, as it does not abort the startup? Will you eventually fix it (unscheduled label)?

lrstanley commented 5 years ago

It's safe to ignore as it doesn't fail the push. Though, it's extremely annoying, as we have many people, when their push fails for another reason, thinking it's this warning...

It's something that has to be fixed in the stemcell is my guess, as those caches really shouldn't even be there in the image, led alone the permissions on the files.

Maybe we can just wrap the logs and drop that line when we see it, before it gets sent to stdout/stderr?

zmackie commented 5 years ago

This will get cleared up when we cut the next release, happening ASAP. Closing for now.