jaegertracing / jaeger-ui

Web UI for Jaeger
http://jaegertracing.io/
Apache License 2.0
1.12k stars 477 forks source link

[Bug]: Jaeger UI does not build on IBM s390x arch (big endian) #2160

Closed pavolloffay closed 4 months ago

pavolloffay commented 7 months ago

What happened?

Jaeger UI does not build on IBM s390x arch (big endian)

The Vite 5 uses rollup 4 which does not work on s390x. The workaround with wasm-node fails as well.

see:

Steps to reproduce

https://github.com/jaegertracing/jaeger-ui/pull/2119

Expected behavior

Be able to build Jaeger UI natively on s390x. It is Red Hat internal requirement that everything has to be built directly from source code.

Relevant log output

#9 568.4 $ NODE_ENV=production REACT_APP_VSN_STATE=$(../../scripts/get-tracking-version.js) vite build
#9 576.0 vite v5.0.11 building for production...
#9 576.5 ✓ 0 modules transformed.
#9 576.5 [vite:build-html] memory access out of bounds
#9 576.5 file: /workspace/packages/jaeger-ui/index.html
#9 576.5 error during build:
#9 576.5 RuntimeError: memory access out of bounds
#9 576.5     at wasm://wasm/0063bf96:wasm-function[1558]:0x162080
#9 576.5     at wasm://wasm/0063bf96:wasm-function[249]:0x104dc0
#9 576.5     at wasm://wasm/0063bf96:wasm-function[1442]:0x15f2f9
#9 576.5     at module.exports.xxhashBase64Url (/workspace/node_modules/rollup/dist/wasm-node/bindings_wasm.js:159:14)
#9 576.5     at getXxhash (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:16781:12)
#9 576.5     at FileEmitter.assignReferenceId (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:18266:27)
#9 576.5     at FileEmitter.emitAsset (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:18311:34)
#9 576.5     at FileEmitter.emitFile (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:18181:25)
#9 576.5     at Object.emitFile (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:17585:41)
#9 576.5     at fileToBuiltUrl (file:///workspace/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:16718:43)
#9 576.7 error Command failed with exit code 1.
#9 576.7 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
#9 ERROR: process "/bin/sh -c yarn install --frozen-lockfile && cd ./packages/jaeger-ui && yarn build" did not complete successfully: exit code: 1
------
 > [4/4] RUN  yarn install --frozen-lockfile && cd ./packages/jaeger-ui && yarn build:
576.5     at wasm://wasm/0063bf96:wasm-function[1442]:0x15f2f9
576.5     at module.exports.xxhashBase64Url (/workspace/node_modules/rollup/dist/wasm-node/bindings_wasm.js:159:14)
576.5     at getXxhash (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:16781:12)
576.5     at FileEmitter.assignReferenceId (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:18266:27)
576.5     at FileEmitter.emitAsset (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:18311:34)
576.5     at FileEmitter.emitFile (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:18181:25)
576.5     at Object.emitFile (file:///workspace/node_modules/rollup/dist/es/shared/node-entry.js:17585:41)
576.5     at fileToBuiltUrl (file:///workspace/node_modules/vite/dist/node/chunks/dep-V3BH7oO1.js:16718:43)
576.7 error Command failed with exit code 1.
576.7 info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
------
WARNING: No output specified with docker-container driver. Build result will only remain in the build cache. To push result image into registry use --push or to load image into docker use --load
Dockerfile:7
--------------------
   5 |     COPY . .
   6 |     
   7 | >>> RUN  yarn install --frozen-lockfile && cd ./packages/jaeger-ui && yarn build
   8 |     
--------------------
ERROR: failed to solve: process "/bin/sh -c yarn install --frozen-lockfile && cd ./packages/jaeger-ui && yarn build" did not complete successfully: exit code: 1


### Screenshot

_No response_

### Additional context

_No response_

### Jaeger backend version

main

### SDK

_No response_

### Pipeline

_No response_

### Stogage backend

_No response_

### Operating system

_No response_

### Deployment model

_No response_

### Deployment configs

_No response_
yurishkuro commented 7 months ago

I don't think this qualifies a bug, as Jaeger UI was never built on or made promises about s390x. Don't mind treating it as an enhancement, but if it doesn't work with our current build system (Vite), then I don't see what we can do about it.

pavolloffay commented 7 months ago

We were always building it on s390x and other archs.

I will change it to enhancement. Do you know if there are some alternatives to vite that we could consider using?

yurishkuro commented 7 months ago

Don't know. It was a big undertaking to replace the build system, need a Node expert for that.