Skip to content

Commit 925e64d

Browse files
authored
Add schedule id to pending activity info and pending decision info to history service (#6507)
* Add schedule id to pending activity info and pending decision info to history
1 parent 05b1609 commit 925e64d

File tree

16 files changed

+618
-458
lines changed

16 files changed

+618
-458
lines changed

.gen/go/shared/shared.go

Lines changed: 134 additions & 6 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gen/proto/history/v1/service.pb.yarpc.go

Lines changed: 149 additions & 148 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gen/proto/matching/v1/service.pb.yarpc.go

Lines changed: 149 additions & 148 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

.gen/proto/shared/v1/history.pb.yarpc.go

Lines changed: 149 additions & 148 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

cmd/server/go.mod

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ require (
4040
github.com/startreedata/pinot-client-go v0.2.0 // latest release supports pinot v0.12.0 which is also internal version
4141
github.com/stretchr/testify v1.8.3
4242
github.com/uber-go/tally v3.3.15+incompatible // indirect
43-
github.com/uber/cadence-idl v0.0.0-20241112184147-b527eebaaeaa
43+
github.com/uber/cadence-idl v0.0.0-20241118185545-0ff09166fc7c
4444
github.com/uber/ringpop-go v0.8.5 // indirect
4545
github.com/uber/tchannel-go v1.22.2 // indirect
4646
github.com/valyala/fastjson v1.4.1 // indirect

cmd/server/go.sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ github.com/uber-go/tally v3.3.12+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyu
407407
github.com/uber-go/tally v3.3.15+incompatible h1:9hLSgNBP28CjIaDmAuRTq9qV+UZY+9PcvAkXO4nNMwg=
408408
github.com/uber-go/tally v3.3.15+incompatible/go.mod h1:YDTIBxdXyOU/sCWilKB4bgyufu1cEi0jdVnRdxvjnmU=
409409
github.com/uber/cadence-idl v0.0.0-20211111101836-d6b70b60eb8c/go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws=
410-
github.com/uber/cadence-idl v0.0.0-20241112184147-b527eebaaeaa h1:pi5AePVFxcQyMF3DqIzSXciZK7sOyZaNv//53tIl4tw=
411-
github.com/uber/cadence-idl v0.0.0-20241112184147-b527eebaaeaa/go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws=
410+
github.com/uber/cadence-idl v0.0.0-20241118185545-0ff09166fc7c h1:sagx8l5XOlJWlwwflrxsxlYXgsgyr1Jpe2eXl7q5Vic=
411+
github.com/uber/cadence-idl v0.0.0-20241118185545-0ff09166fc7c/go.mod h1:oyUK7GCNCRHCCyWyzifSzXpVrRYVBbAMHAzF5dXiKws=
412412
github.com/uber/jaeger-client-go v2.22.1+incompatible h1:NHcubEkVbahf9t3p75TOCR83gdUHXjRJvjoBh1yACsM=
413413
github.com/uber/jaeger-client-go v2.22.1+incompatible/go.mod h1:WVhlPFC8FDjOFMMWRy2pZqQJSXxYSwNYOkTr/Z6d3Kk=
414414
github.com/uber/jaeger-lib v2.2.0+incompatible h1:MxZXOiR2JuoANZ3J6DE/U0kSFv/eJ/GfSYVCjK7dyaw=

common/types/mapper/proto/api.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1997,6 +1997,7 @@ func FromPendingActivityInfo(t *types.PendingActivityInfo) *apiv1.PendingActivit
19971997
LastFailure: FromFailure(t.LastFailureReason, t.LastFailureDetails),
19981998
LastWorkerIdentity: t.LastWorkerIdentity,
19991999
StartedWorkerIdentity: t.StartedWorkerIdentity,
2000+
ScheduleId: t.ScheduleID,
20002001
}
20012002
}
20022003

@@ -2019,6 +2020,7 @@ func ToPendingActivityInfo(t *apiv1.PendingActivityInfo) *types.PendingActivityI
20192020
LastFailureDetails: ToFailureDetails(t.LastFailure),
20202021
LastWorkerIdentity: t.LastWorkerIdentity,
20212022
StartedWorkerIdentity: t.StartedWorkerIdentity,
2023+
ScheduleID: t.ScheduleId,
20222024
}
20232025
}
20242026

@@ -2088,6 +2090,7 @@ func FromPendingDecisionInfo(t *types.PendingDecisionInfo) *apiv1.PendingDecisio
20882090
StartedTime: unixNanoToTime(t.StartedTimestamp),
20892091
Attempt: int32(t.Attempt),
20902092
OriginalScheduledTime: unixNanoToTime(t.OriginalScheduledTimestamp),
2093+
ScheduleId: t.ScheduleID,
20912094
}
20922095
}
20932096

