Skip to content

Commit 5c20b80

Browse files
authored
chore(PipelineLoop): upgrade to tekton v0.41.0 (kubeflow#1072)
* upgrade to tekton v0.40.0 * fix tests
1 parent 1ba195e commit 5c20b80

File tree

6 files changed

+25
-16
lines changed

6 files changed

+25
-16
lines changed

.github/workflows/kfp-tekton-unittests.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ jobs:
3030
validate-testdata:
3131
runs-on: ubuntu-latest
3232
steps:
33+
- name: Install Go
34+
uses: actions/setup-go@v2
35+
with:
36+
go-version: 1.19.x
3337
- uses: actions/checkout@v2
3438
- name: Set up Python 3.7
3539
uses: actions/setup-python@v2

tekton-catalog/pipeline-loops/go.mod

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,17 +4,18 @@ go 1.13
44

55
require (
66
github.com/cenkalti/backoff/v4 v4.1.3
7-
github.com/google/go-cmp v0.5.8
7+
github.com/google/go-cmp v0.5.9
88
github.com/hashicorp/go-multierror v1.1.1
99
github.com/kubeflow/kfp-tekton/tekton-catalog/cache v0.0.0
1010
github.com/kubeflow/kfp-tekton/tekton-catalog/objectstore v0.0.0
11-
github.com/tektoncd/pipeline v0.38.4
12-
go.uber.org/zap v1.21.0
11+
github.com/tektoncd/pipeline v0.41.0
12+
go.uber.org/zap v1.23.0
1313
gomodules.xyz/jsonpatch/v2 v2.2.0
14-
k8s.io/api v0.23.5
15-
k8s.io/apimachinery v0.23.5
16-
k8s.io/client-go v0.23.5
17-
knative.dev/pkg v0.0.0-20220329144915-0a1ec2e0d46c
14+
k8s.io/api v0.25.3
15+
k8s.io/apimachinery v0.25.3
16+
k8s.io/client-go v0.25.3
17+
k8s.io/utils v0.0.0-20220728103510-ee6ede2d64ed
18+
knative.dev/pkg v0.0.0-20221011175852-714b7630a836
1819
)
1920

2021
replace (

tekton-catalog/pipeline-loops/pkg/apis/pipelineloop/v1alpha1/pipelineloop_types.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ limitations under the License.
1717
package v1alpha1
1818

1919
import (
20+
"github.com/tektoncd/pipeline/pkg/apis/pipeline/pod"
2021
v1beta1 "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
2122
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
2223
)
@@ -74,7 +75,7 @@ type PipelineLoopSpec struct {
7475

7576
// PodTemplate holds pod specific configuration
7677
// +optional
77-
PodTemplate *v1beta1.PodTemplate `json:"podTemplate,omitempty"`
78+
PodTemplate *pod.PodTemplate `json:"podTemplate,omitempty"`
7879

7980
// +optional
8081
ServiceAccountName string `json:"serviceAccountName,omitempty"`

tekton-catalog/pipeline-loops/pkg/reconciler/pipelinelooprun/controller.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,10 @@ import (
4141
"go.uber.org/zap"
4242
"go.uber.org/zap/zapcore"
4343
metaV1 "k8s.io/apimachinery/pkg/apis/meta/v1"
44-
"k8s.io/apimachinery/pkg/util/clock"
44+
4545
"k8s.io/client-go/kubernetes"
4646
"k8s.io/client-go/tools/cache"
47+
"k8s.io/utils/clock"
4748
kubeclient "knative.dev/pkg/client/injection/kube/client"
4849
"knative.dev/pkg/configmap"
4950
"knative.dev/pkg/controller"

tekton-catalog/pipeline-loops/pkg/reconciler/pipelinelooprun/pipelinelooprun.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,8 @@ import (
2929
"time"
3030

3131
"k8s.io/apimachinery/pkg/runtime"
32-
"k8s.io/apimachinery/pkg/util/clock"
32+
"k8s.io/utils/clock"
33+
3334
duckv1 "knative.dev/pkg/apis/duck/v1"
3435

3536
"github.com/hashicorp/go-multierror"

tekton-catalog/pipeline-loops/pkg/reconciler/pipelinelooprun/pipelinelooprun_test.go

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ import (
3333
fakeclient "github.com/kubeflow/kfp-tekton/tekton-catalog/pipeline-loops/pkg/client/injection/client/fake"
3434
fakepipelineloopinformer "github.com/kubeflow/kfp-tekton/tekton-catalog/pipeline-loops/pkg/client/injection/informers/pipelineloop/v1alpha1/pipelineloop/fake"
3535
"github.com/kubeflow/kfp-tekton/tekton-catalog/pipeline-loops/test"
36+
"github.com/tektoncd/pipeline/pkg/apis/pipeline/pod"
3637
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1alpha1"
3738
"github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
3839
ttesting "github.com/tektoncd/pipeline/pkg/reconciler/testing"
@@ -331,7 +332,7 @@ var newPipelineLoop = &pipelineloopv1alpha1.PipelineLoop{
331332
PipelineRef: &v1beta1.PipelineRef{Name: "a-pipeline"},
332333
IterateParam: "current-item",
333334
ServiceAccountName: "default",
334-
PodTemplate: &v1beta1.PodTemplate{
335+
PodTemplate: &pod.PodTemplate{
335336
HostAliases: []corev1.HostAlias{{
336337
IP: "0.0.0.0",
337338
Hostnames: []string{"localhost"},
@@ -341,7 +342,7 @@ var newPipelineLoop = &pipelineloopv1alpha1.PipelineLoop{
341342
TaskRunSpecs: []v1beta1.PipelineTaskRunSpec{{
342343
PipelineTaskName: "test-task",
343344
TaskServiceAccountName: "test",
344-
TaskPodTemplate: &v1beta1.PodTemplate{
345+
TaskPodTemplate: &pod.PodTemplate{
345346
HostAliases: []corev1.HostAlias{{
346347
IP: "0.0.0.0",
347348
Hostnames: []string{"localhost"},
@@ -584,7 +585,7 @@ var runNewPipelineLoopWithPodTemplateAndSA = &v1alpha1.Run{
584585
Value: v1beta1.ArrayOrString{Type: v1beta1.ParamTypeArray, ArrayVal: []string{"item1", "item2"}},
585586
}},
586587
ServiceAccountName: "pipeline-runner",
587-
PodTemplate: &v1beta1.PodTemplate{
588+
PodTemplate: &pod.PodTemplate{
588589
HostAliases: []corev1.HostAlias{{
589590
IP: "0.0.0.0",
590591
Hostnames: []string{"localhost"},
@@ -1591,7 +1592,7 @@ var expectedPipelineRunWithPodTemplateAndSA = &v1beta1.PipelineRun{
15911592
Value: v1beta1.ArrayOrString{Type: v1beta1.ParamTypeString, StringVal: "item1"},
15921593
}},
15931594
ServiceAccountName: "pipeline-runner",
1594-
PodTemplate: &v1beta1.PodTemplate{
1595+
PodTemplate: &pod.PodTemplate{
15951596
HostAliases: []corev1.HostAlias{{
15961597
IP: "0.0.0.0",
15971598
Hostnames: []string{"localhost"},
@@ -1634,7 +1635,7 @@ var expectedPipelineRunWithPodTemplate = &v1beta1.PipelineRun{
16341635
Value: v1beta1.ArrayOrString{Type: v1beta1.ParamTypeString, StringVal: "item1"},
16351636
}},
16361637
ServiceAccountName: "default",
1637-
PodTemplate: &v1beta1.PodTemplate{
1638+
PodTemplate: &pod.PodTemplate{
16381639
HostAliases: []corev1.HostAlias{{
16391640
IP: "0.0.0.0",
16401641
Hostnames: []string{"localhost"},
@@ -1644,7 +1645,7 @@ var expectedPipelineRunWithPodTemplate = &v1beta1.PipelineRun{
16441645
TaskRunSpecs: []v1beta1.PipelineTaskRunSpec{{
16451646
PipelineTaskName: "test-task",
16461647
TaskServiceAccountName: "test",
1647-
TaskPodTemplate: &v1beta1.PodTemplate{
1648+
TaskPodTemplate: &pod.PodTemplate{
16481649
HostAliases: []corev1.HostAlias{{
16491650
IP: "0.0.0.0",
16501651
Hostnames: []string{"localhost"},

0 commit comments

Comments
 (0)