{"record":{"id":"9632629010777f08","repo":"temporalio/temporal","slug":"reset-point-for-v-is-expired","errorCode":null,"errorMessage":"Reset point for %v is expired","messagePattern":"Reset point for (.+?) is expired","errorType":"validation","errorClass":null,"httpStatus":null,"severity":"error","filePath":"service/worker/batcher/activities.go","lineNumber":1175,"sourceCode":"\texecution *commonpb.WorkflowExecution,\n\tfrontendClient workflowservice.WorkflowServiceClient,\n\tbuildId string,\n\tcurrentRunOnly bool,\n) (workflowTaskEventID int64, err error) {\n\tres, err := frontendClient.DescribeWorkflowExecution(ctx, &workflowservice.DescribeWorkflowExecutionRequest{\n\t\tNamespace: namespaceStr,\n\t\tExecution: execution,\n\t})\n\tif err != nil {\n\t\treturn 0, err\n\t}\n\tresetPoints := res.GetWorkflowExecutionInfo().GetAutoResetPoints().GetPoints()\n\tfor _, point := range resetPoints {\n\t\tif point.BuildId == buildId {\n\t\t\tif !point.Resettable {\n\t\t\t\treturn 0, fmt.Errorf(\"Reset point for %v is not resettable\", buildId)\n\t\t\t} else if point.ExpireTime != nil && point.ExpireTime.AsTime().Before(time.Now()) {\n\t\t\t\treturn 0, fmt.Errorf(\"Reset point for %v is expired\", buildId)\n\t\t\t} else if execution.RunId != point.RunId && currentRunOnly {\n\t\t\t\treturn 0, fmt.Errorf(\"Reset point for %v points to previous run and CurrentRunOnly is set\", buildId)\n\t\t\t}\n\t\t\texecution.RunId = point.RunId\n\t\t\treturn point.FirstWorkflowTaskCompletedId, nil\n\t\t}\n\t}\n\treturn 0, fmt.Errorf(\"Can't find reset point for %v\", buildId)\n}\n","sourceCodeStart":1157,"sourceCodeEnd":1185,"githubUrl":"https://github.com/temporalio/temporal/blob/bde624efd13fbd3843654058db6d9c716166318b/service/worker/batcher/activities.go#L1157-L1185","documentation":"getResetPoint rejects an auto-reset point whose ExpireTime has passed. Auto-reset points carry an expiry so that old deployment versions cannot be reset to after a retention window; once expired the point is no longer valid for reset and this error is returned.","triggerScenarios":"Calling getResetEventIDByOptions with a buildId whose auto-reset point has ExpireTime set and point.ExpireTime.AsTime().Before(time.Now()) — i.e. the reset request arrives after the point's expiration timestamp.","commonSituations":"Delayed/incident-response reset attempts days after the bad deployment; batch jobs replaying old reset inputs; deployments where reset points expire quickly per server configuration, so automation using cached buildIds fails.","solutions":["Act on resets promptly before the point expires; re-run the reset as soon as the bad deployment is identified.","Choose a non-expired reset point: enumerate auto-reset points and filter by ExpireTime in the future before selecting.","If resets are needed long-term, rely on workflow restart/continue-as-new or archive-based recovery instead of expired reset points.","Adjust server-side reset-point expiry configuration if your operational runbooks require a longer window."],"exampleFix":"// before\nresetID, err := getResetEventIDByOptions(ctx, exec, &ResetOptions{BuildId: \"v1\"}) // expired\n// after\npoints := info.GetAutoResetPoints().GetPoints()\nfor _, p := range points {\n  if p.GetBuildId() == \"v1\" && (p.GetExpireTime() == nil || p.GetExpireTime().AsTime().After(time.Now())) {\n    resetID, err = getResetEventIDByOptions(ctx, exec, &ResetOptions{BuildId: p.GetBuildId()})\n    break\n  }\n}","handlingStrategy":"validation","validationCode":"points := info.GetAutoResetPoints().GetPoints()\nfor _, p := range points {\n  if p.GetBuildId() == buildId {\n    if p.GetExpireTime() != nil && p.GetExpireTime().AsTime().Before(time.Now()) {\n      return fmt.Errorf(\"reset point for %s expired at %s\", buildId, p.GetExpireTime().AsTime())\n    }\n  }\n}","typeGuard":"func isExpired(p *deploymentpb.ResetPoint, now time.Time) bool {\n  return p.GetExpireTime() != nil && p.GetExpireTime().AsTime().Before(now)\n}","tryCatchPattern":"if err := doReset(ctx, exec, buildId); err != nil {\n  if strings.Contains(err.Error(), \"is expired\") {\n    return resetToNonExpiredPoint(ctx, exec)\n  }\n  return err\n}","preventionTips":["Run resets promptly after detecting a bad deployment; don't rely on stale BuildIds.","Filter candidate reset points by ExpireTime before selecting one.","Tune server reset-point expiry configuration to match your incident-response SLA.","Have a fallback recovery path (workflow restart) for expired points."],"tags":["go","reset","expiry","worker-versioning"],"backgroundTag":"reset-point-expired","analyzedSha":"bde624efd13fbd3843654058db6d9c716166318b","analyzedAt":"2026-09-01T07:18:39.080Z","contentChangedAt":null,"schemaVersion":2},"datasetVersion":"2026-09-08T10:18:20.063Z"}