Skip to content

Commit ccd3c04

Browse files
[ci][build] fix commit id (#6420)
Co-authored-by: Cyrus Leung <[email protected]>
1 parent 9dad5cc commit ccd3c04

File tree

3 files changed

+13
-3
lines changed

3 files changed

+13
-3
lines changed

.buildkite/test-pipeline.yaml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ steps:
194194
command: pytest -v -s test_logits_processor.py
195195

196196
- label: Utils Test
197-
command: pytest -v -s test_utils.py
197+
commands:
198+
- pytest -v -s test_utils.py
199+
- pytest -v -s test_embedded_commit.py
198200

199201
- label: Worker Test
200202
mirror_hardwares: [amd]

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ ENV NVCC_THREADS=$nvcc_threads
8888
# make sure punica kernels are built (for LoRA)
8989
ENV VLLM_INSTALL_PUNICA_KERNELS=1
9090

91+
ARG buildkite_commit
92+
ENV BUILDKITE_COMMIT=${buildkite_commit}
93+
9194
ARG USE_SCCACHE
9295
# if USE_SCCACHE is set, use sccache to speed up compilation
9396
RUN --mount=type=cache,target=/root/.cache/pip \

setup.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,13 @@ def load_module_from_path(module_name, path):
3030

3131
def embed_commit_hash():
3232
try:
33-
commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"],
34-
encoding="utf-8").strip()
33+
if "BUILDKITE_COMMIT" in os.environ:
34+
# ci build
35+
commit_id = os.environ["BUILDKITE_COMMIT"]
36+
else:
37+
commit_id = subprocess.check_output(["git", "rev-parse", "HEAD"],
38+
encoding="utf-8").strip()
39+
3540
commit_contents = f'__commit__ = "{commit_id}"\n'
3641

3742
version_file = os.path.join(ROOT_DIR, "vllm", "commit_id.py")

0 commit comments

Comments
 (0)