internal/pkg: compute http identifier from url
All checks were successful
Test / Create distribution (push) Successful in 44s
Test / Sandbox (push) Successful in 2m30s
Test / ShareFS (push) Successful in 3m40s
Test / Hpkg (push) Successful in 4m24s
Test / Sandbox (race detector) (push) Successful in 4m46s
Test / Hakurei (race detector) (push) Successful in 5m51s
Test / Hakurei (push) Successful in 2m28s
Test / Flake checks (push) Successful in 1m41s
All checks were successful
Test / Create distribution (push) Successful in 44s
Test / Sandbox (push) Successful in 2m30s
Test / ShareFS (push) Successful in 3m40s
Test / Hpkg (push) Successful in 4m24s
Test / Sandbox (race detector) (push) Successful in 4m46s
Test / Hakurei (race detector) (push) Successful in 5m51s
Test / Hakurei (push) Successful in 2m28s
Test / Flake checks (push) Successful in 1m41s
The previous implementation exposes arbitrary user input to the cache as an identifier, which is highly error-prone and can cause the cache to enter an inconsistent state if the user is not careful. This change replaces the implementation to compute identifier late, using url string as params. Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
@@ -141,8 +141,8 @@ func Ident(a Artifact) ID {
|
||||
type Kind uint64
|
||||
|
||||
const (
|
||||
// KindHTTP is the kind of [Artifact] returned by [NewHTTP].
|
||||
KindHTTP Kind = iota
|
||||
// KindHTTPGet is the kind of [Artifact] returned by [NewHTTPGet].
|
||||
KindHTTPGet Kind = iota
|
||||
// KindTar is the kind of artifact returned by [NewTar].
|
||||
KindTar
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user