Skip to content

Commit bf92e83

Browse files
authored
CircleCI caching: allow ftime to be ceil(ftime_req) in Base.stale_cachefile (#47433)
* CircleCI caching: allow ftime to be ceil(ftime_req) in Base.stale_cachefile It appears that [caching functionalities](https://circleci.com/docs/caching/) provided by CircleCi, a leading CI/CD provider, can truncate timestamps to full seconds, resulting in re-compilations as below: ``` Rejecting stale cache file /root/.julia/compiled/v1.8/ComponentArrays/cYHSD_3rQji.ji (mtime 1.6673960929277816e9) because file /root/.julia/packages/ComponentArrays/YyD7i/src/ComponentArrays.jl ``` This PR relaxes the `is_stale` check to be robust against rounding-to-second timestamp mutations. I can provide a minimal CircleCI configuration file to reproduce if this is helpful.
1 parent 6321e47 commit bf92e83

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

base/loading.jl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2260,6 +2260,7 @@ end
22602260
ftime = mtime(f)
22612261
is_stale = ( ftime != ftime_req ) &&
22622262
( ftime != floor(ftime_req) ) && # Issue #13606, PR #13613: compensate for Docker images rounding mtimes
2263+
( ftime != ceil(ftime_req) ) && # PR: #47433 Compensate for CirceCI's truncating of timestamps in its caching
22632264
( ftime != trunc(ftime_req, digits=6) ) && # Issue #20837, PR #20840: compensate for GlusterFS truncating mtimes to microseconds
22642265
( ftime != 1.0 ) && # PR #43090: provide compatibility with Nix mtime.
22652266
!( 0 < (ftime_req - ftime) < 1e-6 ) # PR #45552: Compensate for Windows tar giving mtimes that may be incorrect by up to one microsecond

0 commit comments

Comments
 (0)