Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix rhui_alias resolution during cache flush [RHELDST-26143] #733

Merged
merged 1 commit into from
Aug 13, 2024

Commits on Aug 13, 2024

  1. 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
    rohanpm committed Aug 13, 2024
    Configuration menu
    Copy the full SHA
    2cec920 View commit details
    Browse the repository at this point in the history