Validate published output declarations
This commit is contained in:
@@ -90,12 +90,12 @@ func buildPublishOutputPlan(
|
||||
}
|
||||
if _, locked := lockSet[rule.Source]; locked {
|
||||
if declaration, found := priorBySource[rule.Source]; found {
|
||||
identity, err := artifacts.ParseImmutableRunObjectKey(sessionPrefix, declaration.DestinationKey)
|
||||
identity, err := artifacts.ParsePublishedOutputObjectKey(sessionPrefix, declaration.DestinationKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("carried publish output %q: %w", rule.Source, err)
|
||||
}
|
||||
outcome.Status = publishOutputCarriedLocked
|
||||
outcome.Destination = strings.TrimPrefix(identity.RelativePath, "published/")
|
||||
outcome.Destination = identity.Destination
|
||||
outcome.DeclaredKey = declaration.DestinationKey
|
||||
outcome.OriginRun = identity.RunID
|
||||
outcome.Declaration = declaration
|
||||
@@ -115,7 +115,7 @@ func buildPublishOutputPlan(
|
||||
continue
|
||||
}
|
||||
declaredKey := publishOutputRemoteKey(runPrefix, rule.Destination)
|
||||
identity, err := artifacts.ParseImmutableRunObjectKey(sessionPrefix, declaredKey)
|
||||
identity, err := artifacts.ParsePublishedOutputObjectKey(sessionPrefix, declaredKey)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("publish output %q destination: %w", rule.Source, err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user