RocketChat / Rocket.Chat

The communications platform that puts data protection first.
https://rocket.chat/
Other
40.7k stars 10.67k forks source link

`yarn.lock` is out of date, causing "CI" builds to fail. #33367

Open JoshMcCullough opened 1 month ago

JoshMcCullough commented 1 month ago

Description:

When pulling RC for the last 3 tagged releases (6.10.6, 6.11.3, 6.12.1) and then running yarn --immutable, yarn.lock is being updated because multiple packages are newer in the package.json files vs the yarn.lock file.

This leads to an install failure, because yarn can't install the wanted packages, since the lock file versions don't match those in package.json.

image

Furthermore, removing the --immutable flag will install the updated versions, which then break the Docker image due to an upgraded GLIBC requirement

/app/bundle/programs/server/npm/node_modules/meteor/promise/node_modules/meteor-promise/promise_server.js:218
      throw error;
      ^

Error: /usr/lib/x86_64-linux-gnu/libstdc++.so.6: version `GLIBCXX_3.4.29' not found (required by /app/bundle/programs/server/npm/node_modules/isolated-vm/out/isolated_vm.node)
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1173:18)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Module.Mp.load (/app/bundle/programs/server/runtime.js:37:33)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Module.require (internal/modules/cjs/loader.js:1003:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at Object.<anonymous> (/app/bundle/programs/server/npm/node_modules/isolated-vm/isolated-vm.js:1:-44)
    at Module._compile (internal/modules/cjs/loader.js:1114:14)
    at Module.Mp._compile (/app/bundle/programs/server/runtime.js:77:23)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1143:10)
    at Module.load (internal/modules/cjs/loader.js:979:32)
    at Module.Mp.load (/app/bundle/programs/server/runtime.js:37:33)
    at Function.Module._load (internal/modules/cjs/loader.js:819:12)
    at Module.require (internal/modules/cjs/loader.js:1003:19)
    at require (internal/modules/cjs/helpers.js:107:18)
    at npmRequire (/app/bundle/programs/server/npm-require.js:111:12)
    at Module.useNode (packages/modules-runtime.js:751:18)
    at module (/app/bundle/programs/server/packages/modules.js:216576:8)
    at fileEvaluate (packages/modules-runtime.js:336:7)
    at Module.require (packages/modules-runtime.js:238:14)
    at Module.moduleLink [as link] (/app/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:52:22)
    at module (app/integrations/server/lib/isolated-vm/isolated-vm.ts:2:43)
    at fileEvaluate (packages/modules-runtime.js:336:7)
    at Module.require (packages/modules-runtime.js:238:14)
    at Module.moduleLink [as link] (/app/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:52:22)
    at module (app/integrations/server/lib/triggerHandler.js:1:1311)
    at fileEvaluate (packages/modules-runtime.js:336:7)
    at Module.require (packages/modules-runtime.js:238:14)
    at Module.moduleLink [as link] (/app/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:52:22)
    at server/services/meteor/service.ts:1:72
    at module (server/services/meteor/service.ts:286:2)
    at fileEvaluate (packages/modules-runtime.js:336:7)
    at Module.require (packages/modules-runtime.js:238:14)
    at Module.moduleLink [as link] (/app/bundle/programs/server/npm/node_modules/meteor/modules/node_modules/@meteorjs/reify/lib/runtime/index.js:52:22) {
  code: 'ERR_DLOPEN_FAILED'
}

Note that 6.9.2 and 6.9.7 also exhibit the package.json / yarn.lock inequality, but the resulting Docker images start correctly and do not have the GLIBC issue.

Steps to reproduce:

  1. Pull one of the tags specified.
  2. Try to build with yarn --immutable -- build fails.
  3. Try to build with yarn -- build succeeds.
  4. Build/run the Docker image and note that RC fails to start with a GLIBC error.

Expected behavior:

The yarn.lock should never contain older versions than the package.json files.

Actual behavior:

The yarn.lock contains older versions than the package.json files.

Server Setup Information:

Client Setup Information

reetp commented 1 month ago

Can I ask where you pulled the images from?

JoshMcCullough commented 1 month ago

I'm building the image myself using apps/meteor/.docker/Dockerfile from this very repo, unaltered. The issue appears to be that some dep, which is being bumped during yarn install is requiring GLIBC 3+ whereas 2+ is what's available in the base image used to build the RC image.

docker buildx build -f apps/meteor/.docker/Dockerfile .
reetp commented 1 month ago

Kk. I'll try and get a comment on this.

casalsgh commented 1 month ago

asking internal eng team to check

JoshMcCullough commented 1 month ago

We switched to the Alpine Dockerfile, which has GLIBC 3 and we are good for now. But we may "prefer" to move back to the non-Alpine image if/when this is resolved.

Suvendu-UI commented 1 month ago

can i solve this issue?

ggazzo commented 2 weeks ago

is this still a problem?

github-actions[bot] commented 18 hours ago

This issue has been marked as stale because there has been no further activity in the last 10 days. If the issue remains stale for the next 4 days (a total of 14 days with no activity), then it will be assumed that the question has been resolved and the issue will be automatically closed.