Merge branch '57431-sprockets-caches-files-independent-of-content' into 'master'
Use correct integrity hash for sprockets caching Closes #57431 See merge request gitlab-org/gitlab-ce!25033
This commit is contained in:
commit
8886924ca9
|
@ -388,13 +388,11 @@ flaky-examples-check:
|
||||||
|
|
||||||
.assets-compile-cache: &assets-compile-cache
|
.assets-compile-cache: &assets-compile-cache
|
||||||
cache:
|
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"
|
||||||
paths:
|
paths:
|
||||||
- vendor/ruby/
|
- vendor/ruby/
|
||||||
- .yarn-cache/
|
- .yarn-cache/
|
||||||
# We have disabled caching of sprockets for now, as it fails to pick up changes in SCSS:
|
- tmp/cache/assets/sprockets
|
||||||
# https://gitlab.com/gitlab-org/gitlab-ce/issues/57431
|
|
||||||
# - tmp/cache/assets/sprockets
|
|
||||||
|
|
||||||
compile-assets:
|
compile-assets:
|
||||||
<<: *dedicated-runner
|
<<: *dedicated-runner
|
||||||
|
|
|
@ -9,7 +9,7 @@ module Gitlab
|
||||||
def file_digest(path)
|
def file_digest(path)
|
||||||
if stat = self.stat(path)
|
if stat = self.stat(path)
|
||||||
digest = self.stat_digest(path, stat)
|
digest = self.stat_digest(path, stat)
|
||||||
integrity_uri = self.hexdigest_integrity_uri(digest)
|
integrity_uri = self.integrity_uri(digest)
|
||||||
|
|
||||||
key = Sprockets::UnloadedAsset.new(path, self).file_digest_key(integrity_uri)
|
key = Sprockets::UnloadedAsset.new(path, self).file_digest_key(integrity_uri)
|
||||||
cache.fetch(key) do
|
cache.fetch(key) do
|
||||||
|
|
Loading…
Reference in New Issue