Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: use embedded dashboard in Linux binary release #15836

Merged
merged 6 commits into from
Mar 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions ci/scripts/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,12 @@ unzip -o protoc-3.15.8-linux-${PROTOC_ARCH}.zip -d protoc
mv ./protoc/bin/protoc /usr/local/bin/
mv ./protoc/include/* /usr/local/include/

echo "--- Install nodejs"
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
export NVM_DIR="$HOME/.nvm"
. "$NVM_DIR/nvm.sh"
cd dashboard && nvm install && nvm use && cd ..

echo "--- Check risingwave release version"
if [[ -n "${BUILDKITE_TAG}" ]]; then
CARGO_PKG_VERSION="$(toml get --toml-path Cargo.toml workspace.package.version)"
Expand All @@ -59,9 +65,7 @@ if [[ -n "${BUILDKITE_TAG}" ]]; then
fi

echo "--- Build risingwave release binary"
# TODO(bugen): It's really hard to get the dashboard built on such old distro.
# The assets will be proxied to GitHub during runtime.
# export ENABLE_BUILD_DASHBOARD=1
export ENABLE_BUILD_DASHBOARD=1
cargo build -p risingwave_cmd_all --features "rw-static-link" --profile release
cargo build -p risingwave_cmd --bin risectl --features "rw-static-link" --profile release
cd target/release && chmod +x risingwave risectl
Expand Down
2 changes: 1 addition & 1 deletion dashboard/.node-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
v20.11.0
v20.11.1
1 change: 1 addition & 0 deletions dashboard/.nvmrc
46 changes: 23 additions & 23 deletions dashboard/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dashboard/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"react-syntax-highlighter": "^15.5.0",
"recharts": "^2.3.2",
"styled-components": "5.3.0",
"ts-proto": "^1.156.2"
"ts-proto": "^1.169.1"
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I find this necessary or the native executable of this package will require GLIBC 2.29. Not sure why.

},
"devDependencies": {
"@testing-library/jest-dom": "^5.16.2",
Expand Down
6 changes: 3 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@ FROM base AS rust-base

RUN apt-get update && apt-get -y install make cmake protobuf-compiler curl bash lld unzip

# Install Node.js as requirement for building the dashboard.
# Install Node.js as dependency for building the dashboard.
# Bump version together with `dashboard/.node-version`.
ENV NVM_DIR /root/.nvm
ENV NVM_VERSION 0.39.7
ENV NODE_VERSION 20.11.1
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v$NVM_VERSION/install.sh | bash \
RUN curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash \
&& . $NVM_DIR/nvm.sh \
&& nvm install $NODE_VERSION
ENV PATH $NVM_DIR/versions/node/v$NODE_VERSION/bin:$PATH
Expand Down
3 changes: 1 addition & 2 deletions src/meta/dashboard/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
use std::path::{Path, PathBuf};

use cargo_emit::{rerun_if_changed, rustc_cfg};
use npm_rs::{NodeEnv, NpmEnv};
use npm_rs::NpmEnv;

fn env_var_is_true(key: &str) -> bool {
cargo_emit::rerun_if_env_changed!(key);
Expand All @@ -42,7 +42,6 @@ fn build() -> anyhow::Result<()> {
rerun_if_changed!(format!("{DASHBOARD_DIR}/components"));

let exit_status = NpmEnv::default()
.with_node_env(&NodeEnv::Production)
.set_path(DASHBOARD_DIR)
.init_env()
.install(None)
Expand Down
Loading