-
Notifications
You must be signed in to change notification settings - Fork 123
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
PipelineRun with embedded pipelineSpec and taskSpec #166
PipelineRun with embedded pipelineSpec and taskSpec #166
Conversation
Check out this pull request on Review Jupyter notebook visual diffs & provide feedback on notebooks. Powered by ReviewNB |
f4f64c7
to
bd23726
Compare
|
||
|
||
def fix_big_data_passing(workflow: List[Dict[Text, Any]]) -> List[Dict[Text, Any]]: # Tekton change signature | ||
def fix_big_data_passing(workflow: dict) -> dict: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi, @ckadner , could you please don't change the type of input parma for fix_big_data_passing? as I already hanled it in another PR with List type, and fixed big data params in pipelinerun as well. Thanks ckadner!
'metadata': { | ||
'name': pipeline.name or 'Pipeline', | ||
'annotations': { | ||
'name': sanitize_k8s_name(pipeline.name or 'Pipeline', suffix_space=4) + '-run', |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We no longer need the -run
at the end because there won't by any duplicated pipeline name in the embedded spec.
'name': pipeline.name or 'Pipeline', | ||
'annotations': { | ||
'name': sanitize_k8s_name(pipeline.name or 'Pipeline', suffix_space=4) + '-run', | ||
'annotations': { # TODO: do annotations apply to PipelineRun? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, annotations in pipelinerun do apply to all tasks which is the same behavior.
I will take a deeper look with the api and see any errors within the integration. |
for image_pull_secret in pipeline.conf.image_pull_secrets: | ||
service_template['imagePullSecrets'] = [{'name': image_pull_secret.name}] | ||
|
||
# TODO: service_template |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Today the image secret pull PR is finally merged in Tekton, you can ignore this for now and I can create a separate PR to fix it with the new implementation.
tektoncd/pipeline #2767: Unsupported features for embedded pipelineSpec, taskSpec? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I will add comments to the missing parts as I'm running down all the tests.
params: | ||
- name: create-pvc-name | ||
value: $(tasks.create-pvc.results.name) | ||
taskSpec: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The volumes from task spec are missing.
tasks: | ||
- name: download | ||
params: [] | ||
taskSpec: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same here, missing volumes for taskSpec.
tasks: | ||
- name: download | ||
params: [] | ||
taskSpec: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The sidecar spec is missing in this taskSpec
params: [] | ||
taskRef: | ||
name: print-2 | ||
tasks: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Note: this transformer example is one of the missing features for task labels/annotations
Thanks @Tomcli -- I will need to make more changes to address the missing pieces. |
/hold -- wait for merge of Add end-to-end compiler tests #174 so we can verify the changes end-to-end |
3bf6234
to
08ef00b
Compare
@fenglixa -- I tried to update your code in Would you mind taking a look? If this requires a lot more effort than a just a few more small-ish changes, it might take a separate PR after this one gets merged (pending other fixes here). |
21c44ce
to
7ac1ca4
Compare
workflow = copy.deepcopy(workflow) | ||
|
||
tasks = workflow["spec"]["pipelineSpec"]["tasks"] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tasks = workflow["spec"]["pipelineSpec"]["tasks"] | |
tasks = workflow["spec"]["pipelineSpec"].get('tasks', []) + workflow["spec"]["pipelineSpec"].get('finally', []) |
template for template in workflow if template['kind'] == 'PipelineRun' | ||
] | ||
# TODO: why multiple pipelineRuns | ||
pipelinerun_template = workflow |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need to consider the cases of multiple pipelines or pipelineruns in one yaml file? I know it's not the case of current version, but do we need to leave the interfaces for future intergration? why close it?
Hello @ckadner, I am sorry, I don't think such more code diff is needed for
After all, To make this PR go ahead firstly, I think you can ignore big data part, and log another issue to me, I will handle it after your PR commited. Thanks. |
Yes, that is what I attempted :-)
I think I did that, no?
Yup, ... thought I did. I think where I tripped up, or where I would need much more time is with all of the mapping data structures. Do you want me to keep my changes and you continue, or would you like me to revert everything in |
Yes, you could keep your changes, and I will continue on it. Thanks @ckadner |
7ac1ca4
to
24e57bc
Compare
there are some test cases that still need to be fixed. Feng agreed to tackle the
|
Thanks @ckadner |
Thanks for your review and fixes @Tomcli @animeshsingh -- if you approve to merge this PR, then @fenglixa can start working on the subsequent fixes for |
@fenglixa just want to get a sense of timing on your side for the related fixes, given big data fix is critical to watson - before i push this in master, since this will break the master for big data fix for a while. |
Consider to the watson part, let me start working on #189 right now, with the trunk of: https://github.com/ckadner/kfp-tekton/tree/issue_143_embedded_pipelineSpec So let's commit code of this PR with my fixes together later. Due to the influence of Chinese Dragon Boat Festival these days, I may need 3-5 natural days to finish it. Let me know if you have any concern on it. Thanks. |
thanks - to clarify @fenglixa you are recommending to hold this until your PR comes by the end of the week, or merge it now? |
@ckadner a conflict on this one as well |
e33af01
to
71823e2
Compare
Rebased. |
@ckadner @animeshsingh , @ckadner, let's commit these 2 PRs now, to support both pipelinerun and bigdata.
|
@ckadner vis a vis the 6 files mentioned above - what do you want to do? |
I will keep them since they reflect the conversion from individual |
/lgtm |
yes. but that should not be a big deal. the testdata gets regenerated and the bigdatafix builds on top of what I had done, and if Feng has no patience he can just override it :-) |
oh, and, if I were to take those files out, Travis would complain ;-) |
/approve thanks @ckadner for driving this, and @Tomcli @fenglixa for your help. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: animeshsingh 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 |
Which issue is resolved by this Pull Request:
Resolves #143
Description of your changes:
Convert the YAML produced by the
kfp-tekton
compiler:Condition
s,Task
s,Pipeline
,PipelineRun
) intoPipelineRun
with embeddedpipelineSpec
andtaskSpec
sThis will simplify the required work for down-stream integration with the KFP API and KFP UI.
Outstanding Work:
TBD
Environment tested:
python --version
):3.7.5
tkn version
):0.11.0
kubectl version
):0.15
/etc/os-release
): Mac OSTest cases that still need to be fixed (6/15/2020):
super-condition
, solved bykubectl -n kubeflow apply -f https://raw.githubusercontent.com/kubeflow/kfp-tekton-backend/master/manifests/kustomize/base/tekton/catalog-condition.yaml
unknown field "artifacts"
[download : main] sh: results.downloaded-resultoutput.path: not found
invalid input params: missing values for these params which have no default values: [success-condition failure-condition]
invalid input params: missing values for these params which have no default values: [success-condition failure-condition]
Issues to track the outstanding fixes: