-
Notifications
You must be signed in to change notification settings - Fork 0
chore: split out expensive spark tests to parallelize #382
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
Changes from 14 commits
bd866a6
e84fb9a
d8d809f
5380ed0
de3fbd4
8e1a5c7
dd668d6
63d00c2
d338913
c969745
b9dcc12
cb77e8e
b896e03
73fc6e0
59bc5dc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -44,3 +44,133 @@ jobs: | |
--google_credentials=bazel-cache-key.json \ | ||
--test_env=JAVA_OPTS="-Xmx8G -Xms2G" \ | ||
//spark:tests | ||
|
||
fetcher_tests: | ||
runs-on: ubuntu-8_cores-32_gb | ||
container: | ||
image: ghcr.io/${{ github.repository }}-ci:latest | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Bazel cache credentials | ||
run: | | ||
echo "${{ secrets.BAZEL_CACHE_CREDENTIALS }}" | base64 -d > bazel-cache-key.json | ||
|
||
- name: Run Fetcher tests | ||
run: | | ||
bazel test \ | ||
--remote_cache=https://storage.googleapis.com/zipline-bazel-cache \ | ||
--google_credentials=bazel-cache-key.json \ | ||
--test_env=JAVA_OPTS="-Xmx16G -Xms8G" \ | ||
//spark:fetcher_test | ||
|
||
join_tests: | ||
runs-on: ubuntu-8_cores-32_gb | ||
container: | ||
image: ghcr.io/${{ github.repository }}-ci:latest | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Bazel cache credentials | ||
run: | | ||
echo "${{ secrets.BAZEL_CACHE_CREDENTIALS }}" | base64 -d > bazel-cache-key.json | ||
|
||
- name: Run Join tests | ||
run: | | ||
bazel test \ | ||
--remote_cache=https://storage.googleapis.com/zipline-bazel-cache \ | ||
--google_credentials=bazel-cache-key.json \ | ||
--test_env=JAVA_OPTS="-Xmx16G -Xms8G" \ | ||
//spark:join_test | ||
|
||
groupby_tests: | ||
runs-on: ubuntu-8_cores-32_gb | ||
container: | ||
image: ghcr.io/${{ github.repository }}-ci:latest | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Bazel cache credentials | ||
run: | | ||
echo "${{ secrets.BAZEL_CACHE_CREDENTIALS }}" | base64 -d > bazel-cache-key.json | ||
|
||
- name: Run GroupBy tests | ||
run: | | ||
bazel test \ | ||
--remote_cache=https://storage.googleapis.com/zipline-bazel-cache \ | ||
--google_credentials=bazel-cache-key.json \ | ||
--test_env=JAVA_OPTS="-Xmx16G -Xms8G" \ | ||
//spark:groupby_test | ||
|
||
analyzer_tests: | ||
runs-on: ubuntu-8_cores-32_gb | ||
container: | ||
image: ghcr.io/${{ github.repository }}-ci:latest | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Bazel cache credentials | ||
run: | | ||
echo "${{ secrets.BAZEL_CACHE_CREDENTIALS }}" | base64 -d > bazel-cache-key.json | ||
|
||
- name: Run Analyzer tests | ||
run: | | ||
bazel test \ | ||
--remote_cache=https://storage.googleapis.com/zipline-bazel-cache \ | ||
--google_credentials=bazel-cache-key.json \ | ||
--test_env=JAVA_OPTS="-Xmx16G -Xms8G" \ | ||
//spark:analyzer_test | ||
|
||
streamimg_tests: | ||
runs-on: ubuntu-8_cores-32_gb | ||
container: | ||
image: ghcr.io/${{ github.repository }}-ci:latest | ||
credentials: | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
defaults: | ||
run: | ||
working-directory: ${{ github.workspace }} | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup Bazel cache credentials | ||
run: | | ||
echo "${{ secrets.BAZEL_CACHE_CREDENTIALS }}" | base64 -d > bazel-cache-key.json | ||
|
||
- name: Run Streaming tests | ||
run: | | ||
bazel test \ | ||
--remote_cache=https://storage.googleapis.com/zipline-bazel-cache \ | ||
--google_credentials=bazel-cache-key.json \ | ||
--test_env=JAVA_OPTS="-Xmx16G -Xms8G" \ | ||
//spark:streaming_test | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Refactor duplicate job configurations using a reusable workflow. Extract common configuration into a reusable workflow to reduce duplication. Create name: Spark Test Job
on:
workflow_call:
inputs:
test_target:
required: true
type: string
memory_opts:
required: true
type: string
step_name:
required: true
type: string
jobs:
test:
runs-on: ubuntu-8_cores-32_gb
container:
image: ghcr.io/${{ github.repository }}-ci:latest
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
defaults:
run:
working-directory: ${{ github.workspace }}
steps:
- uses: actions/checkout@v4
- name: Setup Bazel cache credentials
run: |
echo "${{ secrets.BAZEL_CACHE_CREDENTIALS }}" | base64 -d > bazel-cache-key.json
- name: ${{ inputs.step_name }}
run: |
bazel test \
--remote_cache=https://storage.googleapis.com/zipline-bazel-cache \
--google_credentials=bazel-cache-key.json \
--test_env=JAVA_OPTS="${{ inputs.memory_opts }}" \
${{ inputs.test_target }} Then simplify the main workflow: jobs:
spark_tests:
uses: ./.github/workflows/spark-test-job.yaml
with:
test_target: //spark:tests
memory_opts: "-Xmx8G -Xms2G"
step_name: "Run Spark tests"
fetcher_tests:
uses: ./.github/workflows/spark-test-job.yaml
with:
test_target: //spark:fetcher_test
memory_opts: "-Xmx16G -Xms8G"
step_name: "Run Fetcher tests"
# ... repeat for other jobs 🧰 Tools🪛 actionlint (1.7.4)49-49: label "ubuntu-8_cores-32_gb" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file (runner-label) 75-75: label "ubuntu-8_cores-32_gb" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file (runner-label) 101-101: label "ubuntu-8_cores-32_gb" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file (runner-label) 127-127: label "ubuntu-8_cores-32_gb" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file (runner-label) 153-153: label "ubuntu-8_cores-32_gb" is unknown. available labels are "windows-latest", "windows-latest-8-cores", "windows-2022", "windows-2019", "ubuntu-latest", "ubuntu-latest-4-cores", "ubuntu-latest-8-cores", "ubuntu-latest-16-cores", "ubuntu-24.04", "ubuntu-22.04", "ubuntu-20.04", "macos-latest", "macos-latest-xl", "macos-latest-xlarge", "macos-latest-large", "macos-15-xlarge", "macos-15-large", "macos-15", "macos-14-xl", "macos-14-xlarge", "macos-14-large", "macos-14", "macos-13-xl", "macos-13-xlarge", "macos-13-large", "macos-13", "macos-12-xl", "macos-12-xlarge", "macos-12-large", "macos-12", "self-hosted", "x64", "arm", "arm64", "linux", "macos", "windows". if it is a custom label for self-hosted runner, set list of labels in actionlint.yaml config file (runner-label) 🪛 YAMLlint (1.35.1)[error] 176-176: no new line character at the end of file (new-line-at-end-of-file) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix typo in job name.
"streamimg_tests" should be "streaming_tests".
📝 Committable suggestion