Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
longquanzheng committed Dec 6, 2024
1 parent b2a853e commit dda96dd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 28 deletions.
2 changes: 1 addition & 1 deletion integ/run_server_for_debug_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import (

// remove the underscore to run
// nolint
func TestNothingButJustRunningTheServiceTemporalWorkerForDebug(t *testing.T) {
func _TestNothingButJustRunningTheServiceTemporalWorkerForDebug(t *testing.T) {
startIwfServiceWithClient(service.BackendTypeTemporal)
time.Sleep(time.Hour)
}
8 changes: 0 additions & 8 deletions integ/util.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ package integ
import (
cadenceapi "github.com/indeedeng/iwf/service/client/cadence"
temporalapi "github.com/indeedeng/iwf/service/client/temporal"
"github.com/indeedeng/iwf/service/common/ptr"
"log"
"net/http"
"time"
Expand Down Expand Up @@ -225,13 +224,6 @@ func minimumContinueAsNewConfigV0() *iwfidl.WorkflowConfig {
return minimumContinueAsNewConfig(false)
}

func minimumContinueAsNewConfigV1() *iwfidl.WorkflowConfig {
return &iwfidl.WorkflowConfig{
ContinueAsNewThreshold: iwfidl.PtrInt32(1),
ContinueAsNewPageSizeInBytes: ptr.Any(int32(1000)),
}
}

func getBackendTypes() []service.BackendType {
backendTypesToTest := []service.BackendType{}

Expand Down
20 changes: 1 addition & 19 deletions service/interpreter/continueAsNewer.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,7 @@ func LoadInternalsFromPreviousRun(
ctx UnifiedContext, provider WorkflowProvider, previousRunId string, continueAsNewPageSizeInBytes int32,
) (*service.ContinueAsNewDumpResponse, error) {
activityOptions := ActivityOptions{
// default timeout is 30 seconds, but configurable in DumpWorkflowInternalActivityConfig config
StartToCloseTimeout: 30 * time.Second,
StartToCloseTimeout: 5 * time.Second,
RetryPolicy: &iwfidl.RetryPolicy{
MaximumIntervalSeconds: iwfidl.PtrInt32(5),
},
Expand Down Expand Up @@ -114,9 +113,6 @@ func LoadInternalsFromPreviousRun(
return &resp, nil
}

var lastRunId = ""
var lastWholeData = ""

func (c *ContinueAsNewer) SetQueryHandlersForContinueAsNew(ctx UnifiedContext) error {
return c.provider.SetQueryHandler(ctx, service.ContinueAsNewDumpQueryType,
func(request iwfidl.WorkflowDumpRequest) (*iwfidl.WorkflowDumpResponse, error) {
Expand All @@ -142,20 +138,6 @@ func (c *ContinueAsNewer) SetQueryHandlersForContinueAsNew(ctx UnifiedContext) e
if err != nil {
return nil, err
}
runId := c.provider.GetWorkflowInfo(ctx).CurrentRunID
if lastRunId == "" || lastRunId != runId {
lastRunId = runId
lastWholeData = string(wholeData)
} else {
if lastRunId == runId {
if lastWholeData != string(wholeData) {
fmt.Println("issues with marshaling order")
fmt.Println(runId)
fmt.Println(string(wholeData))
fmt.Println(string(lastWholeData))
}
}
}
checksum := md5.Sum(wholeData)
pageSize := int32(service.DefaultContinueAsNewPageSizeInBytes)
if request.PageSizeInBytes > 0 {
Expand Down

0 comments on commit dda96dd

Please sign in to comment.