@@ -2101,6 +2104,7 @@ func ToPendingDecisionInfo(t *apiv1.PendingDecisionInfo) *types.PendingDecisionI
21012104
StartedTimestamp: timeToUnixNano(t.StartedTime),
21022105
Attempt: int64(t.Attempt),
21032106
OriginalScheduledTimestamp: timeToUnixNano(t.OriginalScheduledTime),
2107+
ScheduleID: t.ScheduleId,
21042108
}
21052109
}
21062110

common/types/mapper/thrift/shared.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3383,6 +3383,7 @@ func FromPendingActivityInfo(t *types.PendingActivityInfo) *shared.PendingActivi
33833383
LastWorkerIdentity: &t.LastWorkerIdentity,
33843384
LastFailureDetails: t.LastFailureDetails,
33853385
StartedWorkerIdentity: &t.StartedWorkerIdentity,
3386+
ScheduleID: &t.ScheduleID,
33863387
}
33873388
}
33883389

@@ -3406,6 +3407,7 @@ func ToPendingActivityInfo(t *shared.PendingActivityInfo) *types.PendingActivity
34063407
LastWorkerIdentity: t.GetLastWorkerIdentity(),
34073408
LastFailureDetails: t.LastFailureDetails,
34083409
StartedWorkerIdentity: t.GetStartedWorkerIdentity(),
3410+
ScheduleID: t.GetScheduleID(),
34093411
}
34103412
}
34113413

@@ -3488,6 +3490,7 @@ func FromPendingDecisionInfo(t *types.PendingDecisionInfo) *shared.PendingDecisi
34883490
StartedTimestamp: t.StartedTimestamp,
34893491
Attempt: &t.Attempt,
34903492
OriginalScheduledTimestamp: t.OriginalScheduledTimestamp,
3493+
ScheduleID: &t.ScheduleID,
34913494
}
34923495
}
34933496

@@ -3502,6 +3505,7 @@ func ToPendingDecisionInfo(t *shared.PendingDecisionInfo) *types.PendingDecision
35023505
StartedTimestamp: t.StartedTimestamp,
35033506
Attempt: t.GetAttempt(),
35043507
OriginalScheduledTimestamp: t.OriginalScheduledTimestamp,
3508+
ScheduleID: t.GetScheduleID(),
35053509
}
35063510
}
35073511

common/types/shared.go

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3604,6 +3604,7 @@ type PendingActivityInfo struct {
36043604
StartedWorkerIdentity string `json:"startedWorkerIdentity,omitempty"`
36053605
LastWorkerIdentity string `json:"lastWorkerIdentity,omitempty"`
36063606
LastFailureDetails []byte `json:"lastFailureDetails,omitempty"`
3607+
ScheduleID int64 `json:"scheduleID,omitempty"`
36073608
}
36083609

36093610
// GetActivityID is an internal getter (TBD...)
@@ -3686,6 +3687,14 @@ func (v *PendingActivityInfo) GetLastFailureDetails() (o []byte) {
36863687
return
36873688
}
36883689

3690+
// GetScheduleID is an internal getter (TBD...)
3691+
func (v *PendingActivityInfo) GetScheduleID() (o int64) {
3692+
if v != nil {
3693+
return v.ScheduleID
3694+
}
3695+
return
3696+
}
3697+
36893698
// PendingActivityState is an internal type (TBD...)
36903699
type PendingActivityState int32
36913700

@@ -3793,6 +3802,7 @@ type PendingDecisionInfo struct {
37933802
StartedTimestamp *int64 `json:"startedTimestamp,omitempty"`
37943803
Attempt int64 `json:"attempt,omitempty"`
37953804
OriginalScheduledTimestamp *int64 `json:"originalScheduledTimestamp,omitempty"`
3805+
ScheduleID int64 `json:"scheduleID,omitempty"`
37963806
}
37973807

37983808
// PendingDecisionState is an internal type (TBD...)

common/types/testdata/common.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const (
6060
FeatureFlag = "FeatureFlag"
6161

6262
Attempt = 2
63+
ScheduleID = 5
6364
PageSize = 10
6465
HistoryLength = 20
6566
BacklogCountHint = 30
@@ -416,6 +417,7 @@ var (
416417
LastWorkerIdentity: Identity,
417418
LastFailureDetails: FailureDetails,
418419
StartedWorkerIdentity: Identity,
420+
ScheduleID: ScheduleID,
419421
}
420422
PendingActivityInfoArray = []*types.PendingActivityInfo{
421423
&PendingActivityInfo,
@@ -437,5 +439,6 @@ var (
437439
StartedTimestamp: &Timestamp2,
438440
Attempt: Attempt,
439441
OriginalScheduledTimestamp: &Timestamp3,
442+
ScheduleID: ScheduleID,
440443
}
441444
)

0 commit comments

Comments
 (0)