Skip to content

Rails: Implement CI caching or mirroring for external sources of nodejs and yarn

Summary

2023-10-19: curl nodejs download failure (gitlab-com/gl-infra/production#17005 - closed)

We are seeing unreliability of the downloads for Nodejs. While this is fronted by CloudFlare, somethings is causing regular interruptions.

To address this, we should implement use of CI cache for these sources if possible. To do this, we are discussing a few methods:

  1. 🚫 Use additional curl flag for "retry on all errors"
    • This is not available in the curl version within UBI8
  2. Replace curl with a shimmed script to handle these failures (!1593 (merged))
    • If curl fails during download, retry (exit codes 18 and 92)
  3. 🔍 Replace curl with a shimmed script, which will attempt to make use of CI cache before performing curl
    • If not in cache, use curl
    • Problem: CI cache inside Dockerfile? 🤔
  4. Mirror the tarball (by several means, onus on GitLab)
  5. 👎 Use a different mirror (just shifting target, onus on unknown external)

External evidence of upstream's CDN issues

Acceptance Criteria

  • Must work on GitLab.com
  • Must work on Dev
  • Must work for forks / unprivileged access
  • Must work outside of CI
Edited by Jason Plum