A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 12, 06:00 UTC
[CI] fix url-encoding behavior in nightly metadata generation (#29787)
Signed-off-by: Shengqi Chen <harry-chen@outlook.com>
Shengqi Chen committed
Dec 1, 2025 at 23:17 UTC
37593deb02423826e9206ff28e77f57a0ff8a0b0
2 files changed
+26
-18
.buildkite/scripts/generate-nightly-index.py
+6
-5
@@ -112,11 +112,12 @@ def generate_package_index_and_metadata(
112
relative_path = (
113
wheel_base_dir.relative_to(index_base_dir, walk_up=True) / file.filename
114
)
115
- href_tags.append(
116
- f' <a href="{quote(relative_path.as_posix())}">{file.filename}</a><br/>'
117
- )
115
+ # handle with '+' in URL, and avoid double-encoding '/' and already-encoded '%2B'
116
+ # NOTE: this is AWS S3 specific behavior!
117
+ file_path_quoted = quote(relative_path.as_posix(), safe=":%/")
118
+ href_tags.append(f' <a href="{file_path_quoted}">{file.filename}</a><br/>')
119
file_meta = asdict(file)
119
- file_meta["path"] = relative_path.as_posix()
120
+ file_meta["path"] = file_path_quoted
121
metadata.append(file_meta)
122
index_str = INDEX_HTML_TEMPLATE.format(items="\n".join(href_tags))
123
metadata_str = json.dumps(metadata, indent=2)
@@ -185,7 +186,7 @@ def generate_index_and_metadata(
186
"platform_tag": "manylinux2014_aarch64",
187
"variant": "cu129",
188
"filename": "vllm-0.10.2rc2+cu129-cp38-abi3-manylinux2014_aarch64.whl",
188
- "path": "../vllm-0.10.2rc2+cu129-cp38-abi3-manylinux2014_aarch64.whl" # to be concatenated with the directory URL
189
+ "path": "../vllm-0.10.2rc2%2Bcu129-cp38-abi3-manylinux2014_aarch64.whl" # to be concatenated with the directory URL and URL-encoded
190
},
191
...
192
]
setup.py
+20
-13
@@ -319,14 +319,17 @@ class precompiled_wheel_utils:
319
"""Extracts libraries and other files from an existing wheel."""
320
321
@staticmethod
322
- def extract_precompiled_and_patch_package(wheel_url_or_path: str) -> dict:
322
+ def extract_precompiled_and_patch_package(
323
+ wheel_url_or_path: str, download_filename: str | None
324
+ ) -> dict:
325
import tempfile
326
import zipfile
327
328
temp_dir = None
329
try:
330
if not os.path.isfile(wheel_url_or_path):
329
- wheel_filename = wheel_url_or_path.split("/")[-1]
331
+ # use provided filename first, then derive from URL
332
+ wheel_filename = download_filename or wheel_url_or_path.split("/")[-1]
333
temp_dir = tempfile.mkdtemp(prefix="vllm-wheels")
334
wheel_path = os.path.join(temp_dir, wheel_filename)
335
print(f"Downloading wheel from {wheel_url_or_path} to {wheel_path}")
@@ -673,7 +676,8 @@ if envs.VLLM_USE_PRECOMPILED:
676
wheel_location = os.getenv("VLLM_PRECOMPILED_WHEEL_LOCATION", None)
677
if wheel_location is not None:
678
wheel_url = wheel_location
676
- logger.info("Using user-specified precompiled wheel location: {}", wheel_url)
679
+ download_filename = None
680
+ logger.info("Using user-specified precompiled wheel location: %s", wheel_url)
681
else:
682
import platform
683
@@ -686,17 +690,17 @@ if envs.VLLM_USE_PRECOMPILED:
690
precompiled_wheel_utils.get_base_commit_in_main_branch(),
691
)
692
logger.info(
689
- "Using precompiled wheel commit {} with variant {}", commit, variant
693
+ "Using precompiled wheel commit %s with variant %s", commit, variant
694
)
695
try_default = False
692
- wheels, repo_url = None, None
696
+ wheels, repo_url, download_filename = None, None, None
697
try:
698
wheels, repo_url = _fetch_metadata_for_variant(commit, variant)
695
- except Exception as e:
699
+ except Exception:
700
logger.warning(
697
- "Failed to fetch precompiled wheel metadata for variant {}",
701
+ "Failed to fetch precompiled wheel metadata for variant %s",
702
variant,
699
- exc_info=e,
703
+ exc_info=True,
704
)
705
try_default = True # try outside handler to keep the stacktrace simple
706
if try_default:
@@ -717,26 +721,29 @@ if envs.VLLM_USE_PRECOMPILED:
721
"platform_tag": "manylinux1_x86_64",
722
"variant": null,
723
"filename": "vllm-0.11.2.dev278+gdbc3d9991-cp38-abi3-manylinux1_x86_64.whl",
720
-"path": "../vllm-0.11.2.dev278+gdbc3d9991-cp38-abi3-manylinux1_x86_64.whl"
724
+"path": "../vllm-0.11.2.dev278%2Bgdbc3d9991-cp38-abi3-manylinux1_x86_64.whl"
725
},
726
...]"""
727
for wheel in wheels:
728
+ # TODO: maybe check more compatibility later? (python_tag, abi_tag, etc)
729
if wheel.get("package_name") == "vllm" and arch in wheel.get(
730
"platform_tag", ""
731
):
727
- logger.info("Found precompiled wheel metadata: {}", wheel)
732
+ logger.info("Found precompiled wheel metadata: %s", wheel)
733
if "path" not in wheel:
734
raise ValueError(f"Wheel metadata missing path: {wheel}")
730
- # TODO: maybe check more compatibility later? (python_tag, abi_tag, etc)
735
wheel_url = repo_url + wheel["path"]
732
- logger.info("Using precompiled wheel URL: {}", wheel_url)
736
+ download_filename = wheel.get("filename")
737
+ logger.info("Using precompiled wheel URL: %s", wheel_url)
738
break
739
else:
740
raise ValueError(
741
f"No precompiled vllm wheel found for architecture {arch} "
742
f"from repo {repo_url}. All available wheels: {wheels}"
743
)
739
- patch = precompiled_wheel_utils.extract_precompiled_and_patch_package(wheel_url)
744
+ patch = precompiled_wheel_utils.extract_precompiled_and_patch_package(
745
+ wheel_url, download_filename
746
+ )
747
for pkg, files in patch.items():
748
package_data.setdefault(pkg, []).extend(files)
749