Commit Graph

946 Commits

Author SHA1 Message Date
Lance Ball c7332ffb7b
docs: add section about Node.js log levels (#462)
* docs: add section about Node.js log levels

Signed-off-by: Lance Ball <lball@redhat.com>

* squash: updated to also support logLevel in func.yaml

Signed-off-by: Lance Ball <lball@redhat.com>
2021-08-11 07:54:00 -07:00
Luke Kingland 9fd247557a
feat: repository management client api (#467)
* feat: repository management API

Adds a Repositories memeber to Client which enables management of
extensible repositories via methods Add, Rename, Remove, and List.

* fix: repositories urls

Validates that .Add input is parseable as a URL
Tests explicitly convert path to slashes
2021-08-11 03:36:00 -07:00
Luke Kingland 6ae2157549
feat: make func schema if config updated (#468)
Adds the config schema as integrated into the general build process.
Considers schema generation a prerequisite for building, peer to
such tasks as rebuilding pkged.go, but unlike pkged.go, is triggered
on a clean.  A missing schema file or modified config.go triggers
rebuild on make.
2021-08-10 09:44:59 -07:00
Matej Vasek 0bc2266ac8
chore: use mirror for lifecycle image (#470)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-09 09:27:12 -07:00
Zbynek Roubalik 8939f89bea
feat: generate json schema for func.yaml (#460)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-08-09 03:28:11 -07:00
github-actions[bot] 85683ea933
chore: release 0.17.1 (#461)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-05 15:32:59 -04:00
Matej Vasek 79e2234cbc
fix: hide progress indicator if asking for creds (#458)
* fix: hide progress indicator if asking for creds

Signed-off-by: Matej Vasek <mvasek@redhat.com>

* fix: NPE in integration test

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-05 10:41:52 -07:00
Matej Vasek 6fd42a421e
fix: use ascii chars in progress indicator on win (#459)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-05 08:46:52 -07:00
github-actions[bot] 818ec572aa
chore: release 0.17.0 (#440)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-08-04 14:12:26 -04:00
Luke Kingland 9db1a3d902
feat: remote template repositories (#437)
* feat: remote template repositories

* Update cmd/create.go

Co-authored-by: Lance Ball <lball@redhat.com>

* docs: extensible templates

* feat: remote template repositories

* Update docs/guides/language-packs.md

* Update docs/guides/language-packs.md

Co-authored-by: Lance Ball <lball@redhat.com>

* Update docs/guides/language-packs.md

Co-authored-by: Lance Ball <lball@redhat.com>

* Update docs/guides/templates.md

Co-authored-by: Lance Ball <lball@redhat.com>

Co-authored-by: Lance Ball <lball@redhat.com>
2021-08-03 06:28:15 -07:00
Lance Ball 0dba67751e
feat: add support for labels in func.yaml (#373)
* feat: add support for labels in func.yaml and `func config`

This change adds support for setting labels on deployed functions. It uses
the interactive CLI prompt introduced by Zbynek to add, remove and list
labels applied on a deployed function.

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: fix string output for Pair type

Signed-off-by: Lance Ball <lball@redhat.com>

* fixup: review feedback

Signed-off-by: Lance Ball <lball@redhat.com>
2021-08-03 06:10:16 -07:00
Lance Ball 578b33856c
chore: add some collaborators to the OWNERS file (#447)
Signed-off-by: Lance Ball <lball@redhat.com>
2021-08-02 13:35:47 -07:00
Luke Kingland 92b309f791
build: remove pkged.go from make clean (#456) 2021-08-02 08:37:42 -07:00
Luke Kingland 72574c3f40
doc: status badge urls (#455) 2021-08-02 08:35:43 -07:00
Dejan Bosanac 7656c40972
feat: Add proper example of configuring Rust functions. (#436) 2021-08-01 14:51:42 -07:00
Luke Kingland 435d1ac2a3
fix: unnecessary template repackaging (#449)
Removes python caches on template test.  This appears to be the original
cause of unnecessary rebuilds.

Adds pkger.go as an explict entry in the CODE prerequisite var.  This
ensures pkged.go is generated if it doesn't exist, and removes the need
to explicitly enumerate it as a prerequisite to other targets.

Adds pkger.go to the clean target.  This allows a 'make clean && make' to
work as one might expect.  For example ensuring a rebuild if a template
files is removed.

The notable conceptual change here is that this does not induce a build of
pkged.go by explicitly enumarating it as a prerequisite (a difficult
thing to get right, and prone to errors in the future), but rather
directly enumerates ./templates as its prerequisite.

Additional minor modifications include:
- regenerated pkged.go such that this takes effect for main on merge
- adds an explicit target for the 'func' binary and aliases 'build'
- Makefile help text cleanup and consolidation
2021-07-30 07:34:31 -07:00
Luke Kingland 72aa925f9a
chore: removes deprecated CODEOWNERS file (#450)
This repository uses prow, which uses the OWNERS file.
2021-07-30 07:33:31 -07:00
Lance Ball a25b723dbc
feat: print emit response output if it's a cloudevent (#444)
The CloudEvent SDK will provide any event included in the response as a
return value from `Request()`. If it does, print it out. It makes the
experience nicer.

For example, if I run the default TypeScript event function locally, this
is what `kn emit...` looks like.

```
❯ ./func emit --sink local --data '{"hello": "world"}'
Context Attributes,
  specversion: 1.0
  type: echo
  source: function.eventViewer
  id: d7d81ccc-a365-4433-be6b-7edfa43ca360
  time: 2021-07-27T18:57:03.147Z
  datacontenttype: application/json; charset=utf-8
Data,
  {
    "hello": "world"
  }
```

Signed-off-by: Lance Ball <lball@redhat.com>
2021-07-28 04:45:16 -07:00
Luke Kingland 1a1288a6d4
src: match client v0.23.2 deps (#443) 2021-07-27 11:44:50 -07:00
Lance Ball be1ae69b43
chore(ci): fix main CI reference to downloaded pkger (#439)
Signed-off-by: Lance Ball <lball@redhat.com>
2021-07-26 17:06:50 -07:00
Lance Ball d71532a070
fix: fix unit tests for Node.js event templates (#438)
The bump of a major version of the Node.js dependencies changed
the format for the data received over HTTP (string vs. object).
This fixes that test to use JSON.stringify().

Signed-off-by: Lance Ball <lball@redhat.com>
2021-07-26 10:42:15 -07:00
Markus Thömmes 02e86d394a
Change github.com links to the new home (#424) 2021-07-26 10:30:15 -07:00
Julian Friedman ff35740b45
Bump cloudevents dep to 4.0.3 (#434) 2021-07-23 09:43:45 -07:00
Julian Friedman 7e5fd9a526
Bump node dependencies (#433) 2021-07-23 08:27:45 -07:00
Dejan Bosanac a08b843a9c
feat: Configure Rust functions (#430)
* Add ability to add all custom function configuration in a separate module.

Co-authored-by: Dejan Bosanac <dejan@sensatic.net>
Co-authored-by: Jim Crossley <jcrossley3@gmail.com>

Co-authored-by: Jim Crossley <jcrossley3@gmail.com>
2021-07-23 07:02:45 -07:00
Luke Kingland ede284bf01
doc: DEVELOPMENT.md (#432)
* doc: DEVELOPMENT.md

* Update docs/DEVELOPMENT.md

Co-authored-by: Lance Ball <lball@redhat.com>

* Update docs/DEVELOPMENT.md

Co-authored-by: Lance Ball <lball@redhat.com>

Co-authored-by: Lance Ball <lball@redhat.com>
2021-07-23 07:01:45 -07:00
Luke Kingland 66c26115b8
test: confirm repositories search path (#431) 2021-07-22 13:39:44 -07:00
jrangelramos 8cfb448382
ci: e2e test support for typescript runtime (#429)
* ci: Added minimal e2e test for typescript runtime

* ci: resolve lint warning on e2e test
2021-07-22 20:48:29 +09:00
Luke Kingland c257de807d
src: Makefile developer accessibility (#428)
* ci: increase dns update max retries

* src: Makefile accessibility

Restructures the Makefile for better readibility
Separates core unit tests from template unit tests
Adds a `help` target highlighting core targets
Removes unused 'cluser' and 'release' targets
Removes unused targets
2021-07-21 00:45:38 -07:00
Matej Vasek ed0c246ada
CI integration test with podman (#422)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-07-16 06:47:09 -07:00
Markus Thömmes 892558bf2a
Rename module to knative.dev/kn-plugin-func (#423)
Co-authored-by: Lance Ball <lball@redhat.com>
2021-07-15 11:33:32 -07:00
Matej Vasek 771a2307a1
fix: update builders version (#421)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-07-15 11:29:32 -07:00
Luke Kingland b1d840ad60
ci: move to inbuilt cluster config (#419)
Restructures repository cluster setup and configuration scripts
to be used both for local testing as well as in CI.  Adds a
CI-specific ci.sh script for the differences.  Additionally:
- Upgrades to knative v0.23.0
- Upgrades eventing from v1beta1 API to v1
- Adds binary installation script (linux)
- Serializes Build, Int Test, e2e test steps
- Installs Broker and Channel to support Knative Quickstart tutorial.
- Runs a test echo server during installation
- Adds event-based waits in place of most blind time-based waits
- Adds explicit Kubernetes version for KinD
- Replaces a NodePort patched Koourier with an explicit ingress
- Adds retries while activator webhook becomes available
- Merges allocate and configure
2021-07-15 07:45:32 -07:00
Matej Vasek 894f4febda
fix: do not trust builder when using podman (#420)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-07-14 15:47:28 -04:00
Jim Crossley c2c1b999e0
Define handler in terms of CloudEvents rather than http/payload (#412)
This should simplify the unit tests. Only the invalid_event test uses
the actix-web test helpers, just as an example to show it's the HTTP
plumbing that will fail the request when it tries to construct an
Event from invalid (or missing) headers.
2021-07-12 09:04:13 -04:00
Zbynek Roubalik 795cd7251e
docs: fix link to func.yaml docs in language guides (#418)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-07-12 09:02:58 -04:00
Luke Kingland afcde2d551
src: testable commands (#415)
* feat: client progress listener 'stopping' state

* src: testable commands

Restructures commands to accept a fn.Client constructor on command
instantiation.  This allows the concrete implementations, or entire
client to be mocked for testing.
Also some minor refacotring as necessary to shoehorn into the pattern.

* fix: increase default timeout to 120s for service creation

* chore: bump kind, knative and kubectl versions
2021-07-09 11:15:23 -04:00
Lance Ball 346cae0192
chore: add AUTHORS and OWNERS files (#413)
Preparation for the move to knative-sandbox.
See: https://github.com/knative/community/issues/613

Signed-off-by: Lance Ball <lball@redhat.com>
2021-07-07 10:35:33 -04:00
Lance Ball 08df25b9bf
chore(CI): use container-tools/kind for integration tests (#407)
Signed-off-by: Lance Ball <lball@redhat.com>
2021-06-24 14:08:23 -04:00
Matej Vasek 6f40b29d3e
fix: closing stdout
pack client was closing stdout
this commit prevents that

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-06-24 14:30:01 +02:00
Matej Vasek e7b0c375d4
doc: how to use podman
how to use podman

Signed-off-by: Matej Vasek <mvasek@redhat.com>

Co-authored-by: Lance Ball <lball@redhat.com>
2021-06-24 14:29:15 +02:00
Luke Kingland 4222e34aa6
src: test create command validates name 2021-06-24 21:08:06 +09:00
Luke Kingland 1591fa6759
src: refactor create command to be testable 2021-06-24 21:08:06 +09:00
github-actions[bot] 0ad7b548a3
chore: release 0.16.0 (#370)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-06-23 12:55:44 -04:00
Lance Ball bfa5746442
chore: bump to buildpacks v0.8.3 for all versions (#402)
* chore: bump to buildpacks v0.8.2 for all versions

This is causing me to rethink using versions in these templates, and our
overall buildpack version/release strategy. But for now, we should land
this before 0.16.0

* adds trust for any quay.io/boson builder

Signed-off-by: Lance Ball <lball@redhat.com>
2021-06-23 12:44:42 -04:00
Luke Kingland 5ded87368b
src: rename bosonFunc fn 2021-06-22 23:08:11 +09:00
Luke Kingland 8fb99a37af
src: test temp dir helper standardization (#400)
* src: test temp dir helper standardization

* src: test nonempty windows-compatible path
2021-06-21 17:14:17 -04:00
Zbynek Roubalik 6f96011d7c
src: `create`- use Select for specifying runtime in interactive mode (#399)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-21 17:11:35 -04:00
Matej Vasek 88ea081cc0
fix: use credsStore
use credsStore when searching for credentials

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-06-21 15:51:56 +02:00
Luke Kingland 16c3c4de3c
src: filled out templates unit tests 2021-06-21 20:12:08 +09:00