Skip to content

Commit

Permalink
backend(chore): update backend to tekton 0.50 (kubeflow#1297)
Browse files Browse the repository at this point in the history
* update backend to tekton 0.50

* update manifests folder

* update cache server and readme
  • Loading branch information
Tomcli authored Aug 1, 2023
1 parent 05617f3 commit 933f4af
Show file tree
Hide file tree
Showing 12 changed files with 866 additions and 682 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ For more details about the project please follow this detailed [blog post](https
## Architecture

We are currently using [Kubeflow Pipelines 1.8.4](https://github.com/kubeflow/pipelines/releases/tag/1.8.4) and
[Tekton >= 0.47.1](https://github.com/tektoncd/pipeline/releases/tag/v0.47.1)
[Tekton >= 0.50.0](https://github.com/tektoncd/pipeline/releases/tag/v0.50.0)
for this project.

For [Kubeflow Pipelines 2.0.0](https://github.com/kubeflow/pipelines/releases/tag/2.0.0) and
Expand Down
2 changes: 1 addition & 1 deletion backend/src/agent/persistence/worker/persistence_worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ type Saver interface {
}

type EventHandler interface {
AddEventHandler(handler cache.ResourceEventHandler)
AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error)
}

// PersistenceWorker is a generic worker to persist objects from a queue.
Expand Down
13 changes: 7 additions & 6 deletions backend/src/agent/persistence/worker/persistence_worker_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,9 @@ func NewFakeEventHandler() *FakeEventHandler {
return &FakeEventHandler{}
}

func (h *FakeEventHandler) AddEventHandler(handler cache.ResourceEventHandler) {
func (h *FakeEventHandler) AddEventHandler(handler cache.ResourceEventHandler) (cache.ResourceEventHandlerRegistration, error) {
h.handler = handler
return nil, nil
}

func TestPersistenceWorker_Success(t *testing.T) {
Expand Down Expand Up @@ -65,7 +66,7 @@ func TestPersistenceWorker_Success(t *testing.T) {
saver)

// Test
eventHandler.handler.OnAdd(workflow)
eventHandler.handler.OnAdd(workflow, false)
worker.processNextWorkItem()
assert.Equal(t, workflow, pipelineClient.GetWorkflow("MY_NAMESPACE", "MY_NAME"))
assert.Equal(t, 0, worker.Len())
Expand Down Expand Up @@ -95,7 +96,7 @@ func TestPersistenceWorker_NotFoundError(t *testing.T) {
saver)

// Test
eventHandler.handler.OnAdd(workflow)
eventHandler.handler.OnAdd(workflow, false)
worker.processNextWorkItem()
assert.Nil(t, pipelineClient.GetWorkflow("MY_NAMESPACE", "MY_NAME"))
assert.Equal(t, 0, worker.Len())
Expand Down Expand Up @@ -126,7 +127,7 @@ func TestPersistenceWorker_GetWorklowError(t *testing.T) {
saver)

// Test
eventHandler.handler.OnAdd(workflow)
eventHandler.handler.OnAdd(workflow, false)
worker.processNextWorkItem()
assert.Nil(t, pipelineClient.GetWorkflow("MY_NAMESPACE", "MY_NAME"))
assert.Equal(t, 1, worker.Len())
Expand Down Expand Up @@ -160,7 +161,7 @@ func TestPersistenceWorker_ReportWorkflowRetryableError(t *testing.T) {
saver)

// Test
eventHandler.handler.OnAdd(workflow)
eventHandler.handler.OnAdd(workflow, false)
worker.processNextWorkItem()
assert.Nil(t, pipelineClient.GetWorkflow("MY_NAMESPACE", "MY_NAME"))
assert.Equal(t, 1, worker.Len())
Expand Down Expand Up @@ -193,7 +194,7 @@ func TestPersistenceWorker_ReportWorkflowNonRetryableError(t *testing.T) {
saver)

// Test
eventHandler.handler.OnAdd(workflow)
eventHandler.handler.OnAdd(workflow, false)
worker.processNextWorkItem()
assert.Nil(t, pipelineClient.GetWorkflow("MY_NAMESPACE", "MY_NAME"))
assert.Equal(t, 0, worker.Len())
Expand Down
5 changes: 3 additions & 2 deletions backend/src/cache/server/mutation.go
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,8 @@ const (
PipelineRun string = "tekton.dev/pipelineRun"
CachedPipeline string = "pipelines.kubeflow.org/cached_pipeline_run"

TektonGroup string = "tekton.dev/v1beta1"
TektonBetaGroup string = "tekton.dev/v1beta1"
TektonGroup string = "tekton.dev/v1"
TektonTaskKind string = "TaskRun"
ToolInitContainner string = "prepare"
)
Expand Down Expand Up @@ -425,7 +426,7 @@ func isTFXPod(pod *corev1.Pod, logger *zap.SugaredLogger) bool {

func isTaskrunOwn(pod *corev1.Pod) (string, bool) {
for _, ref := range pod.GetOwnerReferences() {
if ref.Kind == TektonTaskKind && ref.APIVersion == TektonGroup {
if ref.Kind == TektonTaskKind && (ref.APIVersion == TektonGroup || ref.APIVersion == TektonBetaGroup) {
return ref.Name, true
}
}
Expand Down
68 changes: 35 additions & 33 deletions backend/third_party_licenses/apiserver.csv
Original file line number Diff line number Diff line change
Expand Up @@ -9,27 +9,27 @@ github.com/cenkalti/backoff,https://github.com/cenkalti/backoff/blob/v2.2.1/LICE
github.com/census-instrumentation/opencensus-proto/gen-go,https://github.com/census-instrumentation/opencensus-proto/blob/v0.4.1/LICENSE,Apache-2.0
github.com/cespare/xxhash/v2,https://github.com/cespare/xxhash/blob/v2.2.0/LICENSE.txt,MIT
github.com/davecgh/go-spew/spew,https://github.com/davecgh/go-spew/blob/v1.1.1/LICENSE,ISC
github.com/emicklei/go-restful/v3,https://github.com/emicklei/go-restful/blob/v3.9.0/LICENSE,MIT
github.com/emicklei/go-restful/v3,https://github.com/emicklei/go-restful/blob/v3.10.2/LICENSE,MIT
github.com/evanphx/json-patch/v5,https://github.com/evanphx/json-patch/blob/v5.6.0/v5/LICENSE,BSD-3-Clause
github.com/fsnotify/fsnotify,https://github.com/fsnotify/fsnotify/blob/v1.5.4/LICENSE,BSD-3-Clause
github.com/fsnotify/fsnotify,https://github.com/fsnotify/fsnotify/blob/v1.6.0/LICENSE,BSD-3-Clause
github.com/go-kit/log,https://github.com/go-kit/log/blob/v0.2.0/LICENSE,MIT
github.com/go-logfmt/logfmt,https://github.com/go-logfmt/logfmt/blob/v0.5.1/LICENSE,MIT
github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.2.3/LICENSE,Apache-2.0
github.com/go-logr/logr,https://github.com/go-logr/logr/blob/v1.2.4/LICENSE,Apache-2.0
github.com/go-openapi/errors,https://github.com/go-openapi/errors/blob/v0.20.2/LICENSE,Apache-2.0
github.com/go-openapi/jsonpointer,https://github.com/go-openapi/jsonpointer/blob/v0.19.6/LICENSE,Apache-2.0
github.com/go-openapi/jsonreference,https://github.com/go-openapi/jsonreference/blob/v0.20.1/LICENSE,Apache-2.0
github.com/go-openapi/jsonreference,https://github.com/go-openapi/jsonreference/blob/v0.20.2/LICENSE,Apache-2.0
github.com/go-openapi/runtime,https://github.com/go-openapi/runtime/blob/v0.21.1/LICENSE,Apache-2.0
github.com/go-openapi/strfmt,https://github.com/go-openapi/strfmt/blob/v0.21.1/LICENSE,Apache-2.0
github.com/go-openapi/swag,https://github.com/go-openapi/swag/blob/v0.22.3/LICENSE,Apache-2.0
github.com/go-sql-driver/mysql,https://github.com/go-sql-driver/mysql/blob/v1.6.0/LICENSE,MPL-2.0
github.com/go-stack/stack,https://github.com/go-stack/stack/blob/v1.8.0/LICENSE.md,MIT
github.com/gogo/protobuf,https://github.com/gogo/protobuf/blob/v1.3.2/LICENSE,BSD-3-Clause
github.com/golang/glog,https://github.com/golang/glog/blob/v1.0.0/LICENSE,Apache-2.0
github.com/golang/glog,https://github.com/golang/glog/blob/v1.1.0/LICENSE,Apache-2.0
github.com/golang/groupcache/lru,https://github.com/golang/groupcache/blob/41bb18bfe9da/LICENSE,Apache-2.0
github.com/golang/protobuf,https://github.com/golang/protobuf/blob/v1.5.3/LICENSE,BSD-3-Clause
github.com/google/gnostic,https://github.com/google/gnostic/blob/v0.6.9/LICENSE,Apache-2.0
github.com/google/go-cmp/cmp,https://github.com/google/go-cmp/blob/v0.5.9/LICENSE,BSD-3-Clause
github.com/google/go-containerregistry/pkg/name,https://github.com/google/go-containerregistry/blob/v0.14.0/LICENSE,Apache-2.0
github.com/google/go-containerregistry/pkg/name,https://github.com/google/go-containerregistry/blob/v0.15.2/LICENSE,Apache-2.0
github.com/google/gofuzz,https://github.com/google/gofuzz/blob/v1.2.0/LICENSE,Apache-2.0
github.com/google/uuid,https://github.com/google/uuid/blob/v1.3.0/LICENSE,BSD-3-Clause
github.com/gorilla/mux,https://github.com/gorilla/mux/blob/v1.8.0/LICENSE,BSD-3-Clause
Expand Down Expand Up @@ -66,55 +66,57 @@ github.com/opencontainers/go-digest,https://github.com/opencontainers/go-digest/
github.com/pelletier/go-toml,https://github.com/pelletier/go-toml/blob/v1.9.5/LICENSE,Apache-2.0
github.com/pkg/errors,https://github.com/pkg/errors/blob/v0.9.1/LICENSE,BSD-2-Clause
github.com/pmezard/go-difflib/difflib,https://github.com/pmezard/go-difflib/blob/v1.0.0/LICENSE,BSD-3-Clause
github.com/prometheus/client_golang/prometheus,https://github.com/prometheus/client_golang/blob/v1.13.0/LICENSE,Apache-2.0
github.com/prometheus/client_model/go,https://github.com/prometheus/client_model/blob/v0.3.0/LICENSE,Apache-2.0
github.com/prometheus/client_golang/prometheus,https://github.com/prometheus/client_golang/blob/v1.15.1/LICENSE,Apache-2.0
github.com/prometheus/client_model/go,https://github.com/prometheus/client_model/blob/v0.4.0/LICENSE,Apache-2.0
github.com/prometheus/common,https://github.com/prometheus/common/blob/v0.26.0/LICENSE,Apache-2.0
github.com/prometheus/common/internal/bitbucket.org/ww/goautoneg,https://github.com/prometheus/common/blob/v0.26.0/internal/bitbucket.org/ww/goautoneg/README.txt,BSD-3-Clause
github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.8.0/LICENSE,Apache-2.0
github.com/prometheus/procfs,https://github.com/prometheus/procfs/blob/v0.9.0/LICENSE,Apache-2.0
github.com/prometheus/statsd_exporter/pkg/mapper,https://github.com/prometheus/statsd_exporter/blob/v0.21.0/LICENSE,Apache-2.0
github.com/robfig/cron,https://github.com/robfig/cron/blob/v1.2.0/LICENSE,MIT
github.com/spf13/afero,https://github.com/spf13/afero/blob/v1.9.2/LICENSE.txt,Apache-2.0
github.com/spf13/cast,https://github.com/spf13/cast/blob/v1.4.1/LICENSE,MIT
github.com/spf13/jwalterweatherman,https://github.com/spf13/jwalterweatherman/blob/v1.1.0/LICENSE,MIT
github.com/spf13/pflag,https://github.com/spf13/pflag/blob/v1.0.5/LICENSE,BSD-3-Clause
github.com/spf13/viper,https://github.com/spf13/viper/blob/v1.10.1/LICENSE,MIT
github.com/stretchr/testify/assert,https://github.com/stretchr/testify/blob/v1.8.2/LICENSE,MIT
github.com/stretchr/testify/assert,https://github.com/stretchr/testify/blob/v1.8.4/LICENSE,MIT
github.com/subosito/gotenv,https://github.com/subosito/gotenv/blob/v1.2.0/LICENSE,MIT
github.com/tektoncd/pipeline/pkg,https://github.com/tektoncd/pipeline/blob/v0.47.1/LICENSE,Apache-2.0
github.com/tektoncd/pipeline/pkg,https://github.com/tektoncd/pipeline/blob/v0.50.0/LICENSE,Apache-2.0
go.mongodb.org/mongo-driver,https://github.com/mongodb/mongo-go-driver/blob/v1.4.4/LICENSE,Apache-2.0
go.opencensus.io,https://github.com/census-instrumentation/opencensus-go/blob/v0.22.5/LICENSE,Apache-2.0
go.uber.org/atomic,https://github.com/uber-go/atomic/blob/v1.10.0/LICENSE.txt,MIT
go.uber.org/multierr,https://github.com/uber-go/multierr/blob/v1.8.0/LICENSE.txt,MIT
go.uber.org/zap,https://github.com/uber-go/zap/blob/v1.24.0/LICENSE.txt,MIT
golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.8.0:LICENSE,BSD-3-Clause
golang.org/x/crypto,https://cs.opensource.google/go/x/crypto/+/v0.10.0:LICENSE,BSD-3-Clause
golang.org/x/exp/maps,https://cs.opensource.google/go/x/exp/+/24139beb:LICENSE,BSD-3-Clause
golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.9.0:LICENSE,BSD-3-Clause
golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.7.0:LICENSE,BSD-3-Clause
golang.org/x/sync/semaphore,https://cs.opensource.google/go/x/sync/+/v0.1.0:LICENSE,BSD-3-Clause
golang.org/x/sys,https://cs.opensource.google/go/x/sys/+/v0.7.0:LICENSE,BSD-3-Clause
golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.7.0:LICENSE,BSD-3-Clause
golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.9.0:LICENSE,BSD-3-Clause
golang.org/x/net,https://cs.opensource.google/go/x/net/+/v0.11.0:LICENSE,BSD-3-Clause
golang.org/x/oauth2,https://cs.opensource.google/go/x/oauth2/+/v0.9.0:LICENSE,BSD-3-Clause
golang.org/x/sync/semaphore,https://cs.opensource.google/go/x/sync/+/v0.3.0:LICENSE,BSD-3-Clause
golang.org/x/sys,https://cs.opensource.google/go/x/sys/+/v0.9.0:LICENSE,BSD-3-Clause
golang.org/x/term,https://cs.opensource.google/go/x/term/+/v0.9.0:LICENSE,BSD-3-Clause
golang.org/x/text,https://cs.opensource.google/go/x/text/+/v0.10.0:LICENSE,BSD-3-Clause
golang.org/x/time/rate,https://cs.opensource.google/go/x/time/+/v0.3.0:LICENSE,BSD-3-Clause
gomodules.xyz/jsonpatch/v2,https://github.com/gomodules/jsonpatch/blob/v2.2.0/v2/LICENSE,Apache-2.0
google.golang.org/api/support/bundler,https://github.com/googleapis/google-api-go-client/blob/v0.116.0/LICENSE,BSD-3-Clause
google.golang.org/genproto,https://github.com/googleapis/go-genproto/blob/dcfb400f0633/LICENSE,Apache-2.0
google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.54.0/LICENSE,Apache-2.0
gomodules.xyz/jsonpatch/v2,https://github.com/gomodules/jsonpatch/blob/v2.3.0/v2/LICENSE,Apache-2.0
google.golang.org/api/support/bundler,https://github.com/googleapis/google-api-go-client/blob/v0.128.0/LICENSE,BSD-3-Clause
google.golang.org/genproto/googleapis/api,https://github.com/googleapis/go-genproto/blob/e85fd2cbaebc/googleapis/api/LICENSE,Apache-2.0
google.golang.org/genproto/googleapis/rpc/status,https://github.com/googleapis/go-genproto/blob/e85fd2cbaebc/googleapis/rpc/LICENSE,Apache-2.0
google.golang.org/genproto/protobuf/field_mask,https://github.com/googleapis/go-genproto/blob/e85fd2cbaebc/LICENSE,Apache-2.0
google.golang.org/grpc,https://github.com/grpc/grpc-go/blob/v1.56.2/LICENSE,Apache-2.0
google.golang.org/protobuf,https://github.com/protocolbuffers/protobuf-go/blob/v1.30.0/LICENSE,BSD-3-Clause
gopkg.in/inf.v0,https://github.com/go-inf/inf/blob/v0.9.1/LICENSE,BSD-3-Clause
gopkg.in/ini.v1,https://github.com/go-ini/ini/blob/v1.66.2/LICENSE,Apache-2.0
gopkg.in/yaml.v2,https://github.com/go-yaml/yaml/blob/v2.4.0/LICENSE,Apache-2.0
gopkg.in/yaml.v3,https://github.com/go-yaml/yaml/blob/496545a6307b/LICENSE,MIT
k8s.io/api,https://github.com/kubernetes/api/blob/v0.25.9/LICENSE,Apache-2.0
k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.26.4/LICENSE,Apache-2.0
k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.26.4/third_party/forked/golang/LICENSE,BSD-3-Clause
k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.25.9/LICENSE,Apache-2.0
k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.90.1/LICENSE,Apache-2.0
k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/15aac26d736a/LICENSE,Apache-2.0
k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json,https://github.com/kubernetes/kube-openapi/blob/15aac26d736a/pkg/internal/third_party/go-json-experiment/json/LICENSE,BSD-3-Clause
k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/15aac26d736a/pkg/validation/spec/LICENSE,Apache-2.0
k8s.io/utils,https://github.com/kubernetes/utils/blob/a36077c30491/LICENSE,Apache-2.0
k8s.io/utils/internal/third_party/forked/golang/net,https://github.com/kubernetes/utils/blob/a36077c30491/internal/third_party/forked/golang/LICENSE,BSD-3-Clause
knative.dev/pkg,https://github.com/knative/pkg/blob/8efb3485adcf/LICENSE,Apache-2.0
k8s.io/api,https://github.com/kubernetes/api/blob/v0.27.2/LICENSE,Apache-2.0
k8s.io/apimachinery/pkg,https://github.com/kubernetes/apimachinery/blob/v0.27.2/LICENSE,Apache-2.0
k8s.io/apimachinery/third_party/forked/golang,https://github.com/kubernetes/apimachinery/blob/v0.27.2/third_party/forked/golang/LICENSE,BSD-3-Clause
k8s.io/client-go,https://github.com/kubernetes/client-go/blob/v0.27.2/LICENSE,Apache-2.0
k8s.io/klog/v2,https://github.com/kubernetes/klog/blob/v2.100.1/LICENSE,Apache-2.0
k8s.io/kube-openapi/pkg,https://github.com/kubernetes/kube-openapi/blob/54b630e78af5/LICENSE,Apache-2.0
k8s.io/kube-openapi/pkg/internal/third_party/go-json-experiment/json,https://github.com/kubernetes/kube-openapi/blob/54b630e78af5/pkg/internal/third_party/go-json-experiment/json/LICENSE,BSD-3-Clause
k8s.io/kube-openapi/pkg/validation/spec,https://github.com/kubernetes/kube-openapi/blob/54b630e78af5/pkg/validation/spec/LICENSE,Apache-2.0
k8s.io/utils,https://github.com/kubernetes/utils/blob/9f6742963106/LICENSE,Apache-2.0
k8s.io/utils/internal/third_party/forked/golang/net,https://github.com/kubernetes/utils/blob/9f6742963106/internal/third_party/forked/golang/LICENSE,BSD-3-Clause
knative.dev/pkg,https://github.com/knative/pkg/blob/dfad48eaa5d0/LICENSE,Apache-2.0
sigs.k8s.io/json,https://github.com/kubernetes-sigs/json/blob/bc3834ca7abd/LICENSE,Apache-2.0
sigs.k8s.io/structured-merge-diff/v4,https://github.com/kubernetes-sigs/structured-merge-diff/blob/v4.2.3/LICENSE,Apache-2.0
sigs.k8s.io/yaml,https://github.com/kubernetes-sigs/yaml/blob/v1.3.0/LICENSE,MIT
Loading

0 comments on commit 933f4af

Please sign in to comment.