Skip to content

Resolve "Localization of blog categories and URLs" BE delete Job update

Step 1: What is changing in this MR?

This MR adds blog exclusion to rsync command on BE deployment exclude_flag=( -x '^.*blog[/\\]') to avoid `blog/` files deletion. Related to gitlab-blog!177 (merged)

related gitlab-blog#153 (closed)

Production Review app
https://about.gitlab.com/blog/fr-fr/2012/06/20/gitlab-wallpaper/ https://153-localization-of-blog-categories-and-urls.about.gitlab-review.app/fr-fr/blog/2012/06/20/gitlab-wallpaper/

Testing Process:

To test /blog repo files are not deleted on BE, this MR was created using the same GCP_BUCKET as our Blog MR, and a blog path exception was added to ignore everything matching blog files with: -x '^.*blog[/\\]'.

After testing the scenarios below -d literal is removed and replaced back with the $delete_flag variable.

Description Commands Exclude flag Screenshot Job Log

Dry run delete job with no exclusions: All blog/ files marked for deletion

with_backoff gsutil -h "Cache-Control:public, max-age=$cache_control_max_age" -m rsync -n -d "${exclude_flag[@]}" -z css,html,js,txt -c -r "$src" "$dest"

dry-run-pre-exclusion-job.txt

Running delete job with no exclusion: All blog/ files are deleted or referenced

with_backoff gsutil -h "Cache-Control:public, max-age=$cache_control_max_age" -m rsync -d "${exclude_flag[@]}" -z css,html,js,txt -c -r "$src" "$dest"

Screenshot 2024-05-09 at 2.31.49 PM.png

delete-pre-exclusion-job.txt

Running delete job with `/blog` exclusion: No blog/ files are deleted or referenced

with_backoff gsutil -h "Cache-Control:public, max-age=$cache_control_max_age" -m rsync -d "${exclude_flag[@]}" -z css,html,js,txt -c -r "$src" "$dest"

Review App:

exclude_flag=( -x '^.*blog[/\\]')

Production:

exclude_flag=( -x '200.html|.nojekyll|^.*blog[/\\]')

Screenshot 2024-05-09 at 2.22.31 PM.png

delete_job-w-exclusion.txt

Step 2: Ensure that your changes comply with the following, where applicable:

  • I, the Assignee, have run Axe tools on any updated pages, and fixed the relevant accessibility issues.
  • These changes work on both Safari, Chrome, and Firefox.
  • These changes have been reviewed for Visual Quality Assurance and Functional Quality Assurance on Mobile, Desktop, and Tablet.
  • These changes work with our Google Analytics and SEO tools.
  • These changes have been documented as expected.

Build Variables:

  • Use Contentful Preview API

Closes #153 (closed)

Edited by Margareth Mañunga

Merge request reports