Skip to content

Commit

Permalink
feat: Upgrade argo-workflow to v3.3.8 (#8009)
Browse files Browse the repository at this point in the history
* Upgrade argo-workflow to v3.3.8

* update go liencenses files

* use golang 1.17 in build and test

* temporarily disable v2 image cloudbuild
  • Loading branch information
chensun authored Jul 12, 2022
1 parent 47809d4 commit 8bee292
Show file tree
Hide file tree
Showing 87 changed files with 7,852 additions and 1,889 deletions.
51 changes: 27 additions & 24 deletions .cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -192,10 +192,10 @@ steps:
args: ['pull', 'gcr.io/cloudsql-docker/gce-proxy:1.25.0']
id: 'pullCloudsqlProxy'
- name: 'gcr.io/cloud-builders/docker'
args: ['pull', 'gcr.io/ml-pipeline/argoexec:v3.2.3-license-compliance']
args: ['pull', 'gcr.io/ml-pipeline/argoexec:v3.3.8-license-compliance']
id: 'pullArgoExecutor'
- name: 'gcr.io/cloud-builders/docker'
args: ['pull', 'gcr.io/ml-pipeline/workflow-controller:v3.2.3-license-compliance']
args: ['pull', 'gcr.io/ml-pipeline/workflow-controller:v3.3.8-license-compliance']
id: 'pullArgoWorkflowController'

# V2 related images
Expand All @@ -205,28 +205,31 @@ steps:
# gcloud builds submit . --config=cloudbuild.yaml --project=$PROJECT_ID
# Reference: https://dev.to/amammay/effective-go-on-gcp-lean-containers-with-ko-on-cloud-build-51ek

- name: 'gcr.io/$PROJECT_ID/ko'
entrypoint: /bin/sh
args:
- -c
- |
cd /workspace/backend/src/v2/
/ko publish --bare ./cmd/launcher-v2 -t $COMMIT_SHA
env:
- 'KO_DOCKER_REPO=gcr.io/$PROJECT_ID/kfp-launcher'
id: 'buildLauncher'
waitFor: ["-"]
- name: 'gcr.io/$PROJECT_ID/ko'
entrypoint: /bin/sh
args:
- -c
- |
cd /workspace/backend/src/v2/
/ko publish --bare ./cmd/driver -t $COMMIT_SHA
env:
- 'KO_DOCKER_REPO=gcr.io/$PROJECT_ID/kfp-driver'
id: 'buildDriver'
waitFor: ["-"]
# Temporarily disable v2 image build due to unblock kubeflow-pipeline-mkp-test
# We aren't building v2 images for MKP at this moment anyway.
#
# - name: 'gcr.io/$PROJECT_ID/ko'
# entrypoint: /bin/sh
# args:
# - -c
# - |
# cd /workspace/backend/src/v2/
# /ko publish --bare ./cmd/launcher-v2 -t $COMMIT_SHA
# env:
# - 'KO_DOCKER_REPO=gcr.io/$PROJECT_ID/kfp-launcher'
# id: 'buildLauncher'
# waitFor: ["-"]
# - name: 'gcr.io/$PROJECT_ID/ko'
# entrypoint: /bin/sh
# args:
# - -c
# - |
# cd /workspace/backend/src/v2/
# /ko publish --bare ./cmd/driver -t $COMMIT_SHA
# env:
# - 'KO_DOCKER_REPO=gcr.io/$PROJECT_ID/kfp-driver'
# id: 'buildDriver'
# waitFor: ["-"]

# Tag for Hosted - SemVersion to Major.Minor parsing
- id: "parseMajorMinorVersion"
Expand Down
20 changes: 10 additions & 10 deletions .release.cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -478,14 +478,14 @@ steps:
docker push gcr.io/ml-pipeline/google/pipelines-test/cloudsqlproxy:$(cat /workspace/mm.ver)
- name: 'gcr.io/cloud-builders/docker'
args: ['pull', 'gcr.io/ml-pipeline/argoexec:v3.2.3-license-compliance']
args: ['pull', 'gcr.io/ml-pipeline/argoexec:v3.3.8-license-compliance']
id: 'pullArgoExecutor'
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/ml-pipeline/argoexec:v3.2.3-license-compliance', 'gcr.io/ml-pipeline/google/pipelines/argoexecutor:$TAG_NAME']
args: ['tag', 'gcr.io/ml-pipeline/argoexec:v3.3.8-license-compliance', 'gcr.io/ml-pipeline/google/pipelines/argoexecutor:$TAG_NAME']
id: 'tagArgoExecutorForMarketplace'
waitFor: ['pullArgoExecutor']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/ml-pipeline/argoexec:v3.2.3-license-compliance', 'gcr.io/ml-pipeline/google/pipelines-test/argoexecutor:$TAG_NAME']
args: ['tag', 'gcr.io/ml-pipeline/argoexec:v3.3.8-license-compliance', 'gcr.io/ml-pipeline/google/pipelines-test/argoexecutor:$TAG_NAME']
id: 'tagArgoExecutorForMarketplaceTest'
waitFor: ['pullArgoExecutor']
- id: 'tagArgoExecutorForMarketplaceMajorMinor'
Expand All @@ -495,20 +495,20 @@ steps:
args:
- -ceux
- |
docker tag gcr.io/ml-pipeline/argoexec:v3.2.3-license-compliance gcr.io/ml-pipeline/google/pipelines/argoexecutor:$(cat /workspace/mm.ver)
docker tag gcr.io/ml-pipeline/argoexec:v3.2.3-license-compliance gcr.io/ml-pipeline/google/pipelines-test/argoexecutor:$(cat /workspace/mm.ver)
docker tag gcr.io/ml-pipeline/argoexec:v3.3.8-license-compliance gcr.io/ml-pipeline/google/pipelines/argoexecutor:$(cat /workspace/mm.ver)
docker tag gcr.io/ml-pipeline/argoexec:v3.3.8-license-compliance gcr.io/ml-pipeline/google/pipelines-test/argoexecutor:$(cat /workspace/mm.ver)
docker push gcr.io/ml-pipeline/google/pipelines/argoexecutor:$(cat /workspace/mm.ver)
docker push gcr.io/ml-pipeline/google/pipelines-test/argoexecutor:$(cat /workspace/mm.ver)
- name: 'gcr.io/cloud-builders/docker'
args: ['pull', 'gcr.io/ml-pipeline/workflow-controller:v3.2.3-license-compliance']
args: ['pull', 'gcr.io/ml-pipeline/workflow-controller:v3.3.8-license-compliance']
id: 'pullArgoWorkflowController'
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/ml-pipeline/workflow-controller:v3.2.3-license-compliance', 'gcr.io/ml-pipeline/google/pipelines/argoworkflowcontroller:$TAG_NAME']
args: ['tag', 'gcr.io/ml-pipeline/workflow-controller:v3.3.8-license-compliance', 'gcr.io/ml-pipeline/google/pipelines/argoworkflowcontroller:$TAG_NAME']
id: 'tagArgoWorkflowControllerForMarketplace'
waitFor: ['pullArgoWorkflowController']
- name: 'gcr.io/cloud-builders/docker'
args: ['tag', 'gcr.io/ml-pipeline/workflow-controller:v3.2.3-license-compliance', 'gcr.io/ml-pipeline/google/pipelines-test/argoworkflowcontroller:$TAG_NAME']
args: ['tag', 'gcr.io/ml-pipeline/workflow-controller:v3.3.8-license-compliance', 'gcr.io/ml-pipeline/google/pipelines-test/argoworkflowcontroller:$TAG_NAME']
id: 'tagArgoWorkflowControllerForMarketplaceTest'
waitFor: ['pullArgoWorkflowController']
- id: 'tagArgoWorkflowControllerForMarketplaceMajorMinor'
Expand All @@ -518,8 +518,8 @@ steps:
args:
- -ceux
- |
docker tag gcr.io/ml-pipeline/workflow-controller:v3.2.3-license-compliance gcr.io/ml-pipeline/google/pipelines/argoworkflowcontroller:$(cat /workspace/mm.ver)
docker tag gcr.io/ml-pipeline/workflow-controller:v3.2.3-license-compliance gcr.io/ml-pipeline/google/pipelines-test/argoworkflowcontroller:$(cat /workspace/mm.ver)
docker tag gcr.io/ml-pipeline/workflow-controller:v3.3.8-license-compliance gcr.io/ml-pipeline/google/pipelines/argoworkflowcontroller:$(cat /workspace/mm.ver)
docker tag gcr.io/ml-pipeline/workflow-controller:v3.3.8-license-compliance gcr.io/ml-pipeline/google/pipelines-test/argoworkflowcontroller:$(cat /workspace/mm.ver)
docker push gcr.io/ml-pipeline/google/pipelines/argoworkflowcontroller:$(cat /workspace/mm.ver)
docker push gcr.io/ml-pipeline/google/pipelines-test/argoworkflowcontroller:$(cat /workspace/mm.ver)
Expand Down
2 changes: 1 addition & 1 deletion backend/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ COPY backend/requirements.txt .
RUN python3 -m pip install -r requirements.txt --no-cache-dir

# Downloading Argo CLI so that the samples are validated
ENV ARGO_VERSION v3.2.3
ENV ARGO_VERSION v3.3.8
RUN curl -sLO https://github.com/argoproj/argo-workflows/releases/download/${ARGO_VERSION}/argo-linux-amd64.gz && \
gunzip argo-linux-amd64.gz && \
chmod +x argo-linux-amd64 && \
Expand Down
12 changes: 12 additions & 0 deletions backend/src/apiserver/client/kubernetes_core_fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
package client

import (
"context"

"github.com/kubeflow/pipelines/backend/src/common/util"
policyv1 "k8s.io/api/policy/v1"
policyv1beta1 "k8s.io/api/policy/v1beta1"
v1 "k8s.io/client-go/kubernetes/typed/core/v1"
)

Expand Down Expand Up @@ -45,3 +49,11 @@ func NewFakeKubernetesCoreClientWithBadPodClient() *FakeKubernetesCoreClientWith
func (c *FakeKubernetesCoreClientWithBadPodClient) PodClient(namespace string) v1.PodInterface {
return c.podClientFake
}

func (c *FakePodClient) EvictV1(context.Context, *policyv1.Eviction) error {
return nil
}

func (c *FakePodClient) EvictV1beta1(context.Context, *policyv1beta1.Eviction) error {
return nil
}
9 changes: 2 additions & 7 deletions backend/src/apiserver/client/pod_fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,24 +5,19 @@ import (
"errors"

"github.com/golang/glog"
applyv1 "k8s.io/client-go/applyconfigurations/core/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/api/policy/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
applyv1 "k8s.io/client-go/applyconfigurations/core/v1"
"k8s.io/client-go/rest"
)

type FakePodClient struct {
}

func (FakePodClient) GetEphemeralContainers(context.Context, string, v1.GetOptions) (*corev1.EphemeralContainers, error) {
glog.Error("This fake method is not yet implemented.")
return nil, nil
}

func (FakePodClient) UpdateEphemeralContainers(context.Context, string, *corev1.EphemeralContainers, v1.UpdateOptions) (*corev1.EphemeralContainers, error) {
func (FakePodClient) UpdateEphemeralContainers(context.Context, string, *corev1.Pod, v1.UpdateOptions) (*corev1.Pod, error) {
glog.Error("This fake method is not yet implemented.")
return nil, nil
}
Expand Down
12 changes: 12 additions & 0 deletions backend/src/cache/client/kubernetes_core_fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@
package client

import (
"context"

"github.com/kubeflow/pipelines/backend/src/common/util"
policyv1 "k8s.io/api/policy/v1"
policyv1beta1 "k8s.io/api/policy/v1beta1"
v1 "k8s.io/client-go/kubernetes/typed/core/v1"
)

Expand Down Expand Up @@ -45,3 +49,11 @@ func NewFakeKubernetesCoreClientWithBadPodClient() *FakeKubernetesCoreClientWith
func (c *FakeKubernetesCoreClientWithBadPodClient) PodClient(namespace string) v1.PodInterface {
return c.podClientFake
}

func (c *FakePodClient) EvictV1(context.Context, *policyv1.Eviction) error {
return nil
}

func (c *FakePodClient) EvictV1beta1(context.Context, *policyv1beta1.Eviction) error {
return nil
}
9 changes: 2 additions & 7 deletions backend/src/cache/client/pod_fake.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@ import (
"errors"

"github.com/golang/glog"
applyv1 "k8s.io/client-go/applyconfigurations/core/v1"
corev1 "k8s.io/api/core/v1"
"k8s.io/api/policy/v1beta1"
v1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/types"
"k8s.io/apimachinery/pkg/watch"
applyv1 "k8s.io/client-go/applyconfigurations/core/v1"
"k8s.io/client-go/rest"
)

Expand All @@ -33,12 +33,7 @@ type FakePodClient struct {
patchIsCalled bool
}

func (FakePodClient) GetEphemeralContainers(context.Context, string, v1.GetOptions) (*corev1.EphemeralContainers, error) {
glog.Error("This fake method is not yet implemented.")
return nil, nil
}

func (FakePodClient) UpdateEphemeralContainers(context.Context, string, *corev1.EphemeralContainers, v1.UpdateOptions) (*corev1.EphemeralContainers, error) {
func (FakePodClient) UpdateEphemeralContainers(context.Context, string, *corev1.Pod, v1.UpdateOptions) (*corev1.Pod, error) {
glog.Error("This fake method is not yet implemented.")
return nil, nil
}
Expand Down
2 changes: 1 addition & 1 deletion backend/src/common/util/execution_status.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ package util
type ExecutionPhase string

// borrow from Workflow.Status.Phase:
// https://pkg.go.dev/github.com/argoproj/argo-workflows/v3@v3.2.3/pkg/apis/workflow/v1alpha1#WorkflowPhase
// https://pkg.go.dev/github.com/argoproj/argo-workflows/v3@v3.3.8/pkg/apis/workflow/v1alpha1#WorkflowPhase
const (
ExecutionUnknown ExecutionPhase = ""
ExecutionPending ExecutionPhase = "Pending" // pending some set-up - rarely used
Expand Down
2 changes: 1 addition & 1 deletion backend/src/v2/test/components/build_go.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ metadata:
author: Yuan Gong <gongyuan94@gmail.com>
implementation:
container:
image: golang:1.16-alpine
image: golang:1.17-alpine
command:
- sh
- -exc
Expand Down
Loading

0 comments on commit 8bee292

Please sign in to comment.