ROX-33230: Handle trailing slash in amzn2 updater#2763
Conversation
|
/retest scanner-db-slim-on-push |
|
@github-actions[bot]: The Use DetailsIn response to this:
Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. |
|
@BradLugo: The following tests failed, say
Full PR test history. Your PR dashboard. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository. I understand the commands that are listed here. |
Description
https://cdn.amazonlinux.com/2/core/latest/x86_64/mirror.listcurrently returns a URL with a trailing slash, e.g.,https://cdn.amazonlinux.com/2/core/2.0/x86_64/5c6fef27354d4abb2fae03725436346c134b4d9683f8f64279a2b307ef2b13dc/, which the updater will use and append/repodata/repomd.xml. However,https://cdn.amazonlinux.com/2/core/2.0/x86_64/5c6fef27354d4abb2fae03725436346c134b4d9683f8f64279a2b307ef2b13dc//repodata/repomd.xmlwill return a 403, whereashttps://cdn.amazonlinux.com/2/core/2.0/x86_64/5c6fef27354d4abb2fae03725436346c134b4d9683f8f64279a2b307ef2b13dc/repodata/repomd.xmlreturns the correct data.These changes use the stdlib url parsing and url methods to construct urls in a critical code path.