test: [skip e2e] [cherry-pick]fix getting hotfix image tag (#29350)

By adding conjunctions, you can obtain more accurate results.

pr: https://github.com/milvus-io/milvus/pull/29347

Signed-off-by: zhuwenxing <wenxing.zhu@zilliz.com>
This commit is contained in:
zhuwenxing 2023-12-20 17:12:41 +08:00 committed by GitHub
parent 9acf32a0b7
commit 40ad5d714a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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()