Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Backend - Marking auto-added artifacts as optional #1289

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 39 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ load("@bazel_tools//tools/build_defs/repo:git.bzl", "new_git_repository")

go_repository(
name = "google_ml_metadata",
commit = "becc26ab61f82bfe7c812894f56f597949ce0fdc",
commit = "0fb82dc56ff7",
importpath = "github.com/google/ml-metadata",
)

Expand Down Expand Up @@ -159,7 +159,7 @@ go_repository(
go_repository(
name = "com_github_argoproj_argo",
importpath = "github.com/argoproj/argo",
tag = "v2.2.0",
tag = "v2.3.0-rc3",
)

go_repository(
Expand Down Expand Up @@ -770,7 +770,7 @@ go_repository(

go_repository(
name = "org_golang_google_genproto",
commit = "bd91e49a0898",
commit = "ae2f86662275",
importpath = "google.golang.org/genproto",
)

Expand Down Expand Up @@ -925,3 +925,39 @@ go_repository(
commit = "5a4828bb7045",
importpath = "golang.org/x/arch",
)

go_repository(
name = "com_github_docker_distribution",
importpath = "github.com/docker/distribution",
tag = "v2.7.0",
)

go_repository(
name = "com_github_opencontainers_go_digest",
importpath = "github.com/opencontainers/go-digest",
tag = "v1.0.0-rc1",
)

go_repository(
name = "io_k8s_apiextensions_apiserver",
commit = "e7617803aceb",
importpath = "k8s.io/apiextensions-apiserver",
)

go_repository(
name = "io_k8s_apiserver",
commit = "d55c9aeff1eb",
importpath = "k8s.io/apiserver",
)

go_repository(
name = "io_k8s_klog",
importpath = "k8s.io/klog",
tag = "v0.1.0",
)

go_repository(
name = "com_github_gorilla_websocket",
importpath = "github.com/gorilla/websocket",
tag = "v1.2.0",
)
15 changes: 13 additions & 2 deletions backend/src/apiserver/resource/resource_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,8 @@ func NewResourceManager(clientManager ClientManagerInterface) *ResourceManager {
objectStore: clientManager.ObjectStore(),
workflowClient: clientManager.Workflow(),
scheduledWorkflowClient: clientManager.ScheduledWorkflow(),
time: clientManager.Time(),
uuid: clientManager.UUID(),
time: clientManager.Time(),
uuid: clientManager.UUID(),
}
}

Expand Down Expand Up @@ -211,6 +211,17 @@ func (r *ResourceManager) CreateRun(apiRun *api.Run) (*model.RunDetail, error) {
// Append provided parameter
workflow.OverrideParameters(parameters)

// Marking auto-added artifacts as optional. Otherwise most older workflows will start failing after upgrade to Argo 2.3.
// TODO: Fix the components to explicitly declare the artifacts they really output.
// TODO: Change the compiler to stop auto-adding those two atrifacts to all tasks.
for templateIdx, template := range workflow.Workflow.Spec.Templates {
for artIdx, artifact := range template.Outputs.Artifacts {
if artifact.Name == "mlpipeline-ui-metadata" || artifact.Name == "mlpipeline-metrics" {
workflow.Workflow.Spec.Templates[templateIdx].Outputs.Artifacts[artIdx].Optional = true
}
}
}

// Create argo workflow CRD resource
newWorkflow, err := r.workflowClient.Create(workflow.Get())
if err != nil {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ require (
github.com/BurntSushi/toml v0.3.1 // indirect
github.com/Masterminds/squirrel v0.0.0-20190107164353-fa735ea14f09
github.com/VividCortex/mysqlerr v0.0.0-20170204212430-6c6b55f8796f
github.com/argoproj/argo v2.2.0+incompatible
github.com/argoproj/argo v2.3.0-rc3+incompatible
github.com/cenkalti/backoff v2.0.0+incompatible
github.com/denisenkom/go-mssqldb v0.0.0-20181014144952-4e0d7dc8888f // indirect
github.com/docker/distribution v2.7.0+incompatible // indirect
Expand Down
3 changes: 3 additions & 0 deletions go.sum

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.