This commit updates both the Node.js and TypeScript cloudevents
templates to use the most recent version of the CloudEvents module, and
bumps transitive dependencies that needed updates via `npm audit fix`.
Signed-off-by: Lance Ball <lball@redhat.com>
* Remove unnecesary files from Quarkus template
The jar will be automatically downloaded first time maven wrapper is used.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Remove unnecesary files from Sprint Boot templates
The jar will be automatically downloaded first time maven wrapper is used.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
All runtimes were actually using paketo builders already, but the
builders were still being explicitly set in manifest.yaml instead of
existing as a default in builder.go like all of the others.
Signed-off-by: Lance Ball <lball@redhat.com>
* chore(deps): bump faas-js-runtime version
There were a couple of bug fixes in the latest release. This commit
picks those up for functions projects in JavaScript and TypeScript.
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: update package-lock.json for node/typescript tmpls
Signed-off-by: Lance Ball <lball@redhat.com>
This commit changes the Python functions to use the open source Paketo
builders. The Paketo builders allow the use of a Procfile to indicate
the desired default start process for the container, so this has been
added to invoke Parliament at startup.
Also, there were no README.md files for Python, so I added them too.
Signed-off-by: Lance Ball <lball@redhat.com>
* Adding timeout and additional logs on e2e http test
* Better revision check on e2e http update test
* ci: Adding workflow to run e2e for all runtimes
* fix: server error 500 for Go cloudevents template
* Support using 'func invoke' for springboot templates
- add README notes for using 'func invoke' to springboot templates
- update ce-type used for cloudevents template tests
* Re-generate zz_filesystem_generated.go after rebase
* updating to latest spring cloud release and refactoring code
* new health endpoints
* implementing simplified echo function in template
* adding banner
* adding NL at EOF
* updating native to release
* fixing trailing whitespace
* adding invocation back
* adding Newline
* whitespaces
* fix lint and regenerate
* regenerate zz filesystem after rebase
* chore: update manifest.yamls
In a couple of cases, the `invoke` parameter was missing. And there was an
outdated use of a typescript buildpack in the typescript/cloudevent templates.
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: I should set VSCode to autosave on focus change
Signed-off-by: Lance Ball <lball@redhat.com>
* fix: use domain qualified registry for springboot
The builder image name should include the registry name. Also it seems
that the tiny builder doesn't actually work. We need base.
Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/775
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: regenerate pkged.go with go 1.17
Signed-off-by: Lance Ball <lball@redhat.com>
* feat!: rename 'emit' to 'invoke' and default to local
This commit renames 'func emit' command to 'func invoke' and makes the
default behavior to send an event to localhost. The special '--sink'
value 'local' is changed to 'cluster' to indicate that the function
should be invoked on the cluster instead of locally. All other behavior
has remained the same.
BREAKING CHANGE
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: update commands.md doc
Signed-off-by: Lance Ball <lball@redhat.com>
* squash: change Emitter interface to Invoker
Changes Emit() to Send() in the (now named) Invoker interface, and changes
Emit() to Invoke() in the client.
BREAKING CHANGE
Signed-off-by: Lance Ball <lball@redhat.com>
* squash: use a common Invoker interface for HTTP and events
Signed-off-by: Lance Ball <lball@redhat.com>
* checkpoint
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: change Emitter to EventInvoker
Signed-off-by: Lance Ball <lball@redhat.com>
* Invoke v2 Draft
* feat: client invoke function
* static invoke defaults and methods
* remove assimilated invoker package
* includes an ignored .func directory on create
* Instances manager with local and remote defaults
Funciton Info is now Instance, representing a Function in a given
environment.
Describing a Function instance is now Instances().Get(f, environment)
Moves Runner to be async with a Stop method to enable returning runtime pid
and port for persisting.
Instances now have a place for primary Route in addition to all routes slice
Running Functions write PID and Port to .func
* cascading targets: local vs remote vs ad-hoc endpoint
* runner start signals and cancel cleanup
* return run on context done or err on channel
* async runner
Refactors the image runner to start the container asynchronously,
reporting back the port on which it started. Errors are communicated
back via a provided channel and stop is signaled using context
cancelation.
* pid neither required nor available
* add withTransport option
Incorporates addition of custom transport of the emitter into the
renamed version invoker. Flag and help text cleanup. Re-additionof the
Info accessor.
* schema now includes invocation data
* loop build msg
* run jobs
Externally exposed port is now chosen based on availability, with 8080
preferred and falling back to an os-chosen open port.
The Client Run method is now async, returning the port assigned to the
running Function, a stop/cleanup function and a runtime errors channel.
The Runner is internally divided into the runner and its started Jobs.
* job metadata
Extracts job metadata tracking to a Job object in the core,
Handles multiple instances of the same Function by creating a single
file for each instances in .func/instances/<port>
* remove superfluous error types and flag bindings
* feat: enable invoke target remote
* feat: preferentially invoke local, remote if running
* feat: read --file for invoke
* feat: invoke confirm prompts
* fixup cli tests
- Updates to handle asynchronous Runner
- Standardize on the naming convention for selective running
* docker runner tests and lint errors
* test refactor
* feat: invoke format override
* comments, spelling and other cleanup
* invoke command doc
* feat: invoke format interactive option
* rename runjob.go to job.go
* e2e test flag update
* test naming homoginization
* silence build activity messages when verbose
* test debugging
* code review updates
- return Job from Client.Run rather than constituent members
- Treat .gitignore as contentious, punting on feature to mutate if
extant.
- docs wording changes
- add invocation format to pertinent manifest.yaml files
* help text spelling etc.
Co-authored-by: Lance Ball <lball@redhat.com>
* feat: add telemetry to Node.js and TypeScript function templates
This commit pulls in the latest version of faas-js-runtime which supports
metrics exposed at /metrics. Also, concidentally, adds CloudEvent batch
support, so Node.js and TypeScript functions may be invoked with a set of
more than one event simultaneously.
Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/710
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: regenerate and commit pkged.go
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: remove stray go.sum and update pkged.go file
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: try to make knative code style happy
Signed-off-by: Lance Ball <lball@redhat.com>
* Revert "fixup: try to make knative code style happy"
This reverts commit 91d625be7b.
* fixup: update package-lock.json files
Signed-off-by: Lance Ball <lball@redhat.com>
The TypeScript templates have been using a small buildpack from the boson
project. The sole purpose of the buildpack was to run the `npm run build`
command so that a TypeScript project would be transpiled before deployment.
The Paketo buildpack for Node.js supports using environment variables at
build time to enable additional scripts to be run, such as `build`. Prior
to the addition of `buildEnvs` by @salaboy in
https://github.com/knative-sandbox/kn-plugin-func/pull/646 it was not
possible to set this value for TypeScript projects. That new feature allows
us to stop using the small buildpack from boson.
Signed-off-by: Lance Ball <lball@redhat.com>
* move springboot template to use springnative
* improving templates to use spring-cloud-deps and ce-type routing
* updating readmes
* removing trailing spaces and adding newline at EOF