test: [skip e2e] fix getting wrong image tag by short name (#29347)

By adding conjunctions, you can obtain more accurate results.

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
pull/29356/head
zhuwenxing 2023-12-20 17:34:42 +08:00 committed by GitHub
parent 1b4d2674b3
commit 1b5ac82c6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -12,7 +12,7 @@ def get_image_tag_by_short_name(repository, tag, arch):
# latest means the tag is a release build
# latest -> v$version
splits = tag.split("-")
prefix = splits[0] if len(splits) > 1 else "v"
prefix = f"{splits[0]}-" if len(splits) > 1 else "v"
url = f"https://hub.docker.com/v2/repositories/{repository}/tags?name={prefix}&ordering=last_updated"
response = requests.get(url)
data = response.json()