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

Support default params for packages in app manifest #200

Closed
duynguyen opened this issue Oct 15, 2020 · 2 comments · Fixed by adobe/aio-lib-runtime#37
Closed

Support default params for packages in app manifest #200

duynguyen opened this issue Oct 15, 2020 · 2 comments · Fixed by adobe/aio-lib-runtime#37
Labels
enhancement

Comments

@duynguyen
Copy link

duynguyen commented Oct 15, 2020

Is your feature request related to a problem? Please describe.
With the aio runtime CLI plugin, you can set default params for package, e.g.

aio rt package create sample-app-0.0.1 --param city NYC --param country USA

However it doesn’t seem possible in wskdeploy: https://github.com/apache/openwhisk-wskdeploy/blob/master/specification/html/spec_packages.md#packages
Because the manifest spec of Firefly follows wskdeploy convention, it doesn't support this use case as well

Describe the solution you'd like
It should be possible to set default params for packages. Example snippet below.

packages:
  __APP_PACKAGE__:
    license: Apache-2.0
    inputs:
      city: $CITY
      country: $COUNTRY
    actions:
      ...

CITY and COUNTRY could be environment variables defined in .env file.

CITY=NYC
COUNTRY=USA

Describe alternatives you've considered
The user could use the CLI to manually set up default params, but it is not as neat as defining them in manifest.

Additional context
This is extremely useful for the cases when developers need to share variables across multiple actions.

@meryllblanchet meryllblanchet added the enhancement label Oct 15, 2020
@meryllblanchet
Copy link

meryllblanchet commented Oct 15, 2020

After chatting with @duynguyen , this is mostly for mapping secrets and K/Vs defined within .env and .aio at package level (instead of having to repeat the mapping across several actions).

Current workaround: repeat the mapping for all the actions, which need to use the variable, or use:

aio rt package create sample-app-0.0.1 --param city NYC --param country USA

@aiojbot
Copy link
Collaborator

aiojbot commented Oct 15, 2020

JIRA issue created: https://jira.corp.adobe.com/browse/ACNA-943

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants