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

Fix update cargo dependencies script for Mac OS X #1010

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open
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
51 changes: 40 additions & 11 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,24 +17,38 @@ defaults:
shell: bash -l {0}

jobs:
detect-ci-trigger:
name: Check for upstream trigger phrase
detect-upstream-trigger:
name: Check for upstream trigger phrase to test with upstream dask
runs-on: ubuntu-latest
if: github.repository == 'dask-contrib/dask-sql'
outputs:
triggered: ${{ steps.detect-trigger.outputs.trigger-found }}
triggered: ${{ steps.detect-upstream-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: xarray-contrib/[email protected]
id: detect-trigger
id: detect-upstream-trigger
with:
keyword: "[test-upstream]"
detect-datafusion-upstream-trigger:
name: Check for upstream trigger phrase to test with upstream datafusion
runs-on: ubuntu-latest
if: github.repository == 'dask-contrib/dask-sql'
outputs:
triggered: ${{ steps.detect-datafusion-upstream-trigger.outputs.trigger-found }}
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 2
- uses: xarray-contrib/[email protected]
id: detect-datafusion-upstream-trigger
with:
keyword: "[test-df-upstream]"
Comment on lines -20 to +47
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since these are fairly quick steps, wonder if it would make sense to consolidate this into a single job with two steps?


test:
name: "Build & Test (${{ matrix.os }}, python: ${{ matrix.python }})"
needs: [detect-ci-trigger]
needs: [detect-upstream-trigger, detect-datafusion-upstream-trigger]
runs-on: ${{ matrix.os }}
env:
CONDA_FILE: continuous_integration/environment-${{ matrix.python }}-dev.yaml
Expand All @@ -54,6 +68,11 @@ jobs:
channel-priority: strict
activate-environment: dask-sql
environment-file: ${{ env.CONDA_FILE }}
- name: Optionally update upstream datafusion & cargo dependencies
if: needs.detect-datafusion-upstream-trigger.outputs.triggered == 'true'
run: |
cd dask_planner
bash update-dependencies.sh
- name: Build the Rust DataFusion bindings
run: |
python setup.py build install
Expand All @@ -64,7 +83,7 @@ jobs:
docker pull bde2020/hive:2.3.2-postgresql-metastore
docker pull bde2020/hive-metastore-postgresql:2.3.0
- name: Optionally install upstream dev Dask
if: needs.detect-ci-trigger.outputs.triggered == 'true'
if: needs.detect-upstream-trigger.outputs.triggered == 'true'
run: |
mamba install --no-channel-priority dask/label/dev::dask
- name: Test with pytest
Expand All @@ -82,7 +101,7 @@ jobs:

cluster:
name: "Test in a dask cluster"
needs: [detect-ci-trigger]
needs: [detect-upstream-trigger, detect-datafusion-upstream-trigger]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -95,6 +114,11 @@ jobs:
channel-priority: strict
activate-environment: dask-sql
environment-file: continuous_integration/environment-3.9-dev.yaml
- name: Optionally update upstream datafusion & cargo dependencies
if: needs.detect-datafusion-upstream-trigger.outputs.triggered == 'true'
run: |
cd dask_planner
bash update-dependencies.sh
- name: Build the Rust DataFusion bindings
run: |
python setup.py build install
Expand All @@ -106,12 +130,12 @@ jobs:
pip list
mamba list
- name: Optionally install upstream dev Dask
if: needs.detect-ci-trigger.outputs.triggered == 'true'
if: needs.detect-upstream-trigger.outputs.triggered == 'true'
run: |
mamba install --no-channel-priority dask/label/dev::dask
- name: run a dask cluster
env:
UPSTREAM: ${{ needs.detect-ci-trigger.outputs.triggered }}
UPSTREAM: ${{ needs.detect-upstream-trigger.outputs.triggered }}
run: |
if [[ $UPSTREAM == "true" ]]; then
docker-compose -f .github/cluster-upstream.yml up -d
Expand All @@ -130,7 +154,7 @@ jobs:

import:
name: "Test importing with bare requirements"
needs: [detect-ci-trigger]
needs: [detect-upstream-trigger, detect-datafusion-upstream-trigger]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -141,6 +165,11 @@ jobs:
use-mamba: true
python-version: "3.8"
channel-priority: strict
- name: Optionally update upstream datafusion & cargo dependencies
if: needs.detect-datafusion-upstream-trigger.outputs.triggered == 'true'
run: |
cd dask_planner
bash update-dependencies.sh
- name: Install dependencies and nothing else
run: |
mamba install setuptools-rust
Expand All @@ -150,7 +179,7 @@ jobs:
pip list
mamba list
- name: Optionally install upstream dev Dask
if: needs.detect-ci-trigger.outputs.triggered == 'true'
if: needs.detect-upstream-trigger.outputs.triggered == 'true'
run: |
python -m pip install --no-deps git+https://github.com/dask/dask
python -m pip install --no-deps git+https://github.com/dask/distributed
Expand Down
2 changes: 1 addition & 1 deletion dask_planner/update-dependencies.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

UPDATE_ALL_CARGO_DEPS="${UPDATE_ALL_CARGO_DEPS:-true}"
# Update datafusion dependencies in the dask-planner to the latest revision from the default branch
sed -i -r 's/^datafusion-([a-z]+).*/datafusion-\1 = { git = "https:\/\/github.com\/apache\/arrow-datafusion\/" }/g' Cargo.toml
sed -i -r -E 's/^datafusion-([a-z]+).*/datafusion-\1 = { git = "https:\/\/github.com\/apache\/arrow-datafusion\/" }/g' Cargo.toml

if [ "$UPDATE_ALL_CARGO_DEPS" = true ] ; then
cargo update
Expand Down