Use correct integrity hash for sprockets caching

Use self.integrity_uri over self.hexdigest_integrity_uri(digest), as the
latter always returned nil leading to improper cache invalidation.

We are alos enabling caching of `tmp/cache/assets/sprockets` again, to
get those performance gains.
parent acb939d7
......@@ -388,13 +388,11 @@ flaky-examples-check:
.assets-compile-cache: &assets-compile-cache
key: "assets-compile:vendor_ruby:.yarn-cache:tmp_cache_assets_sprockets:v4"
key: "assets-compile:vendor_ruby:.yarn-cache:tmp_cache_assets_sprockets:v5"
- vendor/ruby/
- .yarn-cache/
# We have disabled caching of sprockets for now, as it fails to pick up changes in SCSS:
# - tmp/cache/assets/sprockets
- tmp/cache/assets/sprockets
<<: *dedicated-runner
......@@ -9,7 +9,7 @@ module Gitlab
def file_digest(path)
if stat = self.stat(path)
digest = self.stat_digest(path, stat)
integrity_uri = self.hexdigest_integrity_uri(digest)
integrity_uri = self.integrity_uri(digest)
key =, self).file_digest_key(integrity_uri)
cache.fetch(key) do
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment