diff --git a/api/v1alpha1/worker_types.go b/api/v1alpha1/worker_types.go index de4249ac..1f0b6c34 100644 --- a/api/v1alpha1/worker_types.go +++ b/api/v1alpha1/worker_types.go @@ -176,9 +176,8 @@ type TaskQueue struct { // BaseWorkerDeploymentVersion contains fields common to all worker deployment version types type BaseWorkerDeploymentVersion struct { - // The string representation of the deployment version. - // Currently, this is always `deployment_name.build_id`. - VersionID string `json:"versionID"` + // BuildID is the unique identifier for this version of the worker deployment. + BuildID string `json:"buildID"` // Status indicates whether workers in this version may // be eligible to receive tasks from the Temporal server. @@ -329,8 +328,8 @@ type QueueStatistics struct { //+kubebuilder:object:root=true //+kubebuilder:subresource:status // +kubebuilder:resource:shortName=twd;twdeployment;tworkerdeployment -//+kubebuilder:printcolumn:name="Current",type="string",JSONPath=".status.currentVersion.versionID",description="Current Version for new workflows" -//+kubebuilder:printcolumn:name="Target",type="string",JSONPath=".status.targetVersion.versionID",description="Version of the current worker template" +//+kubebuilder:printcolumn:name="Current",type="string",JSONPath=".status.currentVersion.buildID",description="Current Version Build ID" +//+kubebuilder:printcolumn:name="Target",type="string",JSONPath=".status.targetVersion.buildID",description="Build ID of the target worker (based on the pod template)" //+kubebuilder:printcolumn:name="Target-Ramp",type="number",JSONPath=".status.targetVersion.rampPercentage",description="Percentage of new workflows starting on Target Version" //+kubebuilder:printcolumn:name="Age",type="date",JSONPath=".metadata.creationTimestamp" diff --git a/go.mod b/go.mod index 887f95f8..38ea4cf6 100644 --- a/go.mod +++ b/go.mod @@ -14,7 +14,7 @@ require ( github.com/pborman/uuid v1.2.1 github.com/stretchr/testify v1.10.0 go.temporal.io/api v1.50.0 - go.temporal.io/sdk v1.34.0 + go.temporal.io/sdk v1.35.0 k8s.io/api v0.33.2 k8s.io/apimachinery v0.33.2 k8s.io/client-go v0.33.2 diff --git a/go.sum b/go.sum index 5bc12117..30f288da 100644 --- a/go.sum +++ b/go.sum @@ -185,8 +185,8 @@ go.opentelemetry.io/otel/trace v1.34.0 h1:+ouXS2V8Rd4hp4580a8q23bg0azF2nI8cqLYnC go.opentelemetry.io/otel/trace v1.34.0/go.mod h1:Svm7lSjQD7kG7KJ/MUHPVXSDGz2OX4h0M2jHBhmSfRE= go.temporal.io/api v1.50.0 h1:7s8Cn+fKfNx9G0v2Ge9We6X2WiCA3JvJ9JryeNbx1Bc= go.temporal.io/api v1.50.0/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= -go.temporal.io/sdk v1.34.0 h1:VLg/h6ny7GvLFVoQPqz2NcC93V9yXboQwblkRvZ1cZE= -go.temporal.io/sdk v1.34.0/go.mod h1:iE4U5vFrH3asOhqpBBphpj9zNtw8btp8+MSaf5A0D3w= +go.temporal.io/sdk v1.35.0 h1:lRNAQ5As9rLgYa7HBvnmKyzxLcdElTuoFJ0FXM/AsLQ= +go.temporal.io/sdk v1.35.0/go.mod h1:1q5MuLc2MEJ4lneZTHJzpVebW2oZnyxoIOWX3oFVebw= go.uber.org/atomic v1.7.0/go.mod h1:fEN4uk6kAWBTFdckzkM89CLk9XfWZrxpCo0nPH17wJc= go.uber.org/goleak v1.1.10/go.mod h1:8a7PlsEVH3e/a/GLqe5IIrQx6GzcnRmZEufDUTk4A7A= go.uber.org/goleak v1.3.0 h1:2K3zAYmnTNqV73imy9J1T3WC+gmCePx2hEGkimedGto= diff --git a/go.work.sum b/go.work.sum index 70ff595e..b5c7ff81 100644 --- a/go.work.sum +++ b/go.work.sum @@ -1,7 +1,25 @@ +cel.dev/expr v0.15.0/go.mod h1:TRSuuV7DlVCE/uwv5QbAiW/v8l5O8C4eEPHeu7gf7Sg= cel.dev/expr v0.19.1 h1:NciYrtDRIR0lNCnH1LFJegdjspNx9fI59O7TWcua/W4= cel.dev/expr v0.19.1/go.mod h1:MrpN08Q+lEBs+bGYdLxxHkZoUSsCp0nSKTs0nTymJgw= cloud.google.com/go v0.26.0 h1:e0WKqKTd5BnrG8aKH3J3h+QvEIQtSUcf2n5UZ5ZgLtQ= cloud.google.com/go v0.34.0/go.mod h1:aQUYkXzVsufM+DwF1aE+0xfcU+56JwCaLick0ClmMTw= +cloud.google.com/go v0.38.0/go.mod h1:990N+gfupTy94rShfmMCWGDn0LpTmnzTp2qbd1dvSRU= +cloud.google.com/go v0.44.1/go.mod h1:iSa0KzasP4Uvy3f1mN/7PiObzGgflwredwwASm/v6AU= +cloud.google.com/go v0.44.2/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.44.3/go.mod h1:60680Gw3Yr4ikxnPRS/oxxkBccT6SA1yMk63TGekxKY= +cloud.google.com/go v0.45.1/go.mod h1:RpBamKRgapWJb87xiFSdk4g1CME7QZg3uwTez+TSTjc= +cloud.google.com/go v0.46.3/go.mod h1:a6bKKbmY7er1mI7TEI4lsAkts/mkhTSZK8w33B4RAg0= +cloud.google.com/go v0.50.0/go.mod h1:r9sluTvynVuxRIOHXQEHMFffphuXHOMZMycpNR5e6To= +cloud.google.com/go v0.52.0/go.mod h1:pXajvRH/6o3+F9jDHZWQ5PbGhn+o8w9qiu/CffaVdO4= +cloud.google.com/go v0.53.0/go.mod h1:fp/UouUEsRkN6ryDKNW/Upv/JBKnv6WDthjR6+vze6M= +cloud.google.com/go v0.54.0/go.mod h1:1rq2OEkV3YMf6n/9ZvGWI3GWw0VoqH/1x2nd8Is/bPc= +cloud.google.com/go v0.56.0/go.mod h1:jr7tqZxxKOVYizybht9+26Z/gUq7tiRzu+ACVAMbKVk= +cloud.google.com/go v0.57.0/go.mod h1:oXiQ6Rzq3RAkkY7N6t3TcE6jE+CIBBbA36lwQ1JyzZs= +cloud.google.com/go v0.62.0/go.mod h1:jmCYTdRCQuc1PHIIJ/maLInMho30T/Y0M4hTdTShOYc= +cloud.google.com/go v0.65.0/go.mod h1:O5N8zS7uWy9vkA9vayVHs65eM1ubvY4h553ofrNHObY= +cloud.google.com/go v0.72.0/go.mod h1:M+5Vjvlc2wnp6tjzE102Dw08nGShTscUx2nZMufOKPI= +cloud.google.com/go v0.74.0/go.mod h1:VV1xSbzvo+9QJOxLDaJfTjx5e+MePCpCWwvftOeQmWk= +cloud.google.com/go v0.75.0/go.mod h1:VGuuCn7PG0dwsd5XPVm2Mm3wlh3EL55/79EKB6hlPTY= cloud.google.com/go v0.112.0 h1:tpFCD7hpHFlQ8yPwT3x+QeXqc2T6+n6T+hmABHfDUSM= cloud.google.com/go v0.112.0/go.mod h1:3jEEVwZ/MHU4djK5t5RHuKOA/GbLddgTdVubX1qnPD4= cloud.google.com/go/accessapproval v1.7.4 h1:ZvLvJ952zK8pFHINjpMBY5k7LTAp/6pBf50RDMRgBUI= @@ -68,6 +86,12 @@ cloud.google.com/go/beyondcorp v1.0.3 h1:VXf9SnrnSmj2BF2cHkoTHvOUp8gjsz1KJFOMW7c cloud.google.com/go/beyondcorp v1.0.3/go.mod h1:HcBvnEd7eYr+HGDd5ZbuVmBYX019C6CEXBonXbCVwJo= cloud.google.com/go/beyondcorp v1.1.3 h1:ezavJc0Gzh4N8zBskO/DnUVMWPa8lqH/tmQSyaknmCA= cloud.google.com/go/beyondcorp v1.1.3/go.mod h1:3SlVKnlczNTSQFuH5SSyLuRd4KaBSc8FH/911TuF/Cc= +cloud.google.com/go/bigquery v1.0.1/go.mod h1:i/xbL2UlR5RvWAURpBYZTtm/cXjCha9lbfbpx4poX+o= +cloud.google.com/go/bigquery v1.3.0/go.mod h1:PjpwJnslEMmckchkHFfq+HTD2DmtT67aNFKH1/VBDHE= +cloud.google.com/go/bigquery v1.4.0/go.mod h1:S8dzgnTigyfTmLBfrtrhyYhwRxG72rYxvftPBK2Dvzc= +cloud.google.com/go/bigquery v1.5.0/go.mod h1:snEHRnqQbz117VIFhE8bmtwIDY80NLUZUMb4Nv6dBIg= +cloud.google.com/go/bigquery v1.7.0/go.mod h1://okPTzCYNXSlb24MZs83e2Do+h+VXtc4gLoIoXIAPc= +cloud.google.com/go/bigquery v1.8.0/go.mod h1:J5hqkt3O0uAFnINi6JXValWIb1v0goeZM77hZzJN/fQ= cloud.google.com/go/bigquery v1.58.0 h1:drSd9RcPVLJP2iFMimvOB9SCSIrcl+9HD4II03Oy7A0= cloud.google.com/go/bigquery v1.58.0/go.mod h1:0eh4mWNY0KrBTjUzLjoYImapGORq9gEPT7MWjCy9lik= cloud.google.com/go/bigquery v1.66.2 h1:EKOSqjtO7jPpJoEzDmRctGea3c2EOGoexy8VyY9dNro= @@ -153,6 +177,8 @@ cloud.google.com/go/dataqna v0.8.4 h1:NJnu1kAPamZDs/if3bJ3+Wb6tjADHKL83NUWsaIp2z cloud.google.com/go/dataqna v0.8.4/go.mod h1:mySRKjKg5Lz784P6sCov3p1QD+RZQONRMRjzGNcFd0c= cloud.google.com/go/dataqna v0.9.3 h1:lGUj2FYs650EUPDMV6plWBAoh8qH9Bu1KCz1PUYF2VY= cloud.google.com/go/dataqna v0.9.3/go.mod h1:PiAfkXxa2LZYxMnOWVYWz3KgY7txdFg9HEMQPb4u1JA= +cloud.google.com/go/datastore v1.0.0/go.mod h1:LXYbyblFSglQ5pkeyhO+Qmw7ukd3C+pD7TKLgZqpHYE= +cloud.google.com/go/datastore v1.1.0/go.mod h1:umbIZjpQpHh4hmRpGhH4tLFup+FVzqBi1b3c64qFpCk= cloud.google.com/go/datastore v1.15.0 h1:0P9WcsQeTWjuD1H14JIY7XQscIPQ4Laje8ti96IC5vg= cloud.google.com/go/datastore v1.15.0/go.mod h1:GAeStMBIt9bPS7jMJA85kgkpsMkvseWWXiaHya9Jes8= cloud.google.com/go/datastore v1.20.0 h1:NNpXoyEqIJmZFc0ACcwBEaXnmscUpcG4NkKnbCePmiM= @@ -331,6 +357,10 @@ cloud.google.com/go/privatecatalog v0.9.4 h1:Vo10IpWKbNvc/z/QZPVXgCiwfjpWoZ/wbgf cloud.google.com/go/privatecatalog v0.9.4/go.mod h1:SOjm93f+5hp/U3PqMZAHTtBtluqLygrDrVO8X8tYtG0= cloud.google.com/go/privatecatalog v0.10.4 h1:fu2LABMi7CgZORQ2oNGbc0hoZ0FTqLkjGqIgAV/Kc7U= cloud.google.com/go/privatecatalog v0.10.4/go.mod h1:n/vXBT+Wq8B4nSRUJNDsmqla5BYjbVxOlHzS6PjiF+w= +cloud.google.com/go/pubsub v1.0.1/go.mod h1:R0Gpsv3s54REJCy4fxDixWD93lHJMoZTyQ2kNxGRt3I= +cloud.google.com/go/pubsub v1.1.0/go.mod h1:EwwdRX2sKPjnvnqCa270oGRyludottCI76h+R3AArQw= +cloud.google.com/go/pubsub v1.2.0/go.mod h1:jhfEVHT8odbXTkndysNHCcx0awwzvfOlguIAii9o8iA= +cloud.google.com/go/pubsub v1.3.1/go.mod h1:i+ucay31+CNRpDW4Lu78I4xXG+O1r/MAHgjpRVR+TSU= cloud.google.com/go/pubsub v1.34.0 h1:ZtPbfwfi5rLaPeSvDC29fFoE20/tQvGrUS6kVJZJvkU= cloud.google.com/go/pubsub v1.34.0/go.mod h1:alj4l4rBg+N3YTFDDC+/YyFTs6JAjam2QfYsddcAW4c= cloud.google.com/go/pubsub v1.47.0 h1:Ou2Qu4INnf7ykrFjGv2ntFOjVo8Nloh/+OffF4mUu9w= @@ -403,6 +433,12 @@ cloud.google.com/go/speech v1.21.0 h1:qkxNao58oF8ghAHE1Eghen7XepawYEN5zuZXYWaUTA cloud.google.com/go/speech v1.21.0/go.mod h1:wwolycgONvfz2EDU8rKuHRW3+wc9ILPsAWoikBEWavY= cloud.google.com/go/speech v1.26.0 h1:qvURtJs7BQzQhbxWxwai0pT79S8KLVKJ/4W8igVkt1Y= cloud.google.com/go/speech v1.26.0/go.mod h1:78bqDV2SgwFlP/M4n3i3PwLthFq6ta7qmyG6lUV7UCA= +cloud.google.com/go/storage v1.0.0/go.mod h1:IhtSnM/ZTZV8YYJWCY8RULGVqBDmpoyjwiyrjsg+URw= +cloud.google.com/go/storage v1.5.0/go.mod h1:tpKbwo567HUNpVclU5sGELwQWBDZ8gh0ZeosJ0Rtdos= +cloud.google.com/go/storage v1.6.0/go.mod h1:N7U0C8pVQ/+NIKOBQyamJIeKQKkZ+mxpohlUTyfDhBk= +cloud.google.com/go/storage v1.8.0/go.mod h1:Wv1Oy7z6Yz3DshWRJFhqM/UCfaWIRTdp0RXyy7KQOVs= +cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9ullr3+Kg0= +cloud.google.com/go/storage v1.14.0/go.mod h1:GrKmX003DSIwi9o29oFT7YDnHYwZoctc3fOKtUw0Xmo= cloud.google.com/go/storage v1.36.0 h1:P0mOkAcaJxhCTvAkMhxMfrTKiNcub4YmmPBtlhAyTr8= cloud.google.com/go/storage v1.36.0/go.mod h1:M6M/3V/D3KpzMTJyPOR/HU6n2Si5QdaXYEsng2xgOs8= cloud.google.com/go/storagetransfer v1.10.3 h1:YM1dnj5gLjfL6aDldO2s4GeU8JoAvH1xyIwXre63KmI= @@ -496,14 +532,21 @@ github.com/cactus/go-statsd-client/v4 v4.0.0 h1:cjO9CI3GAHtj/Vmmt1/BRq8+hf5MXy/P github.com/census-instrumentation/opencensus-proto v0.2.1 h1:glEXhBS5PSLLv4IXzLA5yPRVX4bilULVyxxbrfOtDAk= github.com/census-instrumentation/opencensus-proto v0.4.1 h1:iKLQ0xPNFxR/2hzXZMrBo8f1j86j5WHzznCCQxV/b8g= github.com/census-instrumentation/opencensus-proto v0.4.1/go.mod h1:4T9NM4+4Vw91VeyqjLS6ao50K5bOcLKN6Q42XnYaRYw= +github.com/chzyer/logex v1.1.10 h1:Swpa1K6QvQznwJRcfTfQJmTE72DqScAa40E+fbHEXEE= +github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI= github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM= github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ= +github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI= github.com/chzyer/readline v1.5.1 h1:upd/6fQk4src78LMRzh5vItIt361/o4uq553V8B5sGI= github.com/chzyer/readline v1.5.1/go.mod h1:Eh+b79XXUwfKfcPLepksvw2tcLE/Ct21YObkaSkeBlk= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1 h1:q763qf9huN11kDQavWsoZXJNW3xEE4JJyHa5Q25/sd8= +github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU= github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04= github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8= github.com/client9/misspell v0.3.4 h1:ta993UF76GwbvJcIo3Y68y/M3WxlpEHPWIGDkJYwzJI= github.com/cncf/udpa/go v0.0.0-20191209042840-269d4d468f6f h1:WBZRG4aNOuI15bLRrCgN8fCq8E5Xuty6jGbmSNEvSsU= +github.com/cncf/udpa/go v0.0.0-20200629203442-efcf912fb354/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= +github.com/cncf/udpa/go v0.0.0-20201120205902-5459f2c99403/go.mod h1:WmhPx2Nbnhtbo57+VJT5O0JRkEi1Wbu0z5j0R8u5Hbk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe h1:QQ3GSy+MqSHxm/d8nCtnAiZdYFd45cYZPs8vOOIYKfk= github.com/cncf/udpa/go v0.0.0-20220112060539-c52dc94e7fbe/go.mod h1:6pvJx4me5XPnfI9Z40ddWsdw2W/uZgQLFXToKeRcDiI= github.com/cncf/xds/go v0.0.0-20241223141626-cff3c89139a3 h1:boJj011Hh+874zpIySeApCX4GeOjPl9qhRF3QuIZq+Q= @@ -524,11 +567,16 @@ github.com/creack/pty v1.1.9 h1:uDmaGzcdjhF4i/plgjmEsriH11Y0o7RKapEf/LDaM3w= github.com/creack/pty v1.1.11 h1:07n33Z8lZxZ2qwegKbObQohDhXDQxiMMz1NOUGYlesw= github.com/creack/pty v1.1.11/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E= github.com/crossdock/crossdock-go v0.0.0-20160816171116-049aabb0122b h1:WR1qVJzbvrVywhAk4kMQKRPx09AZVI0NdEdYs59iHcA= -github.com/fatih/color v1.18.0/go.mod h1:4FelSpRwEGDpQ12mAdzqdOukCy4u8WUtOY6lkT/6HfU= +github.com/envoyproxy/go-control-plane v0.9.7/go.mod h1:cwu0lG7PUMfa9snN8LXBig5ynNVH9qI8YYLbd1fK2po= +github.com/envoyproxy/go-control-plane v0.9.9-0.20201210154907-fd9021fe5dad/go.mod h1:cXg6YxExXjJnVBQHBLXeUAgxn2UodCpnH306RInaBQk= +github.com/envoyproxy/protoc-gen-validate v1.0.4/go.mod h1:qys6tmnRsYrQqIhm2bvKZH4Blx/1gTIZ2UKVY1M+Yew= github.com/fogleman/gg v1.2.1-0.20190220221249-0403632d5b90 h1:WXb3TSNmHp2vHoCroCIB1foO/yQ36swABL8aOVeDpgg= github.com/ghodss/yaml v1.0.0 h1:wQHKEahhL6wmXdzwWG11gIVCkOv05bNOh+Rxn0yngAk= github.com/ghodss/yaml v1.0.0/go.mod h1:4dBDuWmgqj2HViK6kFavaiC9ZROes6MMH2rRYeMEF04= github.com/go-gl/glfw v0.0.0-20190409004039-e6da0acd62b1 h1:QbL/5oDUmRBzO9/Z7Seo6zf912W/a6Sr4Eu0G/3Jho0= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20191125211704-12ad95a8df72/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4 h1:WtGNWLvXpe6ZudgnXrq0barxBImvnnJoMEhXAzcbM0I= +github.com/go-gl/glfw/v3.3/glfw v0.0.0-20200222043503-6f7a984d4dc4/go.mod h1:tQ2UAYgL5IevRw8kRxooKSPJfGvJ9fJQFa0TUsXzTg8= github.com/go-kit/kit v0.9.0 h1:wDJmvq38kDhkVxi50ni9ykkdUr1PKgqKOoi01fa0Mdk= github.com/go-kit/kit v0.9.0/go.mod h1:xBxKIO96dXMWWy0MnWVtmwkA9/13aqxPnvrjFYMA2as= github.com/go-kit/log v0.1.0 h1:DGJh0Sm43HbOeYDNnVZFl8BvcYVvjD5bqYJvp0REbwQ= @@ -550,21 +598,63 @@ github.com/godbus/dbus/v5 v5.0.4/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5x github.com/golang/freetype v0.0.0-20170609003504-e2365dfdc4a0 h1:DACJavvAHhabrF08vX0COfcOBJRhZ8lUbR+ZWIs0Y5g= github.com/golang/glog v1.2.4 h1:CNNw5U8lSiiBk7druxtSHHTsRWcxKoac6kZKm2peBBc= github.com/golang/glog v1.2.4/go.mod h1:6AhwSGph0fcJtXVM/PEHPqZlFeoLxhs7/t5UDAwmO+w= +github.com/golang/groupcache v0.0.0-20190702054246-869f871628b6/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20191227052852-215e87163ea7/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/groupcache v0.0.0-20200121045136-8c9f03a8e57e/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da h1:oI5xCqsCo564l8iNU+DwB5epxmsaqB+rhGL0m5jtYqE= github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da/go.mod h1:cIg4eruTrX1D+g88fzRXU5OdNfaM+9IcxsU14FzY7Hc= +github.com/golang/mock v1.2.0/go.mod h1:oTYuIxOrZwtPieC+H1uAHpcLFnEyAGVDL/k47Jfbm0A= +github.com/golang/mock v1.3.1/go.mod h1:sBzyDLLjw3U8JLTeZvSv8jJB+tU5PVekmnlKIyFUx0Y= +github.com/golang/mock v1.4.0/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.1/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.3/go.mod h1:UOMv5ysSaYNkG+OFQykRIcU/QvvxJf3p21QfJ2Bt3cw= +github.com/golang/mock v1.4.4/go.mod h1:l3mdAwkq5BuhzHwde/uurv3sEJeZMXNpwsxVWU71h+4= +github.com/golang/protobuf v1.3.1/go.mod h1:6lQm79b+lXiMfvg/cZm0SGofjICqVBUtrP5yJMmIC1U= +github.com/golang/protobuf v1.3.4/go.mod h1:vzj43D7+SQXF/4pzW/hwtAqwc6iTitCiVSaWz5lYuqw= +github.com/golang/protobuf v1.3.5/go.mod h1:6O5/vntMXwX2lRkT1hjjk0nAC1IDOTvTlVgjlRvqsdk= +github.com/golang/protobuf v1.4.0-rc.1/go.mod h1:ceaxUfeHdC40wWswd/P6IGgMaK3YpKi5j83Wpe3EHw8= +github.com/golang/protobuf v1.4.0-rc.1.0.20200221234624-67d41d38c208/go.mod h1:xKAWHe0F5eneWXFV3EuXVDTCmh+JuBKY0li0aMyXATA= +github.com/golang/protobuf v1.4.0-rc.2/go.mod h1:LlEzMj4AhA7rCAGe4KMBDvJI+AwstrUpVNzEA03Pprs= +github.com/golang/protobuf v1.4.0-rc.4.0.20200313231945-b860323f09d0/go.mod h1:WU3c8KckQ9AFe+yFwt9sWVRKCVIyN9cPHBJSNnbL67w= +github.com/golang/protobuf v1.4.0/go.mod h1:jodUvKwWbYaEsadDk5Fwe5c77LiNKVO9IDvqG2KuDX0= +github.com/golang/protobuf v1.4.1/go.mod h1:U8fpvMrcmy5pZrNK1lt4xCsGvpyWQ/VVv6QDs8UjoX8= +github.com/golang/protobuf v1.4.2/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= +github.com/golang/protobuf v1.4.3/go.mod h1:oDoupMAO8OvCJWAcko0GGGIgR6R6ocIYbsSw735rRwI= github.com/golang/protobuf v1.5.0/go.mod h1:FsONVRAS9T7sI+LIUmWTfcYkHO4aIWwzhcaSAoJOfIk= github.com/golang/protobuf v1.5.3/go.mod h1:XVQd3VNwM+JqD3oG2Ue2ip4fOMUkwXdXDdiuN0vRsmY= +github.com/google/btree v0.0.0-20180813153112-4030bb1f1f0c/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= +github.com/google/btree v1.0.0/go.mod h1:lNA+9X1NB3Zf8V7Ke586lFgjr2dZNuvo3lPJSGZ5JPQ= github.com/google/cel-go v0.23.2 h1:UdEe3CvQh3Nv+E/j9r1Y//WO0K0cSyD7/y0bzyLIMI4= github.com/google/cel-go v0.23.2/go.mod h1:52Pb6QsDbC5kvgxvZhiL9QX1oZEkcUF/ZqaPx1J5Wwo= github.com/google/flatbuffers v2.0.8+incompatible h1:ivUb1cGomAB101ZM1T0nOiWz9pSrTMoa9+EiY7igmkM= github.com/google/flatbuffers v2.0.8+incompatible/go.mod h1:1AeVuKshWv4vARoZatz6mlQ0JxURH0Kv5+zNeJKJCa8= +github.com/google/go-cmp v0.3.0/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= +github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMywk6iLU= github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= +github.com/google/go-cmp v0.5.2/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.5.5/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/go-pkcs11 v0.3.0 h1:PVRnTgtArZ3QQqTGtbtjtnIkzl2iY2kt24yqbrf7td8= github.com/google/go-pkcs11 v0.3.0/go.mod h1:6eQoGcuNJpa7jnd5pMGdkSaQpNDYvPlXWMcjXXThLlY= +github.com/google/martian v2.1.0+incompatible h1:/CP5g8u/VJHijgedC/Legn3BAbAaWPgecwXBIDzw5no= +github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs= +github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= +github.com/google/martian/v3 v3.1.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0= github.com/google/martian/v3 v3.3.2 h1:IqNFLAmvJOgVlpdEBiQbDc2EwKW77amAycfTuWKdfvw= github.com/google/martian/v3 v3.3.2/go.mod h1:oBOf6HBosgwRXnUGWUB05QECsc6uvmMiJ3+6W4l/CUk= +github.com/google/pprof v0.0.0-20181206194817-3ea8567a2e57/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20190515194954-54271f7e092f/go.mod h1:zfwlbNMJ+OItoe0UupaVj+oy1omPYYDuagoSzA8v9mc= +github.com/google/pprof v0.0.0-20191218002539-d4f498aebedc/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200212024743-f11f1df84d12/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200229191704-1ebb73c60ed3/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200430221834-fc25d7d30c6d/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20200708004538-1a94d8640e99/go.mod h1:ZgVRPoUq/hfqzAqh7sHMqb3I9Rq5C59dIz2SbBwJ4eM= +github.com/google/pprof v0.0.0-20201023163331-3e6fc7fc9c4c/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201203190320-1bf35d6f28c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= +github.com/google/pprof v0.0.0-20201218002935-b9804c9f04c2/go.mod h1:kpwsk12EmLew5upagYY7GY0pfYCcupk39gWOCRROcvE= github.com/google/pprof v0.0.0-20240727154555-813a5fbdbec8/go.mod h1:K1liHPHnj73Fdn/EKuT8nrFqBihUSKXoLYU0BuatOYo= github.com/google/pprof v0.0.0-20241029153458-d1b30febd7db/go.mod h1:vavhavw2zAxS5dIdcRluK6cSGGPlZynqzFM8NdvU144= github.com/google/renameio v0.1.0 h1:GOZbcHa3HfsPKPlmyPyN2KEohoMXOhdMbHrvbpl2QaA= @@ -573,8 +663,12 @@ github.com/google/s2a-go v0.1.7/go.mod h1:50CgR4k1jNlWBu4UfS4AcfhVe1r6pdZPygJ3R8 github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/googleapis/enterprise-certificate-proxy v0.3.2 h1:Vie5ybvEvT75RniqhfFxPRy3Bf7vr3h0cechB90XaQs= github.com/googleapis/enterprise-certificate-proxy v0.3.2/go.mod h1:VLSiSSBs/ksPL8kq3OBOQ6WRI2QnaFynd1DCjZ62+V0= +github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg= +github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk= github.com/googleapis/gax-go/v2 v2.12.0 h1:A+gCJKdRfqXkr+BIRGtZLibNXf0m1f9E4HG56etFpas= github.com/googleapis/gax-go/v2 v2.12.0/go.mod h1:y+aIqrI5eb1YGMVJfuV3185Ts/D7qKpsEkdD5+I6QGU= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8 h1:tlyzajkF3030q6M8SvmJSemC9DTHL/xaMa18b65+JM4= +github.com/googleapis/google-cloud-go-testing v0.0.0-20200911160855-bcd43fbb19e8/go.mod h1:dvDLG8qkwmyD9a/MJJN3XJcT3xFxOKAvTZGvuZmac9g= github.com/gorilla/websocket v1.4.2/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 h1:JeSE6pjso5THxAzdVpqr6/geYxZytqFMBCOtn/ujyeo= github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674/go.mod h1:r4w70xmWCQKmi1ONH4KIaBptdivuRPyosB9RmPlGEwA= @@ -585,7 +679,13 @@ github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0 h1:Ovs26xHkKqVztRpIrF/92Bcuy github.com/grpc-ecosystem/go-grpc-prometheus v1.2.0/go.mod h1:8NvIoxWQoOIhqOTXgfV/d3M/q6VIi02HzZEHgUlZvzk= github.com/grpc-ecosystem/grpc-gateway v1.16.0 h1:gmcG1KaJ57LophUzW0Hy8NmPhnMZb4M0+kPpLofRdBo= github.com/grpc-ecosystem/grpc-gateway v1.16.0/go.mod h1:BDjrQk3hbvj6Nolgz8mAMFbcEtjT1g+wF4CSlocrBnw= +github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0/go.mod h1:ggCgvZ2r7uOoQjOyu2Y1NhHmEPPzzuhWgcza5M1Ji1I= github.com/grpc-ecosystem/grpc-gateway/v2 v2.24.0/go.mod h1:qztMSjm835F2bXf+5HKAPIS5qsmQDqZna/PgVt4rWtI= +github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/hashicorp/golang-lru v0.5.1 h1:0hERBMJE1eitiLkihrMvRVBYAkpHzc/J3QdDN+dAcgU= +github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8= +github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= +github.com/ianlancetaylor/demangle v0.0.0-20200824232613-28f6c0f3b639/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc= github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465 h1:KwWnWVWCNtNq/ewIX7HIKnELmEx2nDP42yskD/pi7QE= github.com/ianlancetaylor/demangle v0.0.0-20240312041847-bd984b5ce465/go.mod h1:gx7rwoVhcfuVKG5uya9Hs3Sxj7EIvldVofAWIUtGouw= github.com/imdario/mergo v0.3.16 h1:wwQJbIsHYGMUyLSPrEq1CT16AhnhNJQ51+4fdHUnCl4= @@ -598,6 +698,9 @@ github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= github.com/jpillora/backoff v1.0.0 h1:uvFg412JmmHBHw7iwprIxkPMI+sGQ4kzOWsMeHnm2EA= github.com/jpillora/backoff v1.0.0/go.mod h1:J/6gKK9jxlEcS3zixgDgUAsiuZ7yrSoa/FX5e0EB2j4= +github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU= +github.com/jstemmer/go-junit-report v0.9.1 h1:6QPYqodiu3GuPL+7mfx+NwDdp2eTkp9IfEUpgAwUN0o= +github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk= github.com/jstemmer/go-junit-report/v2 v2.1.0 h1:X3+hPYlSczH9IMIpSC9CQSZA0L+BipYafciZUWHEmsc= github.com/jstemmer/go-junit-report/v2 v2.1.0/go.mod h1:mgHVr7VUo5Tn8OLVr1cKnLuEy0M92wdRntM99h7RkgQ= github.com/julienschmidt/httprouter v1.3.0 h1:U0609e9tgbseu3rBINet9P48AI/D3oJs4dN7jwJOQ1U= @@ -611,6 +714,8 @@ github.com/klauspost/cpuid/v2 v2.0.9 h1:lgaqFMSdTdQYdZ04uHyN2d/eKdOMyi2YLSvlQIBF github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg= github.com/konsorten/go-windows-terminal-sequences v1.0.1 h1:mweAR1A6xJ3oS2pRaGiHgQ4OO8tzTaLawm8vnODuwDk= github.com/konsorten/go-windows-terminal-sequences v1.0.2 h1:DB17ag19krx9CFsz4o3enTrPXyIXCl+2iCXH/aMAp9s= +github.com/kr/fs v0.1.0 h1:Jskdu9ieNAYnjxsi0LbQp1ulIKZV1LAFgK1tWhpZgl8= +github.com/kr/fs v0.1.0/go.mod h1:FFnZGqtBN9Gxj7eW1uZ42v5BccTP0vu6NEaFoC2HwRg= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515 h1:T+h1c/A9Gawja4Y9mFVWj2vyii2bbUNDw3kt9VxK2EY= github.com/kr/logfmt v0.0.0-20140226030751-b84e30acd515/go.mod h1:+0opPa2QZZtGFBFZlji/RkVcI2GknAs/DXo4wKdlNEc= github.com/kr/pty v1.1.1 h1:VkoXIwSboBpnk99O/KFauAEILuNHv5DVFKZMBN/gUgw= @@ -618,7 +723,6 @@ github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4 h1:sIXJO github.com/lyft/protoc-gen-star/v2 v2.0.4-0.20230330145011-496ad1ac90a4/go.mod h1:amey7yeodaJhXSbf/TlLvWiqQfLOSpEk//mLlc+axEk= github.com/maruel/panicparse/v2 v2.4.0 h1:yQKMIbQ0DKfinzVkTkcUzQyQ60UCiNnYfR7PWwTs2VI= github.com/maruel/panicparse/v2 v2.4.0/go.mod h1:nOY2OKe8csO3F3SA5+hsxot05JLgukrF54B9x88fVp4= -github.com/mattn/go-colorable v0.1.14/go.mod h1:6LmQG8QLFO4G5z1gPvYEzlUgJ2wF+stgPZH1UqBm1s8= github.com/mattn/go-runewidth v0.0.16 h1:E5ScNMtiwvlvB5paMFdw9p4kSQzbXFikJ5SQO6TULQc= github.com/mattn/go-runewidth v0.0.16/go.mod h1:Jdepj2loyihRzMpdS35Xk/zdY8IAYHsh153qUoGf23w= github.com/matttproud/golang_protobuf_extensions v1.0.1 h1:4hp9jkHxhMHkqkrB3Ix0jegS5sx/RkqARlsWZ6pIwiU= @@ -649,6 +753,8 @@ github.com/pierrec/lz4/v4 v4.1.15 h1:MO0/ucJhngq7299dKLwIMtgTfbkoSPF6AoMYDd8Q4q0 github.com/pierrec/lz4/v4 v4.1.15/go.mod h1:gZWDp/Ze/IJXGXf23ltt2EXimqmTUXEy0GFuRQyBid4= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e h1:aoZm08cpOy4WuID//EZDgcC4zIxODThtZNPirFr42+A= github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA= +github.com/pkg/sftp v1.13.1 h1:I2qBYMChEhIjOgazfJmV3/mZM256btk6wkCDRmW7JYs= +github.com/pkg/sftp v1.13.1/go.mod h1:3HaPG6Dq1ILlpPZRO0HVMrsydcdLt6HRDccSgb87qRg= github.com/pquerna/cachecontrol v0.1.0 h1:yJMy84ti9h/+OEWa752kBTKv4XC30OtVVHYv/8cTqKc= github.com/pquerna/cachecontrol v0.1.0/go.mod h1:NrUG3Z7Rdu85UNR3vm7SOsl1nFIeSiQnrHV5K9mBcUI= github.com/prometheus/client_golang v1.20.4/go.mod h1:PIEt8X02hGcP8JWbeHyeZ53Y/jReSnHgO035n//V5WE= @@ -693,6 +799,8 @@ github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510 h1:S2dVYn90KE98chq github.com/xiang90/probing v0.0.0-20221125231312-a49e3df8f510/go.mod h1:UETIi67q53MR2AWcXfiuqkDkRtnGDLqkBTpCHuJHxtU= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1 h1:gEOO8jv9F4OT7lGCjxCBTO/36wtF6j2nSip77qHd4x4= github.com/xrash/smetrics v0.0.0-20240521201337-686a1a2994c1/go.mod h1:Ohn+xnUBiLI6FVj/9LpzZWtj1/D6lUovWYBkxHVV3aM= +github.com/yuin/goldmark v1.1.25/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= +github.com/yuin/goldmark v1.1.32/go.mod h1:3hX8gzYuyVAZsxl0MRgGTJEmQBFcNTphYh9decYSb74= github.com/yuin/goldmark v1.4.13 h1:fVcFKWvrslecOb/tg+Cc05dkeYx540o0FuFt3nUVDoE= github.com/zeebo/xxh3 v1.0.2 h1:xZmwmqxHZA8AI603jOQ0tMqmBr9lPeFwGg6d+xy9DC0= github.com/zeebo/xxh3 v1.0.2/go.mod h1:5NWz9Sef7zIDm2JHfFlcQvNekmcEl9ekUZQQKCYaDcA= @@ -714,6 +822,12 @@ go.etcd.io/etcd/server/v3 v3.5.21 h1:9w0/k12majtgarGmlMVuhwXRI2ob3/d1Ik3X5TKo0yU go.etcd.io/etcd/server/v3 v3.5.21/go.mod h1:G1mOzdwuzKT1VRL7SqRchli/qcFrtLBTAQ4lV20sXXo= go.etcd.io/gofail v0.1.0 h1:XItAMIhOojXFQMgrxjnd2EIIHun/d5qL0Pf7FzVTkFg= go.etcd.io/gofail v0.1.0/go.mod h1:VZBCXYGZhHAinaBiiqYvuDynvahNsAyLFwB3kEHKz1M= +go.opencensus.io v0.21.0/go.mod h1:mSImk1erAIZhrmZN+AvHh14ztQfjbGwt4TtuofqLduU= +go.opencensus.io v0.22.0/go.mod h1:+kGneAE2xo2IficOXnaByMWTGM9T73dGwxeWcUqIpI8= +go.opencensus.io v0.22.2/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.3/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.4/go.mod h1:yxeiOL68Rb0Xd1ddK5vPZ/oVn4vY4Ynel7k9FzqtOIw= +go.opencensus.io v0.22.5/go.mod h1:5pWMHQbX5EPX2/62yrJeAkowc+lfs/XD7Uxpq3pI6kk= go.opencensus.io v0.24.0 h1:y73uSU6J157QMP2kn2r30vwW1A2W2WFwSCGnAVxeaD0= go.opencensus.io v0.24.0/go.mod h1:vNK8G9p7aAivkbmorf4v+7Hgx+Zs0yY+0fOtgBfjQKo= go.opentelemetry.io/contrib/instrumentation/google.golang.org/grpc/otelgrpc v0.58.0 h1:PS8wXpbyaDJQ2VDHHncMe9Vct0Zn1fEjpsjrLxGJoSc= @@ -731,6 +845,7 @@ go.opentelemetry.io/otel/trace v1.33.0/go.mod h1:uIcdVUZMpTAmz0tI1z04GoVSezK37Cb go.opentelemetry.io/proto/otlp v1.4.0 h1:TA9WRvW6zMwP+Ssb6fLoUIuirti1gGbP28GcKG1jgeg= go.opentelemetry.io/proto/otlp v1.4.0/go.mod h1:PPBWZIP98o2ElSqI35IHfu7hIhSwvc5N38Jw8pXuGFY= go.temporal.io/api v1.46.0/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= +go.temporal.io/api v1.49.1/go.mod h1:iaxoP/9OXMJcQkETTECfwYq4cw/bj4nwov8b3ZLVnXM= go.uber.org/atomic v1.4.0/go.mod h1:gD2HeocX3+yG+ygLZcrzQJaqmWj9AIm7n08wl/qW/PE= go.uber.org/atomic v1.7.0 h1:ADUqmZGgLDDfbSL9ZmPxKTybcoEYHgpYfELNoN+7hsw= go.uber.org/automaxprocs v1.6.0 h1:O3y2/QNTOdbF+e/dpXNNW7Rx2hZ4sTIPyybbxyNqTUs= @@ -739,13 +854,36 @@ go.uber.org/multierr v1.1.0/go.mod h1:wR5kodmAFQ0UK8QlbwjlSNy0Z68gJhDJUG5sjR94q/ go.uber.org/multierr v1.10.0/go.mod h1:20+QtiLqy0Nd6FdQB9TLXag12DsQkrbs3htMFfDN80Y= go.uber.org/tools v0.0.0-20190618225709-2cfd321de3ee h1:0mgffUl7nfd+FpvXMVz4IDEaUSmT1ysygQC7qYo7sG4= go.uber.org/zap v1.10.0/go.mod h1:vwi/ZaCAaUcBkycHslxD9B2zi4UTXhF60s6SWpuDF0Q= +golang.org/x/crypto v0.0.0-20190605123033-f99c8df09eb5/go.mod h1:yigFU9vqHzYiE8UmvKecakEJjdnWj3jj499lnFckfCI= +golang.org/x/crypto v0.0.0-20210421170649-83a5a9bb288b/go.mod h1:T9bdIzuCu7OtxOm1hfPfRQxPLYneinmdGuTeoZ9dtd4= +golang.org/x/crypto v0.0.0-20220722155217-630584e8d5aa/go.mod h1:IxCIyHEi3zRg3s0A5j5BB6A9Jmi73HwBIUl50j+osU4= golang.org/x/crypto v0.36.0/go.mod h1:Y4J0ReaxCR1IMaabaSMugxJES1EpwhBHhv2bDHklZvc= +golang.org/x/exp v0.0.0-20190510132918-efd6b22b2522/go.mod h1:ZjyILWgesfNpC6sMxTJOJm9Kp84zZh5NQWvqDGG3Qr8= +golang.org/x/exp v0.0.0-20190829153037-c13cbed26979/go.mod h1:86+5VVa7VpoJ4kLfm080zCjGlMRFzhUhsZKEZO7MGek= +golang.org/x/exp v0.0.0-20191129062945-2f5052295587/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20191227195350-da58074b4299/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200119233911-0405dc783f0a/go.mod h1:2RIsYlXP63K8oxa1u096TMicItID8zy7Y6sNkU49FU4= +golang.org/x/exp v0.0.0-20200207192155-f17229e696bd/go.mod h1:J/WKrq2StrnmMY6+EHIKF9dgMWnmCNThgcyBT1FY9mM= +golang.org/x/exp v0.0.0-20200224162631-6cc2880d07d6/go.mod h1:3jZMyOhIsHpP37uCMkUooju7aAi5cS1Q23tOzKc+0MU= golang.org/x/exp v0.0.0-20240719175910-8a7402abbf56/go.mod h1:M4RDyNAINzryxdtnbRXRL/OHtkFuWGRjvuhBJpk2IlY= golang.org/x/exp v0.0.0-20240909161429-701f63a606c0 h1:e66Fs6Z+fZTbFBAxKfP3PALWBtpfqks2bwGcexMxgtk= golang.org/x/exp v0.0.0-20240909161429-701f63a606c0/go.mod h1:2TbTHSBQa924w8M6Xs1QcRcFwyucIwBGpK1p2f1YFFY= golang.org/x/image v0.0.0-20190802002840-cff245a6509b h1:+qEpEAPhDZ1o0x3tHzZTQDArnOixOzGD9HUJfcg0mb4= +golang.org/x/lint v0.0.0-20190301231843-5614ed5bae6f/go.mod h1:UVdnD1Gm6xHRNCYTkRU2/jEulfH38KcIWyp/GAMgvoE= +golang.org/x/lint v0.0.0-20190409202823-959b441ac422/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= +golang.org/x/lint v0.0.0-20190909230951-414d861bb4ac/go.mod h1:6SW0HCj/g11FgYtHlgUYUwCkIfeOF89ocIRzGO/8vkc= golang.org/x/lint v0.0.0-20190930215403-16217165b5de h1:5hukYrvBGR8/eNkX5mdUezrA6JiaEZDtJb9Ei+1LlBs= +golang.org/x/lint v0.0.0-20191125180803-fdd1cda4f05f/go.mod h1:5qLYkcX4OjUUV8bRuDixDT3tpyyb+LUpUlRWLxfhWrs= +golang.org/x/lint v0.0.0-20200130185559-910be7a94367/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20200302205851-738671d3881b/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5 h1:2M3HP5CCK1Si9FQhwnzYhXdG6DXeebvUHFpre8QvbyI= +golang.org/x/lint v0.0.0-20201208152925-83fdc39ff7b5/go.mod h1:3xt1FjdF8hUf6vQPIChWIBhFzV8gjjsPE/fR3IyQdNY= +golang.org/x/mobile v0.0.0-20190312151609-d3739f865fa6/go.mod h1:z+o9i4GpDbdi3rU15maQ/Ox0txvL9dWGYEHz965HBQE= golang.org/x/mobile v0.0.0-20190719004257-d2bd2a29d028 h1:4+4C/Iv2U4fMZBiMCc98MG1In4gJY5YRhtpDNeDeHWs= +golang.org/x/mod v0.1.1-0.20191105210325-c90efee705ee/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.1.1-0.20191107180719-034126e5016b/go.mod h1:QqPTAvyqsEbceGzBzNggFXnrqF1CaUcvgkdR5Ot7KZg= +golang.org/x/mod v0.4.0/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= +golang.org/x/mod v0.4.1/go.mod h1:s0Qsj1ACt9ePp/hMypM3fl4fZqREWJwdYDEqhRiZZUA= golang.org/x/mod v0.14.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.17.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.18.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= @@ -753,10 +891,32 @@ golang.org/x/mod v0.20.0/go.mod h1:hTbmBsO62+eylJbnUtE2MGJUyE7QWk4xUqPFrRgJ+7c= golang.org/x/mod v0.21.0 h1:vvrHzRwRfVKSiLrG+d4FMl/Qi4ukBCE6kZlTUkDYRT0= golang.org/x/mod v0.21.0/go.mod h1:6SkKJ3Xj0I0BrPOZoBy3bdMptDDU9oJrpohJ3eWZ1fY= golang.org/x/net v0.0.0-20190108225652-1e06a53dbb7e/go.mod h1:mL1N/T3taQHkDXs73rZJwtUhF3w3ftmwwsq0BUmARs4= +golang.org/x/net v0.0.0-20190501004415-9ce7a6920f09/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190503192946-f4e77d36d62c/go.mod h1:t9HGtf8HONx5eT2rtn7q6eTqICYqUVnKs3thJo3Qplg= +golang.org/x/net v0.0.0-20190603091049-60506f45cf65/go.mod h1:HSz+uSET+XFnRR8LxR5pz3Of3rY3CfYBVs4xY44aLks= +golang.org/x/net v0.0.0-20190628185345-da137c7871d7/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20190724013045-ca1201d0de80/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20191209160850-c0dbc17a3553/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200114155413-6afb5195e5aa/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200202094626-16171245cfb2/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200222125558-5a598a2470a0/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200301022130-244492dfa37a/go.mod h1:z5CRVTTTmAJ677TzLLGU+0bjPO0LkuOLi4/5GtJWs/s= +golang.org/x/net v0.0.0-20200324143707-d3edc9973b7e/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200501053045-e0ff5e5a1de5/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200506145744-7e3656a0809f/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A= +golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA= +golang.org/x/net v0.0.0-20201031054903-ff519b6c9102/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= golang.org/x/net v0.0.0-20201202161906-c7110b5ffcbb/go.mod h1:sp8m0HH+o8qH0wwXwYZr8TS3Oi6o0r6Gce1SSxlDquU= +golang.org/x/net v0.0.0-20201209123823-ac852fbbde11/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20201224014010-6772e930b67b/go.mod h1:m0MpNAwzfU5UDzcl9v0D8zg8gWTRqZa9RBIspLL5mdg= +golang.org/x/net v0.0.0-20211112202133-69e39bad7dc2/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= golang.org/x/net v0.0.0-20211123203042-d83791d6bcd9/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y= 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.28.0/go.mod h1:yqtgsTWOOnlGLG9GFRrK3++bGOUEkNBoHZc8MEDWPNg= golang.org/x/net v0.30.0/go.mod h1:2wGyMJ5iFasEhkwi13ChkO/t1ECNC4X4eBKkVFyYFlU= @@ -765,20 +925,57 @@ golang.org/x/net v0.34.0/go.mod h1:di0qlW3YNM5oh6GqDGQr92MyTozJPmybPK4Ev/Gm31k= golang.org/x/net v0.35.0/go.mod h1:EglIi67kWsHKlRzzVMUD93VMSWGFOMSZgxFjparz1Qk= golang.org/x/net v0.36.0/go.mod h1:bFmbeoIPfrw4sMHNhb4J9f6+tPziuGjq7Jk/38fxi1I= golang.org/x/net v0.38.0/go.mod h1:ivrbrMbzFq5J41QOQh0siUuly180yBYtLp+CKbEaFx8= +golang.org/x/oauth2 v0.0.0-20190226205417-e64efc72b421/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +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-20200107190931-bf48bf16ab8d/go.mod h1:gOpvHmFTYa4IltrdGE7lF6nIHvwfUNPOp7c8zoXwtLw= +golang.org/x/oauth2 v0.0.0-20200902213428-5d25da1a8d43/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201109201403-9fd604954f58/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20201208152858-08078c50e5b5/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= +golang.org/x/oauth2 v0.0.0-20210218202405-ba52d332ba99/go.mod h1:KelEdhl1UZF7XfJ4dDtk6s++YSgaE7mD/BuKKDLBl4A= golang.org/x/oauth2 v0.24.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.25.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.26.0/go.mod h1:XYTD2NtWslqkgxebSiOHnXEap4TF09sJSc7H1sXbhtI= golang.org/x/oauth2 v0.27.0/go.mod h1:onh5ek6nERTohokkhCD/y2cV4Do3fxFHFuAejCkRWT8= golang.org/x/sync v0.0.0-20181221193216-37e7f081c4d4/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20190227155943-e225da77a7e6/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20200625203802-6e8e738ad208/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= +golang.org/x/sync v0.0.0-20201207232520-09787c993a3a/go.mod h1:RxMgew5VJxzue5/jJTE5uejpjVlOe/izrB70Jof72aM= golang.org/x/sync v0.8.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.10.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.11.0/go.mod h1:Czt+wKu1gCyEFDUtn0jG5QVvpJ6rzVqr5aXyt9drQfk= golang.org/x/sync v0.12.0/go.mod h1:1dzgHSNfp02xaA81J2MS99Qcpr2w7fw1gpm99rleRqA= +golang.org/x/sys v0.0.0-20190502145724-3ef323f4f1fd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190507160741-ecd444e8653b/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190606165138-5da285871e9c/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190624142023-c5567b49c5d0/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20190726091711-fc99dfbffb4e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191001151750-bb3f8db39f24/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20191026070338-33540a1f6037/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191204072324-ce4227a45e2e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20191228213918-04cbcbbfeed8/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200113162924-86b910548bc1/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200122134326-e047566fdf82/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200202164722-d101bd2416d5/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200212091648-12a6c2dcc1e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200223170610-d5e6a3e2c0ae/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20200323222414-85ca7c5b95cd/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200331124033-c3d80250170d/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20200905004654-be1d3432aa8f/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20201201145000-ef89a241ccb3/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210104204734-6f8348627aad/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210119212857-b64e53b001e4/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210225134936-a50acf3fe073/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= +golang.org/x/sys v0.0.0-20210423185535-09eb48e85fd7/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs= golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg= 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.21.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.23.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= @@ -791,13 +988,60 @@ golang.org/x/sys v0.31.0/go.mod h1:BJP2sWEmIv4KK5OTEluFJCKSidICx8ciO85XgH3Ak8k= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457 h1:zf5N6UOrA487eEFacMePxjXAJctxKmyjKUsjA11Uzuk= golang.org/x/telemetry v0.0.0-20240521205824-bda55230c457/go.mod h1:pRgIJT+bRLFKnoM1ldnzKoxTIn14Yxz928LQRYYgIN0= golang.org/x/term v0.30.0/go.mod h1:NYYFdzHoI5wRh/h5tDMdMqCqPJZEuNqVR5xJLd/n67g= +golang.org/x/text v0.0.0-20170915032832-14c0d48ead0c/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.1-0.20180807135948-17ff2d5776d2/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= +golang.org/x/text v0.3.2/go.mod h1:bEr9sfX3Q8Zfm5fL9x+3itogRgK3+ptLWKqgva+5dAk= +golang.org/x/text v0.3.4/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= golang.org/x/text v0.14.0/go.mod h1:18ZOQIKpY8NJVqYksKHtTdi31H5itFRjB5/qKTNYzSU= golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= golang.org/x/text v0.21.0/go.mod h1:4IBbMaMmOPCJ8SecivzSH54+73PCFmPWxNTLm+vZkEQ= +golang.org/x/text v0.22.0/go.mod h1:YRoo4H8PVmsu+E3Ou7cqLVH8oXWIHVoX0jqUWALQhfY= golang.org/x/text v0.23.0/go.mod h1:/BLNzu4aZCJ1+kcD0DNRotWKage4q2rGVAg4o22unh4= +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= golang.org/x/time v0.3.0/go.mod h1:tRJNPiyCQ0inRvYxbN9jk5I+vvW/OXSQhTDSoE431IQ= golang.org/x/time v0.9.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/tools v0.0.0-20190312151545-0bb0c0a6e846/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190312170243-e65039ee4138/go.mod h1:LCzVGOaR6xXOjkQ3onu1FJEFr0SW1gC7cKk1uF8kGRs= +golang.org/x/tools v0.0.0-20190425150028-36563e24a262/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190506145303-2d16b83fe98c/go.mod h1:RgjU9mgBXZiqYHBnxXauZ1Gv1EHHAz9KjViQ78xBX0Q= +golang.org/x/tools v0.0.0-20190606124116-d0a3d012864b/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190628153133-6cdbf07be9d0/go.mod h1:/rFqwRUd4F7ZHNgwSSTFct+R/Kf4OFW1sUzUTQQTgfc= +golang.org/x/tools v0.0.0-20190816200558-6889da9d5479/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20190911174233-4f2ddba30aff/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191113191852-77e3bb0ad9e7/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191115202509-3a792d9c32b2/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191125144606-a911d9008d1f/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191130070609-6e064ea0cf2d/go.mod h1:b+2E5dAYhXwXZwtnZ6UAqBI28+e2cm9otk0dWdXHAEo= +golang.org/x/tools v0.0.0-20191216173652-a0e659d51361/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20191227053925-7b8e75db28f4/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200117161641-43d50277825c/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200122220014-bf1340f18c4a/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200130002326-2f3ba24bd6e7/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200204074204-1cc6d1ef6c74/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200207183749-b753a1ba74fa/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200212150539-ea181f53ac56/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200224181240-023911ca70b2/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200227222343-706bc42d1f0d/go.mod h1:TB2adYChydJhpapKDTa4BR/hXlZSLoq2Wpct/0txZ28= +golang.org/x/tools v0.0.0-20200304193943-95d2e580d8eb/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200312045724-11d5b4c81c7d/go.mod h1:o4KQGtdN14AW+yjsvvwRTJJuXz8XRtIHtEnmAXLyFUw= +golang.org/x/tools v0.0.0-20200331025713-a30bf2db82d4/go.mod h1:Sl4aGygMT6LrqrWclx+PTx3U+LnKx/seiNR+3G19Ar8= +golang.org/x/tools v0.0.0-20200501065659-ab2804fb9c9d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200512131952-2bc93b1c0c88/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200515010526-7d3b6ebf133d/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200618134242-20370b0cb4b2/go.mod h1:EkVYQZoAsY45+roYkvgYkIh4xh/qjgUK9TdY2XT94GE= +golang.org/x/tools v0.0.0-20200729194436-6467de6f59a7/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200804011535-6c149bb5ef0d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc6FUM5FLjQPp3cFF28FI3qnDFljA= +golang.org/x/tools v0.0.0-20200904185747-39188db58858/go.mod h1:Cj7w3i3Rnn0Xh82ur9kSqwfTHTeVxaDqrfMjpcNT6bE= +golang.org/x/tools v0.0.0-20201110124207-079ba7bd75cd/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201201161351-ac6f37ff4c2a/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20201208233053-a543418bbed2/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210105154028-b0ab187a4818/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.0.0-20210108195828-e2f9c7f1fc8e/go.mod h1:emZCQorbCU4vsT4fOWvOPXz4eW1wZW4PmDk9uLelYpA= +golang.org/x/tools v0.1.0/go.mod h1:xkSsbof2nBLbhDlRMhhhyNLN/zl3eTqcnHD5viDpcZ0= golang.org/x/tools v0.13.0/go.mod h1:HvlwmtVNQAhOuCjW7xxvovg8wbNq7LwfXh/k7wXUl58= golang.org/x/tools v0.16.1/go.mod h1:kYVVN6I1mBNoB1OX+noeBjbRk4IUEPa7JJ+TJMEooJ0= golang.org/x/tools v0.21.1-0.20240508182429-e35e4ccd0d2d/go.mod h1:aiJjzUbINMkxbQROHiO6hDPo2LHcIPhhQsa9DLh0yGk= @@ -810,37 +1054,125 @@ golang.org/x/xerrors v0.0.0-20231012003039-104605ab7028/go.mod h1:NDW/Ps6MPRej6f gonum.org/v1/gonum v0.8.2 h1:CCXrcPKiGGotvnN6jfUsKk4rRqm7q09/YbKb5xCEvtM= gonum.org/v1/netlib v0.0.0-20190313105609-8cb42192e0e0 h1:OE9mWmgKkjJyEmDAAtGMPjXu+YNeGvK9VTSHY6+Qihc= gonum.org/v1/plot v0.0.0-20190515093506-e2840ee46a6b h1:Qh4dB5D/WpoUUp3lSod7qgoyEHbDGPUWjIbnqdqqe1k= +google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE= +google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M= +google.golang.org/api v0.8.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.9.0/go.mod h1:o4eAsZoiT+ibD93RtjEohWalFOjRDx6CVaqeizhEnKg= +google.golang.org/api v0.13.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.14.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.15.0/go.mod h1:iLdEw5Ide6rF15KTC1Kkl0iskquN2gFfn9o9XIsbkAI= +google.golang.org/api v0.17.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.18.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.19.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.20.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.22.0/go.mod h1:BwFmGc8tA3vsd7r/7kR8DY7iEEGSU04BFxCo5jP/sfE= +google.golang.org/api v0.24.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.28.0/go.mod h1:lIXQywCXRcnZPGlsd8NbLnOjtAoL6em04bJ9+z0MncE= +google.golang.org/api v0.29.0/go.mod h1:Lcubydp8VUV7KeIHD9z2Bys/sm/vGKnG1UHuDBSrHWM= +google.golang.org/api v0.30.0/go.mod h1:QGmEvQ87FHZNiUVJkT14jQNYJ4ZJjdRF23ZXz5138Fc= +google.golang.org/api v0.35.0/go.mod h1:/XrVsuzM0rZmrsbjJutiuftIzeuTQcEeaYcSk/mQ1dg= +google.golang.org/api v0.36.0/go.mod h1:+z5ficQTmoYpPn8LCUNVpK5I7hwkpjbcgqA7I34qYtE= +google.golang.org/api v0.40.0/go.mod h1:fYKFpnQN0DsDSKRVRcQSDQNtqWPfM9i+zNPxepjRCQ8= google.golang.org/api v0.155.0 h1:vBmGhCYs0djJttDNynWo44zosHlPvHmA0XiN2zP2DtA= google.golang.org/api v0.155.0/go.mod h1:GI5qK5f40kCpHfPn6+YzGAByIKWv8ujFnmoWm7Igduk= google.golang.org/appengine v1.4.0 h1:/wp5JvzpHIxhs/dumFmF7BXTf3Z+dd4uXta4kVyO508= +google.golang.org/appengine v1.5.0/go.mod h1:xpcJRLb0r/rnEns0DIKYYv+WjYCduHsrkT7/EB5XEv4= +google.golang.org/appengine v1.6.1/go.mod h1:i06prIuMbXzDqacNJfV5OdTW448YApPu5ww/cMBSeb0= +google.golang.org/appengine v1.6.5/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.6/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= +google.golang.org/appengine v1.6.7/go.mod h1:8WjMMxjGQR8xUklV/ARdw2HLXBOI7O7uCIDZVag1xfc= google.golang.org/appengine v1.6.8 h1:IhEN5q69dyKagZPYMSdIjS2HqprW324FRQZJcGqPAsM= google.golang.org/appengine v1.6.8/go.mod h1:1jJ3jBArFh5pcgW8gCtRJnepW8FzD1V44FJffLiz/Ds= +google.golang.org/genproto v0.0.0-20190307195333-5fe7a883aa19/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190418145605-e7d98fc518a7/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190425155659-357c62f0e4bb/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190502173448-54afdca5d873/go.mod h1:VzzqZJRnGkLBvHegQrXjBqPurQTc5/KpmUdxsrq26oE= +google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64/go.mod h1:DMBHOl98Agz4BDEuKkezgsaosCRResVns1a3J2ZsMNc= +google.golang.org/genproto v0.0.0-20190911173649-1774047e7e51/go.mod h1:IbNlFCBrqXvoKpeg0TB2l7cyZUmoaFKYIwrEpbDKLA8= +google.golang.org/genproto v0.0.0-20191108220845-16a3f7862a1a/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191115194625-c23dd37a84c9/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191216164720-4f79533eabd1/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20191230161307-f3c370f40bfb/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200115191322-ca5a22157cba/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200122232147-0452cf42e150/go.mod h1:n3cpQtvxv34hfy77yVDNjmbRyujviMdxYliBSkLhpCc= +google.golang.org/genproto v0.0.0-20200204135345-fa8e72b47b90/go.mod h1:GmwEX6Z4W5gMy59cAlVYjN9JhxgbQH6Gn+gFDQe2lzA= +google.golang.org/genproto v0.0.0-20200212174721-66ed5ce911ce/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200224152610-e50cd9704f63/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200228133532-8c2c7df3a383/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200305110556-506484158171/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200312145019-da6875a35672/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200331122359-1ee6d9798940/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200430143042-b979b6f78d84/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200511104702-f5ebc3bea380/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= google.golang.org/genproto v0.0.0-20200513103714-09dca8ec2884/go.mod h1:55QSHmfGQM9UVYDPBsyGGes0y52j32PQ3BqQfXhyH3c= +google.golang.org/genproto v0.0.0-20200515170657-fc4c6c6a6587/go.mod h1:YsZOwe1myG/8QRHRsmBRE1LrgQY60beZKjly0O1fX9U= +google.golang.org/genproto v0.0.0-20200526211855-cb27e3aa2013/go.mod h1:NbSheEEYHJ7i3ixzK3sjbqSGDJWnxyFXZblF3eUsNvo= +google.golang.org/genproto v0.0.0-20200618031413-b414f8b61790/go.mod h1:jDfRM7FcilCzHH/e9qn6dsT145K34l5v+OpcnNgKAAA= +google.golang.org/genproto v0.0.0-20200729003335-053ba62fc06f/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200804131852-c06518451d9c/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200825200019-8632dd797987/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20200904004341-0bd0a958aa1d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201109203340-2640f1f9cdfb/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201201144952-b05cb90ed32e/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201210142538-e3217bee35cc/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20201214200347-8c77b98c765d/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210108203827-ffc7fda8c3d7/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= +google.golang.org/genproto v0.0.0-20210226172003-ab064af71705/go.mod h1:FWY/as6DDZQgahTzZj3fqbO1CbirC29ZNUFHwi0/+no= google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80 h1:KAeGQVN3M9nD0/bQXnr/ClcEMJ968gUXJQ9pwfSynuQ= google.golang.org/genproto v0.0.0-20240123012728-ef4313101c80/go.mod h1:cc8bqMqtv9gMOr0zHg2Vzff5ULhhL2IXP4sbcn32Dro= +google.golang.org/genproto/googleapis/api v0.0.0-20230822172742-b8732ec3820d/go.mod h1:KjSP20unUpOx5kyQUFa7k4OJg0qeJ7DEZflGDu2p6Bk= google.golang.org/genproto/googleapis/api v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:B5xPO//w8qmBDjGReYLpR6UJPnkldGkCSMoH/2vxJeg= +google.golang.org/genproto/googleapis/api v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:OCdP9MfskevB/rbYvHTsXTtKC+3bHWajPdoKgjcYkfo= google.golang.org/genproto/googleapis/api v0.0.0-20241209162323-e6fa225c2576/go.mod h1:1R3kvZ1dtP3+4p4d3G8uJ8rFk/fWlScl38vanWACI08= google.golang.org/genproto/googleapis/api v0.0.0-20250106144421-5f5ef82da422/go.mod h1:b6h1vNKhxaSoEI+5jc3PJUCustfli/mRab7295pY7rw= google.golang.org/genproto/googleapis/api v0.0.0-20250204164813-702378808489/go.mod h1:iYONQfRdizDB8JJBybql13nArx91jcUk7zCXEsOofM4= google.golang.org/genproto/googleapis/bytestream v0.0.0-20250227231956-55c901821b1e h1:zvaE8E7fBho2NA1ozzrl87A72R/CWwOwg6ICwIe+KtU= google.golang.org/genproto/googleapis/bytestream v0.0.0-20250227231956-55c901821b1e/go.mod h1:35wIojE/F1ptq1nfNDNjtowabHoMSA2qQs7+smpCO5s= google.golang.org/genproto/googleapis/rpc v0.0.0-20240116215550-a9fa1716bcac/go.mod h1:daQN87bsDqDoe316QbbvX60nMoJQa4r6Ds0ZuoAe5yA= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240318140521-94a12d6c2237/go.mod h1:WtryC6hu0hhx87FDGxWCDptyssuo68sk10vYjF+T9fY= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240826202546-f6391c0de4c7/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= +google.golang.org/genproto/googleapis/rpc v0.0.0-20240827150818-7e3bb234dfed/go.mod h1:UqMtugtsSgubUsoxbuAoiCXvqvErP7Gf0so0mK9tHxU= google.golang.org/genproto/googleapis/rpc v0.0.0-20241209162323-e6fa225c2576/go.mod h1:5uTbfoYQed2U9p3KIj2/Zzm02PYhndfdmML0qC3q3FU= google.golang.org/genproto/googleapis/rpc v0.0.0-20250115164207-1a7da9e5054f/go.mod h1:+2Yz8+CLJbIfL9z73EW45avw8Lmge3xVElCP9zEKi50= google.golang.org/genproto/googleapis/rpc v0.0.0-20250204164813-702378808489/go.mod h1:8BS3B93F/U1juMFq9+EDk+qOT5CO1R9IzXxG3PTqiRk= google.golang.org/genproto/googleapis/rpc v0.0.0-20250227231956-55c901821b1e/go.mod h1:LuRYeWDFV6WOn90g357N17oMCaxpgCnbi/44qJvDn2I= +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= +google.golang.org/grpc v1.27.1/go.mod h1:qbnxyOmOxrQa7FizSgH+ReBfzJrCY1pSN7KXBS8abTk= +google.golang.org/grpc v1.28.0/go.mod h1:rpkK4SK4GF4Ach/+MFLZUBavHOvF2JJB5uozKKal+60= +google.golang.org/grpc v1.30.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.0/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= +google.golang.org/grpc v1.31.1/go.mod h1:N36X2cJ7JwdamYAgDz+s+rVMFjt3numwzf/HckM8pak= google.golang.org/grpc v1.33.1/go.mod h1:fr5YgcSWrqhRRxogOsw7RzIpsmvOZ6IcH4kBYTpR3n0= +google.golang.org/grpc v1.33.2/go.mod h1:JMHMWHQWaTccqQQlmk3MJZS+GWXOdAesneDmEnv2fbc= +google.golang.org/grpc v1.34.0/go.mod h1:WotjhfgOW/POjDeRt8vscBtXq+2VjORFy659qA51WJ8= +google.golang.org/grpc v1.35.0/go.mod h1:qjiiYl8FncCW8feJPdyg3v6XW24KsRHe+dy9BAGRRjU= +google.golang.org/grpc v1.59.0/go.mod h1:aUPDwccQo6OTjy7Hct4AfBPD1GptF4fyUjIkQ9YtF98= google.golang.org/grpc v1.60.1/go.mod h1:OlCHIeLYqSSsLi6i49B5QGdzaMZK9+M7LXN2FKz4eGM= +google.golang.org/grpc v1.66.0/go.mod h1:s3/l6xSSCURdVfAnL+TqCNMyTDAGN6+lZeVxnZR128Y= google.golang.org/grpc v1.67.1/go.mod h1:1gLDyUQU7CTLJI90u3nXZ9ekeghjeM7pTDZlqFNg2AA= google.golang.org/grpc v1.68.1/go.mod h1:+q1XYFJjShcqn0QZHvCyeR4CXPA+llXIeUIfIe00waw= google.golang.org/grpc v1.70.0/go.mod h1:ofIJqVKDXx/JiXrwr2IG4/zwdH9txy3IlF40RmcJSQw= +google.golang.org/protobuf v0.0.0-20200109180630-ec00e32a8dfd/go.mod h1:DFci5gLYBciE7Vtevhsrf46CRTquxDuWsQurQQe4oz8= +google.golang.org/protobuf v0.0.0-20200221191635-4d8936d0db64/go.mod h1:kwYJMbMJ01Woi6D6+Kah6886xMZcty6N08ah7+eCXa0= +google.golang.org/protobuf v0.0.0-20200228230310-ab0ca4ff8a60/go.mod h1:cfTl7dwQJ+fmap5saPgwCLgHXTUD7jkjRqWcaiX5VyM= +google.golang.org/protobuf v1.20.1-0.20200309200217-e05f789c0967/go.mod h1:A+miEFZTKqfCUM6K7xSMQL9OKL/b6hQv+e19PK+JZNE= +google.golang.org/protobuf v1.21.0/go.mod h1:47Nbq4nVaFHyn7ilMalzfO3qCViNmqZ2kzikPIcrTAo= +google.golang.org/protobuf v1.22.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.0/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.23.1-0.20200526195155-81db48ad09cc/go.mod h1:EGpADcykh3NcUnDUJcl1+ZksZNG86OlYog2l/sGQquU= +google.golang.org/protobuf v1.24.0/go.mod h1:r/3tXBNzIEhYS9I1OUVjXDlt8tc493IdKGjtUeSXeh4= +google.golang.org/protobuf v1.25.0/go.mod h1:9JNX74DMeImyA3h4bdi1ymwjUzf21/xIlbajtzgsN7c= google.golang.org/protobuf v1.26.0-rc.1/go.mod h1:jlhhOSvTdKEhbULTjvd4ARK9grFBp09yW+WbY/TyQbw= google.golang.org/protobuf v1.26.0/go.mod h1:9q0QmTI4eRPtz6boOQmLYwt+qCgq0jsYwAQnmE0givc= 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= +google.golang.org/protobuf v1.34.2/go.mod h1:qYOHts0dSfpeUzUFpOMr/WGzszTmLH+DiWniOlNbLDw= google.golang.org/protobuf v1.35.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= google.golang.org/protobuf v1.36.1/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= +google.golang.org/protobuf v1.36.3/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= google.golang.org/protobuf v1.36.4/go.mod h1:9fA7Ob0pmnwhb644+1+CVWFRbNajQ6iRojtC/QF5bRE= gopkg.in/errgo.v2 v2.1.0 h1:0vLT13EuvQ0hNvakwLuFZ/jYrLp5F3kcWHXdRggjCE8= gopkg.in/go-jose/go-jose.v2 v2.6.3 h1:nt80fvSDlhKWQgSWyHyy5CfmlQr+asih51R8PTWNKKs= @@ -848,8 +1180,13 @@ gopkg.in/go-jose/go-jose.v2 v2.6.3/go.mod h1:zzZDPkNNw/c9IE7Z9jr11mBZQhKQTMzoEEI gopkg.in/natefinch/lumberjack.v2 v2.2.1 h1:bBRl1b0OH9s/DuPhuXpNl+VtCaJXFZ5/uEFST95x9zc= gopkg.in/natefinch/lumberjack.v2 v2.2.1/go.mod h1:YD8tP3GAjkrDg1eZH7EGmyESg/lsYskCTPBJVb9jqSc= gopkg.in/yaml.v2 v2.2.3/go.mod h1:hI93XBmqTisBFMUTm0b8Fm+jr3Dg1NNxqwp+5A1VGuI= +honnef.co/go/tools v0.0.0-20190106161140-3f1c8253044a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= +honnef.co/go/tools v0.0.0-20190418001031-e561f6794a2a/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc h1:/hemPrYIhOhy8zYrNj+069zDB68us2sMGsfkFJO0iZs= honnef.co/go/tools v0.0.1-2019.2.3 h1:3JgtbtFHMiCmsznwGVTUWbgGov+pVqnlf1dEJTNAXeM= +honnef.co/go/tools v0.0.1-2020.1.3/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= +honnef.co/go/tools v0.0.1-2020.1.4 h1:UoveltGrhghAA7ePc+e+QYDHXrBps2PqFZiHkGR/xK8= +honnef.co/go/tools v0.0.1-2020.1.4/go.mod h1:X/FiERA/W4tHapMX5mGpAtMSVEeEUOyHaw9vFzvIQ3k= k8s.io/api v0.33.0/go.mod h1:CTO61ECK/KU7haa3qq8sarQ0biLq2ju405IZAd9zsiM= k8s.io/apimachinery v0.33.0/go.mod h1:BHW0YOu7n22fFv/JkYOEfkUYNRN0fj0BlvMFWA7b+SM= k8s.io/apiserver v0.33.0 h1:QqcM6c+qEEjkOODHppFXRiw/cE2zP85704YrQ9YaBbc= @@ -870,6 +1207,12 @@ modernc.org/ebnf v1.1.0 h1:ilLq2kO1xGezeg75RyKffLsCLdamQHEmjv0CVq1QEQU= modernc.org/ebnf v1.1.0/go.mod h1:CNIo7vuji3SyjIP/VhEumIKlAguC1g64mcdk/+VJW/w= modernc.org/ebnfutil v1.1.0 h1:8AZ7iHDSIV6lrlgtexrIgmsey6wuSnB8s642ASDaTkc= modernc.org/ebnfutil v1.1.0/go.mod h1:hdAyhM1jZSq9ygKhEeYgerbagyuLxyxzXcakBPyNqUI= +rsc.io/binaryregexp v0.2.0 h1:HfqmD5MEmC0zvwBuF187nq9mdnXjXsSivRiXN7SmRkE= +rsc.io/binaryregexp v0.2.0/go.mod h1:qTv7/COck+e2FymRvadv62gMdZztPaShugOCi3I+8D8= rsc.io/pdf v0.1.1 h1:k1MczvYDUvJBe93bYd7wrZLLUEcLZAuF824/I4e5Xr4= +rsc.io/quote/v3 v3.1.0 h1:9JKUTTIUgS6kzR9mK1YuGKv6Nl+DijDNIc0ghT58FaY= +rsc.io/quote/v3 v3.1.0/go.mod h1:yEA65RcK8LyAZtP9Kv3t0HmxON59tX3rD+tICJqUlj0= +rsc.io/sampler v1.3.0 h1:7uVkIFmeBqHfdjD+gZwtXXI+RODJ2Wc4O7MPEh/QiW4= +rsc.io/sampler v1.3.0/go.mod h1:T1hPZKmBbMNahiBKFy5HrXp6adAjACjK9JXDnKaTXpA= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2 h1:jpcvIRr3GLoUoEKRkHKSmGjxb6lWwrBlJsXc+eUYQHM= sigs.k8s.io/apiserver-network-proxy/konnectivity-client v0.31.2/go.mod h1:Ve9uj1L+deCXFrPOk1LpFXqTg7LCFzFso6PA48q/XZw= diff --git a/helm/temporal-worker-controller/templates/crds/temporal.io_temporalworkerdeployments.yaml b/helm/temporal-worker-controller/templates/crds/temporal.io_temporalworkerdeployments.yaml index e36e1d62..891496fe 100644 --- a/helm/temporal-worker-controller/templates/crds/temporal.io_temporalworkerdeployments.yaml +++ b/helm/temporal-worker-controller/templates/crds/temporal.io_temporalworkerdeployments.yaml @@ -20,11 +20,11 @@ spec: versions: - additionalPrinterColumns: - description: Current Version for new workflows - jsonPath: .status.currentVersion.versionID + jsonPath: .status.currentVersion.buildID name: Current type: string - description: Version of the current worker template - jsonPath: .status.targetVersion.versionID + jsonPath: .status.targetVersion.buildID name: Target type: string - description: Percentage of new workflows starting on Target Version @@ -3810,6 +3810,8 @@ spec: properties: currentVersion: properties: + buildID: + type: string deployment: properties: apiVersion: @@ -3844,15 +3846,15 @@ spec: - name type: object type: array - versionID: - type: string required: + - buildID - status - - versionID type: object deprecatedVersions: items: properties: + buildID: + type: string deployment: properties: apiVersion: @@ -3890,17 +3892,17 @@ spec: - name type: object type: array - versionID: - type: string required: + - buildID - status - - versionID type: object type: array lastModifierIdentity: type: string targetVersion: properties: + buildID: + type: string deployment: properties: apiVersion: @@ -3961,11 +3963,9 @@ spec: - workflowID type: object type: array - versionID: - type: string required: + - buildID - status - - versionID type: object versionConflictToken: format: byte diff --git a/internal/controller/execplan.go b/internal/controller/execplan.go index 84d9da03..dfbced1b 100644 --- a/internal/controller/execplan.go +++ b/internal/controller/execplan.go @@ -12,7 +12,7 @@ import ( "github.com/go-logr/logr" enumspb "go.temporal.io/api/enums/v1" sdkclient "go.temporal.io/sdk/client" - "go.temporal.io/sdk/workflow" + "go.temporal.io/sdk/worker" appsv1 "k8s.io/api/apps/v1" autoscalingv1 "k8s.io/api/autoscaling/v1" metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" @@ -73,9 +73,11 @@ func (r *TemporalWorkerDeploymentReconciler) executePlan(ctx context.Context, l WorkflowExecutionTimeout: time.Hour, WorkflowIDReusePolicy: enumspb.WORKFLOW_ID_REUSE_POLICY_REJECT_DUPLICATE, WorkflowIDConflictPolicy: enumspb.WORKFLOW_ID_CONFLICT_POLICY_FAIL, - VersioningOverride: sdkclient.VersioningOverride{ - Behavior: workflow.VersioningBehaviorPinned, - PinnedVersion: wf.versionID, + VersioningOverride: &sdkclient.PinnedVersioningOverride{ + Version: worker.WorkerDeploymentVersion{ + DeploymentName: p.WorkerDeploymentName, + BuildId: wf.buildID, + }, }, }, wf.workflowType); err != nil { return fmt.Errorf("unable to start test workflow execution: %w", err) @@ -85,9 +87,9 @@ func (r *TemporalWorkerDeploymentReconciler) executePlan(ctx context.Context, l // Register current version or ramps if vcfg := p.UpdateVersionConfig; vcfg != nil { if vcfg.SetCurrent { - l.Info("registering new current version", "version", vcfg.VersionID) + l.Info("registering new current version", "buildID", vcfg.BuildID) if _, err := deploymentHandler.SetCurrentVersion(ctx, sdkclient.WorkerDeploymentSetCurrentVersionOptions{ - Version: vcfg.VersionID, + BuildID: vcfg.BuildID, ConflictToken: vcfg.ConflictToken, Identity: ControllerIdentity, }); err != nil { @@ -95,22 +97,25 @@ func (r *TemporalWorkerDeploymentReconciler) executePlan(ctx context.Context, l } } else { if vcfg.RampPercentage > 0 { - l.Info("applying ramp", "version", vcfg.VersionID, "percentage", vcfg.RampPercentage) + l.Info("applying ramp", "buildID", vcfg.BuildID, "percentage", vcfg.RampPercentage) } else { - l.Info("deleting ramp") + l.Info("deleting ramp", "buildID", vcfg.BuildID) } if _, err := deploymentHandler.SetRampingVersion(ctx, sdkclient.WorkerDeploymentSetRampingVersionOptions{ - Version: vcfg.VersionID, + BuildID: vcfg.BuildID, Percentage: vcfg.RampPercentage, ConflictToken: vcfg.ConflictToken, Identity: ControllerIdentity, }); err != nil { - return fmt.Errorf("unable to set ramping deployment: %w", err) + return fmt.Errorf("unable to set ramping deployment version: %w", err) } } if _, err := deploymentHandler.UpdateVersionMetadata(ctx, sdkclient.WorkerDeploymentUpdateVersionMetadataOptions{ - Version: vcfg.VersionID, + Version: worker.WorkerDeploymentVersion{ + DeploymentName: p.WorkerDeploymentName, + BuildId: vcfg.BuildID, + }, MetadataUpdate: sdkclient.WorkerDeploymentMetadataUpdate{ UpsertEntries: map[string]interface{}{ controllerIdentityKey: getControllerIdentity(), diff --git a/internal/controller/genplan.go b/internal/controller/genplan.go index 35ecca22..f5cc1387 100644 --- a/internal/controller/genplan.go +++ b/internal/controller/genplan.go @@ -39,7 +39,7 @@ type plan struct { type startWorkflowConfig struct { workflowType string workflowID string - versionID string + buildID string taskQueue string } @@ -52,7 +52,7 @@ func (r *TemporalWorkerDeploymentReconciler) generatePlan( temporalState *temporal.TemporalWorkerState, ) (*plan, error) { workerDeploymentName := k8s.ComputeWorkerDeploymentName(w) - targetVersionID := k8s.ComputeVersionID(w) + targetBuildID := k8s.ComputeBuildID(w) // Fetch Kubernetes deployment state k8sState, err := k8s.GetDeploymentState( @@ -93,6 +93,7 @@ func (r *TemporalWorkerDeploymentReconciler) generatePlan( temporalState, connection, plannerConfig, + workerDeploymentName, ) if err != nil { return nil, fmt.Errorf("error generating plan: %w", err) @@ -111,15 +112,14 @@ func (r *TemporalWorkerDeploymentReconciler) generatePlan( plan.startTestWorkflows = append(plan.startTestWorkflows, startWorkflowConfig{ workflowType: wf.WorkflowType, workflowID: wf.WorkflowID, - versionID: wf.VersionID, + buildID: wf.BuildID, taskQueue: wf.TaskQueue, }) } // Handle deployment creation if needed if planResult.ShouldCreateDeployment { - _, buildID, _ := k8s.SplitVersionID(targetVersionID) - d, err := r.newDeployment(w, buildID, connection) + d, err := r.newDeployment(w, targetBuildID, connection) if err != nil { return nil, err } diff --git a/internal/controller/genstatus.go b/internal/controller/genstatus.go index 00b44b47..eb61e9a9 100644 --- a/internal/controller/genstatus.go +++ b/internal/controller/genstatus.go @@ -28,7 +28,7 @@ func (r *TemporalWorkerDeploymentReconciler) generateStatus( temporalState *temporal.TemporalWorkerState, ) (*temporaliov1alpha1.TemporalWorkerDeploymentStatus, error) { workerDeploymentName := k8s.ComputeWorkerDeploymentName(workerDeploy) - targetVersionID := k8s.ComputeVersionID(workerDeploy) + targetBuildID := k8s.ComputeBuildID(workerDeploy) // Fetch Kubernetes deployment state k8sState, err := k8s.GetDeploymentState( @@ -43,12 +43,12 @@ func (r *TemporalWorkerDeploymentReconciler) generateStatus( } // Fetch test workflow status for the desired version - if targetVersionID != temporalState.CurrentVersionID { + if targetBuildID != temporalState.CurrentBuildID { testWorkflows, err := temporal.GetTestWorkflowStatus( ctx, temporalClient, workerDeploymentName, - targetVersionID, + targetBuildID, workerDeploy, temporalState, ) @@ -58,14 +58,16 @@ func (r *TemporalWorkerDeploymentReconciler) generateStatus( } // Add test workflow status to version info if it doesn't exist - if versionInfo, exists := temporalState.Versions[targetVersionID]; exists { + if versionInfo, exists := temporalState.Versions[targetBuildID]; exists { versionInfo.TestWorkflows = append(versionInfo.TestWorkflows, testWorkflows...) } } + // Target build ID already computed above + // Use the state mapper to convert state objects to CRD status - stateMapper := newStateMapper(k8sState, temporalState) - status := stateMapper.mapToStatus(targetVersionID) + stateMapper := newStateMapper(k8sState, temporalState, workerDeploymentName) + status := stateMapper.mapToStatus(targetBuildID) return status, nil } diff --git a/internal/controller/state_mapper.go b/internal/controller/state_mapper.go index ecbbc914..9911e27e 100644 --- a/internal/controller/state_mapper.go +++ b/internal/controller/state_mapper.go @@ -13,31 +13,36 @@ import ( // stateMapper maps between Kubernetes and Temporal states type stateMapper struct { - k8sState *k8s.DeploymentState - temporalState *temporal.TemporalWorkerState + k8sState *k8s.DeploymentState + temporalState *temporal.TemporalWorkerState + workerDeploymentName string } // newStateMapper creates a new state mapper -func newStateMapper(k8sState *k8s.DeploymentState, temporalState *temporal.TemporalWorkerState) *stateMapper { +func newStateMapper(k8sState *k8s.DeploymentState, temporalState *temporal.TemporalWorkerState, workerDeploymentName string) *stateMapper { return &stateMapper{ - k8sState: k8sState, - temporalState: temporalState, + k8sState: k8sState, + temporalState: temporalState, + workerDeploymentName: workerDeploymentName, } } // mapToStatus converts the states to a CRD status -func (m *stateMapper) mapToStatus(targetVersionID string) *v1alpha1.TemporalWorkerDeploymentStatus { +func (m *stateMapper) mapToStatus(targetBuildID string) *v1alpha1.TemporalWorkerDeploymentStatus { status := &v1alpha1.TemporalWorkerDeploymentStatus{ VersionConflictToken: m.temporalState.VersionConflictToken, } + // Get build IDs directly from temporal state + currentBuildID := m.temporalState.CurrentBuildID + rampingBuildID := m.temporalState.RampingBuildID + // Set current version - currentVersionID := m.temporalState.CurrentVersionID - status.CurrentVersion = m.mapCurrentWorkerDeploymentVersion(currentVersionID) + status.CurrentVersion = m.mapCurrentWorkerDeploymentVersionByBuildID(currentBuildID) // Set target version (desired version) - status.TargetVersion = m.mapTargetWorkerDeploymentVersion(targetVersionID) - if m.temporalState.RampingVersionID == targetVersionID { + status.TargetVersion = m.mapTargetWorkerDeploymentVersionByBuildID(targetBuildID) + if rampingBuildID == targetBuildID { status.TargetVersion.RampingSince = m.temporalState.RampingSince // TODO(Shivam): Temporal server is not emitting the right value for RampLastModifiedAt. // This is going to be fixed by https://github.com/temporalio/temporal/pull/8089. @@ -48,13 +53,13 @@ func (m *stateMapper) mapToStatus(targetVersionID string) *v1alpha1.TemporalWork // Add deprecated versions var deprecatedVersions []*v1alpha1.DeprecatedWorkerDeploymentVersion - for versionID := range m.k8sState.Deployments { + for buildID := range m.k8sState.Deployments { // Skip current and target versions - if versionID == currentVersionID || versionID == targetVersionID { + if buildID == currentBuildID || buildID == targetBuildID { continue } - versionStatus := m.mapDeprecatedWorkerDeploymentVersion(versionID) + versionStatus := m.mapDeprecatedWorkerDeploymentVersionByBuildID(buildID) if versionStatus != nil { deprecatedVersions = append(deprecatedVersions, versionStatus) } @@ -67,22 +72,22 @@ func (m *stateMapper) mapToStatus(targetVersionID string) *v1alpha1.TemporalWork return status } -// mapCurrentWorkerDeploymentVersion creates a current version status from the states -func (m *stateMapper) mapCurrentWorkerDeploymentVersion(versionID string) *v1alpha1.CurrentWorkerDeploymentVersion { - if versionID == "" { +// mapCurrentWorkerDeploymentVersionByBuildID creates a current version status from the states using buildID +func (m *stateMapper) mapCurrentWorkerDeploymentVersionByBuildID(buildID string) *v1alpha1.CurrentWorkerDeploymentVersion { + if buildID == "" { return nil } version := &v1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: v1alpha1.BaseWorkerDeploymentVersion{ - VersionID: versionID, - Status: v1alpha1.VersionStatusNotRegistered, + BuildID: buildID, + Status: v1alpha1.VersionStatusNotRegistered, }, } // Set deployment reference if it exists - if deployment, exists := m.k8sState.Deployments[versionID]; exists { - version.Deployment = m.k8sState.DeploymentRefs[versionID] + if deployment, exists := m.k8sState.Deployments[buildID]; exists { + version.Deployment = m.k8sState.DeploymentRefs[buildID] // Check deployment health healthy, healthySince := k8s.IsDeploymentHealthy(deployment) @@ -92,7 +97,7 @@ func (m *stateMapper) mapCurrentWorkerDeploymentVersion(versionID string) *v1alp } // Set version status from temporal state - if temporalVersion, exists := m.temporalState.Versions[versionID]; exists { + if temporalVersion, exists := m.temporalState.Versions[buildID]; exists { version.Status = temporalVersion.Status // Set task queues @@ -102,18 +107,22 @@ func (m *stateMapper) mapCurrentWorkerDeploymentVersion(versionID string) *v1alp return version } -// mapTargetWorkerDeploymentVersion creates a target version status from the states -func (m *stateMapper) mapTargetWorkerDeploymentVersion(versionID string) v1alpha1.TargetWorkerDeploymentVersion { +// mapTargetWorkerDeploymentVersionByBuildID creates a target version status from the states using buildID +func (m *stateMapper) mapTargetWorkerDeploymentVersionByBuildID(buildID string) v1alpha1.TargetWorkerDeploymentVersion { version := v1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: v1alpha1.BaseWorkerDeploymentVersion{ - VersionID: versionID, - Status: v1alpha1.VersionStatusNotRegistered, + BuildID: buildID, + Status: v1alpha1.VersionStatusNotRegistered, }, } + if buildID == "" { + return version + } + // Set deployment reference if it exists - if deployment, exists := m.k8sState.Deployments[versionID]; exists { - version.Deployment = m.k8sState.DeploymentRefs[versionID] + if deployment, exists := m.k8sState.Deployments[buildID]; exists { + version.Deployment = m.k8sState.DeploymentRefs[buildID] // Check deployment health healthy, healthySince := k8s.IsDeploymentHealthy(deployment) @@ -123,7 +132,7 @@ func (m *stateMapper) mapTargetWorkerDeploymentVersion(versionID string) v1alpha } // Set version status from temporal state - if temporalVersion, exists := m.temporalState.Versions[versionID]; exists { + if temporalVersion, exists := m.temporalState.Versions[buildID]; exists { version.Status = temporalVersion.Status // Set ramp percentage if this is a ramping version @@ -143,22 +152,22 @@ func (m *stateMapper) mapTargetWorkerDeploymentVersion(versionID string) v1alpha return version } -// mapDeprecatedWorkerDeploymentVersion creates a deprecated version status from the states -func (m *stateMapper) mapDeprecatedWorkerDeploymentVersion(versionID string) *v1alpha1.DeprecatedWorkerDeploymentVersion { - if versionID == "" { +// mapDeprecatedWorkerDeploymentVersionByBuildID creates a deprecated version status from the states using buildID +func (m *stateMapper) mapDeprecatedWorkerDeploymentVersionByBuildID(buildID string) *v1alpha1.DeprecatedWorkerDeploymentVersion { + if buildID == "" { return nil } version := &v1alpha1.DeprecatedWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: v1alpha1.BaseWorkerDeploymentVersion{ - VersionID: versionID, - Status: v1alpha1.VersionStatusNotRegistered, + BuildID: buildID, + Status: v1alpha1.VersionStatusNotRegistered, }, } // Set deployment reference if it exists - if deployment, exists := m.k8sState.Deployments[versionID]; exists { - version.Deployment = m.k8sState.DeploymentRefs[versionID] + if deployment, exists := m.k8sState.Deployments[buildID]; exists { + version.Deployment = m.k8sState.DeploymentRefs[buildID] // Check deployment health healthy, healthySince := k8s.IsDeploymentHealthy(deployment) @@ -168,7 +177,7 @@ func (m *stateMapper) mapDeprecatedWorkerDeploymentVersion(versionID string) *v1 } // Set version status from temporal state - if temporalVersion, exists := m.temporalState.Versions[versionID]; exists { + if temporalVersion, exists := m.temporalState.Versions[buildID]; exists { version.Status = temporalVersion.Status // Set drained since if available diff --git a/internal/controller/state_mapper_test.go b/internal/controller/state_mapper_test.go index 2b1fb9ba..d99153ab 100644 --- a/internal/controller/state_mapper_test.go +++ b/internal/controller/state_mapper_test.go @@ -28,7 +28,7 @@ func TestMapToStatus(t *testing.T) { // Create Kubernetes state k8sState := &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "worker.v1": { + "v1": { ObjectMeta: metav1.ObjectMeta{ Name: "worker-v1", Namespace: "default", @@ -43,7 +43,7 @@ func TestMapToStatus(t *testing.T) { }, }, }, - "worker.v2": { + "v2": { ObjectMeta: metav1.ObjectMeta{ Name: "worker-v2", Namespace: "default", @@ -58,7 +58,7 @@ func TestMapToStatus(t *testing.T) { }, }, }, - "worker.v3": { + "v3": { ObjectMeta: metav1.ObjectMeta{ Name: "worker-v3", Namespace: "default", @@ -69,19 +69,19 @@ func TestMapToStatus(t *testing.T) { }, }, DeploymentRefs: map[string]*corev1.ObjectReference{ - "worker.v1": { + "v1": { Kind: "Deployment", Name: "worker-v1", Namespace: "default", UID: types.UID("v1-uid"), }, - "worker.v2": { + "v2": { Kind: "Deployment", Name: "worker-v2", Namespace: "default", UID: types.UID("v2-uid"), }, - "worker.v3": { + "v3": { Kind: "Deployment", Name: "worker-v3", Namespace: "default", @@ -92,22 +92,24 @@ func TestMapToStatus(t *testing.T) { // Create Temporal state temporalState := &temporal.TemporalWorkerState{ - CurrentVersionID: "worker.v1", - RampingVersionID: "worker.v2", + CurrentBuildID: "v1", + RampingBuildID: "v2", RampPercentage: 25.0, RampingSince: &rampingSince, VersionConflictToken: []byte("test-token"), Versions: map[string]*temporal.VersionInfo{ - "worker.v1": { - VersionID: "worker.v1", - Status: temporaliov1alpha1.VersionStatusCurrent, + "v1": { + DeploymentName: "worker", + BuildID: "v1", + Status: temporaliov1alpha1.VersionStatusCurrent, TaskQueues: []temporaliov1alpha1.TaskQueue{ {Name: "queue1"}, }, }, - "worker.v2": { - VersionID: "worker.v2", - Status: temporaliov1alpha1.VersionStatusRamping, + "v2": { + DeploymentName: "worker", + BuildID: "v2", + Status: temporaliov1alpha1.VersionStatusRamping, TaskQueues: []temporaliov1alpha1.TaskQueue{ {Name: "queue1"}, }, @@ -120,26 +122,27 @@ func TestMapToStatus(t *testing.T) { }, }, }, - "worker.v3": { - VersionID: "worker.v3", - Status: temporaliov1alpha1.VersionStatusDrained, - DrainedSince: &drainedSince, + "v3": { + DeploymentName: "worker", + BuildID: "v3", + Status: temporaliov1alpha1.VersionStatusDrained, + DrainedSince: &drainedSince, }, }, } // Create state mapper - mapper := newStateMapper(k8sState, temporalState) + mapper := newStateMapper(k8sState, temporalState, "worker") // Map to status - status := mapper.mapToStatus("worker.v2") + status := mapper.mapToStatus("v2") // Verify status assert.Equal(t, []byte("test-token"), status.VersionConflictToken) // Verify default version assert.NotNil(t, status.CurrentVersion) - assert.Equal(t, "worker.v1", status.CurrentVersion.VersionID) + assert.Equal(t, "v1", status.CurrentVersion.BuildID) // Convert to string for comparison expectedStatus := string(temporaliov1alpha1.VersionStatusCurrent) @@ -151,7 +154,7 @@ func TestMapToStatus(t *testing.T) { // Verify target version assert.NotNil(t, status.TargetVersion) - assert.Equal(t, "worker.v2", status.TargetVersion.VersionID) + assert.Equal(t, "v2", status.TargetVersion.BuildID) // Convert to string for comparison expectedRampingStatus := string(temporaliov1alpha1.VersionStatusRamping) @@ -169,7 +172,7 @@ func TestMapToStatus(t *testing.T) { // Verify deprecated versions assert.Equal(t, 1, len(status.DeprecatedVersions)) - assert.Equal(t, "worker.v3", status.DeprecatedVersions[0].VersionID) + assert.Equal(t, "v3", status.DeprecatedVersions[0].BuildID) // Convert to string for comparison expectedDrainedStatus := string(temporaliov1alpha1.VersionStatusDrained) @@ -192,7 +195,7 @@ func TestMapWorkerDeploymentVersion(t *testing.T) { k8sState := &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "worker.v1": { + "v1": { Status: appsv1.DeploymentStatus{ Conditions: []appsv1.DeploymentCondition{ { @@ -205,7 +208,7 @@ func TestMapWorkerDeploymentVersion(t *testing.T) { }, }, DeploymentRefs: map[string]*corev1.ObjectReference{ - "worker.v1": { + "v1": { Kind: "Deployment", Name: "worker-v1", Namespace: "default", @@ -216,20 +219,21 @@ func TestMapWorkerDeploymentVersion(t *testing.T) { temporalState := &temporal.TemporalWorkerState{ Versions: map[string]*temporal.VersionInfo{ - "worker.v1": { - VersionID: "worker.v1", - Status: temporaliov1alpha1.VersionStatusCurrent, - DrainedSince: &drainedSince, + "v1": { + DeploymentName: "worker", + BuildID: "v1", + Status: temporaliov1alpha1.VersionStatusCurrent, + DrainedSince: &drainedSince, }, }, } - mapper := newStateMapper(k8sState, temporalState) + mapper := newStateMapper(k8sState, temporalState, "worker") // Test current version mapping - currentVersion := mapper.mapCurrentWorkerDeploymentVersion("worker.v1") + currentVersion := mapper.mapCurrentWorkerDeploymentVersionByBuildID("v1") assert.NotNil(t, currentVersion) - assert.Equal(t, "worker.v1", currentVersion.VersionID) + assert.Equal(t, "v1", currentVersion.BuildID) assert.Equal(t, temporaliov1alpha1.VersionStatusCurrent, currentVersion.Status) assert.NotNil(t, currentVersion.HealthySince) assert.Equal(t, healthySince.Time.Unix(), currentVersion.HealthySince.Time.Unix()) @@ -237,8 +241,8 @@ func TestMapWorkerDeploymentVersion(t *testing.T) { assert.Equal(t, "worker-v1", currentVersion.Deployment.Name) // Test target version mapping - targetVersion := mapper.mapTargetWorkerDeploymentVersion("worker.v1") - assert.Equal(t, "worker.v1", targetVersion.VersionID) + targetVersion := mapper.mapTargetWorkerDeploymentVersionByBuildID("v1") + assert.Equal(t, "v1", targetVersion.BuildID) assert.Equal(t, temporaliov1alpha1.VersionStatusCurrent, targetVersion.Status) assert.NotNil(t, targetVersion.HealthySince) assert.Equal(t, healthySince.Time.Unix(), targetVersion.HealthySince.Time.Unix()) @@ -246,9 +250,9 @@ func TestMapWorkerDeploymentVersion(t *testing.T) { assert.Equal(t, "worker-v1", targetVersion.Deployment.Name) // Test deprecated version mapping - deprecatedVersion := mapper.mapDeprecatedWorkerDeploymentVersion("worker.v1") + deprecatedVersion := mapper.mapDeprecatedWorkerDeploymentVersionByBuildID("v1") assert.NotNil(t, deprecatedVersion) - assert.Equal(t, "worker.v1", deprecatedVersion.VersionID) + assert.Equal(t, "v1", deprecatedVersion.BuildID) assert.Equal(t, temporaliov1alpha1.VersionStatusCurrent, deprecatedVersion.Status) assert.NotNil(t, deprecatedVersion.HealthySince) assert.Equal(t, healthySince.Time.Unix(), deprecatedVersion.HealthySince.Time.Unix()) @@ -258,9 +262,9 @@ func TestMapWorkerDeploymentVersion(t *testing.T) { assert.Equal(t, "worker-v1", deprecatedVersion.Deployment.Name) // Test with version that doesn't exist - currentVersion = mapper.mapCurrentWorkerDeploymentVersion("nonexistent") + currentVersion = mapper.mapCurrentWorkerDeploymentVersionByBuildID("nonexistent") assert.NotNil(t, currentVersion) - assert.Equal(t, "nonexistent", currentVersion.VersionID) + assert.Equal(t, "nonexistent", currentVersion.BuildID) assert.Equal(t, temporaliov1alpha1.VersionStatusNotRegistered, currentVersion.Status) assert.Nil(t, currentVersion.HealthySince) assert.Nil(t, currentVersion.Deployment) diff --git a/internal/k8s/deployments.go b/internal/k8s/deployments.go index 7367510f..2da43301 100644 --- a/internal/k8s/deployments.go +++ b/internal/k8s/deployments.go @@ -11,7 +11,6 @@ import ( "fmt" "regexp" "sort" - "strings" "github.com/distribution/reference" temporaliov1alpha1 "github.com/temporalio/temporal-worker-controller/api/v1alpha1" @@ -37,11 +36,11 @@ const ( // DeploymentState represents the Kubernetes state of all deployments for a temporal worker deployment type DeploymentState struct { - // Map of versionID to deployment + // Map of buildID to deployment Deployments map[string]*appsv1.Deployment // Sorted deployments by creation time DeploymentsByTime []*appsv1.Deployment - // Map of deployment references + // Map of buildID to deployment references DeploymentRefs map[string]*corev1.ObjectReference } @@ -76,14 +75,13 @@ func GetDeploymentState( return childDeploys.Items[i].ObjectMeta.CreationTimestamp.Before(&childDeploys.Items[j].ObjectMeta.CreationTimestamp) }) - // Track each k8s deployment by version ID + // Track each k8s deployment by build ID for i := range childDeploys.Items { deploy := &childDeploys.Items[i] if buildID, ok := deploy.GetLabels()[BuildIDLabel]; ok { - versionID := workerDeploymentName + VersionIDSeparator + buildID - state.Deployments[versionID] = deploy + state.Deployments[buildID] = deploy state.DeploymentsByTime = append(state.DeploymentsByTime, deploy) - state.DeploymentRefs[versionID] = NewObjectRef(deploy) + state.DeploymentRefs[buildID] = NewObjectRef(deploy) } // Any deployments without the build ID label are ignored } @@ -169,15 +167,6 @@ func CleanAndTruncateString(s string, n int) string { return re.ReplaceAllString(s, K8sResourceNameSeparator) } -// SplitVersionID splits a version ID into its components -func SplitVersionID(versionID string) (deploymentName, buildID string, err error) { - parts := strings.Split(versionID, VersionIDSeparator) - if len(parts) < 2 { - return "", "", fmt.Errorf("invalid version ID format: %s", versionID) - } - return parts[0], parts[1], nil -} - // NewDeploymentWithOwnerRef creates a new deployment resource, including owner references func NewDeploymentWithOwnerRef( typeMeta *metav1.TypeMeta, diff --git a/internal/k8s/deployments_test.go b/internal/k8s/deployments_test.go index 24edc5b2..7c7cc00c 100644 --- a/internal/k8s/deployments_test.go +++ b/internal/k8s/deployments_test.go @@ -194,16 +194,16 @@ func TestGetDeploymentState(t *testing.T) { assert.Equal(t, 2, len(state.DeploymentRefs)) // Verify the content of the maps - assert.Equal(t, "worker-v1", state.Deployments["test-worker.v1"].Name) - assert.Equal(t, "worker-v2", state.Deployments["test-worker.v2"].Name) + assert.Equal(t, "worker-v1", state.Deployments["v1"].Name) + assert.Equal(t, "worker-v2", state.Deployments["v2"].Name) // Verify the deployments are sorted by creation time (oldest first) assert.Equal(t, "worker-v1", state.DeploymentsByTime[0].Name) assert.Equal(t, "worker-v2", state.DeploymentsByTime[1].Name) // Verify refs are correctly created - assert.Equal(t, "worker-v1", state.DeploymentRefs["test-worker.v1"].Name) - assert.Equal(t, "worker-v2", state.DeploymentRefs["test-worker.v2"].Name) + assert.Equal(t, "worker-v1", state.DeploymentRefs["v1"].Name) + assert.Equal(t, "worker-v2", state.DeploymentRefs["v2"].Name) } func TestGenerateBuildID(t *testing.T) { diff --git a/internal/planner/planner.go b/internal/planner/planner.go index 9daf2dac..58baba10 100644 --- a/internal/planner/planner.go +++ b/internal/planner/planner.go @@ -31,8 +31,8 @@ type Plan struct { type VersionConfig struct { // Token to use for conflict detection ConflictToken []byte - // Version ID for which this config applies - VersionID string + // Build ID for the version + BuildID string // One of RampPercentage OR SetCurrent must be set to a non-zero value. @@ -46,7 +46,7 @@ type VersionConfig struct { type WorkflowConfig struct { WorkflowType string WorkflowID string - VersionID string + BuildID string TaskQueue string } @@ -65,6 +65,7 @@ func GeneratePlan( temporalState *temporal.TemporalWorkerState, connection temporaliov1alpha1.TemporalConnectionSpec, config *Config, + workerDeploymentName string, ) (*Plan, error) { plan := &Plan{ ScaleDeployments: make(map[*corev1.ObjectReference]uint32), @@ -77,10 +78,10 @@ func GeneratePlan( plan.UpdateDeployments = getUpdateDeployments(k8sState, status, connection) // Determine if we need to start any test workflows - plan.TestWorkflows = getTestWorkflows(status, config) + plan.TestWorkflows = getTestWorkflows(status, config, workerDeploymentName) // Determine version config changes - plan.VersionConfig = getVersionConfigDiff(l, status, temporalState, config) + plan.VersionConfig = getVersionConfigDiff(l, status, temporalState, config, workerDeploymentName) // TODO(jlegrone): generate warnings/events on the TemporalWorkerDeployment resource when buildIDs are reachable // but have no corresponding Deployment. @@ -88,16 +89,16 @@ func GeneratePlan( return plan, nil } -// checkAndUpdateDeploymentConnectionSpec determines whether the Deployment for the given versionID is +// checkAndUpdateDeploymentConnectionSpec determines whether the Deployment for the given buildID is // out-of-date with respect to the provided TemporalConnectionSpec. If an update is required, it mutates // the existing Deployment in-place and returns a pointer to that Deployment. If no update is needed or // the Deployment does not exist, it returns nil. func checkAndUpdateDeploymentConnectionSpec( - versionID string, + buildID string, k8sState *k8s.DeploymentState, connection temporaliov1alpha1.TemporalConnectionSpec, ) *appsv1.Deployment { - existingDeployment, exists := k8sState.Deployments[versionID] + existingDeployment, exists := k8sState.Deployments[buildID] if !exists { return nil } @@ -147,22 +148,22 @@ func getUpdateDeployments( var updateDeployments []*appsv1.Deployment // Check target version deployment if it has an expired connection spec hash - if status.TargetVersion.VersionID != "" { - if deployment := checkAndUpdateDeploymentConnectionSpec(status.TargetVersion.VersionID, k8sState, connection); deployment != nil { + if status.TargetVersion.BuildID != "" { + if deployment := checkAndUpdateDeploymentConnectionSpec(status.TargetVersion.BuildID, k8sState, connection); deployment != nil { updateDeployments = append(updateDeployments, deployment) } } // Check current version deployment if it has an expired connection spec hash - if status.CurrentVersion != nil && status.CurrentVersion.VersionID != "" { - if deployment := checkAndUpdateDeploymentConnectionSpec(status.CurrentVersion.VersionID, k8sState, connection); deployment != nil { + if status.CurrentVersion != nil && status.CurrentVersion.BuildID != "" { + if deployment := checkAndUpdateDeploymentConnectionSpec(status.CurrentVersion.BuildID, k8sState, connection); deployment != nil { updateDeployments = append(updateDeployments, deployment) } } // Check deprecated versions for expired connection spec hashes for _, version := range status.DeprecatedVersions { - if deployment := checkAndUpdateDeploymentConnectionSpec(version.VersionID, k8sState, connection); deployment != nil { + if deployment := checkAndUpdateDeploymentConnectionSpec(version.BuildID, k8sState, connection); deployment != nil { updateDeployments = append(updateDeployments, deployment) } } @@ -183,8 +184,8 @@ func getDeleteDeployments( continue } - // Look up the deployment - d, exists := k8sState.Deployments[version.VersionID] + // Look up the deployment using buildID + d, exists := k8sState.Deployments[version.BuildID] if !exists { continue } @@ -201,7 +202,7 @@ func getDeleteDeployments( case temporaliov1alpha1.VersionStatusNotRegistered: // NotRegistered versions are versions that the server doesn't know about. // Only delete if it's not the target version. - if status.TargetVersion.VersionID != version.VersionID { + if status.TargetVersion.BuildID != version.BuildID { deleteDeployments = append(deleteDeployments, d) } } @@ -222,7 +223,7 @@ func getScaleDeployments( // Scale the current version if needed if status.CurrentVersion != nil && status.CurrentVersion.Deployment != nil { ref := status.CurrentVersion.Deployment - if d, exists := k8sState.Deployments[status.CurrentVersion.VersionID]; exists { + if d, exists := k8sState.Deployments[status.CurrentVersion.BuildID]; exists { if d.Spec.Replicas != nil && *d.Spec.Replicas != replicas { scaleDeployments[ref] = uint32(replicas) } @@ -230,9 +231,9 @@ func getScaleDeployments( } // Scale the target version if it exists, and isn't current - if (status.CurrentVersion == nil || status.CurrentVersion.VersionID != status.TargetVersion.VersionID) && + if (status.CurrentVersion == nil || status.CurrentVersion.BuildID != status.TargetVersion.BuildID) && status.TargetVersion.Deployment != nil { - if d, exists := k8sState.Deployments[status.TargetVersion.VersionID]; exists { + if d, exists := k8sState.Deployments[status.TargetVersion.BuildID]; exists { if d.Spec.Replicas == nil || *d.Spec.Replicas != replicas { scaleDeployments[status.TargetVersion.Deployment] = uint32(replicas) } @@ -245,7 +246,7 @@ func getScaleDeployments( continue } - d, exists := k8sState.Deployments[version.VersionID] + d, exists := k8sState.Deployments[version.BuildID] if !exists { continue } @@ -300,6 +301,7 @@ func shouldCreateDeployment( func getTestWorkflows( status *temporaliov1alpha1.TemporalWorkerDeploymentStatus, config *Config, + workerDeploymentName string, ) []WorkflowConfig { var testWorkflows []WorkflowConfig @@ -307,7 +309,7 @@ func getTestWorkflows( // version is not yet registered in temporal if config.RolloutStrategy.Gate == nil || status.CurrentVersion == nil || - status.CurrentVersion.VersionID == status.TargetVersion.VersionID || + status.CurrentVersion.BuildID == status.TargetVersion.BuildID || status.TargetVersion.Status == temporaliov1alpha1.VersionStatusNotRegistered { return nil } @@ -325,8 +327,8 @@ func getTestWorkflows( if _, ok := taskQueuesWithWorkflows[tq.Name]; !ok { testWorkflows = append(testWorkflows, WorkflowConfig{ WorkflowType: config.RolloutStrategy.Gate.WorkflowType, - WorkflowID: temporal.GetTestWorkflowID(targetVersion.VersionID, tq.Name), - VersionID: targetVersion.VersionID, + WorkflowID: temporal.GetTestWorkflowID(workerDeploymentName, targetVersion.BuildID, tq.Name), + BuildID: targetVersion.BuildID, TaskQueue: tq.Name, }) } @@ -341,6 +343,7 @@ func getVersionConfigDiff( status *temporaliov1alpha1.TemporalWorkerDeploymentStatus, temporalState *temporal.TemporalWorkerState, config *Config, + workerDeploymentName string, ) *VersionConfig { strategy := config.RolloutStrategy conflictToken := status.VersionConflictToken @@ -368,7 +371,7 @@ func getVersionConfigDiff( vcfg := &VersionConfig{ ConflictToken: conflictToken, - VersionID: status.TargetVersion.VersionID, + BuildID: status.TargetVersion.BuildID, } // If there is no current version, set the target version as the current version @@ -378,10 +381,10 @@ func getVersionConfigDiff( } // If the current version is the target version - if status.CurrentVersion.VersionID == status.TargetVersion.VersionID { + if status.CurrentVersion.BuildID == status.TargetVersion.BuildID { // Reset ramp if needed, this would happen if a ramp has been rolled back before completing - if temporalState.RampingVersionID != "" { - vcfg.VersionID = "" + if temporalState.RampingBuildID != "" { + vcfg.BuildID = "" vcfg.RampPercentage = 0 return vcfg } diff --git a/internal/planner/planner_test.go b/internal/planner/planner_test.go index db645498..0d71f698 100644 --- a/internal/planner/planner_test.go +++ b/internal/planner/planner_test.go @@ -58,8 +58,8 @@ func TestGeneratePlan(t *testing.T) { name: "drained version gets deleted", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithDefaultConnectionSpecHash(0), - "test/namespace.456": createDeploymentWithDefaultConnectionSpecHash(1), + "123": createDeploymentWithDefaultConnectionSpecHash(0), + "456": createDeploymentWithDefaultConnectionSpecHash(1), }, DeploymentsByTime: []*appsv1.Deployment{ createDeploymentWithDefaultConnectionSpecHash(0), @@ -69,14 +69,14 @@ func TestGeneratePlan(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "456", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-456"}, }, }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "456", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-456"}, }, @@ -84,7 +84,7 @@ func TestGeneratePlan(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusDrained, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, @@ -111,26 +111,26 @@ func TestGeneratePlan(t *testing.T) { name: "deployment needs to be scaled", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithDefaultConnectionSpecHash(1), + "123": createDeploymentWithDefaultConnectionSpecHash(1), }, DeploymentsByTime: []*appsv1.Deployment{ createDeploymentWithDefaultConnectionSpecHash(1), }, DeploymentRefs: map[string]*corev1.ObjectReference{ - "test/namespace.123": {Name: "test-123"}, + "123": {Name: "test-123"}, }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, @@ -149,22 +149,22 @@ func TestGeneratePlan(t *testing.T) { name: "rollback scenario - target equals current but deprecated version is ramping", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithDefaultConnectionSpecHash(3), - "test/namespace.456": createDeploymentWithDefaultConnectionSpecHash(3), + "123": createDeploymentWithDefaultConnectionSpecHash(3), + "456": createDeploymentWithDefaultConnectionSpecHash(3), }, DeploymentsByTime: []*appsv1.Deployment{ createDeploymentWithDefaultConnectionSpecHash(3), createDeploymentWithDefaultConnectionSpecHash(3), }, DeploymentRefs: map[string]*corev1.ObjectReference{ - "test/namespace.123": {Name: "test-123"}, - "test/namespace.456": {Name: "test-456"}, + "123": {Name: "test-123"}, + "456": {Name: "test-456"}, }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-123"}, HealthySince: &metav1.Time{ @@ -174,7 +174,7 @@ func TestGeneratePlan(t *testing.T) { }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-123"}, HealthySince: &metav1.Time{ @@ -185,7 +185,7 @@ func TestGeneratePlan(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "456", Status: temporaliov1alpha1.VersionStatusRamping, Deployment: &corev1.ObjectReference{Name: "test-456"}, }, @@ -196,7 +196,7 @@ func TestGeneratePlan(t *testing.T) { Replicas: func() *int32 { r := int32(3); return &r }(), }, state: &temporal.TemporalWorkerState{ - RampingVersionID: "test/namespace.456", // This is what triggers the reset + RampingBuildID: "456", // This is what triggers the reset }, config: &Config{ RolloutStrategy: temporaliov1alpha1.RolloutStrategy{ @@ -220,7 +220,7 @@ func TestGeneratePlan(t *testing.T) { VersionCount: 5, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.new", + BuildID: "new", Status: temporaliov1alpha1.VersionStatusNotRegistered, Deployment: nil, }, @@ -240,21 +240,21 @@ func TestGeneratePlan(t *testing.T) { name: "update deployment when target version, with an existing deployment, has an expired connection spec hash", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithExpiredConnectionSpecHash(1), - "test/namespace.456": createDeploymentWithDefaultConnectionSpecHash(1), + "123": createDeploymentWithExpiredConnectionSpecHash(1), + "456": createDeploymentWithDefaultConnectionSpecHash(1), }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusRamping, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "456", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-456"}, }, @@ -273,22 +273,22 @@ func TestGeneratePlan(t *testing.T) { name: "update deployment when a deprecated version has an expired connection spec hash", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithDefaultConnectionSpecHash(1), - "test/namespace.456": createDeploymentWithDefaultConnectionSpecHash(1), - "test/namespace.789": createDeploymentWithExpiredConnectionSpecHash(1), + "123": createDeploymentWithDefaultConnectionSpecHash(1), + "456": createDeploymentWithDefaultConnectionSpecHash(1), + "789": createDeploymentWithExpiredConnectionSpecHash(1), }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusRamping, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "456", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-456"}, }, @@ -296,7 +296,7 @@ func TestGeneratePlan(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.789", + BuildID: "789", Status: temporaliov1alpha1.VersionStatusDraining, Deployment: &corev1.ObjectReference{Name: "test-789"}, }, @@ -316,21 +316,21 @@ func TestGeneratePlan(t *testing.T) { name: "update deployment when current version has an expired connection spec hash", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithDefaultConnectionSpecHash(1), - "test/namespace.456": createDeploymentWithExpiredConnectionSpecHash(1), + "123": createDeploymentWithDefaultConnectionSpecHash(1), + "456": createDeploymentWithExpiredConnectionSpecHash(1), }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusRamping, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "456", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-456"}, }, @@ -352,7 +352,7 @@ func TestGeneratePlan(t *testing.T) { if tc.status == nil { tc.status = &temporaliov1alpha1.TemporalWorkerDeploymentStatus{} } - plan, err := GeneratePlan(logr.Discard(), tc.k8sState, tc.status, tc.spec, tc.state, createDefaultConnectionSpec(), tc.config) + plan, err := GeneratePlan(logr.Discard(), tc.k8sState, tc.status, tc.spec, tc.state, createDefaultConnectionSpec(), tc.config, "test/namespace") require.NoError(t, err) assert.Equal(t, tc.expectDelete, len(plan.DeleteDeployments), "unexpected number of deletions") @@ -388,14 +388,14 @@ func TestGetDeleteDeployments(t *testing.T) { name: "drained version should be deleted", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithDefaultConnectionSpecHash(0), + "123": createDeploymentWithDefaultConnectionSpecHash(0), }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusDrained, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, @@ -420,14 +420,14 @@ func TestGetDeleteDeployments(t *testing.T) { name: "not yet drained long enough", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.456": createDeploymentWithDefaultConnectionSpecHash(0), + "456": createDeploymentWithDefaultConnectionSpecHash(0), }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "456", Status: temporaliov1alpha1.VersionStatusDrained, Deployment: &corev1.ObjectReference{Name: "test-456"}, }, @@ -449,14 +449,14 @@ func TestGetDeleteDeployments(t *testing.T) { name: "not registered version should be deleted", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithDefaultConnectionSpecHash(1), - "test/namespace.456": createDeploymentWithDefaultConnectionSpecHash(1), + "123": createDeploymentWithDefaultConnectionSpecHash(1), + "456": createDeploymentWithDefaultConnectionSpecHash(1), }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, @@ -464,7 +464,7 @@ func TestGetDeleteDeployments(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "456", Status: temporaliov1alpha1.VersionStatusNotRegistered, Deployment: &corev1.ObjectReference{Name: "test-456"}, }, @@ -501,20 +501,20 @@ func TestGetScaleDeployments(t *testing.T) { name: "current version needs scaling", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithDefaultConnectionSpecHash(1), + "123": createDeploymentWithDefaultConnectionSpecHash(1), }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, @@ -529,14 +529,14 @@ func TestGetScaleDeployments(t *testing.T) { name: "drained version needs scaling down", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.123": createDeploymentWithDefaultConnectionSpecHash(1), - "test/namespace.456": createDeploymentWithDefaultConnectionSpecHash(2), + "123": createDeploymentWithDefaultConnectionSpecHash(1), + "456": createDeploymentWithDefaultConnectionSpecHash(2), }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusCurrent, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, @@ -544,7 +544,7 @@ func TestGetScaleDeployments(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "456", Status: temporaliov1alpha1.VersionStatusDrained, Deployment: &corev1.ObjectReference{Name: "test-456"}, }, @@ -566,16 +566,16 @@ func TestGetScaleDeployments(t *testing.T) { name: "inactive version needs scaling up", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.a": createDeploymentWithDefaultConnectionSpecHash(0), + "a": createDeploymentWithDefaultConnectionSpecHash(0), }, DeploymentRefs: map[string]*corev1.ObjectReference{ - "test/namespace.a": {Name: "test-a"}, + "a": {Name: "test-a"}, }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, @@ -583,7 +583,7 @@ func TestGetScaleDeployments(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.a", + BuildID: "a", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: &corev1.ObjectReference{Name: "test-a"}, }, @@ -599,16 +599,16 @@ func TestGetScaleDeployments(t *testing.T) { name: "ramping version needs scaling up", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.b": createDeploymentWithDefaultConnectionSpecHash(0), + "b": createDeploymentWithDefaultConnectionSpecHash(0), }, DeploymentRefs: map[string]*corev1.ObjectReference{ - "test/namespace.b": {Name: "test-b"}, + "b": {Name: "test-b"}, }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.b", + BuildID: "b", Status: temporaliov1alpha1.VersionStatusRamping, Deployment: &corev1.ObjectReference{Name: "test-b"}, }, @@ -618,7 +618,7 @@ func TestGetScaleDeployments(t *testing.T) { Replicas: func() *int32 { r := int32(3); return &r }(), }, state: &temporal.TemporalWorkerState{ - RampingVersionID: "test/namespace.b", + RampingBuildID: "b", }, expectScales: 1, }, @@ -626,16 +626,16 @@ func TestGetScaleDeployments(t *testing.T) { name: "target version needs scaling up", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.a": createDeploymentWithDefaultConnectionSpecHash(0), + "a": createDeploymentWithDefaultConnectionSpecHash(0), }, DeploymentRefs: map[string]*corev1.ObjectReference{ - "test/namespace.a": {Name: "test-a"}, + "a": {Name: "test-a"}, }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.a", + BuildID: "a", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: &corev1.ObjectReference{Name: "test-a"}, }, @@ -643,7 +643,7 @@ func TestGetScaleDeployments(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.b", + BuildID: "b", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: &corev1.ObjectReference{Name: "test-b"}, }, @@ -659,16 +659,16 @@ func TestGetScaleDeployments(t *testing.T) { name: "don't scale down drained deployment before delay", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.b": createDeploymentWithDefaultConnectionSpecHash(3), + "b": createDeploymentWithDefaultConnectionSpecHash(3), }, DeploymentRefs: map[string]*corev1.ObjectReference{ - "test/namespace.b": {Name: "test-b"}, + "b": {Name: "test-b"}, }, }, status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.a", + BuildID: "a", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: &corev1.ObjectReference{Name: "test-a"}, }, @@ -676,7 +676,7 @@ func TestGetScaleDeployments(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.b", + BuildID: "b", Status: temporaliov1alpha1.VersionStatusDrained, Deployment: &corev1.ObjectReference{Name: "test-b"}, }, @@ -718,7 +718,7 @@ func TestShouldCreateDeployment(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: &corev1.ObjectReference{Name: "test-123"}, }, @@ -734,7 +734,7 @@ func TestShouldCreateDeployment(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.b", + BuildID: "b", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: nil, }, @@ -751,7 +751,7 @@ func TestShouldCreateDeployment(t *testing.T) { VersionCount: 75, // Default limit is 75 TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.new", + BuildID: "new", Status: temporaliov1alpha1.VersionStatusNotRegistered, Deployment: nil, }, @@ -769,7 +769,7 @@ func TestShouldCreateDeployment(t *testing.T) { VersionCount: 5, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.new", + BuildID: "new", Status: temporaliov1alpha1.VersionStatusNotRegistered, Deployment: nil, }, @@ -787,7 +787,7 @@ func TestShouldCreateDeployment(t *testing.T) { VersionCount: 4, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.new", + BuildID: "new", Status: temporaliov1alpha1.VersionStatusNotRegistered, Deployment: nil, }, @@ -821,8 +821,8 @@ func TestGetTestWorkflows(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusInactive, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusInactive, TaskQueues: []temporaliov1alpha1.TaskQueue{ {Name: "queue1"}, {Name: "queue2"}, @@ -837,8 +837,8 @@ func TestGetTestWorkflows(t *testing.T) { }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "456", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, }, @@ -856,8 +856,8 @@ func TestGetTestWorkflows(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusInactive, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusInactive, TaskQueues: []temporaliov1alpha1.TaskQueue{ {Name: "queue1"}, {Name: "queue2"}, @@ -875,7 +875,7 @@ func TestGetTestWorkflows(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "123", Status: temporaliov1alpha1.VersionStatusInactive, TaskQueues: []temporaliov1alpha1.TaskQueue{}, }, @@ -895,8 +895,8 @@ func TestGetTestWorkflows(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusInactive, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusInactive, TaskQueues: []temporaliov1alpha1.TaskQueue{ {Name: "queue1"}, {Name: "queue2"}, @@ -927,7 +927,7 @@ func TestGetTestWorkflows(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - workflows := getTestWorkflows(tc.status, tc.config) + workflows := getTestWorkflows(tc.status, tc.config, "test/namespace") assert.Equal(t, tc.expectWorkflows, len(workflows), "unexpected number of test workflows") }) } @@ -952,15 +952,15 @@ func TestGetVersionConfigDiff(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", + BuildID: "test/namespace.123", Status: temporaliov1alpha1.VersionStatusInactive, HealthySince: &metav1.Time{Time: time.Now().Add(-1 * time.Hour)}, }, }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "456", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, }, @@ -984,8 +984,8 @@ func TestGetVersionConfigDiff(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusInactive, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusInactive, HealthySince: &metav1.Time{ Time: time.Now().Add(-30 * time.Minute), }, @@ -997,8 +997,8 @@ func TestGetVersionConfigDiff(t *testing.T) { }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "456", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, }, @@ -1015,8 +1015,8 @@ func TestGetVersionConfigDiff(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, HealthySince: &metav1.Time{ Time: time.Now().Add(-1 * time.Hour), }, @@ -1024,15 +1024,15 @@ func TestGetVersionConfigDiff(t *testing.T) { }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", - Status: temporaliov1alpha1.VersionStatusRamping, + BuildID: "456", + Status: temporaliov1alpha1.VersionStatusRamping, HealthySince: &metav1.Time{ Time: time.Now().Add(-30 * time.Minute), }, @@ -1041,7 +1041,7 @@ func TestGetVersionConfigDiff(t *testing.T) { }, }, spec: &temporaliov1alpha1.TemporalWorkerDeploymentSpec{}, - state: &temporal.TemporalWorkerState{RampingVersionID: "test/namespace.456"}, + state: &temporal.TemporalWorkerState{RampingBuildID: "456"}, expectConfig: true, expectSetCurrent: false, }, @@ -1053,8 +1053,8 @@ func TestGetVersionConfigDiff(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.789", - Status: temporaliov1alpha1.VersionStatusInactive, + BuildID: "789", + Status: temporaliov1alpha1.VersionStatusInactive, HealthySince: &metav1.Time{ Time: time.Now().Add(-1 * time.Hour), }, @@ -1062,15 +1062,15 @@ func TestGetVersionConfigDiff(t *testing.T) { }, CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", - Status: temporaliov1alpha1.VersionStatusRamping, + BuildID: "456", + Status: temporaliov1alpha1.VersionStatusRamping, }, }, }, @@ -1087,7 +1087,7 @@ func TestGetVersionConfigDiff(t *testing.T) { config := &Config{ RolloutStrategy: tc.strategy, } - versionConfig := getVersionConfigDiff(logr.Discard(), tc.status, tc.state, config) + versionConfig := getVersionConfigDiff(logr.Discard(), tc.status, tc.state, config, "test/namespace") assert.Equal(t, tc.expectConfig, versionConfig != nil, "unexpected version config presence") if tc.expectConfig { assert.NotNil(t, versionConfig, "expected version config") @@ -1121,14 +1121,14 @@ func TestGetVersionConfig_ProgressiveRolloutEdgeCases(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", - Status: temporaliov1alpha1.VersionStatusRamping, + BuildID: "456", + Status: temporaliov1alpha1.VersionStatusRamping, HealthySince: &metav1.Time{ Time: time.Now().Add(-1 * time.Hour), }, @@ -1155,13 +1155,13 @@ func TestGetVersionConfig_ProgressiveRolloutEdgeCases(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusInactive, HealthySince: &metav1.Time{Time: time.Now()}, }, @@ -1184,13 +1184,13 @@ func TestGetVersionConfig_ProgressiveRolloutEdgeCases(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusRamping, HealthySince: &metav1.Time{Time: time.Now()}, }, @@ -1219,13 +1219,13 @@ func TestGetVersionConfig_ProgressiveRolloutEdgeCases(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusRamping, HealthySince: &metav1.Time{Time: time.Now()}, }, @@ -1252,13 +1252,13 @@ func TestGetVersionConfig_ProgressiveRolloutEdgeCases(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusRamping, HealthySince: &metav1.Time{Time: time.Now()}, }, @@ -1288,13 +1288,13 @@ func TestGetVersionConfig_ProgressiveRolloutEdgeCases(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusRamping, HealthySince: &metav1.Time{Time: time.Now()}, }, @@ -1316,7 +1316,7 @@ func TestGetVersionConfig_ProgressiveRolloutEdgeCases(t *testing.T) { config := &Config{ RolloutStrategy: tc.strategy, } - versionConfig := getVersionConfigDiff(testlogr.New(t), tc.status, tc.state, config) + versionConfig := getVersionConfigDiff(testlogr.New(t), tc.status, tc.state, config, "test/namespace") assert.Equal(t, tc.expectConfig, versionConfig != nil, "unexpected version config presence") if tc.expectConfig { assert.Equal(t, tc.expectSetCurrent, versionConfig.SetCurrent, "unexpected set default value") @@ -1468,13 +1468,13 @@ func TestGetVersionConfig_GateWorkflowValidation(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusInactive, HealthySince: &metav1.Time{Time: time.Now().Add(-1 * time.Hour)}, TaskQueues: []temporaliov1alpha1.TaskQueue{ @@ -1502,13 +1502,13 @@ func TestGetVersionConfig_GateWorkflowValidation(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusInactive, HealthySince: &metav1.Time{Time: time.Now().Add(-1 * time.Hour)}, TaskQueues: []temporaliov1alpha1.TaskQueue{ @@ -1536,13 +1536,13 @@ func TestGetVersionConfig_GateWorkflowValidation(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusInactive, HealthySince: &metav1.Time{Time: time.Now().Add(-1 * time.Hour)}, TaskQueues: []temporaliov1alpha1.TaskQueue{ @@ -1570,13 +1570,13 @@ func TestGetVersionConfig_GateWorkflowValidation(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusInactive, HealthySince: &metav1.Time{Time: time.Now().Add(-1 * time.Hour)}, TaskQueues: []temporaliov1alpha1.TaskQueue{ @@ -1606,13 +1606,13 @@ func TestGetVersionConfig_GateWorkflowValidation(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ CurrentVersion: &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.123", - Status: temporaliov1alpha1.VersionStatusCurrent, + BuildID: "123", + Status: temporaliov1alpha1.VersionStatusCurrent, }, }, TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.456", + BuildID: "test/namespace.456", Status: temporaliov1alpha1.VersionStatusInactive, HealthySince: &metav1.Time{Time: time.Now().Add(-1 * time.Hour)}, TaskQueues: []temporaliov1alpha1.TaskQueue{}, // Empty @@ -1628,7 +1628,7 @@ func TestGetVersionConfig_GateWorkflowValidation(t *testing.T) { config := &Config{ RolloutStrategy: tc.strategy, } - versionConfig := getVersionConfigDiff(logr.Discard(), tc.status, tc.state, config) + versionConfig := getVersionConfigDiff(logr.Discard(), tc.status, tc.state, config, "test/namespace") if tc.expectConfig { assert.NotNil(t, versionConfig, "expected version config") } else { @@ -1654,11 +1654,11 @@ func TestComplexVersionStateScenarios(t *testing.T) { name: "multiple deprecated versions in different states", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.a": createDeploymentWithDefaultConnectionSpecHash(5), - "test/namespace.b": createDeploymentWithDefaultConnectionSpecHash(3), - "test/namespace.c": createDeploymentWithDefaultConnectionSpecHash(3), - "test/namespace.d": createDeploymentWithDefaultConnectionSpecHash(1), - "test/namespace.e": createDeploymentWithDefaultConnectionSpecHash(0), + "a": createDeploymentWithDefaultConnectionSpecHash(5), + "b": createDeploymentWithDefaultConnectionSpecHash(3), + "c": createDeploymentWithDefaultConnectionSpecHash(3), + "d": createDeploymentWithDefaultConnectionSpecHash(1), + "e": createDeploymentWithDefaultConnectionSpecHash(0), }, }, config: &Config{ @@ -1667,7 +1667,7 @@ func TestComplexVersionStateScenarios(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.a", + BuildID: "a", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: &corev1.ObjectReference{Name: "test-a"}, }, @@ -1675,21 +1675,21 @@ func TestComplexVersionStateScenarios(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.b", + BuildID: "b", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: &corev1.ObjectReference{Name: "test-b"}, }, }, { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.c", + BuildID: "c", Status: temporaliov1alpha1.VersionStatusDraining, Deployment: &corev1.ObjectReference{Name: "test-c"}, }, }, { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.d", + BuildID: "d", Status: temporaliov1alpha1.VersionStatusDrained, Deployment: &corev1.ObjectReference{Name: "test-d"}, }, @@ -1699,7 +1699,7 @@ func TestComplexVersionStateScenarios(t *testing.T) { }, { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.e", + BuildID: "e", Status: temporaliov1alpha1.VersionStatusDrained, Deployment: &corev1.ObjectReference{Name: "test-e"}, }, @@ -1718,13 +1718,13 @@ func TestComplexVersionStateScenarios(t *testing.T) { }, expectDeletes: 1, // Only e should be deleted (drained long enough and scaled to 0) expectScales: 2, // b needs scaling up, d needs scaling down - expectVersions: []string{"test/namespace.b", "test/namespace.d"}, + expectVersions: []string{"b", "d"}, }, { name: "draining version not scaled down before delay", k8sState: &k8s.DeploymentState{ Deployments: map[string]*appsv1.Deployment{ - "test/namespace.a": createDeploymentWithDefaultConnectionSpecHash(3), + "a": createDeploymentWithDefaultConnectionSpecHash(3), }, }, config: &Config{ @@ -1733,7 +1733,7 @@ func TestComplexVersionStateScenarios(t *testing.T) { status: &temporaliov1alpha1.TemporalWorkerDeploymentStatus{ TargetVersion: temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.a", + BuildID: "a", Status: temporaliov1alpha1.VersionStatusInactive, Deployment: &corev1.ObjectReference{Name: "test-a"}, }, @@ -1741,7 +1741,7 @@ func TestComplexVersionStateScenarios(t *testing.T) { DeprecatedVersions: []*temporaliov1alpha1.DeprecatedWorkerDeploymentVersion{ { BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: "test/namespace.a", + BuildID: "a", Status: temporaliov1alpha1.VersionStatusDrained, Deployment: &corev1.ObjectReference{Name: "test-a"}, }, @@ -1765,7 +1765,7 @@ func TestComplexVersionStateScenarios(t *testing.T) { for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - plan, err := GeneratePlan(logr.Discard(), tc.k8sState, tc.status, tc.spec, tc.state, createDefaultConnectionSpec(), tc.config) + plan, err := GeneratePlan(logr.Discard(), tc.k8sState, tc.status, tc.spec, tc.state, createDefaultConnectionSpec(), tc.config, "test/namespace") require.NoError(t, err) assert.Equal(t, tc.expectDeletes, len(plan.DeleteDeployments), "unexpected number of deletes") @@ -1774,17 +1774,17 @@ func TestComplexVersionStateScenarios(t *testing.T) { if tc.expectVersions != nil { scaledVersions := make([]string, 0, len(plan.ScaleDeployments)) for ref := range plan.ScaleDeployments { - // Extract version ID by looking up in status + // Extract build ID by looking up in status for _, v := range tc.status.DeprecatedVersions { if v.Deployment != nil && v.Deployment.Name == ref.Name { - scaledVersions = append(scaledVersions, v.VersionID) + scaledVersions = append(scaledVersions, v.BuildID) break } } if tc.status.CurrentVersion != nil && tc.status.CurrentVersion.Deployment != nil && tc.status.CurrentVersion.Deployment.Name == ref.Name { - scaledVersions = append(scaledVersions, tc.status.CurrentVersion.VersionID) + scaledVersions = append(scaledVersions, tc.status.CurrentVersion.BuildID) } } // Sort for consistent comparison @@ -1796,34 +1796,38 @@ func TestComplexVersionStateScenarios(t *testing.T) { func TestGetTestWorkflowID(t *testing.T) { testCases := []struct { - name string - taskQueue string - versionID string - expectID string + name string + deploymentName string + buildID string + taskQueue string + expectID string }{ { - name: "basic workflow ID generation", - taskQueue: "my-queue", - versionID: "test/namespace.123", - expectID: "test-test/namespace.123-my-queue", + name: "basic workflow ID generation", + deploymentName: "test/namespace", + buildID: "123", + taskQueue: "my-queue", + expectID: "test-test/namespace:123-my-queue", }, { - name: "workflow ID with special characters in queue name", - taskQueue: "queue-with-dashes-and_underscores", - versionID: "test/namespace.456", - expectID: "test-test/namespace.456-queue-with-dashes-and_underscores", + name: "workflow ID with special characters in queue name", + deploymentName: "test/namespace", + buildID: "456", + taskQueue: "queue-with-dashes-and_underscores", + expectID: "test-test/namespace:456-queue-with-dashes-and_underscores", }, { - name: "workflow ID with dots in version", - taskQueue: "queue", - versionID: "test/namespace.1.2.3", - expectID: "test-test/namespace.1.2.3-queue", + name: "workflow ID with dots in version", + deploymentName: "test/namespace", + buildID: "1.2.3", + taskQueue: "queue", + expectID: "test-test/namespace:1.2.3-queue", }, } for _, tc := range testCases { t.Run(tc.name, func(t *testing.T) { - id := temporal.GetTestWorkflowID(tc.versionID, tc.taskQueue) + id := temporal.GetTestWorkflowID(tc.deploymentName, tc.buildID, tc.taskQueue) assert.Equal(t, tc.expectID, id, "unexpected workflow ID") }) } @@ -1832,7 +1836,7 @@ func TestGetTestWorkflowID(t *testing.T) { func TestCheckAndUpdateDeploymentConnectionSpec(t *testing.T) { tests := []struct { name string - versionID string + buildID string existingDeployment *appsv1.Deployment newConnection temporaliov1alpha1.TemporalConnectionSpec expectUpdate bool @@ -1842,7 +1846,7 @@ func TestCheckAndUpdateDeploymentConnectionSpec(t *testing.T) { }{ { name: "non-existing deployment does not result in an update", - versionID: "non-existent-version", + buildID: "non-existent", existingDeployment: nil, newConnection: temporaliov1alpha1.TemporalConnectionSpec{ HostPort: "new-host:7233", @@ -1851,10 +1855,10 @@ func TestCheckAndUpdateDeploymentConnectionSpec(t *testing.T) { expectUpdate: false, }, { - name: "same connection spec hash does not update the existing deployment", - versionID: "test-version", + name: "same connection spec hash does not update the existing deployment", + buildID: "v1", existingDeployment: createTestDeploymentWithConnection( - "test-version", + "test-worker", "v1", temporaliov1alpha1.TemporalConnectionSpec{ HostPort: defaultHostPort(), MutualTLSSecret: defaultMutualTLSSecret(), @@ -1867,10 +1871,10 @@ func TestCheckAndUpdateDeploymentConnectionSpec(t *testing.T) { expectUpdate: false, }, { - name: "different secret name triggers update", - versionID: "test-version", + name: "different secret name triggers update", + buildID: "v2", existingDeployment: createTestDeploymentWithConnection( - "test-version", + "test-worker", "v2", temporaliov1alpha1.TemporalConnectionSpec{ HostPort: defaultHostPort(), MutualTLSSecret: defaultMutualTLSSecret(), @@ -1889,10 +1893,10 @@ func TestCheckAndUpdateDeploymentConnectionSpec(t *testing.T) { }), }, { - name: "different host port triggers update", - versionID: "test-version", + name: "different host port triggers update", + buildID: "v3", existingDeployment: createTestDeploymentWithConnection( - "test-version", + "test-worker", "v3", temporaliov1alpha1.TemporalConnectionSpec{ HostPort: defaultHostPort(), MutualTLSSecret: defaultMutualTLSSecret(), @@ -1911,10 +1915,10 @@ func TestCheckAndUpdateDeploymentConnectionSpec(t *testing.T) { }), }, { - name: "both hostport and secret change triggers update", - versionID: "test-version", + name: "both hostport and secret change triggers update", + buildID: "v4", existingDeployment: createTestDeploymentWithConnection( - "test-version", + "test-worker", "v4", temporaliov1alpha1.TemporalConnectionSpec{ HostPort: defaultHostPort(), MutualTLSSecret: defaultMutualTLSSecret(), @@ -1933,10 +1937,10 @@ func TestCheckAndUpdateDeploymentConnectionSpec(t *testing.T) { }), }, { - name: "empty mutual tls secret updates correctly", - versionID: "test-version", + name: "empty mutual tls secret updates correctly", + buildID: "v5", existingDeployment: createTestDeploymentWithConnection( - "test-version", + "test-worker", "v5", temporaliov1alpha1.TemporalConnectionSpec{ HostPort: defaultHostPort(), MutualTLSSecret: defaultMutualTLSSecret(), @@ -1962,11 +1966,12 @@ func TestCheckAndUpdateDeploymentConnectionSpec(t *testing.T) { Deployments: map[string]*appsv1.Deployment{}, } + buildID := tt.buildID if tt.existingDeployment != nil { - k8sState.Deployments[tt.versionID] = tt.existingDeployment + k8sState.Deployments[buildID] = tt.existingDeployment } - result := checkAndUpdateDeploymentConnectionSpec(tt.versionID, k8sState, tt.newConnection) + result := checkAndUpdateDeploymentConnectionSpec(buildID, k8sState, tt.newConnection) if !tt.expectUpdate { assert.Nil(t, result, "Expected no update, but got deployment") @@ -2105,13 +2110,13 @@ func createDefaultWorkerSpec() *temporaliov1alpha1.TemporalWorkerDeploymentSpec } // createTestDeploymentWithConnection creates a test deployment with the specified connection spec -func createTestDeploymentWithConnection(versionID string, connection temporaliov1alpha1.TemporalConnectionSpec) *appsv1.Deployment { +func createTestDeploymentWithConnection(deploymentName, buildID string, connection temporaliov1alpha1.TemporalConnectionSpec) *appsv1.Deployment { return k8s.NewDeploymentWithOwnerRef( &metav1.TypeMeta{}, &metav1.ObjectMeta{Name: "test-worker", Namespace: "default"}, createDefaultWorkerSpec(), - versionID, - "build123", + deploymentName, + buildID, connection, ) } diff --git a/internal/temporal/worker_deployment.go b/internal/temporal/worker_deployment.go index 1a52e224..b7d9c11f 100644 --- a/internal/temporal/worker_deployment.go +++ b/internal/temporal/worker_deployment.go @@ -20,22 +20,24 @@ import ( // VersionInfo contains information about a specific version type VersionInfo struct { - VersionID string - Status temporaliov1alpha1.VersionStatus - DrainedSince *time.Time - TaskQueues []temporaliov1alpha1.TaskQueue - TestWorkflows []temporaliov1alpha1.WorkflowExecution + DeploymentName string + BuildID string + Status temporaliov1alpha1.VersionStatus + DrainedSince *time.Time + TaskQueues []temporaliov1alpha1.TaskQueue + TestWorkflows []temporaliov1alpha1.WorkflowExecution } // TemporalWorkerState represents the state of a worker deployment in Temporal type TemporalWorkerState struct { - CurrentVersionID string + CurrentBuildID string VersionConflictToken []byte - RampingVersionID string + RampingBuildID string RampPercentage float32 // RampingSince is the time when the current ramping version was set. - RampingSince *metav1.Time - RampLastModifiedAt *metav1.Time + RampingSince *metav1.Time + RampLastModifiedAt *metav1.Time + // Versions indexed by build ID Versions map[string]*VersionInfo LastModifierIdentity string } @@ -69,8 +71,12 @@ func GetWorkerDeploymentState( routingConfig := workerDeploymentInfo.RoutingConfig // Set basic information - state.CurrentVersionID = routingConfig.CurrentVersion - state.RampingVersionID = routingConfig.RampingVersion + if routingConfig.CurrentVersion != nil { + state.CurrentBuildID = routingConfig.CurrentVersion.BuildId + } + if routingConfig.RampingVersion != nil { + state.RampingBuildID = routingConfig.RampingVersion.BuildId + } state.RampPercentage = routingConfig.RampingVersionPercentage state.LastModifierIdentity = workerDeploymentInfo.LastModifierIdentity state.VersionConflictToken = resp.ConflictToken @@ -78,7 +84,7 @@ func GetWorkerDeploymentState( // TODO(jlegrone): Re-enable stats once available in versioning v3. // Set ramping since time if applicable - if routingConfig.RampingVersion != "" { + if routingConfig.RampingVersion != nil { var ( rampingSinceTime = metav1.NewTime(routingConfig.RampingVersionChangedTime) lastRampUpdateTime = metav1.NewTime(routingConfig.RampingVersionPercentageChangedTime) @@ -90,14 +96,19 @@ func GetWorkerDeploymentState( // Process each version for _, version := range workerDeploymentInfo.VersionSummaries { versionInfo := &VersionInfo{ - VersionID: version.Version, + DeploymentName: version.Version.DeploymentName, + BuildID: version.Version.BuildId, } // Determine version status drainageStatus := version.DrainageStatus - if version.Version == routingConfig.CurrentVersion { + if routingConfig.CurrentVersion != nil && + version.Version.DeploymentName == routingConfig.CurrentVersion.DeploymentName && + version.Version.BuildId == routingConfig.CurrentVersion.BuildId { versionInfo.Status = temporaliov1alpha1.VersionStatusCurrent - } else if version.Version == routingConfig.RampingVersion { + } else if routingConfig.RampingVersion != nil && + version.Version.DeploymentName == routingConfig.RampingVersion.DeploymentName && + version.Version.BuildId == routingConfig.RampingVersion.BuildId { versionInfo.Status = temporaliov1alpha1.VersionStatusRamping } else if drainageStatus == temporalClient.WorkerDeploymentVersionDrainageStatusDraining { versionInfo.Status = temporaliov1alpha1.VersionStatusDraining @@ -106,7 +117,7 @@ func GetWorkerDeploymentState( // Get drain time information versionResp, err := deploymentHandler.DescribeVersion(ctx, temporalClient.WorkerDeploymentDescribeVersionOptions{ - Version: version.Version, + BuildID: version.Version.BuildId, }) if err == nil { drainedSince := versionResp.Info.DrainageInfo.LastChangedTime @@ -116,7 +127,7 @@ func GetWorkerDeploymentState( versionInfo.Status = temporaliov1alpha1.VersionStatusInactive } - state.Versions[version.Version] = versionInfo + state.Versions[version.Version.BuildId] = versionInfo } return state, nil @@ -127,7 +138,7 @@ func GetTestWorkflowStatus( ctx context.Context, client temporalClient.Client, workerDeploymentName string, - versionID string, + buildID string, workerDeploy *temporaliov1alpha1.TemporalWorkerDeployment, temporalState *TemporalWorkerState, ) ([]temporaliov1alpha1.WorkflowExecution, error) { @@ -136,15 +147,21 @@ func GetTestWorkflowStatus( // Get deployment handler deploymentHandler := client.WorkerDeploymentClient().GetHandle(workerDeploymentName) + // Get version info from temporal state to get deployment name + versionInfo, exists := temporalState.Versions[buildID] + if !exists { + return results, nil + } + // Describe the version to get task queue information versionResp, err := deploymentHandler.DescribeVersion(ctx, temporalClient.WorkerDeploymentDescribeVersionOptions{ - Version: versionID, + BuildID: versionInfo.BuildID, }) var notFound *serviceerror.NotFound if err != nil && !errors.As(err, ¬Found) { // Ignore NotFound error, because if the version is not found, we know there are no test workflows running on it. - return nil, fmt.Errorf("unable to describe worker deployment version for version %q: %w", versionID, err) + return nil, fmt.Errorf("unable to describe worker deployment version for buildID %q: %w", buildID, err) } // Check test workflows for each task queue @@ -155,12 +172,12 @@ func GetTestWorkflowStatus( } // Adding task queue information to the current temporal state - temporalState.Versions[versionID].TaskQueues = append(temporalState.Versions[versionID].TaskQueues, temporaliov1alpha1.TaskQueue{ + temporalState.Versions[buildID].TaskQueues = append(temporalState.Versions[buildID].TaskQueues, temporaliov1alpha1.TaskQueue{ Name: tq.Name, }) // Check if there is a test workflow for this task queue - testWorkflowID := GetTestWorkflowID(versionID, tq.Name) + testWorkflowID := GetTestWorkflowID(versionInfo.DeploymentName, versionInfo.BuildID, tq.Name) wf, err := client.DescribeWorkflowExecution( ctx, testWorkflowID, @@ -212,6 +229,6 @@ func mapWorkflowStatus(status enumspb.WorkflowExecutionStatus) temporaliov1alpha } // GetTestWorkflowID generates a workflowID for test workflows -func GetTestWorkflowID(versionID, taskQueue string) string { - return fmt.Sprintf("test-%s-%s", versionID, taskQueue) +func GetTestWorkflowID(deploymentName, buildID, taskQueue string) string { + return fmt.Sprintf("test-%s:%s-%s", deploymentName, buildID, taskQueue) } diff --git a/internal/temporal/worker_deployment_test.go b/internal/temporal/worker_deployment_test.go index d56b85eb..9271ac2e 100644 --- a/internal/temporal/worker_deployment_test.go +++ b/internal/temporal/worker_deployment_test.go @@ -72,29 +72,29 @@ func TestGetTestWorkflowID(t *testing.T) { tests := []struct { name string deploymentName string + buildID string taskQueue string - versionID string expected string }{ { name: "basic test", deploymentName: "worker", + buildID: "v1", taskQueue: "queue1", - versionID: "worker.v1", - expected: "test-worker.v1-queue1", + expected: "test-worker:v1-queue1", }, { name: "with dots", deploymentName: "worker.app", + buildID: "v2", taskQueue: "queue.main", - versionID: "worker.app.v2", - expected: "test-worker.app.v2-queue.main", + expected: "test-worker.app:v2-queue.main", }, } for _, tt := range tests { t.Run(tt.name, func(t *testing.T) { - id := GetTestWorkflowID(tt.versionID, tt.taskQueue) + id := GetTestWorkflowID(tt.deploymentName, tt.buildID, tt.taskQueue) assert.Equal(t, tt.expected, id) }) } diff --git a/internal/testhelpers/make.go b/internal/testhelpers/make.go index 7c6992ce..9badddb0 100644 --- a/internal/testhelpers/make.go +++ b/internal/testhelpers/make.go @@ -88,19 +88,6 @@ func MakeTWDWithImage(name, namespace, imageName string) *temporaliov1alpha1.Tem return MakeTWD(name, namespace, 1, MakePodSpec([]corev1.Container{{Image: imageName}}, nil, ""), nil, nil, nil) } -// MakeVersionId computes a version id based on the image, HelloWorldPodSpec, and k8s namespace. -func MakeVersionId(k8sNamespace, twdName, imageName string) string { - return k8s.ComputeVersionID( - ModifyObj( - MakeTWDWithName(twdName, k8sNamespace), - func(obj *temporaliov1alpha1.TemporalWorkerDeployment) *temporaliov1alpha1.TemporalWorkerDeployment { - obj.Spec.Template = MakeHelloWorldPodSpec(imageName) - return obj - }, - ), - ) -} - // MakeBuildId computes a build id based on the image and // If no podSpec is provided, defaults to HelloWorldPodSpec with the given image name. // If you provide your own podSpec, make sure to give the first container your desired image name if success is expected. @@ -130,7 +117,7 @@ func MakeTWDWithName(name, namespace string) *temporaliov1alpha1.TemporalWorkerD func MakeCurrentVersion(namespace, twdName, imageName string, healthy, createDeployment bool) *temporaliov1alpha1.CurrentWorkerDeploymentVersion { ret := &temporaliov1alpha1.CurrentWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: MakeVersionId(namespace, twdName, imageName), + BuildID: MakeBuildId(twdName, imageName, nil), Status: temporaliov1alpha1.VersionStatusCurrent, HealthySince: nil, Deployment: &corev1.ObjectReference{ @@ -161,7 +148,7 @@ func MakeCurrentVersion(namespace, twdName, imageName string, healthy, createDep func MakeTargetVersion(namespace, twdName, imageName string, rampPercentage float32, healthy, createDeployment bool) temporaliov1alpha1.TargetWorkerDeploymentVersion { ret := temporaliov1alpha1.TargetWorkerDeploymentVersion{ BaseWorkerDeploymentVersion: temporaliov1alpha1.BaseWorkerDeploymentVersion{ - VersionID: MakeVersionId(namespace, twdName, imageName), + BuildID: MakeBuildId(twdName, imageName, nil), Status: temporaliov1alpha1.VersionStatusCurrent, HealthySince: nil, Deployment: &corev1.ObjectReference{ diff --git a/internal/testhelpers/workers.go b/internal/testhelpers/workers.go index dc9f2a0d..eb03d82f 100644 --- a/internal/testhelpers/workers.go +++ b/internal/testhelpers/workers.go @@ -6,7 +6,6 @@ import ( "fmt" "time" - "github.com/temporalio/temporal-worker-controller/internal/k8s" "go.temporal.io/api/workflowservice/v1" "go.temporal.io/sdk/client" "go.temporal.io/sdk/worker" @@ -53,8 +52,11 @@ func newVersionedWorker(ctx context.Context, podTemplateSpec corev1.PodTemplateS opts := worker.Options{ DeploymentOptions: worker.DeploymentOptions{ - UseVersioning: true, - Version: temporalDeploymentName + k8s.VersionIDSeparator + workerBuildId, + UseVersioning: true, + Version: worker.WorkerDeploymentVersion{ + DeploymentName: temporalDeploymentName, + BuildId: workerBuildId, + }, DefaultVersioningBehavior: workflow.VersioningBehaviorPinned, }, } diff --git a/internal/tests/internal/deployment_controller.go b/internal/tests/internal/deployment_controller.go index 66e17282..dca8a834 100644 --- a/internal/tests/internal/deployment_controller.go +++ b/internal/tests/internal/deployment_controller.go @@ -121,13 +121,13 @@ func makePreliminaryStatusTrue( loopDefers := make([]func(), 0) defer handleStopFuncs(loopDefers) for _, dv := range twd.Status.DeprecatedVersions { - t.Logf("Setting up deprecated version %v with status %v", dv.VersionID, dv.Status) + t.Logf("Setting up deprecated version %v with status %v", dv.BuildID, dv.Status) workerStopFuncs := createStatus(ctx, t, env, twd, dv.BaseWorkerDeploymentVersion, nil) loopDefers = append(loopDefers, func() { handleStopFuncs(workerStopFuncs) }) } - if tv := twd.Status.TargetVersion; tv.VersionID != "" { - t.Logf("Setting up target version %v with status %v", tv.VersionID, tv.Status) + if tv := twd.Status.TargetVersion; tv.BuildID != "" { + t.Logf("Setting up target version %v with status %v", tv.BuildID, tv.Status) workerStopFuncs := createStatus(ctx, t, env, twd, tv.BaseWorkerDeploymentVersion, tv.RampPercentage) defer handleStopFuncs(workerStopFuncs) } @@ -151,7 +151,11 @@ func createStatus( rampPercentage *float32, ) (workerStopFuncs []func()) { if prevVersion.Deployment != nil && prevVersion.Deployment.FieldPath == "create" { - v := getVersion(t, prevVersion.VersionID) + deploymentName := k8s.ComputeWorkerDeploymentName(newTWD) + v := &deployment.WorkerDeploymentVersion{ + DeploymentName: deploymentName, + BuildId: prevVersion.BuildID, + } prevTWD := recreateTWD(newTWD, env.images[v.BuildId], env.replicas[v.BuildId]) createWorkerDeployment(ctx, t, env, prevTWD, v.BuildId) expectedDeploymentName := k8s.ComputeVersionedDeploymentName(prevTWD.Name, k8s.ComputeBuildID(prevTWD)) @@ -180,18 +184,6 @@ func createStatus( return workerStopFuncs } -// Helper to handle unlikely error caused by invalid string split. -func getVersion(t *testing.T, versionId string) *deployment.WorkerDeploymentVersion { - deploymentName, buildId, err := k8s.SplitVersionID(versionId) - if err != nil { - t.Error(err) - } - return &deployment.WorkerDeploymentVersion{ - DeploymentName: deploymentName, - BuildId: buildId, - } -} - // recreateTWD returns a copy of the given TWD, but replaces the build-id-generating image name with the given one, // and the Spec.Replicas with the given replica count. // Panics if the twd spec is nil, or if it has no containers, but that should never be true for these integration tests. diff --git a/internal/tests/internal/validation_helpers.go b/internal/tests/internal/validation_helpers.go index 7052cda8..bf483ec2 100644 --- a/internal/tests/internal/validation_helpers.go +++ b/internal/tests/internal/validation_helpers.go @@ -8,7 +8,6 @@ import ( temporaliov1alpha1 "github.com/temporalio/temporal-worker-controller/api/v1alpha1" "github.com/temporalio/temporal-worker-controller/internal/controller" - "github.com/temporalio/temporal-worker-controller/internal/k8s" sdkclient "go.temporal.io/sdk/client" "go.temporal.io/server/api/deployment/v1" "go.temporal.io/server/temporaltest" @@ -53,7 +52,7 @@ func waitForVersionRegistrationInDeployment( return fmt.Errorf("unable to describe worker deployment %s: %w", version.DeploymentName, err) } for _, vs := range resp.Info.VersionSummaries { - if vs.Version == version.DeploymentName+k8s.VersionIDSeparator+version.BuildId { + if vs.Version.DeploymentName == version.DeploymentName && vs.Version.BuildId == version.BuildId { return nil } } @@ -72,7 +71,7 @@ func setCurrentVersion( deploymentHandler := ts.GetDefaultClient().WorkerDeploymentClient().GetHandle(version.DeploymentName) eventually(t, 30*time.Second, time.Second, func() error { _, err := deploymentHandler.SetCurrentVersion(ctx, sdkclient.WorkerDeploymentSetCurrentVersionOptions{ - Version: version.DeploymentName + k8s.VersionIDSeparator + version.BuildId, + BuildID: version.BuildId, Identity: controller.ControllerIdentity, }) if err != nil { @@ -93,13 +92,13 @@ func setRampingVersion( waitForVersionRegistrationInDeployment(t, ctx, ts, version) deploymentHandler := ts.GetDefaultClient().WorkerDeploymentClient().GetHandle(version.DeploymentName) eventually(t, 30*time.Second, time.Second, func() error { - var versionStr string + var buildID string if version != nil { - versionStr = version.DeploymentName + k8s.VersionIDSeparator + version.BuildId + buildID = version.BuildId } _, err := deploymentHandler.SetRampingVersion(ctx, sdkclient.WorkerDeploymentSetRampingVersionOptions{ - Version: versionStr, + BuildID: buildID, Percentage: rampPercentage, Identity: controller.ControllerIdentity, }) @@ -136,10 +135,10 @@ func verifyTemporalWorkerDeploymentStatusEventually( if twd.Status.CurrentVersion == nil { return fmt.Errorf("expected CurrentVersion to be set") } - if twd.Status.CurrentVersion.VersionID != expectedDeploymentStatus.CurrentVersion.VersionID { - return fmt.Errorf("expected current version id to be '%s', got '%s'", - expectedDeploymentStatus.CurrentVersion.VersionID, - twd.Status.CurrentVersion.VersionID) + if twd.Status.CurrentVersion.BuildID != expectedDeploymentStatus.CurrentVersion.BuildID { + return fmt.Errorf("expected current build id to be '%s', got '%s'", + expectedDeploymentStatus.CurrentVersion.BuildID, + twd.Status.CurrentVersion.BuildID) } if twd.Status.CurrentVersion.Deployment == nil { return fmt.Errorf("expected CurrentVersion.Deployment to be set") @@ -150,14 +149,14 @@ func verifyTemporalWorkerDeploymentStatusEventually( twd.Status.CurrentVersion.Deployment.Name) } } - if expectedDeploymentStatus.TargetVersion.VersionID != "" { - if twd.Status.TargetVersion.VersionID == "" { + if expectedDeploymentStatus.TargetVersion.BuildID != "" { + if twd.Status.TargetVersion.BuildID == "" { return fmt.Errorf("expected TargetVersion to be set") } - if twd.Status.TargetVersion.VersionID != expectedDeploymentStatus.TargetVersion.VersionID { - return fmt.Errorf("expected target version id to be '%s', got '%s'", - expectedDeploymentStatus.TargetVersion.VersionID, - twd.Status.TargetVersion.VersionID) + if twd.Status.TargetVersion.BuildID != expectedDeploymentStatus.TargetVersion.BuildID { + return fmt.Errorf("expected target build id to be '%s', got '%s'", + expectedDeploymentStatus.TargetVersion.BuildID, + twd.Status.TargetVersion.BuildID) } if expectedDeploymentStatus.TargetVersion.RampPercentage != nil { if twd.Status.TargetVersion.RampPercentage == nil {