From d564f6eacb79f5b909f9d4b03ff6ae1140c827c1 Mon Sep 17 00:00:00 2001 From: Will Jones Date: Wed, 17 Jul 2024 11:17:33 -0700 Subject: [PATCH] ci: fix vectordb release process (#1450) * Labelled jobs `vectordb` and `lancedb` so it's clear which package they are for * Fix permission issue in aarch64 Linux `vectordb` build that has been blocking release for two months. * Added Slack notifications for failure of these publish jobs. --- .github/workflows/npm-publish.yml | 29 +++++++++++++++++++++++++++-- ci/manylinux_node/Dockerfile | 4 ++-- 2 files changed, 29 insertions(+), 4 deletions(-) diff --git a/.github/workflows/npm-publish.yml b/.github/workflows/npm-publish.yml index 1082b7e2..18b78dbf 100644 --- a/.github/workflows/npm-publish.yml +++ b/.github/workflows/npm-publish.yml @@ -7,6 +7,7 @@ on: jobs: node: + name: vectordb Typescript runs-on: ubuntu-latest # Only runs on tags that matches the make-release action if: startsWith(github.ref, 'refs/tags/v') @@ -39,6 +40,7 @@ jobs: node/vectordb-*.tgz node-macos: + name: vectordb ${{ matrix.config.arch }} strategy: matrix: config: @@ -69,6 +71,7 @@ jobs: node/dist/lancedb-vectordb-darwin*.tgz nodejs-macos: + name: lancedb ${{ matrix.config.arch }} strategy: matrix: config: @@ -99,7 +102,7 @@ jobs: nodejs/dist/*.node node-linux: - name: node-linux (${{ matrix.config.arch}}-unknown-linux-gnu + name: vectordb (${{ matrix.config.arch}}-unknown-linux-gnu) runs-on: ${{ matrix.config.runner }} # Only runs on tags that matches the make-release action if: startsWith(github.ref, 'refs/tags/v') @@ -139,7 +142,7 @@ jobs: node/dist/lancedb-vectordb-linux*.tgz nodejs-linux: - name: nodejs-linux (${{ matrix.config.arch}}-unknown-linux-gnu + name: lancedb (${{ matrix.config.arch}}-unknown-linux-gnu runs-on: ${{ matrix.config.runner }} # Only runs on tags that matches the make-release action if: startsWith(github.ref, 'refs/tags/v') @@ -190,6 +193,7 @@ jobs: !nodejs/dist/*.node node-windows: + name: vectordb ${{ matrix.target }} runs-on: windows-2022 # Only runs on tags that matches the make-release action if: startsWith(github.ref, 'refs/tags/v') @@ -223,6 +227,7 @@ jobs: node/dist/lancedb-vectordb-win32*.tgz nodejs-windows: + name: lancedb ${{ matrix.target }} runs-on: windows-2022 # Only runs on tags that matches the make-release action if: startsWith(github.ref, 'refs/tags/v') @@ -256,6 +261,7 @@ jobs: nodejs/dist/*.node release: + name: vectordb NPM Publish needs: [node, node-macos, node-linux, node-windows] runs-on: ubuntu-latest # Only runs on tags that matches the make-release action @@ -284,8 +290,18 @@ jobs: for filename in *.tgz; do npm publish $PUBLISH_ARGS $filename done + - name: Notify Slack Action + uses: ravsamhq/notify-slack-action@2.3.0 + if: ${{ always() }} + with: + status: ${{ job.status }} + notify_when: "failure" + notification_title: "{workflow} is failing" + env: + SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }} release-nodejs: + name: lancedb NPM Publish needs: [nodejs-macos, nodejs-linux, nodejs-windows] runs-on: ubuntu-latest # Only runs on tags that matches the make-release action @@ -333,6 +349,15 @@ jobs: else npm publish --access public fi + - name: Notify Slack Action + uses: ravsamhq/notify-slack-action@2.3.0 + if: ${{ always() }} + with: + status: ${{ job.status }} + notify_when: "failure" + notification_title: "{workflow} is failing" + env: + SLACK_WEBHOOK_URL: ${{ secrets.ACTION_MONITORING_SLACK }} update-package-lock: needs: [release] diff --git a/ci/manylinux_node/Dockerfile b/ci/manylinux_node/Dockerfile index 67e7d396..93b93dd5 100644 --- a/ci/manylinux_node/Dockerfile +++ b/ci/manylinux_node/Dockerfile @@ -18,8 +18,8 @@ COPY install_protobuf.sh install_protobuf.sh RUN ./install_protobuf.sh ${ARCH} ENV DOCKER_USER=${DOCKER_USER} -# Create a group and user -RUN echo ${ARCH} && adduser --user-group --create-home --uid ${DOCKER_USER} build_user +# Create a group and user, but only if it doesn't exist +RUN echo ${ARCH} && id -u ${DOCKER_USER} >/dev/null 2>&1 || adduser --user-group --create-home --uid ${DOCKER_USER} build_user # We switch to the user to install Rust and Node, since those like to be # installed at the user level.