* update go-http templates to match new idiomatic handler
* update embedded templates
* bump func-go dependency
* regenerate templates
* update template deps again
* run embed again
* update test fixtures
* use go1.22 in CI
* setup metallb right after creating k8s cluster
* func-go v1.21.2
* revert static http handler signature update
Since the Pack and S2I builders do not yet use the new func-go
middleware, we are not yet able update the static static handler template.
* func-go v0.21.3
* revert static handler template test
* update embedded template fs
* try go 1.21 throughout
---------
Co-authored-by: Luke Kingland <luke@lukekingland.com>
* Making updates to Spring boot templates, as suggested by @trisberg
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* 🤖 We touched the samples, so adding the generated thing
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Bump JDK Builder to 21
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Some more java 21 setters
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
---------
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* 💄 Adding New() to make the file compile
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* Checkin stuff to make test in IDE pass
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
---------
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
* chore: use custom jammy paketo builder
Use our own modified jammy builder with additional buildpacks for
GoFunc and Rust. This enables on cluster build for Go and Rust functions.
Where possible (Go, Java) we use "tiny" variant, other runtimes use "base"
variant.
The updated task is new file instead of modifying existing task
this is done for sake of keeping compatiblility.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: remove unnecessary code per review request
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: podman test refers correct tkn task yamls
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* chore: bump faas-js-runtime and cloudevents for node & TS
The Node.js and TypeScript templates have been bumped to the latest
versions of faas-js-runtime (2.2.2) and CloudEvents (7.0.1).
There is an issue with the `expectType` test for TypeScript CloudEvent
functions which I can't quite figure out, but the type test is not
critical and does not do anything to validate other than whether the
function signature is what's expected by faas-js-runtime, and in this
case, I think type exported type for faas-js-runtime may actually be the
issue here.
Signed-off-by: Lance Ball <lball@redhat.com>
* chore: pin all github actions to go 1.20.2
There was a change in how go parses URLs in versions higher than 1.20.2
(likely 1.20.6 and up) which breaks the Docker API's handling of daemon
URIs. This fix pins the Go version at a version known to work with the
existing Docker API and `func` implementation.
Signed-off-by: Lance Ball <lball@redhat.com>
---------
Signed-off-by: Lance Ball <lball@redhat.com>
- update to use spring-cloud.version 2022.0.3
- remove springboot.platform.version property, not needed, rely on parent version
- remove import scope and pom type from spring-boot dependencies
By:
- Using a more opinionated release profile to optimize binary
- Removing not required dependencies
- Updating the rest of the dependencies
- Switch to Rust edition 2021
- Cleanup imports by importing the concrete types
- Avoid unnecessary type assertions
- Do not unwrap port
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
By:
- Using a more opinionated release profile to optimize binary
- Removing not required dependencies
- Updating the rest of the dependencies
- Cleanup imports by importing the concrete types
- Avoid unnecessary type assertions
- Do not unwrap port
Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
Allows buildpacks to be updated by updating to a newer version of
func. Previously, buildpacs were fixed at time of function creation
without a manual edit of func.yaml. Currently using Go as the reference
implementation in this commit.
* initial chg
* fix parent version selection
* change from `false` to false
* move platform checking as first task in main
* re-make generate/zz_filesystem_generated.go
* fixes of spaces in code at line 105, in following lint rules
* feat: custom health checks for node and typescript
This commit bumps the faas-js-runtime for Node.js and TypeScript
dependencies to version 1.1.0, which includes an API allowing function
developers to override the liveness and readiness checks for their
functions.
Signed-off-by: Lance Ball <lball@redhat.com>
* fixup
Signed-off-by: Lance Ball <lball@redhat.com>
---------
Signed-off-by: Lance Ball <lball@redhat.com>
* Add Python templates for gunicorn and uwsgi + Flask
These templates represents the most common and simple ways
how to implement FAAS in Python either directly via gunicorn
or using Flask and uwsgi.
* feat: runtime envvar definition in templates
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: use APP_MODULE not app.sh
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: update docs
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* test: better diffing in tests
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: update tests
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: style
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
* chore: update references to zz_filesystem_generated.go
Some places were missed in the repo restructuring. This should fix
test_infra build failures.
Signed-off-by: Lance Ball <lball@redhat.com>
* fix: do not put "." into template zip array (#24)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
---------
Signed-off-by: Lance Ball <lball@redhat.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <matejvasek@gmail.com>
* 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>
* 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>
* Improve test error output
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Template ZIP generator close file after use
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Improve template ZIP generation
Use only 755 and 644 mod permission.
The exec bit is really the only one that we care about.
Also other bits may be set differently on developer machines depending
on its configuration, this would affect generation reproducibility.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Add explanatory comment
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Fix formatting for template zip generator
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* fixup: style
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Improve formant performance in template generation
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Improve memory footprint of template generation
Use streamlined generation which is limiting need for in memory buffers.
Might be imprtant if we had big files in templates.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Generate templates unconditionally
Rationale:
The way we create prerequisites (the find command) we cannot detect deleted files.
The generation is fast (around 500ms) so we can afford that.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Test embbeded templates content on push to main
This has to run prior to `make test` because the `test` recipe
enforces generation of the templates zip.
This would prevent test from being run against git commited templates
zip.
Signed-off-by: Matej Vasek <mvasek@redhat.com>
* Optimization don't use unnecessary io.Pipe
Signed-off-by: Matej Vasek <mvasek@redhat.com>