internal/pkg: update http checksum signature
All checks were successful
Test / Create distribution (push) Successful in 55s
Test / Sandbox (push) Successful in 3m7s
Test / Sandbox (race detector) (push) Successful in 5m45s
Test / ShareFS (push) Successful in 5m47s
Test / Hpkg (push) Successful in 6m13s
Test / Hakurei (push) Successful in 7m6s
Test / Hakurei (race detector) (push) Successful in 8m38s
Test / Flake checks (push) Successful in 1m41s
All checks were successful
Test / Create distribution (push) Successful in 55s
Test / Sandbox (push) Successful in 3m7s
Test / Sandbox (race detector) (push) Successful in 5m45s
Test / ShareFS (push) Successful in 5m47s
Test / Hpkg (push) Successful in 6m13s
Test / Hakurei (push) Successful in 7m6s
Test / Hakurei (race detector) (push) Successful in 8m38s
Test / Flake checks (push) Successful in 1m41s
This was using the old pre-KnownChecksum function signature. It did not affect correctness since httpArtifact performs internal validation to avoid the strict mode vfs roundtrip, but it prevented content-addressed cache hits. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -32,6 +32,8 @@ type httpArtifact struct {
|
||||
mu sync.Mutex
|
||||
}
|
||||
|
||||
var _ KnownChecksum = new(httpArtifact)
|
||||
|
||||
// NewHTTPGet returns a new [File] backed by the supplied client. A GET request
|
||||
// is set up for url. If c is nil, [http.DefaultClient] is used instead.
|
||||
func NewHTTPGet(
|
||||
@@ -59,8 +61,8 @@ func (a *httpArtifact) Params() []byte { return []byte(a.url) }
|
||||
// Dependencies returns a nil slice.
|
||||
func (a *httpArtifact) Dependencies() []Artifact { return nil }
|
||||
|
||||
// Checksum returns the address to the caller-supplied checksum.
|
||||
func (a *httpArtifact) Checksum() *Checksum { return &a.checksum }
|
||||
// Checksum returns the caller-supplied checksum.
|
||||
func (a *httpArtifact) Checksum() Checksum { return a.checksum }
|
||||
|
||||
// ResponseStatusError is returned for a response returned by an [http.Client]
|
||||
// with a status code other than [http.StatusOK].
|
||||
|
||||
Reference in New Issue
Block a user