Files
tasks/api/persistence/v1/task_queues.go-helpers.pb.go
c278efc8c3 worker-versioning GA: revision number to handle async workflow inconsistencies. (#8553)
## What changed?
- This PR adds revision number mechanics to handle task dispatch
inconsistencies that could arise since our versioning API's are becoming
eventually-consistent.

## Why?
- Making our versioning API's eventually consistent.

## How did you test it?
- [ ] built
- [ ] run locally and tested manually
- [ ] covered by existing tests
- [ ] added new unit test(s)
- [ ] added new functional test(s)

## Potential risks
- There are risks but they are gated by a dynamic config.

---

> [!NOTE]
> Adds revision-number semantics to task dispatch/versioning and
introduces a new per-deployment TQ user-data schema, updating APIs,
persistence, and server logic (DC-gated) with comprehensive tests.
> 
> - **APIs (proto changes)**:
> - Add `revision_number` to `taskqueue.v1.TaskVersionDirective` and
propagate `task_dispatch_revision_number` in History
`Record*TaskStarted` requests.
> - Matching `SyncDeploymentUserDataRequest`: new fields
`deployment_name`, `update_routing_config`, `upsert_versions_data`,
`forget_versions`; response includes `routing_config_changed`. Deprecate
old `update_version_data`/`forget_version` oneof.
> - Deployment API: add `WorkerDeploymentVersionData`; mark
`DeploymentVersionData` deprecated where applicable.
> - **Persistence (task queue user data)**:
> - Extend `DeploymentData` with `deployments_data` (map of deployment →
`WorkerDeploymentData` holding `RoutingConfig` and per-build version
data). Deprecate legacy `versions` and `unversioned_ramp_data` fields.
> - **Server logic**:
> - Matching/History: compute target version using revision numbers;
start workflow deployment transitions using revision-aware decisions;
support mixed old/new schemas when calculating current/ramping.
> - Matching: new helpers to migrate/clean old-format entries, apply
routing-config updates atomically, and prevent query blackholes using
status.
> - Task dispatch carries and records revision number; internal task
struct/plumbing updated.
> - **Dynamic config**:
> - Add `system.useRevisionNumberForWorkerVersioning` (plumbed through
History/Matching) to gate new behavior.
> - **Tests**:
> - Add/expand unit and functional tests covering new schema,
routing-config updates, revision-number behavior, and propagation.
> - **Misc**:
> - Describe/Stats paths updated to read both schemas; minor build/deps
update (api-go replace).
> 
> <sup>Written by [Cursor
Bugbot]() for commit
e84f4845067edbb8f65d2b7bac1f579b620db41c. This will update automatically
on new commits. Configure
[here]().</sup>

---------

Co-authored-by: ShahabT <[email protected]>
2025-11-10 15:11:38 -05:00

377 lines
10 KiB
Go

// Code generated by protoc-gen-go-helpers. DO NOT EDIT.
package persistence
import (
"google.golang.org/protobuf/proto"
)
// Marshal an object of type BuildId to the protobuf v3 wire format
func (val *BuildId) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type BuildId from the protobuf v3 wire format
func (val *BuildId) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *BuildId) Size() int {
return proto.Size(val)
}
// Equal returns whether two BuildId values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *BuildId) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *BuildId
switch t := that.(type) {
case *BuildId:
that1 = t
case BuildId:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type CompatibleVersionSet to the protobuf v3 wire format
func (val *CompatibleVersionSet) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type CompatibleVersionSet from the protobuf v3 wire format
func (val *CompatibleVersionSet) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *CompatibleVersionSet) Size() int {
return proto.Size(val)
}
// Equal returns whether two CompatibleVersionSet values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *CompatibleVersionSet) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *CompatibleVersionSet
switch t := that.(type) {
case *CompatibleVersionSet:
that1 = t
case CompatibleVersionSet:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type AssignmentRule to the protobuf v3 wire format
func (val *AssignmentRule) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type AssignmentRule from the protobuf v3 wire format
func (val *AssignmentRule) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *AssignmentRule) Size() int {
return proto.Size(val)
}
// Equal returns whether two AssignmentRule values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *AssignmentRule) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *AssignmentRule
switch t := that.(type) {
case *AssignmentRule:
that1 = t
case AssignmentRule:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type RedirectRule to the protobuf v3 wire format
func (val *RedirectRule) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type RedirectRule from the protobuf v3 wire format
func (val *RedirectRule) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *RedirectRule) Size() int {
return proto.Size(val)
}
// Equal returns whether two RedirectRule values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *RedirectRule) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *RedirectRule
switch t := that.(type) {
case *RedirectRule:
that1 = t
case RedirectRule:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type VersioningData to the protobuf v3 wire format
func (val *VersioningData) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type VersioningData from the protobuf v3 wire format
func (val *VersioningData) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *VersioningData) Size() int {
return proto.Size(val)
}
// Equal returns whether two VersioningData values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *VersioningData) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *VersioningData
switch t := that.(type) {
case *VersioningData:
that1 = t
case VersioningData:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type DeploymentData to the protobuf v3 wire format
func (val *DeploymentData) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type DeploymentData from the protobuf v3 wire format
func (val *DeploymentData) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *DeploymentData) Size() int {
return proto.Size(val)
}
// Equal returns whether two DeploymentData values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *DeploymentData) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *DeploymentData
switch t := that.(type) {
case *DeploymentData:
that1 = t
case DeploymentData:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type WorkerDeploymentData to the protobuf v3 wire format
func (val *WorkerDeploymentData) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type WorkerDeploymentData from the protobuf v3 wire format
func (val *WorkerDeploymentData) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *WorkerDeploymentData) Size() int {
return proto.Size(val)
}
// Equal returns whether two WorkerDeploymentData values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *WorkerDeploymentData) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *WorkerDeploymentData
switch t := that.(type) {
case *WorkerDeploymentData:
that1 = t
case WorkerDeploymentData:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type TaskQueueTypeUserData to the protobuf v3 wire format
func (val *TaskQueueTypeUserData) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type TaskQueueTypeUserData from the protobuf v3 wire format
func (val *TaskQueueTypeUserData) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *TaskQueueTypeUserData) Size() int {
return proto.Size(val)
}
// Equal returns whether two TaskQueueTypeUserData values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *TaskQueueTypeUserData) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *TaskQueueTypeUserData
switch t := that.(type) {
case *TaskQueueTypeUserData:
that1 = t
case TaskQueueTypeUserData:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type TaskQueueUserData to the protobuf v3 wire format
func (val *TaskQueueUserData) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type TaskQueueUserData from the protobuf v3 wire format
func (val *TaskQueueUserData) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *TaskQueueUserData) Size() int {
return proto.Size(val)
}
// Equal returns whether two TaskQueueUserData values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *TaskQueueUserData) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *TaskQueueUserData
switch t := that.(type) {
case *TaskQueueUserData:
that1 = t
case TaskQueueUserData:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}
// Marshal an object of type VersionedTaskQueueUserData to the protobuf v3 wire format
func (val *VersionedTaskQueueUserData) Marshal() ([]byte, error) {
return proto.Marshal(val)
}
// Unmarshal an object of type VersionedTaskQueueUserData from the protobuf v3 wire format
func (val *VersionedTaskQueueUserData) Unmarshal(buf []byte) error {
return proto.Unmarshal(buf, val)
}
// Size returns the size of the object, in bytes, once serialized
func (val *VersionedTaskQueueUserData) Size() int {
return proto.Size(val)
}
// Equal returns whether two VersionedTaskQueueUserData values are equivalent by recursively
// comparing the message's fields.
// For more information see the documentation for
// https://pkg.go.dev/google.golang.org/protobuf/proto#Equal
func (this *VersionedTaskQueueUserData) Equal(that interface{}) bool {
if that == nil {
return this == nil
}
var that1 *VersionedTaskQueueUserData
switch t := that.(type) {
case *VersionedTaskQueueUserData:
that1 = t
case VersionedTaskQueueUserData:
that1 = &t
default:
return false
}
return proto.Equal(this, that1)
}