From f7124667145d1f7c614d9fc644bc07bb6174454a Mon Sep 17 00:00:00 2001 From: Ophestra Date: Fri, 9 Jan 2026 01:51:39 +0900 Subject: internal/pkg: move dependency flooding to cache This imposes a hard upper limit to concurrency during dependency satisfaction and moves all dependency-related code out of individual implementations of Artifact. This change also includes ctx and msg as part of Cache. Signed-off-by: Ophestra --- internal/pkg/tar_test.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'internal/pkg/tar_test.go') diff --git a/internal/pkg/tar_test.go b/internal/pkg/tar_test.go index 6c22d316..b292ab82 100644 --- a/internal/pkg/tar_test.go +++ b/internal/pkg/tar_test.go @@ -121,8 +121,8 @@ func checkTarHTTP( tarDir := stubArtifact{ kind: pkg.KindExec, params: []byte("directory containing a single regular file"), - cure: func(c *pkg.CureContext) error { - work := c.GetWorkDir() + cure: func(t *pkg.TContext) error { + work := t.GetWorkDir() if err := os.MkdirAll(work.String(), 0700); err != nil { return err } @@ -136,8 +136,8 @@ func checkTarHTTP( tarDirMulti := stubArtifact{ kind: pkg.KindExec, params: []byte("directory containing a multiple entries"), - cure: func(c *pkg.CureContext) error { - work := c.GetWorkDir() + cure: func(t *pkg.TContext) error { + work := t.GetWorkDir() if err := os.MkdirAll(work.Append( "garbage", ).String(), 0700); err != nil { @@ -153,8 +153,8 @@ func checkTarHTTP( tarDirType := stubArtifact{ kind: pkg.KindExec, params: []byte("directory containing a symbolic link"), - cure: func(c *pkg.CureContext) error { - work := c.GetWorkDir() + cure: func(t *pkg.TContext) error { + work := t.GetWorkDir() if err := os.MkdirAll(work.String(), 0700); err != nil { return err } @@ -197,7 +197,7 @@ func checkTarHTTP( {"error passthrough", pkg.NewTar(stubArtifact{ kind: pkg.KindExec, params: []byte("doomed artifact"), - cure: func(c *pkg.CureContext) error { + cure: func(t *pkg.TContext) error { return stub.UniqueError(0xcafe) }, }, pkg.TarGzip), nil, pkg.Checksum{}, stub.UniqueError(0xcafe)}, -- cgit v1.3.1