Skip to content

Commit

Permalink
Modified client to prevent flakiness in batch tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Duke0404 committed Oct 23, 2024
1 parent 1cabd99 commit 2e1135e
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -130,11 +130,8 @@ func (c *ProvisioningRequestClient) UpdateProvisioningRequest(pr *v1.Provisionin
ctx, cancel := context.WithTimeout(context.Background(), provisioningRequestClientCallTimeout)
defer cancel()

// UpdateStatus API call on a copy of the PR with cleared Spec field ensures that
// the default null template.metadata.creationTimestamp field of PodTemplateSpec
// will not generate false error logs as a side effect.
// UpdateStatus API call on a copy of the PR
prCopy := pr.DeepCopy()
prCopy.Spec = v1.ProvisioningRequestSpec{}
updatedPr, err := c.client.AutoscalingV1().ProvisioningRequests(prCopy.Namespace).UpdateStatus(ctx, prCopy, metav1.UpdateOptions{})
if err != nil {
return pr, err
Expand Down

0 comments on commit 2e1135e

Please sign in to comment.