Parallel-deployed review apps throw 404s immediately after pipeline completes

Summary

Review apps generated as parallel deployments throw 404 errors for some files after the deploy job reports as completed.

On the gitlab-docs-hugo project, where we're using parallel deployments for review apps, there is a period of ~2 minutes after deploy where the site is broken due to missing frontend files.

This seems to only happen when creating the review app for the first time, and seems to only impact parallel deployments. We are not seeing this on production deploys, MR pipelines after the first one, or review apps that do not use parallel deployments.

This feels similar to this bug from last year: #827 (closed)

Steps to reproduce

  1. Create a new MR in the gitlab-docs-hugo project.
  2. As soon as the pipeline is complete, visit the review app. The site looks broken, and there are 404s from various files in the console log.
  3. Refresh the page, and you'll see fewer 404s. Continue refreshing every few seconds, and eventually you'll see a working site with no 404s.

Example Project

What is the current bug behavior?

After an MR pipeline completes for the first time, the review app is missing files for a few minutes.

What is the expected correct behavior?

The review app site should be completely deployed if the pipeline is finished.

Relevant logs and/or screenshots

Screenshot at 11:18am Screenshot at 11:19am
11-18 image
12:08pm 12:08:30 12:09 12:09:30
12-08 12-08-2 12-09 12-09-2

Output of checks

This bug happens on GitLab.com