Skip to content

Commit 8b886aa

Browse files
committed
Revert "[CI] fix url-encoding behavior in nightly metadata generation (#29787)"
This reverts commit 37593de.
1 parent eaf8148 commit 8b886aa

File tree

2 files changed

+18
-26
lines changed

2 files changed

+18
-26
lines changed

.buildkite/scripts/generate-nightly-index.py

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,12 +112,11 @@ def generate_package_index_and_metadata(
112112
relative_path = (
113113
wheel_base_dir.relative_to(index_base_dir, walk_up=True) / file.filename
114114
)
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/>')
115+
href_tags.append(
116+
f' <a href="{quote(relative_path.as_posix())}">{file.filename}</a><br/>'
117+
)
119118
file_meta = asdict(file)
120-
file_meta["path"] = file_path_quoted
119+
file_meta["path"] = relative_path.as_posix()
121120
metadata.append(file_meta)
122121
index_str = INDEX_HTML_TEMPLATE.format(items="\n".join(href_tags))
123122
metadata_str = json.dumps(metadata, indent=2)
@@ -186,7 +185,7 @@ def generate_index_and_metadata(
186185
"platform_tag": "manylinux2014_aarch64",
187186
"variant": "cu129",
188187
"filename": "vllm-0.10.2rc2+cu129-cp38-abi3-manylinux2014_aarch64.whl",
189-
"path": "../vllm-0.10.2rc2%2Bcu129-cp38-abi3-manylinux2014_aarch64.whl" # to be concatenated with the directory URL and URL-encoded
188+
"path": "../vllm-0.10.2rc2+cu129-cp38-abi3-manylinux2014_aarch64.whl" # to be concatenated with the directory URL
190189
},
191190
...
192191
]

setup.py

Lines changed: 13 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -319,17 +319,14 @@ class precompiled_wheel_utils:
319319
"""Extracts libraries and other files from an existing wheel."""
320320

321321
@staticmethod
322-
def extract_precompiled_and_patch_package(
323-
wheel_url_or_path: str, download_filename: str | None
324-
) -> dict:
322+
def extract_precompiled_and_patch_package(wheel_url_or_path: str) -> dict:
325323
import tempfile
326324
import zipfile
327325

328326
temp_dir = None
329327
try:
330328
if not os.path.isfile(wheel_url_or_path):
331-
# use provided filename first, then derive from URL
332-
wheel_filename = download_filename or wheel_url_or_path.split("/")[-1]
329+
wheel_filename = wheel_url_or_path.split("/")[-1]
333330
temp_dir = tempfile.mkdtemp(prefix="vllm-wheels")
334331
wheel_path = os.path.join(temp_dir, wheel_filename)
335332
print(f"Downloading wheel from {wheel_url_or_path} to {wheel_path}")
@@ -676,8 +673,7 @@ def _fetch_metadata_for_variant(
676673
wheel_location = os.getenv("VLLM_PRECOMPILED_WHEEL_LOCATION", None)
677674
if wheel_location is not None:
678675
wheel_url = wheel_location
679-
download_filename = None
680-
logger.info("Using user-specified precompiled wheel location: %s", wheel_url)
676+
logger.info("Using user-specified precompiled wheel location: {}", wheel_url)
681677
else:
682678
import platform
683679

@@ -690,17 +686,17 @@ def _fetch_metadata_for_variant(
690686
precompiled_wheel_utils.get_base_commit_in_main_branch(),
691687
)
692688
logger.info(
693-
"Using precompiled wheel commit %s with variant %s", commit, variant
689+
"Using precompiled wheel commit {} with variant {}", commit, variant
694690
)
695691
try_default = False
696-
wheels, repo_url, download_filename = None, None, None
692+
wheels, repo_url = None, None
697693
try:
698694
wheels, repo_url = _fetch_metadata_for_variant(commit, variant)
699-
except Exception:
695+
except Exception as e:
700696
logger.warning(
701-
"Failed to fetch precompiled wheel metadata for variant %s",
697+
"Failed to fetch precompiled wheel metadata for variant {}",
702698
variant,
703-
exc_info=True,
699+
exc_info=e,
704700
)
705701
try_default = True # try outside handler to keep the stacktrace simple
706702
if try_default:
@@ -721,29 +717,26 @@ def _fetch_metadata_for_variant(
721717
"platform_tag": "manylinux1_x86_64",
722718
"variant": null,
723719
"filename": "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"
720+
"path": "../vllm-0.11.2.dev278+gdbc3d9991-cp38-abi3-manylinux1_x86_64.whl"
725721
},
726722
...]"""
727723
for wheel in wheels:
728-
# TODO: maybe check more compatibility later? (python_tag, abi_tag, etc)
729724
if wheel.get("package_name") == "vllm" and arch in wheel.get(
730725
"platform_tag", ""
731726
):
732-
logger.info("Found precompiled wheel metadata: %s", wheel)
727+
logger.info("Found precompiled wheel metadata: {}", wheel)
733728
if "path" not in wheel:
734729
raise ValueError(f"Wheel metadata missing path: {wheel}")
730+
# TODO: maybe check more compatibility later? (python_tag, abi_tag, etc)
735731
wheel_url = repo_url + wheel["path"]
736-
download_filename = wheel.get("filename")
737-
logger.info("Using precompiled wheel URL: %s", wheel_url)
732+
logger.info("Using precompiled wheel URL: {}", wheel_url)
738733
break
739734
else:
740735
raise ValueError(
741736
f"No precompiled vllm wheel found for architecture {arch} "
742737
f"from repo {repo_url}. All available wheels: {wheels}"
743738
)
744-
patch = precompiled_wheel_utils.extract_precompiled_and_patch_package(
745-
wheel_url, download_filename
746-
)
739+
patch = precompiled_wheel_utils.extract_precompiled_and_patch_package(wheel_url)
747740
for pkg, files in patch.items():
748741
package_data.setdefault(pkg, []).extend(files)
749742

0 commit comments

Comments
 (0)