indeedeng / iwf

iWF is a WorkflowAsCode microservice orchestration platform offering an orchestration coding framework and service for building resilient, fault-tolerant, scalable long-running processes
MIT License
540 stars 55 forks source link

[bug] avoid overriding continueAsNew threshold when providing workflowConfig (IWF-254) #457

Closed longquanzheng closed 2 weeks ago

longquanzheng commented 1 month ago

The continueAsNew threshold is 0 (meaning no continueAsNew) when the workflowConfig is not provided: https://github.com/indeedeng/iwf/blob/main/service/interpreter/continueAsNewCounter.go#L48

In current code, when start API provides a configOverride, it will not use the default config, which is 100 threshold: https://github.com/indeedeng/iwf/blob/main/service/api/service.go#L109

We should fix that because when user provide the configOverride, they don't mean to override everthing. They should only override based on the default config --> e.g. the activityOptimization. The override logic should be similar to https://github.com/indeedeng/iwf/blob/main/service/interpreter/workflowConfiger.go#L26