-
Notifications
You must be signed in to change notification settings - Fork 577
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
Update openwhisk-knative pipeline to v1beta1 #375
Conversation
|
Hi @mrutkows. Thanks for your PR. I'm waiting for a tektoncd member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@pritidesai please can you give your review? |
/ok-to-test |
The (openwhisk) pipeline and its tasks (that are being updated in this PR) have no integration tests, but now seem to be blocked by some repo.-wide integration tests that are failing? What is the process at this point? |
@mrutkows you'll need to rebase on top of the latest master to get the fixed integration tests. |
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 haven't reviewed the whole review but the error in the CI seems to point that the test runner create multiple times the same resource which fail :
+ kubectl -n openwhisk-549 create -f /tmp/.mm.0l7pIB
taskrun.tekton.dev/taskrun-install-npm-packages created
taskrun.tekton.dev/taskrun-install-npm-packages-without-path created
Error from server (AlreadyExists): error when creating "/tmp/.mm.0l7pIB": pipelineresources.tekton.dev "app-git" already exists
+ teardown_test_resources
As noted your test should only create one pipelineresorce and have it reference it directly from the Task/Pipeline
openwhisk/.gitignore
Outdated
@@ -0,0 +1,46 @@ | |||
############################################## |
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.
Any chance you can remove this file ? See here for the reasoning why gitignore should be kept local https://julien.danjou.info/properly-managing-your-gitignore/
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 am not so much convinced by this argument of having gitignore everywhere in the catalogs, if the gitignore contained some specific files for the specifics openwhisk files then that would be fine, but those are mostly editors/ide exclude, which are best kept in the user configuration
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.
@chmouel the design of gitignore supports and encourages use of directory-specific use (see https://labs.consol.de/development/git/2017/02/22/gitignore.html) to allow finer-grained exclusion. It seems that since the catalog is effectively a collection of subprojects each would want and be encouraged to have its own rules specific to its installation/configuration/tests.
However, I agree with the point from the ref. article and removed the "editor" specific entries in the file. Hopefully, what remains is accurate to the examples only.
What remains are artifacts created, if you follow the "openwhisk" specific readme's optional instructions to manually run the examples the scripts and steps cause many new files to be created which we do not want checked in by developers who may be updating this specific catalog entry.
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 am not so much convinced by this argument of having gitignore everywhere in the catalogs
@chmouel As indicated on the update, gitignore is now specific to the openwhisk entry and artifacts that are created from following its README only.
openwhisk/01-dice-color.json
Outdated
@@ -0,0 +1,5 @@ | |||
{ |
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.
Those .json files are examples, isnt it ? By convention we movet them to the examples/ directory
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.
@chmouel yes, had thought to move them, but it took so much time to get the instructions working that I had hoped to defer this to a subsequent PR as it seemed the priority was to get the resources themselves updated to v1beta1 level.
If this is a "blocker" I can try to find some time in the next several days to do so, but would it suffice to open an issue and assign it to myself against just this catalog entry?
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.
@chmouel I decided to co-locate the JSON parameter (input) files in the same subdirectory with the Java pipelineRun YAML as this is the only pipelinerun (example) that uses these input files.
openwhisk/README.md
Outdated
|
||
## Clone this repository | ||
The `PipelineRun` resource used to build a Python application is named `build-javascript-app-image` and derived from the template file [pipelinerun-build-padding-app.yaml.tmpl](pipelinerun/javascript/pipelinerun-javascript.yaml.tmpl). |
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.
s/python/javascript/
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.
thanks for fixing this 👍
openwhisk/README.md
Outdated
|
||
## Create Service Account for our Runtime Builds | ||
```bash | ||
tkn pr describe build-javascript-app-image |
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.
please replace this with tkn pr describe build-python-app-image
openwhisk/README.md
Outdated
|
||
This directory contains Tekton Task which can be used to Build and Serve Knative compatible applications (i.e., OpenWhisk Actions) on Kubernetes. | ||
*This catalog offering provides a single pipeline that can be used to build either [Apache OpenWhisk](https://openwhisk.apache.org/) or [Knative](https://openwhisk.apache.org/) compatible containers for supported runtimes used to execute OpenWhisk serverless functions.* |
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.
please update the knative link here
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.
Thanks @pritidesai. Silly copy/paste mistake. Will take the opportunity to add links a couple of other places in the opening paragraphs that may be helpful for easily accessing context.
openwhisk/README.md
Outdated
- [x] Knative v0.5.0 | ||
- [x] Tekton Pipeline | ||
- [x] Knative Client (OPTIONAL) | ||
The project provides a set of [supported language runtimes](https://openwhisk.apache.org/downloads.html#component-releases) that includes a proxy that enforces a *documented contract for function initialization (function injection) and execution* along with a standard context. Several of these runtimes, such as NodeJS, Python and Java, have been updated to support execution on as containers on either OpenWhisk or [Knative](https://openwhisk.apache.org/) clusters. In the latter case, the resultant containers can be run as on Knative without requiring an OpenWhisk control plane. |
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 as above, please update the knative link here
@pritidesai Also, just removed demo-commands.sh which was a legacy script to run just the java demo. In the future, we should look to see about creating a java-only pipeline (and perhaps for each of the language branches). It would be great if we could eventually have what Simon has been pushing for which are "pipeline tasks" so we could have a master pipleine that runs each of the language "pipeline branches" as tasks (with switch logic). |
@chmouel Hi Chris, seeing if you wished to re-review post-changes. Thanks! |
@pritidesai Hi Priti, I think that all your comments have been addressed; would you be able to re-review? |
Sorry @mrutkows for delay, will review it today 🙏 |
openwhisk/README.md
Outdated
|
||
--- | ||
|
||
## Troubleshooting | ||
#### Java |
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: s/####/###/ like other runtimes NodeJs and Python
@mrutkows: PR needs rebase. Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
@mrutkows as you rebase, would you mind adding a body to the commit message? (https://github.com/tektoncd/community/blob/master/standards.md#commit-messages) Thanks! |
@vdemeester @sthaha can we discover pipelines and tasks in subfolders with hub? |
Yes and no, we can parse all files in a repo but I think the ReOrg TEP addresses the issue of computable file paths from kind/name/version information i.e. given a resource In TEP we chose kind/resource/version/resource.yaml as the structure and it requires the current PR to be broken into
So that the hub can look for cc: @mrutkows I have no (strong) opinion on this structure and is open to changing this structure if it suits us better but let's do it as an amendment to the existing TEP.
That is a great question and one that we should address especially because with support for pipelines in hub (doesn't exist now) we would have to display/inform users of dependent tasks, conditions etc ... |
@mrutkows @pritidesai unfortunately this breaks the organisation proposed in the TEP :( which requires files to be organised as e.g. Additionally, the files are missing mandatory metadata as stated in https://github.com/tektoncd/community/blob/master/teps/0003-tekton-catalog-organization.md#versioning-resources viz. metadata:
labels:
app.kubernetes.io/version:
annotations:
tekton.dev/pipelines.minVersion: "0.12.1"
spec:
description: >-
one line summary of the resource
Para describing the resource You may also add additional metadata such as |
@sthaha Please know that this PR predated the referenced TEP, and I did not place them under the "task" folder structure, but rebased this Monday to adapt to a change done (#416) on behalf of all existing content. I will look at how to conform to the TEP, but we are effectively a pipeline that (hopefully in the future) may be able to run in its entirety as a "pipeline task" (term being used) and fear we are falling under "uncharted ground" in the proposal that was recently implemented. After reading the TEP, it looks like there is discretion under "pipeline" top-level structure, if I refactor to move our existing sub-directory structure (and README instructions) under:
Would that meet the criteria in your mind? I just want to have a v1beta1 level pipeline that the openwhisk community can use as soon as possible as they are stuck on alpha tasks/samples (which are quite dated). |
@mrutkows , based on our conversation on Slack, like @afrittoli pointed out the TEP is in Please note that having the mandatory annotations and the You may want to address the comment on slack if you haven't already.
|
@sthaha @pritidesai I have concluded that with the recent hub going live that we should indeed adapt towards the referenced TEP. Therefore, the latest commit moves the openwhisk folder (catalog entry) under I look forward to being the first "pipeline" under the new structure and figuring out how we evolve towards the best practices for pipelines and their often many dependencies and considerations beyond that of a single task. |
This commit represents a complete update of the OpenWhisk to Knative pipeline from v1alpha1 level to v1beta1 resource levels. This pipeline also adds conditional logic to support additional "branches" of the pipeline to sequence tasks that can detect and build serverless applications for not only NodeJS (previously the only lang. supported), but also Python and Java. In addition, this pipeline utilizes a workspace for sharing data/state across tasks. Each language branch has its own sample functions with instructions for users to build and test on knative the services they build.
@pritidesai @chmouel @sbwsg @sthaha I would truly appreciate a review in hope that after addressing all comments and rebasing/refactoring/adapting for the draft hub layout proposal that this finally can be merged. |
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: vdemeester 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 |
@vdemeester @mrutkows Just noting that I am okay with merging the patch since the TEP is still in I am also unsure about the Since the pipeline is usable, I don't think we should bikeshed on it. However, we should discuss this further in our WG call. cc: @chmouel |
Fix catalog ci failure
Changes
This PR is a complete update of the OpenWhisk to Knative pipeline from v1alpha1 level to v1beta1 resource levels. This pipeline also adds conditional logic to support additional "branches" of the pipeline to sequence tasks that can detect and build serverless applications for not only NodeJS (previously the only lang. supported), but also Python and Java. In addition, this pipeline utilizes a workspace for sharing data/state across tasks. Each language branch has its own sample functions with instructions for users to build and test on knative the services they build.
Submitter Checklist
These are the criteria that every PR should meet, please check them off as you
review them:
See the contribution guide
for more details.