• Stan Hu's avatar
    Fix 404s downloading latest build artifacts · 8a3879f3
    Stan Hu authored
    Previously `ArtifactsController#latest_succeeded` might return 404s even
    though `ArtifactsController#download` would successfully return an
    artifact. For example, this could happen when:
    
    1. A new commit was merged to `master`.
    2. A user attempts to download the artifact for `master` before the
    pipeline for `master` finishes, or the pipeline fails altogether.
    
    To fix this problem, we fallback to looking up a successful pipelines by
    ref name if one doesn't exist for the SHA.
    
    Closes https://gitlab.com/gitlab-org/gitlab/-/issues/216055
    8a3879f3
sh-fix-artifacts-download-404.yml 89 Bytes