Reconcile uncertain tag pushes
This commit is contained in:
@@ -33,6 +33,8 @@ const (
|
||||
PublicationTagCreation PublicationPhase = PublicationPhase(publish.TagCreation)
|
||||
// PublicationPush identifies the remote tag push attempt.
|
||||
PublicationPush PublicationPhase = PublicationPhase(publish.Push)
|
||||
// PublicationReconciliation identifies the single authoritative tag query after a push error.
|
||||
PublicationReconciliation PublicationPhase = PublicationPhase(publish.Reconciliation)
|
||||
// PublicationComplete identifies a successful tag push.
|
||||
PublicationComplete PublicationPhase = PublicationPhase(publish.Complete)
|
||||
)
|
||||
@@ -51,8 +53,10 @@ type PublicationResult struct {
|
||||
// object to the selected remote. It returns a result with errors: preflight
|
||||
// failures are not_attempted, failed authoritative guards are conflict, and
|
||||
// errors after local tag creation but before push are not_published. A failed
|
||||
// push is unknown until remote reconciliation is available. A nil error means
|
||||
// the push succeeded and the result state is published.
|
||||
// push gets one bounded authoritative tag query: an exact object match confirms
|
||||
// publication, absence is not_published, a different object is conflict, and
|
||||
// an unreadable result is unknown. A nil error means publication is confirmed
|
||||
// by the successful push or exact remote object match.
|
||||
func Publish(ctx context.Context, request ReleaseRequest) (PublicationResult, error) {
|
||||
var validate func(context.Context, candidate.Candidate) error
|
||||
if request.Validate != nil {
|
||||
|
||||
Reference in New Issue
Block a user