Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update all Pipelines CRD versions to v1beta1. (#681)
  • Loading branch information
neuromage authored and k8s-ci-robot committed Jan 18, 2019
1 parent e7c9011 commit 578e823
Show file tree
Hide file tree
Showing 109 changed files with 330 additions and 315 deletions.
2 changes: 1 addition & 1 deletion backend/src/agent/persistence/client/BUILD.bazel
Expand Up @@ -15,7 +15,7 @@ go_library(
deps = [
"//backend/api:go_default_library",
"//backend/src/common/util:go_default_library",
"//backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1:go_default_library",
"//backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1beta1:go_default_library",
"@com_github_argoproj_argo//pkg/client/informers/externalversions/workflow/v1alpha1:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@io_k8s_client_go//plugin/pkg/client/auth/gcp:go_default_library",
Expand Down
Expand Up @@ -16,7 +16,7 @@ package client

import (
"github.com/kubeflow/pipelines/backend/src/common/util"
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1alpha1"
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/informers/externalversions/scheduledworkflow/v1beta1"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
"k8s.io/client-go/tools/cache"
)
Expand All @@ -27,11 +27,11 @@ type ScheduledWorkflowClientInterface interface {

// ScheduledWorkflowClient is a client to call the ScheduledWorkflow API.
type ScheduledWorkflowClient struct {
informer v1alpha1.ScheduledWorkflowInformer
informer v1beta1.ScheduledWorkflowInformer
}

// NewScheduledWorkflowClient creates an instance of the client.
func NewScheduledWorkflowClient(informer v1alpha1.ScheduledWorkflowInformer) *ScheduledWorkflowClient {
func NewScheduledWorkflowClient(informer v1beta1.ScheduledWorkflowInformer) *ScheduledWorkflowClient {
return &ScheduledWorkflowClient{
informer: informer,
}
Expand Down
2 changes: 1 addition & 1 deletion backend/src/agent/persistence/persistence_agent.go
Expand Up @@ -49,7 +49,7 @@ func NewPersistenceAgent(
pipelineClient *client.PipelineClient,
time util.TimeInterface) *PersistenceAgent {
// obtain references to shared informers
swfInformer := swfInformerFactory.Scheduledworkflow().V1alpha1().ScheduledWorkflows()
swfInformer := swfInformerFactory.Scheduledworkflow().V1beta1().ScheduledWorkflows()
workflowInformer := workflowInformerFactory.Argoproj().V1alpha1().Workflows()

// Add controller types to the default Kubernetes Scheme so Events can be
Expand Down
2 changes: 1 addition & 1 deletion backend/src/agent/persistence/worker/BUILD.bazel
Expand Up @@ -37,7 +37,7 @@ go_test(
"//backend/api:go_default_library",
"//backend/src/agent/persistence/client:go_default_library",
"//backend/src/common/util:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
"@com_github_stretchr_testify//assert:go_default_library",
"@io_k8s_apimachinery//pkg/apis/meta/v1:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/agent/persistence/worker/swf_saver_test.go
Expand Up @@ -20,7 +20,7 @@ import (

"github.com/kubeflow/pipelines/backend/src/agent/persistence/client"
"github.com/kubeflow/pipelines/backend/src/common/util"
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
"github.com/stretchr/testify/assert"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
_ "k8s.io/client-go/plugin/pkg/client/auth/gcp"
Expand Down
2 changes: 1 addition & 1 deletion backend/src/apiserver/BUILD.bazel
Expand Up @@ -18,7 +18,7 @@ go_library(
"//backend/src/apiserver/server:go_default_library",
"//backend/src/apiserver/storage:go_default_library",
"//backend/src/common/util:go_default_library",
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1:go_default_library",
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
"@com_github_argoproj_argo//pkg/client/clientset/versioned/typed/workflow/v1alpha1:go_default_library",
"@com_github_cenkalti_backoff//:go_default_library",
"@com_github_fsnotify_fsnotify//:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/apiserver/client/BUILD.bazel
Expand Up @@ -12,7 +12,7 @@ go_library(
visibility = ["//visibility:public"],
deps = [
"//backend/src/crd/pkg/client/clientset/versioned:go_default_library",
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1:go_default_library",
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
"@com_github_argoproj_argo//pkg/client/clientset/versioned:go_default_library",
"@com_github_argoproj_argo//pkg/client/clientset/versioned/typed/workflow/v1alpha1:go_default_library",
"@com_github_cenkalti_backoff//:go_default_library",
Expand Down
8 changes: 4 additions & 4 deletions backend/src/apiserver/client/scheduled_workflow.go
Expand Up @@ -20,20 +20,20 @@ import (
"github.com/cenkalti/backoff"
"github.com/golang/glog"
swfclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned"
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
"k8s.io/client-go/rest"
)

// creates a new client for the Kubernetes ScheduledWorkflow CRD.
func CreateScheduledWorkflowClientOrFatal(namespace string, initConnectionTimeout time.Duration) v1alpha1.ScheduledWorkflowInterface {
var swfClient v1alpha1.ScheduledWorkflowInterface
func CreateScheduledWorkflowClientOrFatal(namespace string, initConnectionTimeout time.Duration) v1beta1.ScheduledWorkflowInterface {
var swfClient v1beta1.ScheduledWorkflowInterface
var operation = func() error {
restConfig, err := rest.InClusterConfig()
if err != nil {
return err
}
swfClientSet := swfclient.NewForConfigOrDie(restConfig)
swfClient = swfClientSet.ScheduledworkflowV1alpha1().ScheduledWorkflows(namespace)
swfClient = swfClientSet.ScheduledworkflowV1beta1().ScheduledWorkflows(namespace)
return nil
}

Expand Down
2 changes: 1 addition & 1 deletion backend/src/apiserver/client_manager.go
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/kubeflow/pipelines/backend/src/apiserver/model"
"github.com/kubeflow/pipelines/backend/src/apiserver/storage"
"github.com/kubeflow/pipelines/backend/src/common/util"
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
minio "github.com/minio/minio-go"
)

Expand Down
6 changes: 3 additions & 3 deletions backend/src/apiserver/resource/BUILD.bazel
Expand Up @@ -19,8 +19,8 @@ go_library(
"//backend/src/apiserver/model:go_default_library",
"//backend/src/apiserver/storage:go_default_library",
"//backend/src/common/util:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
"//backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1:go_default_library",
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
"@com_github_argoproj_argo//pkg/client/clientset/versioned/typed/workflow/v1alpha1:go_default_library",
"@com_github_golang_glog//:go_default_library",
Expand All @@ -45,7 +45,7 @@ go_test(
"//backend/src/apiserver/model:go_default_library",
"//backend/src/apiserver/storage:go_default_library",
"//backend/src/common/util:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
"@com_github_pkg_errors//:go_default_library",
"@com_github_stretchr_testify//assert:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/apiserver/resource/client_manager_fake.go
Expand Up @@ -19,7 +19,7 @@ import (
"github.com/golang/glog"
"github.com/kubeflow/pipelines/backend/src/apiserver/storage"
"github.com/kubeflow/pipelines/backend/src/common/util"
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
)

const (
Expand Down
6 changes: 3 additions & 3 deletions backend/src/apiserver/resource/model_converter_test.go
Expand Up @@ -23,9 +23,9 @@ import (
"github.com/kubeflow/pipelines/backend/src/apiserver/common"
"github.com/kubeflow/pipelines/backend/src/apiserver/model"
"github.com/kubeflow/pipelines/backend/src/common/util"
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)

func TestToModelRunMetric(t *testing.T) {
Expand Down Expand Up @@ -133,7 +133,7 @@ func TestToModelJob(t *testing.T) {
Trigger: model.Trigger{
CronSchedule: model.CronSchedule{
CronScheduleStartTimeInSec: util.Int64Pointer(1),
Cron: util.StringPointer("1 * * * *"),
Cron: util.StringPointer("1 * * * *"),
},
},
MaxConcurrency: 1,
Expand Down
4 changes: 2 additions & 2 deletions backend/src/apiserver/resource/resource_manager.go
Expand Up @@ -28,8 +28,8 @@ import (
"github.com/kubeflow/pipelines/backend/src/apiserver/model"
"github.com/kubeflow/pipelines/backend/src/apiserver/storage"
"github.com/kubeflow/pipelines/backend/src/common/util"
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1alpha1"
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
scheduledworkflowclient "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
"github.com/pkg/errors"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
Expand Down
10 changes: 5 additions & 5 deletions backend/src/apiserver/resource/resource_manager_test.go
Expand Up @@ -28,7 +28,7 @@ import (
"github.com/kubeflow/pipelines/backend/src/apiserver/model"
"github.com/kubeflow/pipelines/backend/src/apiserver/storage"
"github.com/kubeflow/pipelines/backend/src/common/util"
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
"github.com/pkg/errors"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/codes"
Expand Down Expand Up @@ -724,7 +724,7 @@ func TestReportWorkflowResource_ScheduledWorkflowIDNotEmpty_Success(t *testing.T
Namespace: "MY_NAMESPACE",
UID: "WORKFLOW_1",
OwnerReferences: []v1.OwnerReference{{
APIVersion: "kubeflow.org/v1alpha1",
APIVersion: "kubeflow.org/v1beta1",
Kind: "ScheduledWorkflow",
Name: "SCHEDULE_NAME",
UID: types.UID(job.UUID),
Expand Down Expand Up @@ -791,7 +791,7 @@ func TestReportWorkflowResource_ScheduledWorkflowIDNotEmpty_ExperimentNotFound(t
Namespace: "MY_NAMESPACE",
UID: "WORKFLOW_1",
OwnerReferences: []v1.OwnerReference{{
APIVersion: "kubeflow.org/v1alpha1",
APIVersion: "kubeflow.org/v1beta1",
Kind: "ScheduledWorkflow",
Name: "SCHEDULE_NAME",
UID: types.UID(newJob.UUID),
Expand Down Expand Up @@ -978,7 +978,7 @@ func TestReadArtifact_Succeed(t *testing.T) {
UID: "run-1",
CreationTimestamp: v1.NewTime(time.Unix(11, 0).UTC()),
OwnerReferences: []v1.OwnerReference{{
APIVersion: "kubeflow.org/v1alpha1",
APIVersion: "kubeflow.org/v1beta1",
Kind: "ScheduledWorkflow",
Name: "SCHEDULE_NAME",
UID: types.UID(job.UUID),
Expand Down Expand Up @@ -1022,7 +1022,7 @@ func TestReadArtifact_WorkflowNoStatus_NotFound(t *testing.T) {
UID: "run-1",
CreationTimestamp: v1.NewTime(time.Unix(11, 0).UTC()),
OwnerReferences: []v1.OwnerReference{{
APIVersion: "kubeflow.org/v1alpha1",
APIVersion: "kubeflow.org/v1beta1",
Kind: "ScheduledWorkflow",
Name: "SCHEDULE_NAME",
UID: types.UID(job.UUID),
Expand Down
2 changes: 1 addition & 1 deletion backend/src/apiserver/resource/resource_manager_util.go
Expand Up @@ -21,7 +21,7 @@ import (

api "github.com/kubeflow/pipelines/backend/api/go_client"
"github.com/kubeflow/pipelines/backend/src/common/util"
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
"k8s.io/apimachinery/pkg/apis/meta/v1"
)

Expand Down
Expand Up @@ -20,7 +20,7 @@ import (

"github.com/golang/protobuf/ptypes/timestamp"
api "github.com/kubeflow/pipelines/backend/api/go_client"
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
"github.com/stretchr/testify/assert"
"k8s.io/apimachinery/pkg/apis/meta/v1"
)
Expand Down
22 changes: 11 additions & 11 deletions backend/src/apiserver/resource/scheduled_workflow_fake.go
Expand Up @@ -18,23 +18,23 @@ import (
"errors"

"github.com/golang/glog"
"github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
"github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
"k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
)

type FakeScheduledWorkflowClient struct {
workflows map[string]*v1alpha1.ScheduledWorkflow
workflows map[string]*v1beta1.ScheduledWorkflow
}

func NewScheduledWorkflowClientFake() *FakeScheduledWorkflowClient {
return &FakeScheduledWorkflowClient{
workflows: make(map[string]*v1alpha1.ScheduledWorkflow),
workflows: make(map[string]*v1beta1.ScheduledWorkflow),
}
}

func (c *FakeScheduledWorkflowClient) Create(workflow *v1alpha1.ScheduledWorkflow) (*v1alpha1.ScheduledWorkflow, error) {
func (c *FakeScheduledWorkflowClient) Create(workflow *v1beta1.ScheduledWorkflow) (*v1beta1.ScheduledWorkflow, error) {
workflow.UID = "123"
workflow.Namespace = "default"
workflow.Name = workflow.GenerateName
Expand All @@ -47,19 +47,19 @@ func (c *FakeScheduledWorkflowClient) Delete(name string, options *v1.DeleteOpti
return nil
}

func (c *FakeScheduledWorkflowClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ScheduledWorkflow, err error) {
func (c *FakeScheduledWorkflowClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ScheduledWorkflow, err error) {
return nil, nil
}

func (c *FakeScheduledWorkflowClient) Get(name string, options v1.GetOptions) (*v1alpha1.ScheduledWorkflow, error) {
func (c *FakeScheduledWorkflowClient) Get(name string, options v1.GetOptions) (*v1beta1.ScheduledWorkflow, error) {
workflow, ok := c.workflows[name]
if ok {
return workflow, nil
}
return nil, errors.New("not found")
}

func (c *FakeScheduledWorkflowClient) Update(*v1alpha1.ScheduledWorkflow) (*v1alpha1.ScheduledWorkflow, error) {
func (c *FakeScheduledWorkflowClient) Update(*v1beta1.ScheduledWorkflow) (*v1beta1.ScheduledWorkflow, error) {
glog.Error("This fake method is not yet implemented.")
return nil, nil
}
Expand All @@ -69,7 +69,7 @@ func (c *FakeScheduledWorkflowClient) DeleteCollection(options *v1.DeleteOptions
return nil
}

func (c *FakeScheduledWorkflowClient) List(opts v1.ListOptions) (*v1alpha1.ScheduledWorkflowList, error) {
func (c *FakeScheduledWorkflowClient) List(opts v1.ListOptions) (*v1beta1.ScheduledWorkflowList, error) {
glog.Error("This fake method is not yet implemented.")
return nil, nil
}
Expand All @@ -83,14 +83,14 @@ type FakeBadScheduledWorkflowClient struct {
FakeScheduledWorkflowClient
}

func (FakeBadScheduledWorkflowClient) Create(workflow *v1alpha1.ScheduledWorkflow) (*v1alpha1.ScheduledWorkflow, error) {
func (FakeBadScheduledWorkflowClient) Create(workflow *v1beta1.ScheduledWorkflow) (*v1beta1.ScheduledWorkflow, error) {
return nil, errors.New("some error")
}

func (FakeBadScheduledWorkflowClient) Get(name string, options v1.GetOptions) (*v1alpha1.ScheduledWorkflow, error) {
func (FakeBadScheduledWorkflowClient) Get(name string, options v1.GetOptions) (*v1beta1.ScheduledWorkflow, error) {
return nil, errors.New("some error")
}

func (FakeBadScheduledWorkflowClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1alpha1.ScheduledWorkflow, err error) {
func (FakeBadScheduledWorkflowClient) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ScheduledWorkflow, err error) {
return nil, errors.New("some error")
}
2 changes: 1 addition & 1 deletion backend/src/apiserver/resource/workflow_fake.go
Expand Up @@ -20,7 +20,7 @@ import (
"github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
"github.com/golang/glog"
"github.com/pkg/errors"
"k8s.io/apimachinery/pkg/apis/meta/v1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
)
Expand Down
4 changes: 2 additions & 2 deletions backend/src/apiserver/server/BUILD.bazel
Expand Up @@ -24,7 +24,7 @@ go_library(
"//backend/src/apiserver/model:go_default_library",
"//backend/src/apiserver/resource:go_default_library",
"//backend/src/common/util:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
"@com_github_golang_glog//:go_default_library",
"@com_github_golang_protobuf//jsonpb:go_default_library_gen",
Expand Down Expand Up @@ -61,7 +61,7 @@ go_test(
"//backend/src/apiserver/resource:go_default_library",
"//backend/src/apiserver/storage:go_default_library",
"//backend/src/common/util:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1:go_default_library",
"//backend/src/crd/pkg/apis/scheduledworkflow/v1beta1:go_default_library",
"@com_github_argoproj_argo//pkg/apis/workflow/v1alpha1:go_default_library",
"@com_github_google_go_cmp//cmp:go_default_library",
"@com_github_stretchr_testify//assert:go_default_library",
Expand Down
2 changes: 1 addition & 1 deletion backend/src/apiserver/server/report_server.go
Expand Up @@ -23,7 +23,7 @@ import (
api "github.com/kubeflow/pipelines/backend/api/go_client"
"github.com/kubeflow/pipelines/backend/src/apiserver/resource"
"github.com/kubeflow/pipelines/backend/src/common/util"
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
scheduledworkflow "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
)

type ReportServer struct {
Expand Down
10 changes: 5 additions & 5 deletions backend/src/apiserver/server/report_server_test.go
Expand Up @@ -8,7 +8,7 @@ import (
workflowapi "github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
api "github.com/kubeflow/pipelines/backend/api/go_client"
"github.com/kubeflow/pipelines/backend/src/common/util"
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1alpha1"
swfapi "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
"github.com/stretchr/testify/assert"
"google.golang.org/grpc/codes"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
Expand Down Expand Up @@ -69,7 +69,7 @@ func TestValidateReportWorkflowRequest(t *testing.T) {
Namespace: "MY_NAMESPACE",
UID: "1",
OwnerReferences: []metav1.OwnerReference{{
APIVersion: "kubeflow.org/v1alpha1",
APIVersion: "kubeflow.org/v1beta1",
Kind: "ScheduledWorkflow",
Name: "SCHEDULE_NAME",
UID: types.UID("1"),
Expand All @@ -96,7 +96,7 @@ func TestValidateReportWorkflowRequest_MissingField(t *testing.T) {
Namespace: "MY_NAMESPACE",
UID: "1",
OwnerReferences: []metav1.OwnerReference{{
APIVersion: "kubeflow.org/v1alpha1",
APIVersion: "kubeflow.org/v1beta1",
Kind: "ScheduledWorkflow",
Name: "SCHEDULE_NAME",
UID: types.UID("1"),
Expand All @@ -114,7 +114,7 @@ func TestValidateReportWorkflowRequest_MissingField(t *testing.T) {
Name: "MY_NAME",
UID: "1",
OwnerReferences: []metav1.OwnerReference{{
APIVersion: "kubeflow.org/v1alpha1",
APIVersion: "kubeflow.org/v1beta1",
Kind: "ScheduledWorkflow",
Name: "SCHEDULE_NAME",
UID: types.UID("1"),
Expand All @@ -133,7 +133,7 @@ func TestValidateReportWorkflowRequest_MissingField(t *testing.T) {
Name: "MY_NAME",
Namespace: "MY_NAMESPACE",
OwnerReferences: []metav1.OwnerReference{{
APIVersion: "kubeflow.org/v1alpha1",
APIVersion: "kubeflow.org/v1beta1",
Kind: "ScheduledWorkflow",
Name: "SCHEDULE_NAME",
UID: types.UID("1"),
Expand Down

0 comments on commit 578e823

Please sign in to comment.