From c31a436e7bdf13e34812baccc9ed2afd92945873 Mon Sep 17 00:00:00 2001 From: Lucas Bajolet Date: Fri, 17 Jun 2022 13:53:46 -0400 Subject: [PATCH] registry: only update status on status update Prior to this commit, we'd send updates to both the labels and the cloud-provider whenever an update to the status of a build would be sent. This would cause a bug in which once a build reached the post-processing state, and its cloud-provider was set, the status could not be updated anymore, as the cloud-provider would be set and further updates are rejected by the platform. To avoid this problem, we only transmit the status when doing a status update, and no other fields along with it. --- internal/registry/types.bucket.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/registry/types.bucket.go b/internal/registry/types.bucket.go index 34c69a9c9f1..9221ba7aa04 100644 --- a/internal/registry/types.bucket.go +++ b/internal/registry/types.bucket.go @@ -156,10 +156,10 @@ func (b *Bucket) UpdateBuildStatus(ctx context.Context, name string, status mode _, err = b.client.UpdateBuild(ctx, buildToUpdate.ID, buildToUpdate.RunUUID, - buildToUpdate.CloudProvider, "", "", - buildToUpdate.Labels, + "", + nil, status, nil, )