grafana / grafana

The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
https://grafana.com
GNU Affero General Public License v3.0
64.56k stars 12.09k forks source link

UI Build: nx blocks build of grafana on `freebsd-aarch64` targets #89055

Closed qd3v closed 3 months ago

qd3v commented 4 months ago

What happened?

We use FreeBSD running on AWS Graviton CPUs (aarch64), and in order to not rely on package maintainers of grafana we build all we need using Packer on EC2 instance. But after I switch to v11.0.0, the build is failed on UI compilation step. It turned out the problem is nx tool used has some rust code that is not configured to support aarch64-unknown-freebsd rust target or smth. I'm getting same error but for FreeBSD.

What did you expect to happen?

successful build

Did this work before?

there was no nx tool required to build UI before v11

How do we reproduce it?

  1. start t4g.medium using community freebsd AMI: "ami-0899e94ddf21b4bbb | FreeBSD 14.0-STABLE-arm64-20240411 UEFI-PREFERRED cloud-init ZFS | 2024-04-11T20:07:22.000Z". Use 30GB+ root EBS
  2. install sudo pkg install gmake git go yarn wget
  3. checkout code, switch to v11 (tag or branch) and run make all

Is the bug inside a dashboard panel?

nope

Environment (with versions)?

Grafana: v11 OS: FreeBSD freebsd 14.0-STABLE FreeBSD 14.0-STABLE #0 stable/14-n267376-ca8e2e4c91cc: Thu Apr 18 05:50:52 UTC 2024 root@releng1.nyi.freebsd.org:/usr/obj/usr/src/arm64.aarch64/sys/GENERIC arm64 Browser: N/A

Grafana platform?

Other

Datasource(s)?

No response

jackw commented 4 months ago

Hello, thanks for bringing this to our attention. It's possible to bypass Nx to build the Grafana frontend by running the following commands:

yarn run themes-generate
yarn run generate-icons
yarn workspaces foreach --include="@grafana-plugins/*" --parallel -A run build
NODE_ENV=production yarn exec webpack --config scripts/webpack/webpack.prod.js --progress

I think those, combined with make build-go, should offer a workaround to using an OS that Nx doesn't currently support.

tolzhabayev commented 3 months ago

Closing as workaround is present in the comment above