diff --git a/go.mod b/go.mod index 3f4d3788..22e300d1 100644 --- a/go.mod +++ b/go.mod @@ -12,7 +12,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/uber-go/tally/v4 v4.1.17-0.20240412215630-22fe011f5ff0 go.temporal.io/api v1.34.0 - go.temporal.io/sdk v1.26.1 + go.temporal.io/sdk v1.27.0 go.temporal.io/sdk/contrib/tally v0.2.0 go.temporal.io/server v1.24.1 go.uber.org/zap v1.27.0 @@ -50,7 +50,7 @@ require ( github.com/yusufpapurcu/wmi v1.2.4 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.21.0 // indirect diff --git a/go.sum b/go.sum index c654241f..6d2e423d 100644 --- a/go.sum +++ b/go.sum @@ -217,8 +217,8 @@ go.temporal.io/api v1.5.0/go.mod h1:BqKxEJJYdxb5dqf0ODfzfMxh8UEQ5L3zKS51FiIYYkA= go.temporal.io/api v1.34.0 h1:RBQtYF+jJa252uruscL0TULgdFNqUkhk5R7Bj8PT2ko= go.temporal.io/api v1.34.0/go.mod h1:YN5Ty/DSp7uAdJxLxup+Y3aQLM00q+7cZuOEGFJ2Ob8= go.temporal.io/sdk v1.12.0/go.mod h1:lSp3lH1lI0TyOsus0arnO3FYvjVXBZGi/G7DjnAnm6o= -go.temporal.io/sdk v1.26.1 h1:ggmFBythnuuW3yQRp0VzOTrmbOf+Ddbe00TZl+CQ+6U= -go.temporal.io/sdk v1.26.1/go.mod h1:ph3K/74cry+JuSV9nJH+Q+Zeir2ddzoX2LjWL/e5yCo= +go.temporal.io/sdk v1.27.0 h1:C5oOE/IRyLcZaFoB13kEHsjvSHEnGcwT6bNys0HFFHk= +go.temporal.io/sdk v1.27.0/go.mod h1:PnOq5f3dWuU2NAbY+yczXkIeycsIIdBtoCO62ZE0aak= go.temporal.io/sdk/contrib/tally v0.2.0 h1:XnTJIQcjOv+WuCJ1u8Ve2nq+s2H4i/fys34MnWDRrOo= go.temporal.io/sdk/contrib/tally v0.2.0/go.mod h1:1kpSuCms/tHeJQDPuuKkaBsMqfHnIIRnCtUYlPNXxuE= go.temporal.io/server v1.24.1 h1:PfLwLNZKFPUFYXDpHvi7fqQC94VAHI3Ssn7bSqYzzCU= @@ -245,8 +245,8 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= diff --git a/go.work.sum b/go.work.sum index ab7f0415..08d8030f 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1934,6 +1934,7 @@ github.com/centrifugal/centrifuge-go v0.10.1 h1:aAiW8SeJygYjyjvb6C7WM9uNDmVEAN60 github.com/centrifugal/centrifuge-go v0.10.1/go.mod h1:jYJB6Nony+XVRbMJUZCzL2iDAp9rkJT7SRmf7Y1fQMY= github.com/centrifugal/protocol v0.10.0 h1:Lac48ATVjVjirYPTHxbSMmiQXXajx7dhARKHy1UOL+A= github.com/centrifugal/protocol v0.10.0/go.mod h1:Tq5I1mBpLHkLxNM9gfb3Gth+sTE2kKU5hH3cVgmVs9s= +github.com/cespare/xxhash v1.1.0 h1:a6HrQnmkObjyL+Gs60czilIUGqrzKutQD6XZog3p+ko= github.com/cespare/xxhash/v2 v2.2.0/go.mod h1:VGX0DQ3Q6kWi7AoAeZDth3/j3BFtOZR5XLFGgcrjCOs= github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= @@ -2208,6 +2209,7 @@ github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY= github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ= github.com/gorilla/websocket v1.5.0 h1:PPwGk2jz7EePpoHN/+ClbZu8SPxiqlu12wZP/3sWmnc= github.com/gorilla/websocket v1.5.0/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= +github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway/v2 v2.7.0/go.mod h1:hgWBS7lorOAVIJEQMi4ZsPv9hVvWI6+ch50m39Pf2Ks= github.com/grpc-ecosystem/grpc-gateway/v2 v2.11.3/go.mod h1:o//XUCC/F+yRGJoPO/VU0GSB0f8Nhgmxx0VIRUvaC0w= github.com/grpc-ecosystem/grpc-gateway/v2 v2.16.0 h1:YBftPWNWd4WwGqtY2yeZL2ef8rHAxPBD8KFhJpmcqms= @@ -2928,6 +2930,7 @@ golang.org/x/net v0.19.0/go.mod h1:CfAk/cbD4CthTvqiEl8NpboMuiuOYsAr/7NOjZJtv1U= golang.org/x/net v0.20.0/go.mod h1:z8BVo6PvndSri0LbOE3hAn0apkU+1YvI6E70E9jsnvY= golang.org/x/net v0.21.0/go.mod h1:bIjVDfnllIU7BJ2DNgfnXvpSvtn8VRwhlsaeUTyUS44= golang.org/x/net v0.22.0/go.mod h1:JKghWKKOSdJwpW2GEx0Ja7fmaKnMsbu+MWVZTokSYmg= +golang.org/x/net v0.25.0/go.mod h1:JkAGAh7GEvH74S6FOH42FLoXpXbE/aqXSrIQjXgsiwM= golang.org/x/oauth2 v0.0.0-20190604053449-0f29369cfe45/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20191202225959-858c2ad4c8b6/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= @@ -3060,6 +3063,7 @@ golang.org/x/sys v0.15.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.16.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.17.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.18.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= +golang.org/x/sys v0.20.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/telemetry v0.0.0-20240208230135-b75ee8823808/go.mod h1:KG1lNk5ZFNssSZLrpVb4sMXKMpGwGXOxSG3rnu2gZQQ= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2 h1:IRJeR9r1pYWsHKTRe/IInb7lYvbBVIqOgsX/u0mbOWY= golang.org/x/telemetry v0.0.0-20240228155512-f48c80bd79b2/go.mod h1:TeRTkGYfJXctD9OcfyVLyj2J3IxLnKwHJR8f4D8a3YE= @@ -3109,6 +3113,7 @@ golang.org/x/text v0.11.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.12.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.13.0/go.mod h1:TvPlkZtksWOMsz7fbANvkp4WM8x/WCo/om8BMLbz+aE= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= +golang.org/x/text v0.15.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/time v0.0.0-20181108054448-85acf8d2951c/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20190308202827-9d24e82272b4/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.0.0-20191024005414-555d28b269f0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= @@ -3492,6 +3497,7 @@ google.golang.org/genproto/googleapis/api v0.0.0-20240318140521-94a12d6c2237/go. google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa h1:Jt1XW5PaLXF1/ePZrznsh/aAUvI7Adfc3LY1dAKlzRs= google.golang.org/genproto/googleapis/api v0.0.0-20240325203815-454cdb8f5daa/go.mod h1:K4kfzHtI0kqWA79gecJarFtDn/Mls+GxQcg3Zox91Ac= google.golang.org/genproto/googleapis/api v0.0.0-20240415141817-7cd4c1c1f9ec/go.mod h1:wTHjrkbcS8AoQbb/0v9bFIPItZQPAsyVfgG9YPUhjAM= +google.golang.org/genproto/googleapis/api v0.0.0-20240521202816-d264139d666e/go.mod h1:LweJcLbyVij6rCex8YunD8DYR5VDonap/jYl3ZRxcIU= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc h1:g3hIDl0jRNd9PPTs2uBzYuaD5mQuwOkZY0vSc0LR32o= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230530153820-e85fd2cbaebc/go.mod h1:ylj+BE99M198VPbBh6A8d9n3w8fChvyLK3wwBOjXBFA= google.golang.org/genproto/googleapis/bytestream v0.0.0-20230920204549-e6e6cdab5c13 h1:AzcXcS6RbpBm65S0+/F78J9hFCL0/GZWp8oCRZod780= @@ -3539,6 +3545,8 @@ google.golang.org/genproto/googleapis/rpc v0.0.0-20240325203815-454cdb8f5daa/go. google.golang.org/genproto/googleapis/rpc v0.0.0-20240415141817-7cd4c1c1f9ec/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240415180920-8c6c420018be/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= google.golang.org/genproto/googleapis/rpc v0.0.0-20240515191416-fc5f0ca64291/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240521202816-d264139d666e/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240604185151-ef581f913117/go.mod h1:EfXuqaE1J41VCDicxHzUDm+8rk+7ZdXzHV0IhO/I6s0= google.golang.org/grpc v1.20.1/go.mod h1:10oTOabMzJvdu6/UiuZezV6QK5dSlG84ov/aaiqXj38= google.golang.org/grpc v1.21.1/go.mod h1:oYelfM1adQP15Ek0mdvEgi9Df8B9CZIaU1084ijfRaM= google.golang.org/grpc v1.26.0/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= @@ -3600,6 +3608,7 @@ google.golang.org/protobuf v1.30.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqw google.golang.org/protobuf v1.31.0/go.mod h1:HV8QOd/L58Z+nl8r43ehVNZIU/HEI6OcFqwMG9pJV4I= google.golang.org/protobuf v1.32.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= google.golang.org/protobuf v1.33.0/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= +google.golang.org/protobuf v1.34.1/go.mod h1:c6P6GXX6sHbq/GpV6MGZEdwhWPcYBgnhAHhKbcUYpos= gopkg.in/alecthomas/kingpin.v2 v2.2.6 h1:jMFz6MfLP0/4fUyZle81rXUoxOBFi19VUFKVDOQfozc= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/errgo.v2 v2.1.0/go.mod h1:hNsd1EY+bozCKY1Ytp96fpM3vjJbqLJn88ws8XvfDNI= diff --git a/tests/go.mod b/tests/go.mod index d8f62ee2..46941d8f 100644 --- a/tests/go.mod +++ b/tests/go.mod @@ -20,7 +20,7 @@ require ( github.com/stretchr/testify v1.9.0 github.com/temporalio/roadrunner-temporal/v4 v4.8.0 go.temporal.io/api v1.34.0 - go.temporal.io/sdk v1.26.1 + go.temporal.io/sdk v1.27.0 go.uber.org/zap v1.27.0 ) @@ -97,7 +97,7 @@ require ( go.temporal.io/server v1.24.1 // indirect go.uber.org/atomic v1.11.0 // indirect go.uber.org/multierr v1.11.0 // indirect - golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 // indirect + golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 // indirect golang.org/x/net v0.26.0 // indirect golang.org/x/sync v0.7.0 // indirect golang.org/x/sys v0.21.0 // indirect diff --git a/tests/go.sum b/tests/go.sum index a2531940..3ca07396 100644 --- a/tests/go.sum +++ b/tests/go.sum @@ -315,8 +315,7 @@ go.temporal.io/api v1.5.0/go.mod h1:BqKxEJJYdxb5dqf0ODfzfMxh8UEQ5L3zKS51FiIYYkA= go.temporal.io/api v1.34.0 h1:RBQtYF+jJa252uruscL0TULgdFNqUkhk5R7Bj8PT2ko= go.temporal.io/api v1.34.0/go.mod h1:YN5Ty/DSp7uAdJxLxup+Y3aQLM00q+7cZuOEGFJ2Ob8= go.temporal.io/sdk v1.12.0/go.mod h1:lSp3lH1lI0TyOsus0arnO3FYvjVXBZGi/G7DjnAnm6o= -go.temporal.io/sdk v1.26.1 h1:ggmFBythnuuW3yQRp0VzOTrmbOf+Ddbe00TZl+CQ+6U= -go.temporal.io/sdk v1.26.1/go.mod h1:ph3K/74cry+JuSV9nJH+Q+Zeir2ddzoX2LjWL/e5yCo= +go.temporal.io/sdk v1.27.0 h1:C5oOE/IRyLcZaFoB13kEHsjvSHEnGcwT6bNys0HFFHk= go.temporal.io/sdk/contrib/opentelemetry v0.5.0 h1:SOcS5VD7lWU+zwtY9PITn5nXLlSywgVzl5A7kWwQ6kI= go.temporal.io/sdk/contrib/opentelemetry v0.5.0/go.mod h1:zJF/95YTBlTnsnMHLKiZzMFN76LnuTTGC7juBS7NeBY= go.temporal.io/sdk/contrib/tally v0.2.0 h1:XnTJIQcjOv+WuCJ1u8Ve2nq+s2H4i/fys34MnWDRrOo= @@ -345,8 +344,7 @@ golang.org/x/crypto v0.0.0-20190308221718-c2843e01d9a2/go.mod h1:djNgcEr1/C05ACk golang.org/x/crypto v0.0.0-20191011191535-87dc89f01550/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= golang.org/x/crypto v0.0.0-20200622213623-75b288015ac9/go.mod h1:LzIPMQfyMNhhGPhUkYOs5KpL4U8rLKemX1yGLhDgUto= golang.org/x/exp v0.0.0-20190121172915-509febef88a4/go.mod h1:CJ0aWSM057203Lf6IL+f9T1iT9GByDxfZKAQTCR3kQA= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8 h1:LoYXNGAShUG3m/ehNk4iFctuhGX/+R1ZpfJ4/ia80JM= -golang.org/x/exp v0.0.0-20240604190554-fc45aab8b7f8/go.mod h1:jj3sYF3dwk5D+ghuXyeI3r5MFf+NT2An6/9dOA95KSI= +golang.org/x/exp v0.0.0-20240613232115-7f521ea00fb8 h1:yixxcjnhBmY0nkL253HFVIm0JsFHwrHdT3Yh6szTnfY= golang.org/x/lint v0.0.0-20181026193005-c67002cb31c3/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= golang.org/x/lint v0.0.0-20190227174305-5b3e6a55c961/go.mod h1:wehouNa3lNwaWXcvxsM5YxQ5yQlVC4a0KAMCusXpPoU= golang.org/x/lint v0.0.0-20190313153728-d0100b6bd8b3/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= diff --git a/tests/updates/updates_async_test.go b/tests/updates/updates_async_test.go index 2dab0361..9ca82b1d 100644 --- a/tests/updates/updates_async_test.go +++ b/tests/updates/updates_async_test.go @@ -12,7 +12,6 @@ import ( "go.temporal.io/api/common/v1" "go.temporal.io/api/enums/v1" "go.temporal.io/api/history/v1" - updatepb "go.temporal.io/api/update/v1" "go.temporal.io/api/workflowservice/v1" "go.temporal.io/sdk/client" ) @@ -48,14 +47,12 @@ func Test_Updates_9(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ - RunID: w.GetRunID(), - WorkflowID: w.GetID(), - UpdateName: awaitWithTimeoutM, - Args: []any{"key", 1, "fallback"}, - WaitPolicy: &updatepb.WaitPolicy{ - LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, - }, + handle, err := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: awaitWithTimeoutM, + Args: []any{"key", 1, "fallback"}, + WaitForStage: client.WorkflowUpdateStageAccepted, }) require.NoError(t, err) @@ -113,14 +110,12 @@ func Test_Updates_10(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ - RunID: w.GetRunID(), - WorkflowID: w.GetID(), - UpdateName: awaitM, - Args: []any{"key"}, - WaitPolicy: &updatepb.WaitPolicy{ - LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, - }, + handle, err2 := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: awaitM, + Args: []any{"key"}, + WaitForStage: client.WorkflowUpdateStageAccepted, }) require.NoError(t, err2) @@ -146,14 +141,12 @@ func Test_Updates_10(t *testing.T) { ctx3, cancel3 := context.WithTimeout(context.Background(), time.Minute) defer cancel3() - handle, err := s.Client.UpdateWorkflowWithOptions(ctx3, &client.UpdateWorkflowWithOptionsRequest{ - RunID: w.GetRunID(), - WorkflowID: w.GetID(), - UpdateName: resolveValueM, - Args: []any{"key", "resolved"}, - WaitPolicy: &updatepb.WaitPolicy{ - LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, - }, + handle, err := s.Client.UpdateWorkflow(ctx3, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: resolveValueM, + Args: []any{"key", "resolved"}, + WaitForStage: client.WorkflowUpdateStageAccepted, }) require.NoError(t, err) @@ -219,14 +212,12 @@ func Test_Updates_11(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ - RunID: w.GetRunID(), - WorkflowID: w.GetID(), - UpdateName: awaitM, - Args: []any{fmt.Sprintf("key-%d", i)}, - WaitPolicy: &updatepb.WaitPolicy{ - LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, - }, + handle, err2 := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: awaitM, + Args: []any{fmt.Sprintf("key-%d", i)}, + WaitForStage: client.WorkflowUpdateStageAccepted, }) require.NoError(t, err2) @@ -245,14 +236,12 @@ func Test_Updates_11(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ - RunID: w.GetRunID(), - WorkflowID: w.GetID(), - UpdateName: resolveValueM, - Args: []any{fmt.Sprintf("key-%d", i), "resolved"}, - WaitPolicy: &updatepb.WaitPolicy{ - LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, - }, + handle, err2 := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: resolveValueM, + Args: []any{fmt.Sprintf("key-%d", i), "resolved"}, + WaitForStage: client.WorkflowUpdateStageAccepted, }) require.NoError(t, err2) @@ -320,14 +309,12 @@ func Test_Updates_12(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ - RunID: w.GetRunID(), - WorkflowID: w.GetID(), - UpdateName: awaitM, - Args: []any{fmt.Sprintf("key-%d", i)}, - WaitPolicy: &updatepb.WaitPolicy{ - LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, - }, + handle, err2 := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: awaitM, + Args: []any{fmt.Sprintf("key-%d", i)}, + WaitForStage: client.WorkflowUpdateStageAccepted, }) require.NoError(t, err2) @@ -346,14 +333,12 @@ func Test_Updates_12(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err2 := s.Client.UpdateWorkflowWithOptions(ctx, &client.UpdateWorkflowWithOptionsRequest{ - RunID: w.GetRunID(), - WorkflowID: w.GetID(), - UpdateName: resolveValueM, - Args: []any{fmt.Sprintf("key-%d", i), fmt.Sprintf("resolved-%d", i)}, - WaitPolicy: &updatepb.WaitPolicy{ - LifecycleStage: enums.UPDATE_WORKFLOW_EXECUTION_LIFECYCLE_STAGE_ACCEPTED, - }, + handle, err2 := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: resolveValueM, + Args: []any{fmt.Sprintf("key-%d", i), fmt.Sprintf("resolved-%d", i)}, + WaitForStage: client.WorkflowUpdateStageAccepted, }) require.NoError(t, err2) diff --git a/tests/updates/updates_replay_test.go b/tests/updates/updates_replay_test.go index 1ec17363..040e5abd 100644 --- a/tests/updates/updates_replay_test.go +++ b/tests/updates/updates_replay_test.go @@ -44,7 +44,13 @@ func TestUpdatesReplay(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameM, "John Doe") + handle, err := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: addNameM, + Args: []any{"John Doe"}, + WaitForStage: client.WorkflowUpdateStageAccepted, + }) require.NoError(t, err) var result any diff --git a/tests/updates/updates_test.go b/tests/updates/updates_test.go index 3b0d3f06..f38a3420 100644 --- a/tests/updates/updates_test.go +++ b/tests/updates/updates_test.go @@ -44,7 +44,13 @@ func Test_UpdatesInit(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameM, "John Doe") + handle, err := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: addNameM, + Args: []any{"John Doe"}, + WaitForStage: client.WorkflowUpdateStageAccepted, + }) require.NoError(t, err) var result any @@ -85,7 +91,13 @@ func Test_Updates_2(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameWOValidationM, "John Doe 42") + handle, err := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: addNameWOValidationM, + Args: []any{"John Doe 42"}, + WaitForStage: client.WorkflowUpdateStageAccepted, + }) require.NoError(t, err) var result any @@ -126,7 +138,13 @@ func Test_Updates_4(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameM, "42") + handle, err := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: addNameM, + Args: []any{"42"}, + WaitForStage: client.WorkflowUpdateStageAccepted, + }) require.NoError(t, err) var result any @@ -167,7 +185,13 @@ func Test_Updates_5(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), throwExcM, "John Doe") + handle, err := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: throwExcM, + Args: []any{"John Doe"}, + WaitForStage: client.WorkflowUpdateStageAccepted, + }) require.NoError(t, err) var result any @@ -208,7 +232,13 @@ func Test_Updates_6(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), randomizeNameM, 1) + handle, err := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: randomizeNameM, + Args: []any{1}, + WaitForStage: client.WorkflowUpdateStageAccepted, + }) require.NoError(t, err) var result []any @@ -249,7 +279,13 @@ func Test_Updates_7(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), randomizeNameM, 3) + handle, err := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: randomizeNameM, + Args: []any{3}, + WaitForStage: client.WorkflowUpdateStageAccepted, + }) require.NoError(t, err) var result []any @@ -290,7 +326,13 @@ func Test_Updates_8(t *testing.T) { ctx, cancel := context.WithTimeout(context.Background(), time.Minute) defer cancel() - handle, err := s.Client.UpdateWorkflow(ctx, w.GetID(), w.GetRunID(), addNameViaActivityM, "John Doe") + handle, err := s.Client.UpdateWorkflow(ctx, client.UpdateWorkflowOptions{ + RunID: w.GetRunID(), + WorkflowID: w.GetID(), + UpdateName: addNameViaActivityM, + Args: []any{"John Doe"}, + WaitForStage: client.WorkflowUpdateStageAccepted, + }) require.NoError(t, err) var result any