The helper Function constructor which uses a passed function as defaults
was missing map initializations. This could lead to nil pointer
exceptions as it is used by client.Init.
* feat: enable s2i for python
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: update zz_filesystem_generated.go
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: test
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: test
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: test
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: script
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Ensures all tests which apply to both build and deploy commands are
invoked. Test implementations are kept on deploy command, as it is the
primary command and build is a derivitave. Slight logical and
alphabetical reordering.
* feat(templates): remove liveness and readiness from defaults
The liveness and readiness URLs are defined in code as defaulting to
`/health/liveness` and `/health/readiness` respectively. The deploy
command handles these defaults without requiring them to exist in the
`func.yaml` file. Existing tests for defaults and overrides already
exist, so this change does not require additional tests to be included.
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: remove default endpoints from repository.go
Signed-off-by: Lance Ball <lball@redhat.com>
---------
Signed-off-by: Lance Ball <lball@redhat.com>
* add option 'branch' to command 'repository add'
* Format go code (#1407)
Signed-off-by: Knative Automation <automation@knative.team>
* chore: refactor repository layout (#1554)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
* fixup: removes --branch tag from repo commands
Removes the currently in-flight work on the `--branch` tag, simply
supporting a `refspec` on the repository URI. For example,
https://github.com/knative-sandbox/func-tastic#metacontroller will pull
the `func-tastic` repo, and set the currently active HEAD to the
`metacontroller` branch. Adds support for displaying this with the
command `func repo list -v`.
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: add example to `func repo add` documentation
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup: adjust test output expectations
Signed-off-by: Lance Ball <lball@redhat.com>
---------
Signed-off-by: Knative Automation <automation@knative.team>
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
Signed-off-by: Lance Ball <lball@redhat.com>
Co-authored-by: Yingchun Guo <yingchun.guo@intel.com>
Co-authored-by: knative-automation <automation@knative.team>
Co-authored-by: Zbynek Roubalik <zroubalik@gmail.com>
* cleanup: style
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fix: use current func image for in cluster tests
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* feat: deploy command global config function context
* fix static check errors
* fix test
* fix remote persists test
* env opaque box test
* use keyed fields (govet)
* mock deployer expansion
* ClearEnvs now in shared testing pkg
* effectivePath now uses plfags
* list directly uses config for default namespace
* Improved Namespace calculation and Caching
- Built() now a client package function
- Namespace evaluation delegeate to implementations
This enables the func.yaml to avert dirtiness checks on rebuilds
(caching)
- Build and Deploy update build stamp on completion
Enables dirtiness checks to be unaffects, leading to better caching.
- CLI Namespace checks no longer require k8s env evaluation for default
- Fixed missing condition check in TestDeploy_Namespace
- Fixes some minor linter and spelling errors
- Global config does not directly set namespace - it is corrected to be
deferred evaluation used by implementations.
- Skips writing func.yaml on f.Write if there were no modifications,
which leads to better caching (no timestamp update means Built ==
true)
- HasImage removed in favor of a corrected fn.Built
* linting, misspellings and docs rebuild
* warn user if git settings exist on a non-remote build
* lint error fix
* test flag unsetting persists
* allow unknown flags in preparsing of flags
* pre-submit cleanup
* update cmd to use client.Init
* Dapr runtime support
- installs Dapr cli in CI
- installs Dapr runtime on allocation of test cluster
- annotates services to enable dapr sidecar integration
- installs redis via helm, enabling state store, pub/sub and distributed
lock
- integration test added for local invocation
- integration test added for service-to-service invocation via the
sidecar
Note that Dapr runs metrics on port 9002 so as not to collide with
Knative metrics.
* create constants for knative service labels
* extract dapr annotations and use labels
Adds two meta-commands, 'Apply' and 'Update', to the client.
Renames 'Create' to 'Init' to avoid confusion with 'Update' (and to be more
linguistically similar to git commands), and adds it as an alias to the
create CLI command.
* fix: e2e tests logs on error
Commands now print stdout buffer on failure. In particular, they now
print the stdout buffer, the stderr buffer, and the final returned error text.
* use combined output throughout oncluster tests
* e2e set TestInvoke verbosity on
- add needed buildEnv properties
- add class to register runtime hints for MessageUtils.MessageStructureWithCaseInsensitiveHeaderKeys
- update README files
- update unit tests to use Java 17
Signed-off-by: Thomas Risberg <trisberg@pivotal.io>
Signed-off-by: Thomas Risberg <trisberg@pivotal.io>
When a user attempts to build, run or deploy a function and it has not
been previously built, the `--registry` flag or `FUNC_REGISTRY` environment
variable must be set so that the image name can be calculated. The
current error message, `registry required` is not very helpful, and
requires the user to divine what needs to happen next to fix the
problem. This change updates the error message text to indicate that the
user should set the `--registry` flag or `FUNC_REGISTRY` environment
variable.
Fixes: https://github.com/knative/func/issues/1504
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>
* Update Spring Boot to 2.7.7
- also add function-template springboot.md doc
Signed-off-by: Thomas Risberg <trisberg@pivotal.io>
* Fix lint errors
Signed-off-by: Thomas Risberg <trisberg@pivotal.io>
Includes guidance for Language Pack authors creating templates that use
runtimes other than those that are built in to the CLI.
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Lance Ball <lball@redhat.com>