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

Runs and jobs can be created from pipeline version #2445

Merged
merged 42 commits into from
Oct 28, 2019

Conversation

jingzhang36
Copy link
Contributor

@jingzhang36 jingzhang36 commented Oct 21, 2019

  1. Add support to create run/job from pipeline version.
  2. Add GetPipelineVersionTemplate method for later usage in FE to render pipeline version details page.
  3. Uncommented default version field in pipeline proto message, since it doesn't change current FE behavior (i.e., FE is only displaying pipeline list and pipeline details and shows no sign of versions)

This change is Reviewable

@jingzhang36
Copy link
Contributor Author

/assign @IronPan
/cc @james-jwu

@jingzhang36
Copy link
Contributor Author

/assign @IronPan

@@ -241,7 +248,7 @@ message Pipeline {
// version is used as default. (In the future, if desired by customers, we
// can allow them to set default version.)
// TODO(jingzhang36): expose this in API pipeline definition with FE changes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove todo?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, yes.

if err != nil {
return nil, util.Wrap(err, "Unable to parse the parameter.")
}
resourceReferences, err := r.toModelResourceReferences(runId, common.Run, run.ResourceReferences)
resourceReferences, err := r.toModelResourceReferences(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit - could we revert the fmt changes like this? the new code is arguably not as readable as the old format.

Copy link
Contributor Author

@jingzhang36 jingzhang36 Oct 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This code snippet shows as "outdated" in my page view...probably page refresh thing and the good news is this line is indeed reverted.

// (1) raw pipeline manifest in pipeline_spec
// (2) pipeline version in resource_references
var workflowSpecManifestBytes []byte
workflowSpecManifestBytes, err :=
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this line breaking is really not as readable as old version. please consider change the fmt style

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same as above

@@ -241,3 +241,27 @@ func ValidatePipelineSpec(resourceManager *resource.ResourceManager, spec *api.P
}
return nil
}

// Verify pipeline version in resource references as creator.
func VerifyPipelineVersionReferenceAsCreator(resourceManager *resource.ResourceManager, references []*api.ResourceReference) (*string, error) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

the name of this function is not very clear to me.
consider CheckPipelineVersionReference()
and put more description what is checked

  • pipeline version reference exist
  • it is a owner
  • ID is a valid
  • pipeline

Copy link
Contributor Author

@jingzhang36 jingzhang36 Oct 25, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One question: since experiment is the owner of run, I set pipeline version as the creator. Let me know if you prefer it be an owner as well.

Copy link
Member

@IronPan IronPan Oct 28, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sorry i mean it's a creator instead of a owner. i happened to use them interchagably.

@IronPan
Copy link
Member

IronPan commented Oct 28, 2019

/lgtm
/approve

@k8s-ci-robot
Copy link
Contributor

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: IronPan

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@k8s-ci-robot k8s-ci-robot merged commit 47aaf08 into kubeflow:master Oct 28, 2019
jingzhang36 added a commit to jingzhang36/pipelines that referenced this pull request Oct 29, 2019
k8s-ci-robot pushed a commit that referenced this pull request Oct 30, 2019
* re-generate api since #2445 changed api proto

* Fix integration test for pipeline client

* use generated constants
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants