2325
}
2326
for buildID, versionData := range req.GetUpsertVersionsData() {
2328
>
// Skip if existing version data has a higher revision number to avoid stale writes.
2329
>
// Equal revision number is accepted for now because we may roll back the workflow version
2330
>
// and stop incrementing the revision number.
2331
>
if existing != nil && existing.GetRevisionNumber() > versionData.GetRevisionNumber() {
2332
continue
2333
}
2335
>
changed = true
2336
>
if versionData.GetDeleted() {
2337
// Remove the version from the old deployment data format if present.
2338
//nolint:staticcheck // SA1019 deprecated versions will clean up later