Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: set repoRoot on http cache so cache can be restored #4956

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cli/internal/cache/cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ func newSyncCache(opts Opts, repoRoot turbopath.AbsoluteSystemPath, client clien
}

if useHTTPCache {
implementation := newHTTPCache(opts, client, recorder)
implementation := newHTTPCache(opts, client, recorder, repoRoot)
cacheImplementations = append(cacheImplementations, implementation)
}

Expand Down
3 changes: 2 additions & 1 deletion cli/internal/cache/cache_http.go
Original file line number Diff line number Diff line change
Expand Up @@ -267,12 +267,13 @@ func (cache *httpCache) CleanAll() {

func (cache *httpCache) Shutdown() {}

func newHTTPCache(opts Opts, client client, recorder analytics.Recorder) *httpCache {
func newHTTPCache(opts Opts, client client, recorder analytics.Recorder, repoRoot turbopath.AbsoluteSystemPath) *httpCache {
return &httpCache{
writable: true,
client: client,
requestLimiter: make(limiter, 20),
recorder: recorder,
repoRoot: repoRoot,
signerVerifier: &ArtifactSignatureAuthentication{
// TODO(Gaspar): this should use RemoteCacheOptions.TeamId once we start
// enforcing team restrictions for repositories.
Expand Down