Skip to content

Commit ead7688

Browse files
committed
add 1st iteration of pre-merge pipeline
Signed-off-by: Johnny Yang <johnnyyang@google.com>
1 parent 05e4b16 commit ead7688

File tree

3 files changed

+57
-25
lines changed

3 files changed

+57
-25
lines changed

.buildkite/pipeline_jax.yml

Lines changed: 1 addition & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -107,23 +107,6 @@ steps:
107107
exit 0
108108
fi
109109
110-
111-
- label: "JAX unit tests"
112-
key: test_7
113-
soft_fail: true
114-
agents:
115-
queue: tpu_v6e_queue
116-
commands:
117-
- |
118-
.buildkite/scripts/run_in_docker.sh \
119-
python3 -m pytest -s -v -x /workspace/tpu_inference/tests/ \
120-
--ignore=/workspace/tpu_inference/tests/kernels \
121-
--ignore=/workspace/tpu_inference/tests/lora \
122-
--ignore=/workspace/tpu_inference/tests/e2e \
123-
--ignore=/workspace/tpu_inference/tpu_inference/mock \
124-
--ignore=/workspace/tpu_inference/tests/layers/vllm/test_compressed_tensors_moe.py \
125-
--cov-config=/workspace/tpu_inference/.coveragerc --cov tpu_inference --cov-report term-missing --cov-fail-under=69
126-
127110
- label: "JAX unit tests - kernels"
128111
key: test_8
129112
soft_fail: true
@@ -268,7 +251,6 @@ steps:
268251
- test_4
269252
- test_5
270253
- test_6
271-
- test_7
272254
- test_8
273255
- test_9
274256
- test_10
@@ -282,4 +264,4 @@ steps:
282264
commands:
283265
- |
284266
.buildkite/scripts/check_results.sh \
285-
"TPU JAX Tests Failed" test_0 test_1 test_2 test_3 test_4 test_5 test_6 test_7 test_8 test_9 test_10 test_11 test_12 test_13 test_15 test_16
267+
"TPU JAX Tests Failed" test_0 test_1 test_2 test_3 test_4 test_5 test_6 test_8 test_9 test_10 test_11 test_12 test_13 test_15 test_16

.buildkite/pipeline_pre_merge.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
steps:
2+
- label: "JAX unit tests"
3+
soft_fail: true
4+
agents:
5+
queue: tpu_v6e_queue
6+
commands:
7+
- |
8+
.buildkite/scripts/run_in_docker.sh \
9+
python3 -m pytest -s -v -x /workspace/tpu_inference/tests/ \
10+
--ignore=/workspace/tpu_inference/tests/kernels \
11+
--ignore=/workspace/tpu_inference/tests/lora \
12+
--ignore=/workspace/tpu_inference/tests/e2e \
13+
--ignore=/workspace/tpu_inference/tpu_inference/mock \
14+
--cov-config=/workspace/tpu_inference/.coveragerc --cov tpu_inference --cov-report term-missing --cov-fail-under=69
15+
16+
- label: "Upload modified feature(s)/model(s) introduced in this PR"
17+
soft_fail: true
18+
# nightly run automatically uploads all features & models, so the next line is needed to dedup
19+
if: build.env("NIGHTLY") != "1"
20+
agents:
21+
queue: cpu
22+
command: |
23+
git fetch origin $BUILDKITE_PULL_REQUEST_BASE_BRANCH
24+
BASE_REF="$BUILDKITE_PULL_REQUEST_BASE_BRANCH"
25+
HEAD_REF="$BUILDKITE_COMMIT"
26+
27+
# Get newly added or modified yml files in '.buildkite/models/' OR '.buildkite/features/'
28+
MODIFIED_YML_PATHS=$(git diff --name-only --diff-filter=AM "$BASE_REF" "$HEAD_REF" | grep -E '^\.buildkite\/(models|features)\/.*\.yml$' | tr '\n' ' ')
29+
30+
if [ -n "$MODIFIED_YML_PATHS" ]; then
31+
echo "Detected new models/features yml files: $MODIFIED_YML_PATHS"
32+
for FILE_PATH in $MODIFIED_YML_PATHS; do
33+
echo "Processing and uploading pipeline: ${FILE_PATH}"
34+
buildkite-agent pipeline upload "${FILE_PATH}"
35+
echo "Successfully uploaded ${FILE_PATH}"
36+
done
37+
else
38+
echo "No new models/features yml files detected"
39+
fi

.buildkite/scripts/bootstrap.sh

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,29 @@ else
2020
echo "Code files changed. Proceeding with pipeline upload."
2121
fi
2222

23+
upload_pre_merge_pipeline() {
24+
buildkite-agent pipeline upload .buildkite/pipeline_pre_merge.yml
25+
}
26+
2327
upload_pipeline() {
24-
VLLM_COMMIT_HASH=$(git ls-remote https://github.com/vllm-project/vllm.git HEAD | awk '{ print $1}')
25-
buildkite-agent meta-data set "VLLM_COMMIT_HASH" "${VLLM_COMMIT_HASH}"
26-
echo "Using vllm commit hash: $(buildkite-agent meta-data get "VLLM_COMMIT_HASH")"
2728
buildkite-agent pipeline upload .buildkite/pipeline_jax.yml
2829
# buildkite-agent pipeline upload .buildkite/pipeline_torch.yml
2930
buildkite-agent pipeline upload .buildkite/main.yml
3031
buildkite-agent pipeline upload .buildkite/nightly_releases.yml
32+
upload_pre_merge_pipeline
3133
}
3234

33-
echo "--- Starting Buildkite Bootstrap ---"
35+
fetch_latest_upstream_vllm_commit() {
36+
# To help with debugging (when needed), perform setup to:
37+
# 1. Use the same upstream vllm commit for all jobs in this CI run for consistency
38+
# 2. Record which upstream commit this CI run is using
39+
VLLM_COMMIT_HASH=$(git ls-remote https://github.com/vllm-project/vllm.git HEAD | awk '{ print $1}')
40+
buildkite-agent meta-data set "VLLM_COMMIT_HASH" "${VLLM_COMMIT_HASH}"
41+
echo "Using vllm commit hash: $(buildkite-agent meta-data get "VLLM_COMMIT_HASH")"
42+
}
3443

44+
echo "--- Starting Buildkite Bootstrap ---"
45+
fetch_latest_upstream_vllm_commit
3546
# Check if the current build is a pull request
3647
if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then
3748
echo "This is a Pull Request build."
@@ -42,8 +53,8 @@ if [ "$BUILDKITE_PULL_REQUEST" != "false" ]; then
4253
echo "Found 'ready' label on PR. Uploading main pipeline..."
4354
upload_pipeline
4455
else
45-
echo "No 'ready' label found on PR. Skipping main pipeline upload."
46-
exit 0 # Exit with 0 to indicate success (no error, just skipped)
56+
echo "No 'ready' label found on PR. Uploading fast check pipeline"
57+
upload_pre_merge_pipeline
4758
fi
4859
else
4960
# If it's NOT a Pull Request (e.g., branch push, tag, manual build)

0 commit comments

Comments
 (0)