-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix rhui_alias resolution during cache flush [RHELDST-26143]
It was intended to take RHUI aliases into account during cache flush, but this was not implemented correctly. The main issue was that alias resolution was only implemented in the direction of (src => dest), but in the case of RHUI, we are always publishing content on the destination (non-RHUI) side of the alias. Hence we need to also consider the aliases in the (dest => src) direction to figure out that the src (RHUI) side of the alias is relevant for cache flush. A second issue was that, if multiple aliases were involved in a path, we would not flush cache for all of them. This couldn't work because the uri_alias function was designed to return only a single value, after resolution of all aliases. When multiple aliases are in play, content is actually accessible at all the paths calculated during each step of the resolution, so we need to keep track of intermediate paths and flush cache for all of them. This now behaves correctly in the typical case of both $releasever and RHUI aliases being in play, e.g. for /content/dist/rhel9/9/foo, it will now correctly calculate the 4 typical paths under which content is accessible: - /content/dist/rhel9/9/foo - /content/dist/rhel9/9.4/foo - /content/dist/rhel9/rhui/9/foo - /content/dist/rhel9/rhui/9.4/foo
- Loading branch information
Showing
5 changed files
with
286 additions
and
50 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.