Skip to content

Commit

Permalink
feat(backend): update tekton api spec to v1 (#1349)
Browse files Browse the repository at this point in the history
* update tekton api spec to v1

* fix unit tests

* fix unit tests

* downgrade go client due to unresolved knative issue

* update licenses

* update status

* fix condition state
  • Loading branch information
Tomcli authored Sep 29, 2023
1 parent a4d7335 commit 93b8b1e
Show file tree
Hide file tree
Showing 68 changed files with 1,589 additions and 3,939 deletions.
30 changes: 29 additions & 1 deletion backend/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,10 @@ CSV_PATH=backend/third_party_licenses
# Whenever build command for any of the binaries change, we should update them both here and in backend/Dockerfiles.

.PHONY: all
all: license_apiserver license_persistence_agent license_cache_server license_swf license_viewer
all: license_apiserver license_persistence_agent license_cache_server license_swf license_viewer tekton_licenses

.PHONY: tekton_licenses
tekton_licenses: license_tekton_driver license_tekton_ehc license_tekton_ehw license_tekton_ktc license_tekton_ktw

.PHONY: clean
clean:
Expand All @@ -21,6 +24,16 @@ $(BUILD)/swf:
GO111MODULE=on go build -o $(BUILD)/swf github.com/kubeflow/pipelines/backend/src/crd/controller/scheduledworkflow
$(BUILD)/viewer:
GO111MODULE=on go build -o $(BUILD)/viewer github.com/kubeflow/pipelines/backend/src/crd/controller/viewer
$(BUILD)/license_tekton_driver:
GO111MODULE=on go build -o $(BUILD)/license_tekton_driver github.com/kubeflow/pipelines/backend/src/v2/cmd/controller
$(BUILD)/license_tekton_ehc:
GO111MODULE=on go build -o $(BUILD)/license_tekton_ehc github.com/kubeflow/pipelines/backend/src/v2/cmd/tekton-exithandler/controller
$(BUILD)/license_tekton_ehw:
GO111MODULE=on go build -o $(BUILD)/license_tekton_ehw github.com/kubeflow/pipelines/backend/src/v2/cmd/tekton-exithandler/webhook
$(BUILD)/license_tekton_ktc:
GO111MODULE=on go build -o $(BUILD)/license_tekton_ktc github.com/kubeflow/pipelines/backend/src/v2/cmd/tekton-kfptask/controller
$(BUILD)/license_tekton_ktw:
GO111MODULE=on go build -o $(BUILD)/license_tekton_ktw github.com/kubeflow/pipelines/backend/src/v2/cmd/tekton-kfptask/webhook

# Update licenses info after dependencies changed.
# See README.md#updating-licenses-info section for more details.
Expand All @@ -39,6 +52,21 @@ license_swf: $(BUILD)/swf
.PHONY: license_viewer
license_viewer: $(BUILD)/viewer
cd $(MOD_ROOT) && go-licenses csv ./backend/src/crd/controller/viewer > $(CSV_PATH)/viewer.csv
.PHONY: license_tekton_driver
license_tekton_driver: $(BUILD)/license_tekton_driver
cd $(MOD_ROOT) && go-licenses csv ./backend/src/v2/cmd/controller > $(CSV_PATH)/tekton-driver.csv
.PHONY: license_tekton_ehc
license_tekton_ehc: $(BUILD)/license_tekton_ehc
cd $(MOD_ROOT) && go-licenses csv ./backend/src/v2/cmd/tekton-exithandler/controller > $(CSV_PATH)/tekton-exithandler-controller.csv
.PHONY: license_tekton_ehw
license_tekton_ehw: $(BUILD)/license_tekton_ehw
cd $(MOD_ROOT) && go-licenses csv ./backend/src/v2/cmd/tekton-exithandler/webhook > $(CSV_PATH)/tekton-exithandler-webhook.csv
.PHONY: license_tekton_ktc
license_tekton_ktc: $(BUILD)/license_tekton_ktc
cd $(MOD_ROOT) && go-licenses csv ./backend/src/v2/cmd/tekton-kfptask/controller > $(CSV_PATH)/tekton-kfptask-controller.csv
.PHONY: license_tekton_ktw
license_tekton_ktw: $(BUILD)/license_tekton_ktw
cd $(MOD_ROOT) && go-licenses csv ./backend/src/v2/cmd/tekton-kfptask/webhook > $(CSV_PATH)/tekton-kfptask-webhook.csv

.PHONY: image_all
image_all: image_apiserver image_persistence_agent image_cache image_swf image_viewer image_visualization
Expand Down
2 changes: 1 addition & 1 deletion backend/src/common/util/execution_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ func NewExecutionInformerOrFatal(execType ExecutionType, namespace string,
glog.Fatalf("Failed to create ExecutionInformer for Argo. Error: %v", err)
}
return &PipelineRunInformer{
informer: prInformer.Tekton().V1beta1().PipelineRuns(), factory: prInformer, clientset: prClient}
informer: prInformer.Tekton().V1().PipelineRuns(), factory: prInformer, clientset: prClient}
default:
glog.Fatalf("Not supported type of Execution")
}
Expand Down
4 changes: 2 additions & 2 deletions backend/src/common/util/execution_spec.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import (

workflowapi "github.com/argoproj/argo-workflows/v3/pkg/apis/workflow/v1alpha1"
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
pipelineapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1beta1"
pipelineapi "github.com/tektoncd/pipeline/pkg/apis/pipeline/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"sigs.k8s.io/yaml"
)
Expand Down Expand Up @@ -303,7 +303,7 @@ func ScheduleSpecToExecutionSpec(
pr := &pipelineapi.PipelineRun{
Spec: spec,
}
pr.APIVersion = "tekton.dev/v1beta1"
pr.APIVersion = "tekton.dev/v1"
pr.Kind = "PipelineRun"
return NewPipelineRun(pr), nil
default:
Expand Down
Loading

0 comments on commit 93b8b1e

Please sign in to comment.