On CI machines the image registry is present and reachable.
That causes the actual registry, not mock server, is accessed by the test.
Signed-off-by: Matej Vasek <mvasek@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>
* src: refactor
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* src: Allow usage of custom CA for
Allows TLS verify against custom CA for chosen server names.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: style
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: lint
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: cleanup
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* chore: bump lifecycle version to 0.13.0
And add docker.io/paketobuildpacks as another trusted builder prefix.
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: bump to 0.13.2
Signed-off-by: Lance Ball <lball@redhat.com>
* Use common functionality for docker cred retrieval
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: docker auth secret for tekton pipeline
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: style
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* chore: fix typo in deploy command output (#501)
* feat!: use `function.knative.dev` for function related labels
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
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>
* allow build to be triggered from run when fn.Image is missing
* add build check when run by the run command
* added unit test for run command
* remove log output
* rename run test
* change build trigger to be managed by a flag and not a prompt
* tlet users know about the --build flag in the error message
* fix code check issue
* add some debug info to the run_test
* Update cmd/run.go
Co-authored-by: Luke Kingland <58986931+lkingland@users.noreply.github.com>
* add build field to runConfig
* fix issue with cmd args for testing
* refactor run tests to use mocks
* update imageless function run error message
* add check for build error test case
* run unit test cleanup
* empty commit
Co-authored-by: Luke Kingland <58986931+lkingland@users.noreply.github.com>
* src: dialer pod auto-exit
The pod should exit (be Completed) when func exits.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* feat: use in cluster dialer by default
This sets http.DefaultTransport to our specialized RoundTripper.
The RoundTripper first tries dial in standard way.
If dial operation fails due to hostname resolution error
in cluster dialer will be used.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* src: randomize testing namespace
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* src: test wait for servise
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixes pre review request
Signed-off-by: Matej Vasek <mvasek@redhat.com>