From d194a3a190b84410d73f4b0e4f34f6ea6dd633c2 Mon Sep 17 00:00:00 2001 From: Michael Matloka Date: Mon, 9 Oct 2023 17:37:22 +0200 Subject: [PATCH] Add HogQL version check to backend CI --- .github/workflows/build-hogql-parser.yml | 3 +-- .github/workflows/ci-backend.yml | 14 +++++++++++++- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build-hogql-parser.yml b/.github/workflows/build-hogql-parser.yml index db55a650c0f5e..4759cdb20696b 100644 --- a/.github/workflows/build-hogql-parser.yml +++ b/.github/workflows/build-hogql-parser.yml @@ -36,9 +36,8 @@ jobs: build-wheels: name: Build wheels on ${{ matrix.os }} needs: check-version - # if: github.ref == 'refs/heads/master' TODO: Only build on master once the containers build on ARM runs-on: ${{ matrix.os }} - timeout-minutes: 120 # The Linux ARM builds are painfully slow + timeout-minutes: 30 strategy: matrix: # As of October 2023, GitHub doesn't have ARM Actions runners… and ARM emulation is insanely slow diff --git a/.github/workflows/ci-backend.yml b/.github/workflows/ci-backend.yml index 6fc13397ba37f..1e4f2412f2f48 100644 --- a/.github/workflows/ci-backend.yml +++ b/.github/workflows/ci-backend.yml @@ -119,7 +119,7 @@ jobs: sudo apt-get update sudo apt-get install libxml2-dev libxmlsec1 libxmlsec1-dev libxmlsec1-openssl - - name: Install python dependencies + - name: Install Python dependencies if: steps.cache-backend-tests.outputs.cache-hit != 'true' run: | cd current @@ -166,6 +166,18 @@ jobs: antlr | grep "Version" npm run grammar:build && git diff --exit-code + - name: Check if hogql-parser versions are in sync + shell: bash + run: | + local=$(python hogql_parser/setup.py --version) + required=$(grep 'hogql-parser' requirements.txt | cut -d "=" -f3) + if [[ "$required" == "$local" ]]; then + echo "Version $required of hogql-parser specified in requirements.txt is not the same as $local in hogql_parser/setup.py" + echo "This needs to be resolved before this PR is merged" + echo "If $local is not yet available on PyPI, wait for the \"Release hogql-parser\" workflow to finish" + exit 1 + fi + check-migrations: needs: changes if: needs.changes.outputs.backend == 'true'