fix: 腾讯云更新ssl关联资源失败

This commit is contained in:
131 2025-07-13 21:51:09 +08:00 committed by RHQYZ
parent 07d5c2051c
commit d3e207cb2f

View File

@ -130,9 +130,9 @@ func (d *SSLDeployerProvider) executeUpdateCertificateInstance(ctx context.Conte
return fmt.Errorf("failed to execute sdk request 'ssl.UpdateCertificateInstance': %w", err)
}
if updateCertificateInstanceResp.Response.DeployStatus == nil {
if updateCertificateInstanceResp.Response.DeployStatus == nil || updateCertificateInstanceResp.Response.DeployRecordId == nil {
return errors.New("unexpected deployment job status")
} else if *updateCertificateInstanceResp.Response.DeployStatus == 1 {
} else if *updateCertificateInstanceResp.Response.DeployRecordId > 0 {
deployRecordId = fmt.Sprintf("%d", *updateCertificateInstanceResp.Response.DeployRecordId)
break
}
@ -175,6 +175,9 @@ func (d *SSLDeployerProvider) executeUpdateCertificateInstance(ctx context.Conte
}
if succeededCount+failedCount == totalCount {
if failedCount > 0 {
return fmt.Errorf("deployment job failed (succeeded: %d, failed: %d, total: %d)", succeededCount, failedCount, totalCount)
}
break
}
}