Repository: flyteorg/flyte
Pull request #5577 (2024-07-22 17:57:29)

Respect original task definition retry strategy for single task executions
## Why are the changes needed?
It's counter-intuitive that a single task execution doesn't respect a task spec when creating the system-generated workflow but workflow compilation ordinarily does



## What changes were proposed in this pull request?
See PR title.

## How was this patch tested?
Unit test

### Setup process

### Screenshots

## Check all the applicable boxes <!-- Follow the above conventions to check the box -->

- [ ] I updated the documentation accordingly.
- [ ] All new and existing tests passed.
- [ ] All commits are signed-off.

## Related PRs

<!-- Add related pull requests for reviewers to check -->

## Docs link

<!-- Add documentation link built by CI jobs here, and specify the changed place -->


codecov[bot]: ## [Codecov](https://app.codecov.io/gh/flyteorg/flyte/pull/5577?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) Report
All modified and coverable lines are covered by tests :white_check_mark:
> Project coverage is 79.06%. Comparing base [(`337088e`)](https://app.codecov.io/gh/flyteorg/flyte/commit/337088e07bc9f3511eb82c3b2c77140fe449e6cd?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) to head [(`3f0d570`)](https://app.codecov.io/gh/flyteorg/flyte/commit/3f0d5708ca5c6b3ba044675724ac798a8427b02f?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg).

<details><summary>Additional details and impacted files</summary>


```diff
@@             Coverage Diff             @@
##           master    #5577       +/-   ##
===========================================
+ Coverage   60.98%   79.06%   +18.07%     
===========================================
  Files         796       18      -778     
  Lines       51676     1323    -50353     
===========================================
- Hits        31515     1046    -30469     
+ Misses      17261      209    -17052     
+ Partials     2900       68     -2832     
```

| [Flag](https://app.codecov.io/gh/flyteorg/flyte/pull/5577/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | Coverage Δ | |
|---|---|---|
| [unittests-datacatalog](https://app.codecov.io/gh/flyteorg/flyte/pull/5577/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `?` | |
| [unittests-flyteadmin](https://app.codecov.io/gh/flyteorg/flyte/pull/5577/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `?` | |
| [unittests-flytecopilot](https://app.codecov.io/gh/flyteorg/flyte/pull/5577/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `?` | |
| [unittests-flytectl](https://app.codecov.io/gh/flyteorg/flyte/pull/5577/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `?` | |
| [unittests-flyteidl](https://app.codecov.io/gh/flyteorg/flyte/pull/5577/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `79.06% <ø> (ø)` | |
| [unittests-flyteplugins](https://app.codecov.io/gh/flyteorg/flyte/pull/5577/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `?` | |
| [unittests-flytepropeller](https://app.codecov.io/gh/flyteorg/flyte/pull/5577/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `?` | |
| [unittests-flytestdlib](https://app.codecov.io/gh/flyteorg/flyte/pull/5577/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg) | `?` | |

Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg#carryforward-flags-in-the-pull-request-comment) to find out more.

</details>

[:umbrella: View full report in Codecov by Sentry](https://app.codecov.io/gh/flyteorg/flyte/pull/5577?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg).   
:loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=flyteorg).


Patch:
diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml
index 1cc63bf63..2e61f36f4 100644
--- a/.github/workflows/checks.yml
+++ b/.github/workflows/checks.yml
@@ -10,7 +10,7 @@ on:
     branches:
       - master
 env:
-  GO_VERSION: "1.21"
+  GO_VERSION: "1.22"
   PRIORITIES: "P0"
 jobs:
   unpack-envvars:
diff --git a/.github/workflows/flyteidl-checks.yml b/.github/workflows/flyteidl-checks.yml
index aa6ff0f65..f8a1d0f4d 100644
--- a/.github/workflows/flyteidl-checks.yml
+++ b/.github/workflows/flyteidl-checks.yml
@@ -10,7 +10,7 @@ on:
     branches:
       - master
 env:
-  GO_VERSION: "1.21"
+  GO_VERSION: "1.22"
 jobs:
   unpack-envvars:
     runs-on: ubuntu-latest
diff --git a/.github/workflows/generate_flyte_manifest.yml b/.github/workflows/generate_flyte_manifest.yml
index 33bbdca89..a8c90a451 100644
--- a/.github/workflows/generate_flyte_manifest.yml
+++ b/.github/workflows/generate_flyte_manifest.yml
@@ -15,9 +15,9 @@ jobs:
       - uses: actions/checkout@v4
         with:
           fetch-depth: "0"
-      - uses: actions/setup-go@v4
+      - uses: actions/setup-go@v5
         with:
-          go-version: "1.21"
+          go-version: "1.22"
       - name: Update references
         env:
           VERSION: ${{ github.event.inputs.next-version }}
diff --git a/.github/workflows/go_generate.yml b/.github/workflows/go_generate.yml
index bef6c6713..2fb80653a 100644
--- a/.github/workflows/go_generate.yml
+++ b/.github/workflows/go_generate.yml
@@ -21,13 +21,13 @@ jobs:
         working-directory: ${{ inputs.component }}
     steps:
       - uses: actions/checkout@v4
-      - uses: arduino/setup-protoc@v1
+      - uses: arduino/setup-protoc@v3
         with:
           repo-token: ${{ secrets.FLYTE_BOT_PAT }}
       - uses: bufbuild/buf-setup-action@v1
         with:
           github_token: ${{ secrets.FLYTE_BOT_PAT }}
-      - uses: actions/setup-go@v4
+      - uses: actions/setup-go@v5
         with:
           go-version: ${{ inputs.go-version }}
       - name: Go generate and diff
diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml
index 4c1eccead..eb0118f6d 100644
--- a/.github/workflows/integration.yml
+++ b/.github/workflows/integration.yml
@@ -37,7 +37,7 @@ jobs:
         with:
           version: "v0.11.1"
       - name: Set up Go
-        uses: actions/setup-go@v4
+        uses: actions/setup-go@v5
         with:
           go-version: ${{ inputs.go-version }}
       - name: Integration
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 4c58f87f4..54793d100 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -20,7 +20,7 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v4
       - name: Set up Go
-        uses: actions/setup-go@v4
+        uses: actions/setup-go@v5
         with:
           go-version: ${{ inputs.go-version }}
       - name: Lint
diff --git a/.github/workflows/single-binary.yml b/.github/workflows/single-binary.yml
index ce5411328..23d438b32 100644
--- a/.github/workflows/single-binary.yml
+++ b/.github/workflows/single-binary.yml
@@ -17,9 +17,9 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - uses: actions/setup-go@v4
+      - uses: actions/setup-go@v5
         with:
-          go-version: "1.21"
+          go-version: "1.22"
       - name: golangci-lint
         uses: golangci/golangci-lint-action@v3
         with:
diff --git a/Dockerfile b/Dockerfile
index c48d29253..fc32351eb 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -2,7 +2,7 @@ ARG FLYTECONSOLE_VERSION=latest
 FROM ghcr.io/flyteorg/flyteconsole:${FLYTECONSOLE_VERSION} AS flyteconsole
 
 
-FROM --platform=${BUILDPLATFORM} golang:1.21-bookworm AS flytebuilder
+FROM --platform=${BUILDPLATFORM} golang:1.22-bookworm AS flytebuilder
 
 ARG TARGETARCH
 ENV GOARCH "${TARGETARCH}"
diff --git a/Dockerfile.datacatalog b/Dockerfile.datacatalog
index ffda0ca8d..b6bfc8707 100644
--- a/Dockerfile.datacatalog
+++ b/Dockerfile.datacatalog
@@ -3,7 +3,8 @@
 #
 # TO OPT OUT OF UPDATES, SEE https://github.com/flyteorg/boilerplate/blob/master/Readme.rst
 
-FROM --platform=${BUILDPLATFORM} golang:1.21-alpine3.18 as builder
+FROM --platform=${BUILDPLATFORM} golang:1.22-alpine3.18 as builder
+
 
 ARG TARGETARCH
 ENV GOARCH "${TARGETARCH}"
diff --git a/Dockerfile.flyteadmin b/Dockerfile.flyteadmin
index fa8b3acbd..2fe21cccc 100644
--- a/Dockerfile.flyteadmin
+++ b/Dockerfile.flyteadmin
@@ -3,7 +3,7 @@
 #
 # TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst
 
-FROM --platform=${BUILDPLATFORM} golang:1.21-alpine3.18 as builder
+FROM --platform=${BUILDPLATFORM} golang:1.22-alpine3.18 as builder
 
 ARG TARGETARCH
 ENV GOARCH "${TARGETARCH}"
diff --git a/Dockerfile.flytecopilot b/Dockerfile.flytecopilot
index f696ebd61..44107f109 100644
--- a/Dockerfile.flytecopilot
+++ b/Dockerfile.flytecopilot
@@ -3,7 +3,8 @@
 #
 # TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst
 
-FROM --platform=${BUILDPLATFORM} golang:1.21-alpine3.18 as builder
+FROM --platform=${BUILDPLATFORM} golang:1.22-alpine3.18 as builder
+
 
 ARG TARGETARCH
 ENV GOARCH "${TARGETARCH}"
diff --git a/Dockerfile.flytepropeller b/Dockerfile.flytepropeller
index fa226c1d8..058d78b21 100644
--- a/Dockerfile.flytepropeller
+++ b/Dockerfile.flytepropeller
@@ -3,7 +3,9 @@
 #
 # TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst
 
-FROM --platform=${BUILDPLATFORM} golang:1.21-alpine3.18 as builder
+
+FROM --platform=${BUILDPLATFORM} golang:1.22-alpine3.18 as builder
+
 
 ARG TARGETARCH
 ENV GOARCH "${TARGETARCH}"
diff --git a/Dockerfile.flytescheduler b/Dockerfile.flytescheduler
index 71421fd22..b22d050fc 100644
--- a/Dockerfile.flytescheduler
+++ b/Dockerfile.flytescheduler
@@ -3,7 +3,9 @@
 #
 # TO OPT OUT OF UPDATES, SEE https://github.com/lyft/boilerplate/blob/master/Readme.rst
 
-FROM --platform=${BUILDPLATFORM} golang:1.21-alpine3.18 as builder
+
+FROM --platform=${BUILDPLATFORM} golang:1.22-alpine3.18 as builder
+
 
 ARG TARGETARCH
 ENV GOARCH "${TARGETARCH}"
diff --git a/boilerplate/flyte/golang_support_tools/go.mod b/boilerplate/flyte/golang_support_tools/go.mod
index 2b4aa1d1a..3abdda171 100644
--- a/boilerplate/flyte/golang_support_tools/go.mod
+++ b/boilerplate/flyte/golang_support_tools/go.mod
@@ -1,8 +1,6 @@
 module github.com/flyteorg/boilerplate
 
-go 1.21
-
-toolchain go1.21.7
+go 1.22
 
 require (
 	github.com/EngHabu/mockery v0.0.0-20220916190332-dde70e38baba
diff --git a/datacatalog/go.mod b/datacatalog/go.mod
index b361dff68..74aa98868 100644
--- a/datacatalog/go.mod
+++ b/datacatalog/go.mod
@@ -1,6 +1,8 @@
 module github.com/flyteorg/flyte/datacatalog
 
-go 1.21
+go 1.22
+
+toolchain go1.22.1
 
 require (
 	github.com/Selvatico/go-mocket v1.0.7
diff --git a/docker/sandbox-bundled/Dockerfile b/docker/sandbox-bundled/Dockerfile
index 0e8b0b085..92e8fa2d4 100644
--- a/docker/sandbox-bundled/Dockerfile
+++ b/docker/sandbox-bundled/Dockerfile
@@ -10,7 +10,7 @@ COPY images/manifest.txt images/preload ./
 RUN --security=insecure ./preload manifest.txt
 
 
-FROM --platform=${BUILDPLATFORM} golang:1.19-bullseye AS bootstrap
+FROM --platform=${BUILDPLATFORM} golang:1.22-bullseye AS bootstrap
 
 ARG TARGETARCH
 ENV CGO_ENABLED 0
diff --git a/docker/sandbox-bundled/bootstrap/go.mod b/docker/sandbox-bundled/bootstrap/go.mod
index 447dd0862..81c932457 100644
--- a/docker/sandbox-bundled/bootstrap/go.mod
+++ b/docker/sandbox-bundled/bootstrap/go.mod
@@ -1,6 +1,6 @@
 module github.com/flyteorg/flyte/docker/sandbox-bundled/bootstrap
 
-go 1.21
+go 1.22
 
 require (
 	github.com/stretchr/testify v1.8.0
diff --git a/docs/concepts/architecture.rst b/docs/concepts/architecture.rst
index 6727bd61d..9f080f753 100644
--- a/docs/concepts/architecture.rst
+++ b/docs/concepts/architecture.rst
@@ -32,7 +32,7 @@ Flyte components are separated into 3 logical planes. The planes are summarized
 |                   | It stores information such as current and past running workflows, and provides that information upon request. |
 |                   | It also accepts requests to execute workflows, but offloads the work to the Data Plane.                       |
 +-------------------+---------------------------------------------------------------------------------------------------------------+
-| **Data Plane**    | The sole responsibility of the the Data Plane is to fulfill workflows.                                        |
+| **Data Plane**    | The sole responsibility of the Data Plane is to fulfill workflows.                                            |
 |                   | It accepts workflow requests from the Control Plane and guides the workflow to completion,                    |
 |                   | launching tasks on a cluster of machines as necessary based on the workflow graph.                            |
 |                   | It sends status events back to the control plane so the information can be stored and surfaced to end-users.  |
diff --git a/docs/deployment/configuration/monitoring.rst b/docs/deployment/configuration/monitoring.rst
index 7b0d9ddc0..48239288f 100644
--- a/docs/deployment/configuration/monitoring.rst
+++ b/docs/deployment/configuration/monitoring.rst
@@ -133,7 +133,7 @@ This is especially true if you plan to use the Service Monitors provided by the
 
 .. note::
 
-   By default, the ``ServiceMonitor`` is configured with a ``scrapeTimeout`` of 30s and and ``interval`` of 60s. You can customize these values if needed.
+   By default, the ``ServiceMonitor`` is configured with a ``scrapeTimeout`` of 30s and ``interval`` of 60s. You can customize these values if needed.
 
 With the above configuration in place you should be able to import the dashboards in your Grafana instance.
 
diff --git a/flyteadmin/go.mod b/flyteadmin/go.mod
index d3e5e602d..4c43d4ad8 100644
--- a/flyteadmin/go.mod
+++ b/flyteadmin/go.mod
@@ -1,6 +1,6 @@
 module github.com/flyteorg/flyte/flyteadmin
 
-go 1.21
+go 1.22
 
 require (
 	cloud.google.com/go/iam v1.1.5
diff --git a/flyteadmin/pkg/manager/impl/util/single_task_execution.go b/flyteadmin/pkg/manager/impl/util/single_task_execution.go
index 883ef0aec..b032d21e5 100644
--- a/flyteadmin/pkg/manager/impl/util/single_task_execution.go
+++ b/flyteadmin/pkg/manager/impl/util/single_task_execution.go
@@ -85,6 +85,15 @@ func CreateOrGetWorkflowModel(
 		Version: workflowIdentifier.Version,
 	})
 
+	var retryStrategy *core.RetryStrategy
+	if task.GetClosure().GetCompiledTask().GetTemplate() != nil &&
+		task.GetClosure().GetCompiledTask().GetTemplate().GetMetadata() != nil &&
+		task.GetClosure().GetCompiledTask().GetTemplate().GetMetadata().GetRetries() != nil {
+		retryStrategy = task.GetClosure().GetCompiledTask().GetTemplate().GetMetadata().GetRetries()
+	} else {
+		retryStrategy = &defaultRetryStrategy
+	}
+
 	if err != nil {
 		if ferr, ok := err.(errors.FlyteAdminError); !ok || ferr.Code() != codes.NotFound {
 			return nil, err
@@ -99,7 +108,7 @@ func CreateOrGetWorkflowModel(
 						Id: generateNodeNameFromTask(taskIdentifier.Name),
 						Metadata: &core.NodeMetadata{
 							Name:    generateNodeNameFromTask(taskIdentifier.Name),
-							Retries: &defaultRetryStrategy,
+							Retries: retryStrategy,
 						},
 						Inputs: generateBindings(*task.Closure.CompiledTask.Template.Interface.Inputs, noInputNodeID),
 						Target: &core.Node_TaskNode{
diff --git a/flytecopilot/go.mod b/flytecopilot/go.mod
index f1265198f..b1f7b3822 100644
--- a/flytecopilot/go.mod
+++ b/flytecopilot/go.mod
@@ -1,6 +1,6 @@
 module github.com/flyteorg/flyte/flytecopilot
 
-go 1.21
+go 1.22
 
 require (
 	github.com/aws/aws-sdk-go v1.44.2
diff --git a/flytectl/docs/source/gen/flytectl_update_project.rst b/flytectl/docs/source/gen/flytectl_update_project.rst
index 63a3c4eba..ce203b736 100644
--- a/flytectl/docs/source/gen/flytectl_update_project.rst
+++ b/flytectl/docs/source/gen/flytectl_update_project.rst
@@ -53,7 +53,7 @@ Then, pass it in using the *file* flag:
 
 To archive or activate (unarchive) a project using a *yaml* file:
 
-* Add a state field, with a value of *0* for activated (unarchived) or *1* for archived, at the top level of the the *yaml* file.
+* Add a state field, with a value of *0* for activated (unarchived) or *1* for archived, at the top level of the *yaml* file.
 
 * Add the *archive* flag to the command.
 
diff --git a/flytectl/go.mod b/flytectl/go.mod
index 47f9a1d5a..c661cfde3 100644
--- a/flytectl/go.mod
+++ b/flytectl/go.mod
@@ -1,6 +1,8 @@
 module github.com/flyteorg/flyte/flytectl
 
-go 1.21
+go 1.22
+
+toolchain go1.22.0
 
 require (
 	github.com/apoorvam/goterminal v0.0.0-20180523175556-614d345c47e5
diff --git a/flyteidl/go.mod b/flyteidl/go.mod
index 9f3ebc3f9..1bef1d2be 100644
--- a/flyteidl/go.mod
+++ b/flyteidl/go.mod
@@ -1,8 +1,6 @@
 module github.com/flyteorg/flyte/flyteidl
 
-go 1.21
-
-toolchain go1.21.3
+go 1.22
 
 require (
 	github.com/flyteorg/flyte/flytestdlib v0.0.0-00010101000000-000000000000
diff --git a/flyteplugins/go.mod b/flyteplugins/go.mod
index bcf6dab61..692d43b71 100644
--- a/flyteplugins/go.mod
+++ b/flyteplugins/go.mod
@@ -1,6 +1,6 @@
 module github.com/flyteorg/flyte/flyteplugins
 
-go 1.21
+go 1.22
 
 require (
 	github.com/GoogleCloudPlatform/spark-on-k8s-operator v0.0.0-20200723154620-6f35a1152625
diff --git a/flytepropeller/go.mod b/flytepropeller/go.mod
index 76e81366a..75a2b684d 100644
--- a/flytepropeller/go.mod
+++ b/flytepropeller/go.mod
@@ -1,6 +1,6 @@
 module github.com/flyteorg/flyte/flytepropeller
 
-go 1.21
+go 1.22
 
 require (
 	github.com/DiSiqueira/GoTree v1.0.1-0.20180907134536-53a8e837f295
diff --git a/go.mod b/go.mod
index 2748b1f29..336fdb016 100644
--- a/go.mod
+++ b/go.mod
@@ -1,6 +1,6 @@
 module github.com/flyteorg/flyte
 
-go 1.21
+go 1.22
 
 require (
 	github.com/flyteorg/flyte/datacatalog v0.0.0-00010101000000-000000000000


Test patch:
diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml
index b7c76cff2..cbce9cd05 100644
--- a/.github/workflows/tests.yml
+++ b/.github/workflows/tests.yml
@@ -16,9 +16,9 @@ jobs:
       - name: Fetch the code
         uses: actions/checkout@v4
       - name: Set up Go
-        uses: actions/setup-go@v4
+        uses: actions/setup-go@v5
         with:
-          go-version: "1.21"
+          go-version: "1.22"
       - name: Compile
         run: make compile
       - name: Run tests
@@ -75,8 +75,8 @@ jobs:
     runs-on: ubuntu-latest
     steps:
       - uses: actions/checkout@v4
-      - uses: actions/setup-go@v4
+      - uses: actions/setup-go@v5
         with:
-          go-version: "1.21"
+          go-version: "1.22"
       - name: Helm and diff
         run: DELTA_CHECK=true make helm
diff --git a/.github/workflows/unit-tests.yml b/.github/workflows/unit-tests.yml
index d3a20f382..3911d6402 100644
--- a/.github/workflows/unit-tests.yml
+++ b/.github/workflows/unit-tests.yml
@@ -23,7 +23,7 @@ jobs:
       - name: Checkout
         uses: actions/checkout@v4
       - name: Set up Go
-        uses: actions/setup-go@v4
+        uses: actions/setup-go@v5
         with:
           go-version: ${{ inputs.go-version }}
       - name: Unit Tests
diff --git a/flyteadmin/pkg/manager/impl/util/single_task_execution_test.go b/flyteadmin/pkg/manager/impl/util/single_task_execution_test.go
index 82840e4dd..899aae066 100644
--- a/flyteadmin/pkg/manager/impl/util/single_task_execution_test.go
+++ b/flyteadmin/pkg/manager/impl/util/single_task_execution_test.go
@@ -109,6 +109,9 @@ func TestCreateOrGetWorkflowModel(t *testing.T) {
 			Name:         ".flytegen.app.workflows.MyWorkflow.my_task",
 			Version:      "12345",
 		}), fmt.Sprintf("%+v", request.Id))
+		assert.Len(t, request.GetSpec().GetTemplate().GetNodes(), 1)
+		assert.Equal(t, request.GetSpec().GetTemplate().GetNodes()[0].GetMetadata().GetRetries().GetRetries(), uint32(2))
+
 		return &admin.WorkflowCreateResponse{}, nil
 	})
 	taskIdentifier := &core.Identifier{
@@ -148,6 +151,11 @@ func TestCreateOrGetWorkflowModel(t *testing.T) {
 							},
 						},
 					},
+					Metadata: &core.TaskMetadata{
+						Retries: &core.RetryStrategy{
+							Retries: 2,
+						},
+					},
 				},
 			},
 		},
diff --git a/flytestdlib/go.mod b/flytestdlib/go.mod
index a46362866..93a334c72 100644
--- a/flytestdlib/go.mod
+++ b/flytestdlib/go.mod
@@ -1,6 +1,6 @@
 module github.com/flyteorg/flyte/flytestdlib
 
-go 1.21
+go 1.22
 
 require (
 	github.com/aws/aws-sdk-go v1.44.2