Comments (13)
@paulcastro ,very interesting features, please split it into smaller issues, so we could help if possible.
from openwhisk-wskdeploy.
When someone pushes a package to a repo, there should be a default package name for it that is unique. We currently don't have a scheme for this though we could borrow from other dependency management frameworks. For instance, we could use a URL as the canonical name for the package.
When someone integrates a package from a repo, they should have the option to override the default name.
An example of support for this kind of model is how Go treats imports.
from openwhisk-wskdeploy.
After weighting several options, I would use a shorten (no protocol) URL as the canonical name for the package as you suggested. This has several advantages:
- it is unique
- no need to override the default name to avoid conflict
- no need to go through a global naming service to guarantee the package name uniqueness
- easier server-side deployment
- the name can be used to directly locate the source code
The only minor problem is the package name cannot contains /
characters, which has a simple solution.
from openwhisk-wskdeploy.
Thinking about package bindings, perhaps something like this:
package:
name: myPackage
dependencies:
cloudant:
version 1.2
location: /whisk.system/cloudant
binding-name: myCloudant
inputs:
param1: value1
The above assumes there is an OpenWhisk package called Cloudant
, it's location is "whisk.system", and I want to refer to it as myCloudant
inside this manifest file.
I'm not sure how to handle name uniqueness for package names. One option is to follow go's model, and use an internet style name based on whisk.system or GitHub repos:
package:
name: myPackage
dependencies:
/whisk.system/cloudant:
version 1.2
binding-name: myCloudant
inputs:
param1: value
github.com/openwhisk/openwhisk-client-swift
version .02.2
binding-name: mySwift
If you don't specify a binding-name, then you refer to the package using whatever the package itself specifies, e.g. /whisk.system/cloudant refers to itself as "cloudant" in its package manifest.
from openwhisk-wskdeploy.
Another option is to specify the binding name upfront, and not have a binding-name key.
package:
name: myPackage
dependencies:
myCloudant:
version 1.2
location: /whisk.system/cloudant
inputs:
param1: value1
mySwift:
location: github.com/openwhisk/openwhisk-client-swift
If I want to use the default name (i.e. not specify a binding) then I just use the default name:
package:
name: myPackage
dependencies:
cloudant:
version 1.2
location: /whisk.system/cloudant
inputs:
param1: value1
from openwhisk-wskdeploy.
For uniqueness, see #41 (comment)
The first option does not work, as property keys in YAML must be unique and the same package can be bound multiple times. Option 2 might be clearer.
from openwhisk-wskdeploy.
so we are all agree with this solution #41 (comment), Ok, i'll investigate it and put it a high prio one, as our 101 use cases need to use dependencies. @paulcastro , are you already on this one, as I see you assigned yourself.
from openwhisk-wskdeploy.
@lzbj I can reassign to you - thanks. We agree on option 2 (see below).
For iteration 1: we will only support binding so the location value should be the package we are binding to. This will support the 101 use case.
In the next iteration, we can add support for location being a remote GitHub URL.
package:
name: myPackage
dependencies:
myCloudant:
version 1.2
location: /whisk.system/cloudant
inputs:
param1: value1
mySwift:
location: github.com/openwhisk/openwhisk-client-swift
from openwhisk-wskdeploy.
Ok, sure, got it. thanks.
from openwhisk-wskdeploy.
I tried using url
and source
as keys to distinguish between GitHub and system bindings. I'm not 100% this is correct and may refactor to overload location
with two meanings per the previous example.
package:
name: myPackage
dependencies:
myCloudant:
version 1.2
source: /whisk.system/cloudant
inputs:
param1: value1
mySwift:
url: https://github.com/openwhisk/openwhisk-client-swift
from openwhisk-wskdeploy.
I'm updating over the code to support the original format using location
without prefixes:
package:
name: myPackage
dependencies:
myCloudant:
version 1.2
location: /whisk.system/cloudant
inputs:
param1: value1
mySwift:
location: github.com/openwhisk/openwhisk-client-swift```
from openwhisk-wskdeploy.
@paulcastro opened #259 to track spec. updates for dependencies.
from openwhisk-wskdeploy.
merged
from openwhisk-wskdeploy.
Related Issues (20)
- Specifying action parameters in the inputs array or the annotations one HOT 1
- Update docs to reflect everywhere wskdeploy does interpolation on manifest values HOT 1
- Need test case for duplicate entries in manifest.yaml
- Support for Swagger 3.x HOT 1
- Spec documentation for action includes and excludes is missing HOT 1
- Binaries no longer packaged with releases HOT 3
- Explicit runtime version test failing on deprecated go:1.11 action
- wskdeploy does not work with .rs extension rust files.
- Upgrade to v2 of go-i18n (internationalization) package
- Unrecognized architecture:aarch64 HOT 9
- Tests are failing with modified reflection API (reflect -> goccy/go-reflect ), on Aarch64 HOT 7
- Add support for Apple Silicon (i.e., Darwin (not iOS), ARM64) with cross-compile linker
- Each sequance invocation is suffer from cold start HOT 1
- Environment variable not available in action name
- Can wskdeploy orchestrates actions as a DAG? HOT 2
- manifest spec doesn't specify `project.config` key
- Binding a JSON type to a package causes a panic
- swift 4.2 runtime is missing
- Empty files are missing HOT 1
- Option "include" in manifest.yml file does not preserve files permission
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from openwhisk-wskdeploy.