* updated the version * updated the serializer * fixed test * fixed some more changes * tested to update versions of k8 packages * reverted package update * change in API * fixed dependencies, need to fix broken tests now * updated fake client and fixed test due to updates in timestam.timestamp * missed to update fake client pod * fixed issue in controller * tested to update * updated * updated controller viewer * updates to fix go mod vendor * Updated the client * updated the golang versions * missed one docker file update, from 1.11 -> 1.13 * testing to fixe persistinace agent issues * Updated after feedback Co-authored-by: Niklas hansson <niklashansson@Niklass-MacBook-Pro.local>
This commit is contained in:
parent
000da72181
commit
d7793aff1b
|
|
@ -1,5 +1,5 @@
|
|||
# Dockerfile for building the source code of cache_server
|
||||
FROM golang:1.11-alpine3.7 as builder
|
||||
FROM golang:1.13.15-alpine3.12 as builder
|
||||
|
||||
RUN apk update && apk upgrade && \
|
||||
apk add --no-cache bash git openssh gcc musl-dev
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.11-alpine3.7 as builder
|
||||
FROM golang:1.13.15-alpine3.12 as builder
|
||||
|
||||
WORKDIR /go/src/github.com/kubeflow/pipelines
|
||||
COPY . .
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
FROM golang:1.11-alpine3.7 as builder
|
||||
FROM golang:1.13.15-alpine3.12 as builder
|
||||
|
||||
WORKDIR /go/src/github.com/kubeflow/pipelines
|
||||
COPY . .
|
||||
|
|
|
|||
|
|
@ -44,10 +44,10 @@ type PersistenceAgent struct {
|
|||
|
||||
// NewPersistenceAgent returns a new persistence agent.
|
||||
func NewPersistenceAgent(
|
||||
swfInformerFactory swfinformers.SharedInformerFactory,
|
||||
workflowInformerFactory workflowinformers.SharedInformerFactory,
|
||||
pipelineClient *client.PipelineClient,
|
||||
time util.TimeInterface) *PersistenceAgent {
|
||||
swfInformerFactory swfinformers.SharedInformerFactory,
|
||||
workflowInformerFactory workflowinformers.SharedInformerFactory,
|
||||
pipelineClient *client.PipelineClient,
|
||||
time util.TimeInterface) *PersistenceAgent {
|
||||
// obtain references to shared informers
|
||||
swfInformer := swfInformerFactory.Scheduledworkflow().V1beta1().ScheduledWorkflows()
|
||||
workflowInformer := workflowInformerFactory.Argoproj().V1alpha1().Workflows()
|
||||
|
|
@ -62,7 +62,7 @@ func NewPersistenceAgent(
|
|||
swfWorker := worker.NewPersistenceWorker(time, swfregister.Kind, swfInformer.Informer(), true,
|
||||
worker.NewScheduledWorkflowSaver(swfClient, pipelineClient))
|
||||
|
||||
workflowWorker := worker.NewPersistenceWorker(time, workflowregister.Kind,
|
||||
workflowWorker := worker.NewPersistenceWorker(time, workflowregister.WorkflowKind,
|
||||
workflowInformer.Informer(), true,
|
||||
worker.NewWorkflowSaver(workflowClient, pipelineClient, ttlSecondsAfterWorkflowFinish))
|
||||
|
||||
|
|
|
|||
|
|
@ -2,10 +2,11 @@ package client
|
|||
|
||||
import (
|
||||
"errors"
|
||||
|
||||
"github.com/golang/glog"
|
||||
corev1 "k8s.io/api/core/v1"
|
||||
"k8s.io/api/policy/v1beta1"
|
||||
"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"
|
||||
"k8s.io/client-go/rest"
|
||||
|
|
@ -14,6 +15,16 @@ import (
|
|||
type FakePodClient struct {
|
||||
}
|
||||
|
||||
func (FakePodClient) GetEphemeralContainers(string, v1.GetOptions) (*corev1.EphemeralContainers, error) {
|
||||
glog.Error("This fake method is not yet implemented.")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (FakePodClient) UpdateEphemeralContainers(string, *corev1.EphemeralContainers) (*corev1.EphemeralContainers, error) {
|
||||
glog.Error("This fake method is not yet implemented.")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (FakePodClient) Create(*corev1.Pod) (*corev1.Pod, error) {
|
||||
glog.Error("This fake method is not yet implemented.")
|
||||
return nil, nil
|
||||
|
|
|
|||
|
|
@ -166,7 +166,7 @@ func formulateRetryWorkflow(wf *util.Workflow) (*util.Workflow, []string, error)
|
|||
// Do not allow retry of workflows with pods in Running/Pending phase
|
||||
return nil, nil, util.NewInternalServerError(
|
||||
errors.New("workflow cannot be retried"),
|
||||
"Workflow cannot be retried with node %s in %s phase", node, node.Phase)
|
||||
"Workflow cannot be retried with node %s in %s phase", node.ID, node.Phase)
|
||||
}
|
||||
if node.Type == wfv1.NodeTypePod {
|
||||
podsToDelete = append(podsToDelete, node.ID)
|
||||
|
|
|
|||
|
|
@ -263,7 +263,8 @@ spec:
|
|||
arguments: {}
|
||||
entrypoint: rand-fail-dag
|
||||
templates:
|
||||
- dag:
|
||||
- arguments: {}
|
||||
dag:
|
||||
tasks:
|
||||
- arguments: {}
|
||||
name: A
|
||||
|
|
@ -277,10 +278,10 @@ spec:
|
|||
metadata: {}
|
||||
name: rand-fail-dag
|
||||
outputs: {}
|
||||
- container:
|
||||
- arguments: {}
|
||||
container:
|
||||
args:
|
||||
- import random; import sys; exit_code = random.choice([0, 0, 1]); print('exiting
|
||||
with code {}'.format(exit_code)); sys.exit(exit_code)
|
||||
- import random; import sys; exit_code = random.choice([0, 0, 1]); print('exiting with code {}'.format(exit_code)); sys.exit(exit_code)
|
||||
command:
|
||||
- python
|
||||
- -c
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
api "github.com/kubeflow/pipelines/backend/api/go_client"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/client"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/common"
|
||||
|
|
@ -394,7 +395,7 @@ func TestListExperiment_Multiuser(t *testing.T) {
|
|||
} else {
|
||||
if err != nil {
|
||||
t.Errorf("TestListExperiment_Multiuser(%v) expect no error but got %v", tc.name, err)
|
||||
} else if !cmp.Equal(tc.expectedExperiments, response.Experiments) {
|
||||
} else if !cmp.Equal(tc.expectedExperiments, response.Experiments, cmpopts.IgnoreFields(api.Experiment{}, "CreatedAt")) {
|
||||
t.Errorf("TestListExperiment_Multiuser(%v) expect (%+v) but got (%+v)", tc.name, tc.expectedExperiments, response.Experiments)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ import (
|
|||
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
api "github.com/kubeflow/pipelines/backend/api/go_client"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/client"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/common"
|
||||
|
|
@ -426,7 +427,9 @@ func TestListJobs_Multiuser(t *testing.T) {
|
|||
} else {
|
||||
if err != nil {
|
||||
t.Errorf("TestListJobs_Multiuser(%v) expect no error but got %v", tc.name, err)
|
||||
} else if !cmp.Equal(tc.expectedJobs, response.Jobs) {
|
||||
} else if !cmp.Equal(tc.expectedJobs, response.Jobs, cmpopts.IgnoreFields(api.Job{}, "Trigger"),
|
||||
cmpopts.IgnoreFields(api.Run{}, "CreatedAt"), cmpopts.IgnoreFields(api.Job{}, "UpdatedAt"),
|
||||
cmpopts.IgnoreFields(api.Job{}, "CreatedAt")) {
|
||||
t.Errorf("TestListJobs_Multiuser(%v) expect (%+v) but got (%+v)", tc.name, tc.expectedJobs, response.Jobs)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import (
|
|||
"github.com/argoproj/argo/pkg/apis/workflow/v1alpha1"
|
||||
"github.com/golang/protobuf/ptypes/timestamp"
|
||||
"github.com/google/go-cmp/cmp"
|
||||
"github.com/google/go-cmp/cmp/cmpopts"
|
||||
api "github.com/kubeflow/pipelines/backend/api/go_client"
|
||||
"github.com/kubeflow/pipelines/backend/src/apiserver/common"
|
||||
"github.com/kubeflow/pipelines/backend/src/common/util"
|
||||
|
|
@ -375,7 +376,8 @@ func TestListRuns_Multiuser(t *testing.T) {
|
|||
} else {
|
||||
if err != nil {
|
||||
t.Errorf("TestListRuns_Multiuser(%v) expect no error but got %v", tc.name, err)
|
||||
} else if !cmp.Equal(tc.expectedRuns, response.Runs) {
|
||||
} else if !cmp.Equal(tc.expectedRuns, response.Runs, cmpopts.IgnoreFields(api.Run{}, "CreatedAt"),
|
||||
cmpopts.IgnoreFields(api.Run{}, "ScheduledAt"), cmpopts.IgnoreFields(api.Run{}, "FinishedAt")) {
|
||||
t.Errorf("TestListRuns_Multiuser(%v) expect (%+v) but got (%+v)", tc.name, tc.expectedRuns, response.Runs)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -31,6 +31,16 @@ type FakePodClient struct {
|
|||
patchIsCalled bool
|
||||
}
|
||||
|
||||
func (FakePodClient) GetEphemeralContainers(string, v1.GetOptions) (*corev1.EphemeralContainers, error) {
|
||||
glog.Error("This fake method is not yet implemented.")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (FakePodClient) UpdateEphemeralContainers(string, *corev1.EphemeralContainers) (*corev1.EphemeralContainers, error) {
|
||||
glog.Error("This fake method is not yet implemented.")
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
func (FakePodClient) Create(*corev1.Pod) (*corev1.Pod, error) {
|
||||
glog.Error("This fake method is not yet implemented.")
|
||||
return nil, nil
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ func TestToStringForStore(t *testing.T) {
|
|||
},
|
||||
})
|
||||
assert.Equal(t,
|
||||
"{\"metadata\":{\"name\":\"WORKFLOW_NAME\",\"creationTimestamp\":null},\"spec\":{\"templates\":null,\"entrypoint\":\"\",\"arguments\":{}},\"status\":{\"startedAt\":null,\"finishedAt\":null}}",
|
||||
"{\"metadata\":{\"name\":\"WORKFLOW_NAME\",\"creationTimestamp\":null},\"spec\":{\"templates\":null,\"arguments\":{}},\"status\":{\"startedAt\":null,\"finishedAt\":null}}",
|
||||
workflow.ToStringForStore())
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -76,8 +76,7 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
_, err = builder.SimpleController().
|
||||
WithManager(mgr).
|
||||
_, err = builder.ControllerManagedBy(mgr).
|
||||
ForType(&viewerV1beta1.Viewer{}).
|
||||
Owns(&appsv1.Deployment{}).
|
||||
Owns(&corev1.Service{}).
|
||||
|
|
|
|||
|
|
@ -272,7 +272,7 @@ func serviceFrom(v *viewerV1beta1.Viewer, deploymentName string) *corev1.Service
|
|||
func (r *Reconciler) maybeDeleteOldestViewer(t viewerV1beta1.ViewerType, namespace string) error {
|
||||
list := &viewerV1beta1.ViewerList{}
|
||||
|
||||
if err := r.Client.List(context.Background(), &client.ListOptions{Namespace: namespace}, list); err != nil {
|
||||
if err := r.Client.List(context.Background(), list, &client.ListOptions{Namespace: namespace}); err != nil {
|
||||
return fmt.Errorf("failed to list viewers: %v", err)
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -48,7 +48,7 @@ func TestMain(m *testing.M) {
|
|||
func getDeployments(t *testing.T, c client.Client) []*appsv1.Deployment {
|
||||
dplList := &appsv1.DeploymentList{}
|
||||
|
||||
if err := c.List(context.Background(), &client.ListOptions{}, dplList); err != nil {
|
||||
if err := c.List(context.Background(), dplList, &client.ListOptions{}); err != nil {
|
||||
t.Fatalf("Failed to list deployments from Fake client: %v", err)
|
||||
}
|
||||
|
||||
|
|
@ -63,7 +63,7 @@ func getDeployments(t *testing.T, c client.Client) []*appsv1.Deployment {
|
|||
func getServices(t *testing.T, c client.Client) []*corev1.Service {
|
||||
svcList := &corev1.ServiceList{}
|
||||
|
||||
if err := c.List(context.Background(), &client.ListOptions{}, svcList); err != nil {
|
||||
if err := c.List(context.Background(), svcList, &client.ListOptions{}); err != nil {
|
||||
t.Fatalf("Failed to list services with fake client: %v", err)
|
||||
}
|
||||
|
||||
|
|
@ -78,7 +78,7 @@ func getServices(t *testing.T, c client.Client) []*corev1.Service {
|
|||
func getViewers(t *testing.T, c client.Client) []*viewerV1beta1.Viewer {
|
||||
list := &viewerV1beta1.ViewerList{}
|
||||
|
||||
if err := c.List(context.Background(), &client.ListOptions{}, list); err != nil {
|
||||
if err := c.List(context.Background(), list, &client.ListOptions{}); err != nil {
|
||||
t.Fatalf("Failed to list viewers with fake client: %v", err)
|
||||
}
|
||||
|
||||
|
|
@ -150,8 +150,9 @@ func TestReconcile_EachViewerCreatesADeployment(t *testing.T) {
|
|||
|
||||
wantDpls := []*appsv1.Deployment{{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "viewer-123-deployment",
|
||||
Namespace: "kubeflow",
|
||||
Name: "viewer-123-deployment",
|
||||
Namespace: "kubeflow",
|
||||
ResourceVersion: "1",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Name: "viewer-123",
|
||||
|
|
@ -249,8 +250,9 @@ func TestReconcile_ViewerUsesSpecifiedVolumeMountsForDeployment(t *testing.T) {
|
|||
|
||||
wantDpls := []*appsv1.Deployment{{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "viewer-123-deployment",
|
||||
Namespace: "kubeflow",
|
||||
Name: "viewer-123-deployment",
|
||||
Namespace: "kubeflow",
|
||||
ResourceVersion: "1",
|
||||
OwnerReferences: []metav1.OwnerReference{{
|
||||
APIVersion: "kubeflow.org/v1beta1",
|
||||
Name: "viewer-123",
|
||||
|
|
@ -337,8 +339,9 @@ func TestReconcile_EachViewerCreatesAService(t *testing.T) {
|
|||
|
||||
want := []*v1.Service{{
|
||||
ObjectMeta: metav1.ObjectMeta{
|
||||
Name: "viewer-123-service",
|
||||
Namespace: "kubeflow",
|
||||
Name: "viewer-123-service",
|
||||
Namespace: "kubeflow",
|
||||
ResourceVersion: "1",
|
||||
Annotations: map[string]string{
|
||||
"getambassador.io/config": "\n---\n" +
|
||||
"apiVersion: ambassador/v0\n" +
|
||||
|
|
|
|||
|
|
@ -135,7 +135,7 @@ func (in *ScheduledWorkflowCondition) DeepCopy() *ScheduledWorkflowCondition {
|
|||
func (in *ScheduledWorkflowList) DeepCopyInto(out *ScheduledWorkflowList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]ScheduledWorkflow, len(*in))
|
||||
|
|
@ -172,6 +172,11 @@ func (in *ScheduledWorkflowSpec) DeepCopyInto(out *ScheduledWorkflowSpec) {
|
|||
*out = new(int64)
|
||||
**out = **in
|
||||
}
|
||||
if in.NoCatchup != nil {
|
||||
in, out := &in.NoCatchup, &out.NoCatchup
|
||||
*out = new(bool)
|
||||
**out = **in
|
||||
}
|
||||
if in.MaxHistory != nil {
|
||||
in, out := &in.MaxHistory, &out.MaxHistory
|
||||
*out = new(int64)
|
||||
|
|
|
|||
|
|
@ -68,7 +68,7 @@ func (in *Viewer) DeepCopyObject() runtime.Object {
|
|||
func (in *ViewerList) DeepCopyInto(out *ViewerList) {
|
||||
*out = *in
|
||||
out.TypeMeta = in.TypeMeta
|
||||
out.ListMeta = in.ListMeta
|
||||
in.ListMeta.DeepCopyInto(&out.ListMeta)
|
||||
if in.Items != nil {
|
||||
in, out := &in.Items, &out.Items
|
||||
*out = make([]Viewer, len(*in))
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
package versioned
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
scheduledworkflowv1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/typed/scheduledworkflow/v1beta1"
|
||||
discovery "k8s.io/client-go/discovery"
|
||||
rest "k8s.io/client-go/rest"
|
||||
|
|
@ -25,8 +27,6 @@ import (
|
|||
type Interface interface {
|
||||
Discovery() discovery.DiscoveryInterface
|
||||
ScheduledworkflowV1beta1() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface
|
||||
// Deprecated: please explicitly pick a version if possible.
|
||||
Scheduledworkflow() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface
|
||||
}
|
||||
|
||||
// Clientset contains the clients for groups. Each group has exactly one
|
||||
|
|
@ -41,12 +41,6 @@ func (c *Clientset) ScheduledworkflowV1beta1() scheduledworkflowv1beta1.Schedule
|
|||
return c.scheduledworkflowV1beta1
|
||||
}
|
||||
|
||||
// Deprecated: Scheduledworkflow retrieves the default version of ScheduledworkflowClient.
|
||||
// Please explicitly pick a version.
|
||||
func (c *Clientset) Scheduledworkflow() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface {
|
||||
return c.scheduledworkflowV1beta1
|
||||
}
|
||||
|
||||
// Discovery retrieves the DiscoveryClient
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
if c == nil {
|
||||
|
|
@ -56,9 +50,14 @@ func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
|||
}
|
||||
|
||||
// NewForConfig creates a new Clientset for the given config.
|
||||
// If config's RateLimiter is not set and QPS and Burst are acceptable,
|
||||
// NewForConfig will generate a rate-limiter in configShallowCopy.
|
||||
func NewForConfig(c *rest.Config) (*Clientset, error) {
|
||||
configShallowCopy := *c
|
||||
if configShallowCopy.RateLimiter == nil && configShallowCopy.QPS > 0 {
|
||||
if configShallowCopy.Burst <= 0 {
|
||||
return nil, fmt.Errorf("Burst is required to be greater than 0 when RateLimiter is not set and QPS is set to greater than 0")
|
||||
}
|
||||
configShallowCopy.RateLimiter = flowcontrol.NewTokenBucketRateLimiter(configShallowCopy.QPS, configShallowCopy.Burst)
|
||||
}
|
||||
var cs Clientset
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
|||
}
|
||||
}
|
||||
|
||||
cs := &Clientset{}
|
||||
cs := &Clientset{tracker: o}
|
||||
cs.discovery = &fakediscovery.FakeDiscovery{Fake: &cs.Fake}
|
||||
cs.AddReactor("*", "*", testing.ObjectReaction(o))
|
||||
cs.AddWatchReactor("*", func(action testing.Action) (handled bool, ret watch.Interface, err error) {
|
||||
|
|
@ -60,20 +60,20 @@ func NewSimpleClientset(objects ...runtime.Object) *Clientset {
|
|||
type Clientset struct {
|
||||
testing.Fake
|
||||
discovery *fakediscovery.FakeDiscovery
|
||||
tracker testing.ObjectTracker
|
||||
}
|
||||
|
||||
func (c *Clientset) Discovery() discovery.DiscoveryInterface {
|
||||
return c.discovery
|
||||
}
|
||||
|
||||
func (c *Clientset) Tracker() testing.ObjectTracker {
|
||||
return c.tracker
|
||||
}
|
||||
|
||||
var _ clientset.Interface = &Clientset{}
|
||||
|
||||
// ScheduledworkflowV1beta1 retrieves the ScheduledworkflowV1beta1Client
|
||||
func (c *Clientset) ScheduledworkflowV1beta1() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface {
|
||||
return &fakescheduledworkflowv1beta1.FakeScheduledworkflowV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
||||
// Scheduledworkflow retrieves the ScheduledworkflowV1beta1Client
|
||||
func (c *Clientset) Scheduledworkflow() scheduledworkflowv1beta1.ScheduledworkflowV1beta1Interface {
|
||||
return &fakescheduledworkflowv1beta1.FakeScheduledworkflowV1beta1{Fake: &c.Fake}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,15 +21,14 @@ import (
|
|||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
var scheme = runtime.NewScheme()
|
||||
var codecs = serializer.NewCodecFactory(scheme)
|
||||
var parameterCodec = runtime.NewParameterCodec(scheme)
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
|
||||
AddToScheme(scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
scheduledworkflowv1beta1.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
|
|
@ -42,10 +41,13 @@ func init() {
|
|||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
func AddToScheme(scheme *runtime.Scheme) {
|
||||
scheduledworkflowv1beta1.AddToScheme(scheme)
|
||||
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(scheme, schema.GroupVersion{Version: "v1"})
|
||||
utilruntime.Must(AddToScheme(scheme))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -21,15 +21,14 @@ import (
|
|||
runtime "k8s.io/apimachinery/pkg/runtime"
|
||||
schema "k8s.io/apimachinery/pkg/runtime/schema"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
utilruntime "k8s.io/apimachinery/pkg/util/runtime"
|
||||
)
|
||||
|
||||
var Scheme = runtime.NewScheme()
|
||||
var Codecs = serializer.NewCodecFactory(Scheme)
|
||||
var ParameterCodec = runtime.NewParameterCodec(Scheme)
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||
AddToScheme(Scheme)
|
||||
var localSchemeBuilder = runtime.SchemeBuilder{
|
||||
scheduledworkflowv1beta1.AddToScheme,
|
||||
}
|
||||
|
||||
// AddToScheme adds all types of this clientset into the given scheme. This allows composition
|
||||
|
|
@ -42,10 +41,13 @@ func init() {
|
|||
// )
|
||||
//
|
||||
// kclientset, _ := kubernetes.NewForConfig(c)
|
||||
// aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
// _ = aggregatorclientsetscheme.AddToScheme(clientsetscheme.Scheme)
|
||||
//
|
||||
// After this, RawExtensions in Kubernetes types will serialize kube-aggregator types
|
||||
// correctly.
|
||||
func AddToScheme(scheme *runtime.Scheme) {
|
||||
scheduledworkflowv1beta1.AddToScheme(scheme)
|
||||
var AddToScheme = localSchemeBuilder.AddToScheme
|
||||
|
||||
func init() {
|
||||
v1.AddToGroupVersion(Scheme, schema.GroupVersion{Version: "v1"})
|
||||
utilruntime.Must(AddToScheme(Scheme))
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,7 +116,7 @@ func (c *FakeScheduledWorkflows) DeleteCollection(options *v1.DeleteOptions, lis
|
|||
// Patch applies the patch and returns the patched scheduledWorkflow.
|
||||
func (c *FakeScheduledWorkflows) Patch(name string, pt types.PatchType, data []byte, subresources ...string) (result *v1beta1.ScheduledWorkflow, err error) {
|
||||
obj, err := c.Fake.
|
||||
Invokes(testing.NewPatchSubresourceAction(scheduledworkflowsResource, c.ns, name, data, subresources...), &v1beta1.ScheduledWorkflow{})
|
||||
Invokes(testing.NewPatchSubresourceAction(scheduledworkflowsResource, c.ns, name, pt, data, subresources...), &v1beta1.ScheduledWorkflow{})
|
||||
|
||||
if obj == nil {
|
||||
return nil, err
|
||||
|
|
|
|||
|
|
@ -16,6 +16,8 @@
|
|||
package v1beta1
|
||||
|
||||
import (
|
||||
"time"
|
||||
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
scheme "github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/scheme"
|
||||
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
|
||||
|
|
@ -72,11 +74,16 @@ func (c *scheduledWorkflows) Get(name string, options v1.GetOptions) (result *v1
|
|||
|
||||
// List takes label and field selectors, and returns the list of ScheduledWorkflows that match those selectors.
|
||||
func (c *scheduledWorkflows) List(opts v1.ListOptions) (result *v1beta1.ScheduledWorkflowList, err error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
result = &v1beta1.ScheduledWorkflowList{}
|
||||
err = c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("scheduledworkflows").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Do().
|
||||
Into(result)
|
||||
return
|
||||
|
|
@ -84,11 +91,16 @@ func (c *scheduledWorkflows) List(opts v1.ListOptions) (result *v1beta1.Schedule
|
|||
|
||||
// Watch returns a watch.Interface that watches the requested scheduledWorkflows.
|
||||
func (c *scheduledWorkflows) Watch(opts v1.ListOptions) (watch.Interface, error) {
|
||||
var timeout time.Duration
|
||||
if opts.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*opts.TimeoutSeconds) * time.Second
|
||||
}
|
||||
opts.Watch = true
|
||||
return c.client.Get().
|
||||
Namespace(c.ns).
|
||||
Resource("scheduledworkflows").
|
||||
VersionedParams(&opts, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Watch()
|
||||
}
|
||||
|
||||
|
|
@ -130,10 +142,15 @@ func (c *scheduledWorkflows) Delete(name string, options *v1.DeleteOptions) erro
|
|||
|
||||
// DeleteCollection deletes a collection of objects.
|
||||
func (c *scheduledWorkflows) DeleteCollection(options *v1.DeleteOptions, listOptions v1.ListOptions) error {
|
||||
var timeout time.Duration
|
||||
if listOptions.TimeoutSeconds != nil {
|
||||
timeout = time.Duration(*listOptions.TimeoutSeconds) * time.Second
|
||||
}
|
||||
return c.client.Delete().
|
||||
Namespace(c.ns).
|
||||
Resource("scheduledworkflows").
|
||||
VersionedParams(&listOptions, scheme.ParameterCodec).
|
||||
Timeout(timeout).
|
||||
Body(options).
|
||||
Do().
|
||||
Error()
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ package v1beta1
|
|||
import (
|
||||
v1beta1 "github.com/kubeflow/pipelines/backend/src/crd/pkg/apis/scheduledworkflow/v1beta1"
|
||||
"github.com/kubeflow/pipelines/backend/src/crd/pkg/client/clientset/versioned/scheme"
|
||||
serializer "k8s.io/apimachinery/pkg/runtime/serializer"
|
||||
rest "k8s.io/client-go/rest"
|
||||
)
|
||||
|
||||
|
|
@ -68,7 +67,7 @@ func setConfigDefaults(config *rest.Config) error {
|
|||
gv := v1beta1.SchemeGroupVersion
|
||||
config.GroupVersion = &gv
|
||||
config.APIPath = "/apis"
|
||||
config.NegotiatedSerializer = serializer.DirectCodecFactory{CodecFactory: scheme.Codecs}
|
||||
config.NegotiatedSerializer = scheme.Codecs.WithoutConversion()
|
||||
|
||||
if config.UserAgent == "" {
|
||||
config.UserAgent = rest.DefaultKubernetesUserAgent()
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ import (
|
|||
cache "k8s.io/client-go/tools/cache"
|
||||
)
|
||||
|
||||
// NewInformerFunc takes versioned.Interface and time.Duration to return a SharedIndexInformer.
|
||||
type NewInformerFunc func(versioned.Interface, time.Duration) cache.SharedIndexInformer
|
||||
|
||||
// SharedInformerFactory a small interface to allow for adding an informer without an import cycle
|
||||
|
|
@ -32,4 +33,5 @@ type SharedInformerFactory interface {
|
|||
InformerFor(obj runtime.Object, newFunc NewInformerFunc) cache.SharedIndexInformer
|
||||
}
|
||||
|
||||
// TweakListOptionsFunc is a function that transforms a v1.ListOptions.
|
||||
type TweakListOptionsFunc func(*v1.ListOptions)
|
||||
|
|
|
|||
101
go.mod
101
go.mod
|
|
@ -1,94 +1,51 @@
|
|||
module github.com/kubeflow/pipelines
|
||||
|
||||
require (
|
||||
cloud.google.com/go v0.44.3 // indirect
|
||||
github.com/Masterminds/squirrel v0.0.0-20190107164353-fa735ea14f09
|
||||
github.com/VividCortex/mysqlerr v0.0.0-20170204212430-6c6b55f8796f
|
||||
github.com/argoproj/argo v2.3.0+incompatible
|
||||
github.com/argoproj/argo v0.0.0-20200506223611-54154c61eb4f
|
||||
github.com/cenkalti/backoff v2.0.0+incompatible
|
||||
github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f // indirect
|
||||
github.com/docker/spdystream v0.0.0-20170912183627-bc6354cbbc29 // indirect
|
||||
github.com/elazarl/goproxy v0.0.0-20181111060418-2ce16c963a8a // indirect
|
||||
github.com/emicklei/go-restful v2.8.0+incompatible // indirect
|
||||
github.com/erikstmartin/go-testdb v0.0.0-20160219214506-8d10e4a1bae5 // indirect
|
||||
github.com/fsnotify/fsnotify v1.4.7
|
||||
github.com/ghodss/yaml v0.0.0-20180820084758-c7ce16629ff4
|
||||
github.com/globalsign/mgo v0.0.0-20181015135952-eeefdecb41b8 // indirect
|
||||
github.com/go-ini/ini v1.38.1 // indirect
|
||||
github.com/go-logr/logr v0.1.0 // indirect
|
||||
github.com/go-logr/zapr v0.1.0 // indirect
|
||||
github.com/go-openapi/analysis v0.17.2 // indirect
|
||||
github.com/go-openapi/errors v0.17.0
|
||||
github.com/go-openapi/runtime v0.0.0-20181031204026-aadb2cc7b886
|
||||
github.com/go-openapi/strfmt v0.17.0
|
||||
github.com/go-openapi/swag v0.17.0
|
||||
github.com/go-openapi/validate v0.17.2
|
||||
github.com/go-sql-driver/mysql v1.4.0
|
||||
github.com/gogo/protobuf v1.1.1 // indirect
|
||||
github.com/fsnotify/fsnotify v1.4.9
|
||||
github.com/ghodss/yaml v1.0.0
|
||||
github.com/go-openapi/errors v0.19.2
|
||||
github.com/go-openapi/runtime v0.19.4
|
||||
github.com/go-openapi/strfmt v0.19.3
|
||||
github.com/go-openapi/swag v0.19.8
|
||||
github.com/go-openapi/validate v0.19.5
|
||||
github.com/go-sql-driver/mysql v1.4.1
|
||||
github.com/golang/glog v0.0.0-20160126235308-23def4e6c14b
|
||||
github.com/golang/groupcache v0.0.0-20180513044358-24b0969c4cb7 // indirect
|
||||
github.com/golang/protobuf v1.3.2
|
||||
github.com/google/addlicense v0.0.0-20200422172452-68a83edd47bc // indirect
|
||||
github.com/google/go-cmp v0.3.1
|
||||
github.com/google/gofuzz v0.0.0-20170612174753-24818f796faf // indirect
|
||||
github.com/google/uuid v1.0.0
|
||||
github.com/googleapis/gnostic v0.2.0 // indirect
|
||||
github.com/golang/protobuf v1.4.2
|
||||
github.com/google/go-cmp v0.5.2
|
||||
github.com/google/uuid v1.1.1
|
||||
github.com/gopherjs/gopherjs v0.0.0-20181103185306-d547d1d9531e // indirect
|
||||
github.com/gorilla/websocket v1.4.0 // indirect
|
||||
github.com/gregjones/httpcache v0.0.0-20180305231024-9cad4c3443a7 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.6.3
|
||||
github.com/hashicorp/golang-lru v0.5.3 // indirect
|
||||
github.com/imdario/mergo v0.3.5 // indirect
|
||||
github.com/grpc-ecosystem/grpc-gateway v1.12.1
|
||||
github.com/jinzhu/gorm v1.9.1
|
||||
github.com/jinzhu/inflection v0.0.0-20180308033659-04140366298a // indirect
|
||||
github.com/jinzhu/now v0.0.0-20181116074157-8ec929ed50c3 // indirect
|
||||
github.com/json-iterator/go v0.0.0-20180701071628-ab8a2e0c74be // indirect
|
||||
github.com/jtolds/gls v4.2.1+incompatible // indirect
|
||||
github.com/kr/pretty v0.1.0 // indirect
|
||||
github.com/lib/pq v1.0.0 // indirect
|
||||
github.com/mattbaird/jsonpatch v0.0.0-20171005235357-81af80346b1a // indirect
|
||||
github.com/mattn/go-sqlite3 v1.9.0
|
||||
github.com/minio/minio-go v6.0.14+incompatible
|
||||
github.com/mitchellh/go-homedir v0.0.0-20180523094522-3864e76763d9 // indirect
|
||||
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
|
||||
github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742 // indirect
|
||||
github.com/onsi/ginkgo v1.7.0 // indirect
|
||||
github.com/onsi/gomega v1.4.3 // indirect
|
||||
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
|
||||
github.com/peterhellberg/duration v0.0.0-20191119133758-ec6baeebcd10
|
||||
github.com/pkg/errors v0.8.0
|
||||
github.com/prometheus/client_golang v0.9.2
|
||||
github.com/robfig/cron v0.0.0-20180505203441-b41be1df6967
|
||||
github.com/sirupsen/logrus v1.0.6
|
||||
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d // indirect
|
||||
github.com/smartystreets/goconvey v0.0.0-20181108003508-044398e4856c // indirect
|
||||
github.com/spf13/viper v1.3.0
|
||||
github.com/stretchr/testify v1.3.0
|
||||
github.com/valyala/bytebufferpool v1.0.0 // indirect
|
||||
github.com/valyala/fasttemplate v0.0.0-20170224212429-dcecefd839c4 // indirect
|
||||
go.uber.org/atomic v1.3.2 // indirect
|
||||
go.uber.org/multierr v1.1.0 // indirect
|
||||
go.uber.org/zap v1.9.1 // indirect
|
||||
golang.org/x/crypto v0.0.0-20190829043050-9756ffdc2472 // indirect
|
||||
golang.org/x/net v0.0.0-20190827160401-ba9fcec4b297
|
||||
golang.org/x/sync v0.0.0-20200317015054-43a5402ce75a // indirect
|
||||
golang.org/x/sys v0.0.0-20190826190057-c7b8b68b1456 // indirect
|
||||
google.golang.org/api v0.9.0
|
||||
google.golang.org/genproto v0.0.0-20190801165951-fa694d86fc64
|
||||
google.golang.org/grpc v1.23.0
|
||||
gopkg.in/airbrake/gobrake.v2 v2.0.9 // indirect
|
||||
gopkg.in/check.v1 v1.0.0-20180628173108-788fd7840127 // indirect
|
||||
gopkg.in/gemnasium/logrus-airbrake-hook.v2 v2.1.2 // indirect
|
||||
gopkg.in/inf.v0 v0.9.1 // indirect
|
||||
gopkg.in/ini.v1 v1.39.3 // indirect
|
||||
gopkg.in/yaml.v2 v2.2.2
|
||||
k8s.io/api v0.0.0-20180712090710-2d6f90ab1293
|
||||
k8s.io/apiextensions-apiserver v0.0.0-20190103235604-e7617803aceb // indirect
|
||||
k8s.io/apimachinery v0.0.0-20180621070125-103fd098999d
|
||||
k8s.io/client-go v0.0.0-20180718001006-59698c7d9724
|
||||
k8s.io/kube-openapi v0.0.0-20180719232738-d8ea2fe547a4 // indirect
|
||||
github.com/pkg/errors v0.9.1
|
||||
github.com/prometheus/client_golang v1.0.0
|
||||
github.com/robfig/cron v1.2.0
|
||||
github.com/sirupsen/logrus v1.4.2
|
||||
github.com/spf13/viper v1.3.2
|
||||
github.com/stretchr/testify v1.5.1
|
||||
golang.org/x/net v0.0.0-20200520004742-59133d7f0dd7
|
||||
google.golang.org/api v0.20.0
|
||||
google.golang.org/genproto v0.0.0-20200317114155-1f3552e48f24
|
||||
google.golang.org/grpc v1.28.0
|
||||
gopkg.in/yaml.v2 v2.3.0
|
||||
k8s.io/api v0.17.9
|
||||
k8s.io/apimachinery v0.17.9
|
||||
k8s.io/client-go v0.17.9
|
||||
k8s.io/code-generator v0.17.9
|
||||
k8s.io/kubernetes v1.11.1
|
||||
sigs.k8s.io/controller-runtime v0.0.0-20181121180216-5558165425ef
|
||||
sigs.k8s.io/controller-runtime v0.5.11
|
||||
sigs.k8s.io/testing_frameworks v0.1.1 // indirect
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# This image has the script to kick off the ML pipeline API integration test,
|
||||
# and upload the result to GCS
|
||||
|
||||
FROM golang:1.11
|
||||
FROM golang:1.13.15
|
||||
|
||||
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz
|
||||
RUN mkdir -p /usr/local/gcloud
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# This image has the script to kick off the ML pipeline initialization test,
|
||||
# and upload the result to GCS
|
||||
|
||||
FROM golang:1.11
|
||||
FROM golang:1.13.15
|
||||
|
||||
RUN curl https://dl.google.com/dl/cloudsdk/release/google-cloud-sdk.tar.gz > /tmp/google-cloud-sdk.tar.gz
|
||||
RUN mkdir -p /usr/local/gcloud
|
||||
|
|
|
|||
|
|
@ -0,0 +1,5 @@
|
|||
package tools
|
||||
|
||||
import (
|
||||
_ "k8s.io/code-generator"
|
||||
)
|
||||
Loading…
Reference in New Issue