-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Document adding a new runtime kind. #3837
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
Conversation
docs/actions-new.md
Outdated
| packages and third party dependencies is the same from the OpenWhisk platform which is language | ||
| and runtime agnostic. | ||
|
|
||
| The canonical unit of execution is a container which implements a specific interface: |
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.
we'll need to document this interface...
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.
Would be good to express the required interface in a precise way.
Now digressing a bit ... Going forward I would like to prototype a way where runtime implementations are passed a URL of the attachment and they directly pull the attachment from storage instead of invoker acting as a proxy. For e.g. each runtime can just package curl and upon receiving the url just do a get via curl and stream it to file system. This would be more of optional capability supported by runtime.
So should we have some kind of versioning of the interface now where Invoker can detect what all a runtime t supports and based on that talks to it in a compatible way. For e.g. one way to implement the above change would be to add some capability attribute in runtime manifest and then based on that use a different approach (say use /init/v2) to talk to runtime.
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.
a reason we haven't documented the interface was to retain the ability to make breaking changes... but maybe that ship has sailed. so i've gone ahead and added it here... might be the first time we really make this official.
docs/actions-swift.md
Outdated
| return [ "greeting" : "Hello \(name)!" ] | ||
| } else { | ||
| return [ "greeting" : "Hello stranger!" ] | ||
| } |
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 think that the Swift source code should be indented 4 spaces as per The Swift Programming Language book.
Codecov Report
@@ Coverage Diff @@
## master #3837 +/- ##
======================================
Coverage 74.6% 74.6%
======================================
Files 138 138
Lines 6465 6465
Branches 406 406
======================================
Hits 4823 4823
Misses 1642 1642Continue to review full report at Codecov.
|
|
In addition to this proposal, I have one more thing I have to add here: although I believe the current Ruby Runtime should be functionally acceptable (as test suites including canonical test suite passed), however I still don't fully figure out how following input variables except for the "value" key are processed after /run method returns the result: Any pointer or reference for this might be also helpful for anyone new to here like me. Except for this, I don't think there is any missing parts necessary for runtime development. |
8e6dd0a to
2fba6ed
Compare
| └── tests | ||
| └── src # tests suits... | ||
| └── ... # ... which extend canonical interface plus additional runtime specific 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.
Should we add gradle - docker.gradle into the runtime repository structure as well.
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.
if you use the docker skeleton repo as the starting point, you'll inherit the gradle build including the docker.gradle settings --- these are meant to help with failing docker commands.
|
@remore take a look at the latest commits - do they help? |
dgrove-oss
left a comment
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.
One awkward sentence, but otherwise seems fine. I'll hold off merging to give you a chance to edit it.
docs/actions-new.md
Outdated
| OpenWhisk supports [several languages and runtimes](actions.md#languages-and-runtimes) but | ||
| there may be other languages or runtimes that are important for your organization, for which | ||
| you want tighter integration with the platform. Adding a new language, or runtime with bespoke | ||
| packages and third party dependencies is the same from the OpenWhisk platform which is language |
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.
Something off in this sentence. Here's an attempt to maybe fix it..
Adding a new language, or runtime with bespoke packages and third party dependencies, is the same as a supported language from the perspective of the OpenWhisk platform which is language
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 the feedback - I attempted a rewording in the last commit.
|
@rabbah It looks more than perfect to me. Thank you for this definitive and informative write-up. This will for sure give us decent understanding to get started to develop language runtime. |
Document the steps required to add a new runtime kind to the main repo so that it is available to the OpenWhisk deployment.
Description
We have received contributions to add PHP, Go, Ruby (#3725) and on the Apache dev list a new runtime for Ballerina.
This PR documents the steps required to add a new runtime to this repo so that it is available to the OpenWhisk deployment. Comments appreciated and welcome, particularly from those who have contributed runtimes recently (@sciabarracom @remore @akrabat).
cc @csantanapr
I'm happy to accept additional improvements to this write up via pull requests and all contributions will receive due credit.
Related issue and scope
My changes affect the following components
Types of changes
Checklist: