Compare commits

...

1799 Commits

Author SHA1 Message Date
David Fridrich 9e117217a6
fix-components (#2998) 2025-08-21 14:45:50 +00:00
David Fridrich 208801aecb
fix-of-a-fix (#2994) 2025-08-20 15:08:50 +00:00
David Fridrich f6e6021693
Remove container flag - variant I (#2987) 2025-08-20 13:18:49 +00:00
David Fridrich c48dbc1b7b
fix python injector bug (#2992) 2025-08-20 11:45:48 +00:00
Knative Automation 88c0dd6f8d
upgrade to latest dependencies (#2991)
bumping knative.dev/hack 70d4b00...d496a6e:
  > d496a6e allow [skip-dot-release] in quoted text (# 429)
  > 0dc673d Update community files (# 427)
bumping knative.dev/serving a5948d0...8fa5c34:
  > 8fa5c34 Update net-kourier nightly (# 16026)
bumping knative.dev/client/pkg a920115...7b01527:
  > 7b01527 upgrade to latest dependencies (# 2029)

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-20 10:07:48 +00:00
Knative Automation c13214d21f
upgrade to latest dependencies (#2989)
bumping knative.dev/eventing 81cbeaa...8b0ad5e:
  > 8b0ad5e [Automated] Update eventing-eventing-integrations nightly (# 8672)
  > b8caa63 fix: metrics with prometheus default to same port as before (# 8669)
  > 0a35d6e feat: add requestreply ingress handler (# 8611)
  > 9488776 [main] Upgrade to latest dependencies (# 8667)
bumping knative.dev/serving 5ea75cc...a5948d0:
  > a5948d0 Update net-istio nightly (# 16027)
  > 23f988f Update net-contour nightly (# 16024)
  > 1f2f77e Update net-gateway-api nightly (# 16023)
  > 2b57d07 upgrade to latest dependencies (# 16022)
bumping knative.dev/client/pkg cf58e40...a920115:
  > a920115 upgrade to latest dependencies (# 2028)
  > 0ef9eff upgrade to latest dependencies (# 2026)
  > 176d0f1 upgrade to latest dependencies (# 2025)

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-19 14:00:50 +00:00
Knative Automation 0bc78a612c
upgrade to latest dependencies (#2988)
bumping knative.dev/client/pkg 576bdc2...cf58e40:
  > cf58e40 upgrade to latest dependencies (# 2024)
bumping knative.dev/serving 4df9185...5ea75cc:
  > 5ea75cc Update net-kourier nightly (# 16020)
  > c3407f4 drop unused metrics domain env var (# 16019)

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-18 08:10:47 +00:00
Knative Automation 3efb11c9a7
Update community files (#2974)
Signed-off-by: Knative Automation <automation@knative.team>
2025-08-18 01:58:47 +00:00
Knative Automation 94fb8cc916
upgrade to latest dependencies (#2982)
bumping k8s.io/apiextensions-apiserver a0cfc63...f0c80b7:
  > f0c80b7 Update dependencies to v0.33.4 tag
bumping k8s.io/client-go e7397e5...9c62a4c:
  > 9c62a4c Update dependencies to v0.33.4 tag
bumping knative.dev/serving c3e27aa...4df9185:
  > 4df9185 Fix queue proxy user metrics port (# 16018)
  > 421c16c fix a tracing protocol comment (# 16015)
  > 2599d36 Update net-gateway-api nightly (# 16010)
  > e3a87eb Update net-contour nightly (# 16014)
bumping knative.dev/client/pkg 3345f43...576bdc2:
  > 576bdc2 upgrade to latest dependencies (# 2023)
  > 997b81b upgrade to latest dependencies (# 2022)
bumping k8s.io/apimachinery 173776a...173776a:
bumping k8s.io/apiserver 338d7b8...026035b:
  > 026035b Update dependencies to v0.33.4 tag
  > 234ce9f Merge pull request # 132337 from hakuna-matatah/automated-cherry-pick-of-# 132244-upstream-release-1.33
  > 5e9ddf2 Fix -Consistent paginated lists serve from cache
bumping knative.dev/networking 1456f13...a7d7760:
  > a7d7760 upgrade to latest dependencies (# 1076)
bumping knative.dev/eventing 23fa820...81cbeaa:
  > 81cbeaa remove prometheus from tracing protocol (# 8665)
  > 78983f7 [main] Upgrade to latest dependencies (# 8664)
bumping k8s.io/api 04f698e...2daa873:
  > 2daa873 Update dependencies to v0.33.4 tag

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-15 13:57:43 +00:00
Dave Protasowski e4bd40bf20
pin knative.dev/pkg so that it compiles (#2986)
tektoncd uses an old metrics package we dropped. thus we need to
wait for them to migrate away before resuming these bumps
2025-08-14 15:18:43 +00:00
Knative Automation 46266c9a5c
upgrade to latest dependencies (#2981)
bumping knative.dev/client/pkg 7205263...527deb6:
  > 527deb6 upgrade to latest dependencies (# 2017)

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-12 14:00:46 +00:00
Knative Automation 775a5f7926
upgrade to latest dependencies (#2976)
bumping golang.org/x/sys 751c3c6...5b936e1:
  > 5b936e1 unix/linux: update to Linux kernel 6.16, Go to 1.24.5
  > 3a82703 unix: remove redundant xnu version check for {p}readv/{p}writev
  > 9920300 unix: add missing nft conntrack constants
  > ad4e0fc unix: remove redundant word in comment
  > 084ad87 unix: fix //sys decl after CL 548795
bumping golang.org/x/net 76358aa...e74bc31:
  > e74bc31 go.mod: update golang.org/x dependencies
  > af6926e http2: remove references to defunct http2.golang.org test server
bumping golang.org/x/term 30da5dd...a35244d:
  > a35244d go.mod: update golang.org/x dependencies
  > 4f53e0c term: allow multi-line bracketed paste to not create single line with verbatim LFs
  > 27f29d8 term: remove duplicate flag and add comment on windows
bumping knative.dev/networking e0e80d6...5be3ba4:
  > 5be3ba4 Update community files (# 1074)
bumping golang.org/x/text b6d2645...425d715:
  > 425d715 go.mod: update golang.org/x dependencies
bumping knative.dev/pkg 2a0abb7...e06d4c9:
  > e06d4c9 Bump the golang-x group with 2 updates (# 3231)
  > 6d876dd Bump google.golang.org/protobuf from 1.36.6 to 1.36.7 (# 3230)
  > 9402b8c Update community files (# 3228)
bumping knative.dev/client/pkg 5bab515...7205263:
  > 7205263 upgrade to latest dependencies (# 2016)
  > cf1ddc8 upgrade to latest dependencies (# 2015)
  > 9ab334e upgrade to latest dependencies (# 2014)
  > 1dcc958 Update community files (# 2013)
  > 4a6db32 upgrade to latest dependencies (# 2012)
bumping golang.org/x/crypto 459a9db...ef5341b:
  > ef5341b go.mod: update golang.org/x dependencies
  > b999374 acme: fix pebble subprocess output data race
  > c247dea x509roots/fallback: store bundle certs directly in DER
  > 1fda731 acme: increase pebble test waitForServer attempts
  > 1b4c3d2 x509roots/fallback: update bundle
  > b903b53 acme: capture pebble test subprocess stdout/stderr
bumping knative.dev/serving d0d784c...43463bc:
  > 43463bc Update net-contour nightly (# 16006)
  > 098102d Update net-gateway-api nightly (# 16005)
  > f5aade4 Update net-kourier nightly (# 16004)
  > 9e361de Update net-istio nightly (# 16003)
  > 2a07f5e Update community files (# 16002)
bumping knative.dev/eventing 96629b6...50a65f4:
  > 50a65f4 [main] Update community files (# 8659)
bumping google.golang.org/protobuf 3f79c52...7e776d4:
  > 7e776d4 all: release v1.36.7
  > 8e8926e encoding/protowire: micro-optimize SizeVarint (-20% on Intel)
  > 32018e9 internal/impl: remove unnecessary atomic access for non-lazy lists
  > 9c38aec impl: remove unnecessary nil check from presence.Present
  > 41298d3 types/descriptorpb: regenerate using latest protobuf v31 release
  > e5d4468 cmd/protoc-gen-go: centralize presence and lazy logic into filedesc
  > b4a995b internal: move usePresenceForField to internal/filedesc
  > 3a5f1f0 internal/impl: clean up usePresenceForField() (no-op)
  > 58d6425 all: start v1.36.6-devel
bumping golang.org/x/mod ea04085...f8a9fe2:
  > f8a9fe2 go.mod: update golang.org/x dependencies

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-12 02:20:44 +00:00
github-actions[bot] 1aecc549ec
chore: update Quarkus platform version to 3.25.2 (#2978)
Co-authored-by: Knative Automation <automation@knative.team>
2025-08-11 12:04:53 +00:00
Knative Automation 61ecd623a2
upgrade to latest dependencies (#2975)
bumping knative.dev/serving 940713f...d0d784c:
  > d0d784c Update net-istio nightly (# 15991)

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-07 14:08:50 +00:00
Knative Automation ac3e634673
upgrade to latest dependencies (#2971)
bumping knative.dev/eventing 3bdae0a...96629b6:
  > 96629b6 Injected tracing headers into jobsink event file (# 8626)
  > 02861b7 cleanup: drop pkg/tracing from test code (# 8654)
bumping knative.dev/serving 7320a2a...940713f:
  > 940713f Update net-kourier nightly (# 15989)
  > 2aa8928 Update net-contour nightly (# 15987)
bumping knative.dev/client/pkg 0fd66f1...5bab515:
  > 5bab515 upgrade to latest dependencies (# 2011)

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-07 13:10:49 +00:00
Rayyan 065006cfb1
fix: force container=true for pack/s2i builders when not explicitly set (#2966)
* fix: force container=true for pack/s2i builders when not explicitly set

- Added logic to automatically set container=true for containerized builders (pack/s2i)
  when --container flag is not explicitly provided by user
- Fixes issue where 'func run --builder=pack' would incorrectly run on host instead of container
- Solution checks if builder is pack/s2i and --container flag wasn't changed by user
- Resolves #2955

* fix: enforce container mode for pack/s2i builders

- Auto-set container=true for pack/s2i when --container not explicitly set
- Validate and error on incompatible --builder=pack --container=false combinations
- Handle both flags and FUNC_CONTAINER environment variable

Fixes #2955
Addresses @gauron99 feedback on explicit container=false validation

* added logic to prevent test failure in testfunctionwithoutcontainer and also fixed some formatting issues to prevent test failure

* refactored the way of implementation based on the  suggestion provided also added the test as requested to do so

* fixed the linting errors

* fimplemented  smart builder/container auto-selection
automatically handles pack->container=true and container=false->host builder. also updated the e2e test and added new smartbuilderselection test in run_test.go

* fix linting errors
2025-08-07 12:46:49 +00:00
Knative Automation aeb51b3f61
upgrade to latest dependencies (#2969)
bumping knative.dev/client/pkg fcc5f74...0fd66f1:
  > 0fd66f1 upgrade to latest dependencies (# 2009)
bumping knative.dev/serving 2346125...7320a2a:
  > 7320a2a Update net-gateway-api nightly (# 15988)

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-06 14:04:50 +00:00
David Fridrich 13c7e76d94
fix templates ref (#2967) 2025-08-06 07:02:48 +00:00
Knative Automation cac432e0dd
upgrade to latest dependencies (#2968)
bumping knative.dev/serving 95b1ace...2346125:
  > 2346125 upgrade to latest dependencies (# 15980)
  > 290d8f2 Update net-gateway-api nightly (# 15984)
  > dbf24f6 drop old usage of knative.dev/pkg/tracing (# 15982)
  > 7d6d830 Update net-contour nightly (# 15986)
  > d34d283 Update net-kourier nightly (# 15985)
  > c02fe66 Update net-istio nightly (# 15983)
bumping knative.dev/eventing f1916c1...3bdae0a:
  > 3bdae0a drop use of tracing config map in webhook (# 8653)
  > 51710e2 [main] Upgrade to latest dependencies (# 8652)
bumping knative.dev/networking edb1a4a...e0e80d6:
  > e0e80d6 upgrade to latest dependencies (# 1073)

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-06 02:20:48 +00:00
David Fridrich 7fb68ef9d6
drastically simplify the components update (#2959)
- now runs in update-deps.sh
- only need to modify json and autogen script
2025-08-05 10:43:45 +00:00
Kapil Sareen 2e49dd0de8
mcp: adds remote template support (#2951)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-08-05 07:13:45 +00:00
Knative Automation df09ae9ec9
upgrade to latest dependencies (#2963)
bumping github.com/spf13/pflag 5ca8134...f9cbdd9:
  > f9cbdd9 Merge pull request # 348 from max-frank/add-time-flag-support
  > 1c62fb2 Merge pull request # 431 from LeGEC/430-fix-usage-message-for-func-flags
  > e3be2eb Reduce duplication by forwarding to sibling functions
  > 8a6c85f Merge pull request # 409 from ShawnJeffersonWang/master
  > 1a4b5b2 fix discrepancy in order of arguments for Func() and BoolFunc() # 433
  > 7cc25e3 Don't export `TimeValue` (yet)
  > bca0664 Merge pull request # 429 from LeGEC/426-add-func-and-bool-func
  > f9b6619 fix: add test for argument length check
  > 4730aa0 fix help message for Func and BoolFunc flags # 430
  > d15848d Remove unnecessary time test stderr dev null redirect
  > 196624c Merge pull request # 418 from hujun-open/master
  > 69bc3bd add support for Func() and BoolFunc() # 426
  > 7104d90 fix: correct argument length check in FlagSet.Parse
  > f4c97c2 minor: fix typos in comments
  > c5ce22e Use time.Time for expectations in time flag tests
  > 7322552 Merge pull request # 424 from valdar/issue/423
  > 011db0c - update text_test.go based on PR review comments
  > 1992c5a Add support for time.Time flags
  > 957ea4b Merge pull request # 428 from co63oc/fix1
  > 9c97fad fix # 423 : Add helper function and some documentation to parse shorthand go test flags.
  > 2a2b77a Merge remote-tracking branch 'upstream/master'
  > d661846 Merge pull request # 425 from eth-p/error-structs
  > 155e7f3 Fix typos
  > 19c9c40 Merge pull request # 422 from MidnightRocket/fix-default-is-zerovalue-for-generic-value-type
  > aae8e19 Merge remote-tracking branch 'upstream/master'
  > 6ca66b1 test: Add tests for error structs
  > c963093 Improve readability for error in TestPrintDefaults
  > 1118d46 add support equivalent to golang flag.TextVar(), also fixes the test failure as described in # 368
  > ca5cf96 feat: Add getters to error structs
  > edb1664 Add better test for defaultIsZeroValue for generic Value type
  > 8d77158 feat: Use error structs for most returned errors
  > 9edfc8d Fix defaultIsZeroValue check for generic Value type
  > e926890 test: Commonly-returned error messages
bumping golang.org/x/crypto 3bf9d2a...459a9db:
  > 459a9db go.mod: update golang.org/x dependencies
  > 74e709a ssh: add AlgorithmNegotiationError
  > b3790b8 acme: fix TLSALPN01ChallengeCert for IP address identifiers
  > 1dc4269 acme: add Pebble integration testing
  > 97bf787 blake2b: implement hash.XOF
  > 952517d x509roots/fallback: update bundle
  > c6fce02 ssh: refuse to parse certificates that use a certificate as signing key
  > 0ae49b8 ssh: reject certificate keys used as signature keys for SSH certs
bumping knative.dev/pkg f6a99ac...2a0abb7:
  > 2a0abb7 Bump github.com/prometheus/client_golang from 1.22.0 to 1.23.0 (# 3225)
  > 5bfaba0 Bump the golang-x group with 3 updates (# 3217)
  > 032a2ec Bump sigs.k8s.io/yaml from 1.5.0 to 1.6.0 (# 3221)
  > 4c6fea7 Bump github.com/spf13/pflag from 1.0.6 to 1.0.7 (# 3219)
bumping knative.dev/serving ca4a998...95b1ace:
  > 95b1ace Bump chainguard-dev/actions in the github-actions group (# 15979)
  > efda2f6 upgrade to latest dependencies (# 15977)
bumping github.com/prometheus/client_golang d50be25...e4b2208:
  > e4b2208 Cut v1.23.0 (# 1848)
  > d9492af cut v1.23.0-rc.1 (# 1842)
  > aeae8a0 Cut v1.23.0-rc.0 (# 1837)
  > b157309 Update common Prometheus files (# 1832)
  > a704e28 build(deps): bump the github-actions group with 3 updates (# 1826)
  > c774311 Fix errNotImplemented reference (# 1835)
  > db4db7b Update runtime metrics for Go v1.23 and v1.24 (# 1833)
  > 99d380e Update common Prometheus files (# 1831)
  > f3ef320 Merge pull request # 1828 from prometheus/dependabot/go_modules/exp/github.com/prometheus/common-0.65.0
  > 5f451a4 Merge pull request # 1827 from prometheus/dependabot/go_modules/github.com/prometheus/common-0.65.0
  > 520c91a build(deps): bump github.com/prometheus/common in /exp
  > b0ace3d exp/api: Bubble up status code from writeResponse (# 1823)
  > cb60794 build(deps): bump github.com/prometheus/common from 0.64.0 to 0.65.0
  > c68532c Update common Prometheus files (# 1821)
  > f802256 Merge pull request # 1817 from prometheus/dependabot/github_actions/github-actions-9e57cb1b1f
  > 1c273ac Merge pull request # 1815 from prometheus/repo_sync
  > 2853758 build(deps): bump the github-actions group with 5 updates
  > 7c924b7 Simplify buf binary install (# 1814)
  > e9d599a Update common Prometheus files
  > 7ed72b7 fix: client prompt return on context cancellation (# 1729)
  > 730147d Cleaup Go modules (# 1813)
  > 90dc0f6 Update supported Go versions (# 1812)
  > d765890 Merge pull request # 1800 from prometheus/dependabot/go_modules/golang.org/x/net-0.38.0
  > d72eeef Merge pull request # 1808 from prometheus/dependabot/go_modules/github.com/prometheus/procfs-0.16.1
  > 19efc48 build(deps): bump golang.org/x/net from 0.35.0 to 0.38.0
  > c247081 Merge pull request # 1805 from prometheus/dependabot/go_modules/github.com/prometheus/client_model-0.6.2
  > 8423214 build(deps): bump github.com/prometheus/procfs from 0.16.0 to 0.16.1
  > 5fedba1 Merge pull request # 1807 from prometheus/dependabot/go_modules/golang.org/x/sys-0.32.0
  > f124486 build(deps): bump github.com/prometheus/client_model from 0.6.1 to 0.6.2
  > 6f383da Merge pull request # 1806 from prometheus/dependabot/go_modules/go.uber.org/goleak-1.3.0
  > 2db5bc8 Add exemplars for native histograms (# 1686)
  > ab6f400 build(deps): bump golang.org/x/sys from 0.30.0 to 0.32.0
  > 96a5ad6 test(registry): Add goleak-based goroutine leak detection (# 1797)
  > d8a1805 build(deps): bump go.uber.org/goleak from 1.2.0 to 1.3.0
  > 6f2e765 Merge pull request # 1809 from prometheus/repo_sync
  > 9b83d99 Merge pull request # 1799 from prometheus/dependabot/go_modules/tutorials/whatsup/golang.org/x/net-0.38.0
  > 2f65277 build(deps): bump the github-actions group with 2 updates (# 1804)
  > 1f5710d Update common Prometheus files
  > 34eaefd chore(ci): Fix flaky tests (# 1795)
  > 4131495 build(deps): bump golang.org/x/net in /tutorials/whatsup
  > 72eeefb feat(github-actions): add Go file change detection to golangci-lint workflow (# 1794)
  > f6c417a Add WrapCollectorWith and WrapCollectorWithPrefix (# 1766)
  > 7afba29 Merge branch 'release-1.22'
  > 81df5d1 Update common Prometheus files (# 1791)
  > fa1f7b7 Merge pull request # 1790 from prometheus/dependabot/github_actions/github-actions-ac4e748984
  > 6b5a0b5 Upgrade golangci-lint to v2 (# 1789)
  > aca9263 build(deps): bump the github-actions group across 1 directory with 3 updates
  > 0162a5b Merge pull request # 1786 from prometheus/dependabot/go_modules/github.com/prometheus/procfs-0.16.0
  > af4c77f Merge pull request # 1784 from prometheus/dependabot/go_modules/google.golang.org/protobuf-1.36.6
  > b8f4cc6 build(deps): bump github.com/prometheus/procfs from 0.15.1 to 0.16.0
  > 5aa253c Merge pull request # 1783 from prometheus/dependabot/go_modules/github.com/prometheus/common-0.63.0
  > 2d684c6 build(deps): bump google.golang.org/protobuf from 1.36.5 to 1.36.6
  > b00c53f Merge pull request # 1781 from prometheus/dependabot/go_modules/exp/github.com/prometheus/common-0.63.0
  > 3a56d3e build(deps): bump github.com/prometheus/common from 0.62.0 to 0.63.0
  > bb5d7a6 Merge pull request # 1782 from prometheus/dependabot/go_modules/exp/google.golang.org/protobuf-1.36.6
  > 5c02216 build(deps): bump github.com/prometheus/common in /exp
  > 2e8fbe6 Update common Prometheus files (# 1779)
  > 0bfbfb7 build(deps): bump google.golang.org/protobuf in /exp
  > a78cf0c Update common Prometheus files (# 1778)
  > adb915c Update common Prometheus files (# 1771)
  > 331dfab Merge pull request # 1776 from prometheus/dependabot/go_modules/tutorials/whatsup/golang.org/x/net-0.36.0
  > 45edd8a Merge pull request # 1770 from prometheus/superq/update_test_url
  > 4d3dcae build(deps): bump golang.org/x/net in /tutorials/whatsup
  > 93a67cb Update example test
bumping golang.org/x/mod 9d33331...ea04085:
  > ea04085 go.mod: update golang.org/x dependencies
bumping golang.org/x/text 8072180...b6d2645:
  > b6d2645 go.mod: update golang.org/x dependencies
bumping golang.org/x/term 2ec7864...30da5dd:
  > 30da5dd go.mod: update golang.org/x dependencies
bumping golang.org/x/sync 8a14946...7fad2c9:
  > 7fad2c9 errgroup: revert propagation of panics
bumping knative.dev/eventing 88be38a...f1916c1:
  > f1916c1 [main] Upgrade to latest dependencies (# 8650)
bumping golang.org/x/net 6e41cae...76358aa:
  > 76358aa go.mod: update golang.org/x dependencies
bumping sigs.k8s.io/yaml 0f318dc...048d724:
  > 048d724 Merge pull request # 132 from thockin/master
  > 23c836c Bolster tests, mostly in error-handling
  > 2e3340b Add compact output tests
  > 4a4f539 Add test case for tabs in multi-line strings
  > 13509ad Change which methods get a newline and fix tests
  > 59c2c43 Add compact mode so KYAML can be used in more places
  > abc1add kyaml: Implement escaping closer to YAML spec
  > 7749171 Add a yamlfmt cmd
  > a932007 Add KYAML support

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-05 07:02:44 +00:00
Matej Vašek 80d05981a8
fix: Python host builder base image version (#2965)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-08-04 22:57:44 +00:00
Matej Vašek 719b2863ca
Fix backward compat Python pack build (#2962)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-08-02 07:22:41 +00:00
Matej Vašek 5f7666213c
Fix for arm64 buildpacks (#2961)
There is a bug paketo-buildpacks/packit/issues/650.
This commits mitigates the issue by explicitly setting the arch.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-08-02 07:11:41 +00:00
Knative Automation f889e2cc93
upgrade to latest dependencies (#2954)
bumping knative.dev/pkg 19d3cc2...f6a99ac:
  > f6a99ac Bump google.golang.org/grpc from 1.73.0 to 1.74.2 (# 3222)
  > 0c4867c Bump go.opentelemetry.io/otel/exporters/prometheus from 0.59.0 to 0.59.1 in the otel group (# 3223)
bumping knative.dev/eventing 7ea8857...88be38a:
  > 88be38a [Automated] Update eventing-eventing-integrations nightly (# 8648)
bumping knative.dev/serving 5765200...ca4a998:
  > ca4a998 Update net-contour nightly (# 15975)
  > 0ee4c91 Update net-gateway-api nightly (# 15973)
  > 1c89c37 Update net-istio nightly (# 15974)
bumping cloud.google.com/go/compute/metadata c116c79...2e6a95e:
  > 2e6a95e pubsub: fix flaky streaming retry test
  > 581b839 pubsub: check early if streaming iterator is already drained
  > cc13a9b spanner: fix time.Time comparisons for upcoming Go1.9 monotonic times
  > 1ba9ec4 spanner: remove most logging from tests
  > 11737a0 spanner: skip some tests in short mode
  > 7bcba8a datastore: DRY up loading entity code
  > df9740f regenerate toolkit client
  > 960c768 trace: export tracing scopes
  > 8b0ab47 logadmin: retry on CreateMetric and UpdateMetric
  > 2066696 trace: clarify how gRPC options work
  > 8ccb9da storage: clean up integration tests
  > e64d7f0 storage: support per-object storage class
  > 8c9328e storage: omit bucket from copy attributes
  > a60f1cd .travis.yml: add 1.8
  > 7829099 bigtable: give more time to integration test
  > 0a87edb vision: mark as beta
  > 1acdf4a bigtable: Add ability to create table with initial splits
  > 2a6bd99 vision: improve tests
  > bc86f93 vision: rename FullText to DocumentText
  > 681a0fc vision: add full text (document) detection
  > d526dfa vision: set client version
  > 78582c9 vision: update for vision 1.1
  > d863e7b trace: fix the gRPC error message assertions
  > 686a2d1 kokoro: name build artifact after gerrit revision
  > 51b5d60 kokoro: set -o pipefail
  > f47eb49 datastore: docs and test cleanup
  > c7e7950 bigquery: Integration test with nested types.
  > dffd606 bigquery: Remove extraneous newline
  > 909e1f6 bigquery: Force location of returned timestamps to be UTC
  > 1a6cf6f all: refactor authn/authz examples, add notices to subpackages
  > d063553 kokoro: don't run integration tests
  > 34d4e09 CONTRIBUTING: describe initialization for spanner tests
  > d803665 bigquery: detect recursive types correctly during schema inference
  > 65d0f1e bigquery: omit nil repeated struct fields on upload
  > 5e7b3ea pubsub: support streaming pull
  > e7389bf datastore: add x-goog-api-client header
  > b39420d spanner: add x-google-api-client header
  > 02ed701 errors: report repo version
  > 3bd2af3 kokoro: push build log to GCS as artifact
  > a2550fd Fix comment that referred to missing method
  > c48bdec trace: fix broken build
  > 9aed268 internal/fields: adds ability to specify leaf types in call to NewCache
  > a39e88b bigtable/bttest: fix the cells ordering problem in emulator.
  > 9b68cf4 kokoro: support integration tests, move config to internal storage
  > 1ed2f0a trace: allow users to create root-level spans without a request
  > 1eabf37 trace: always use host to name spans
  > 6521623 trace: error messages shouldn't end with punctuation
  > 0b87d14 regenerate toolkit clients
  > a36575d storage: set storage service endpoint if set in options
  > e48f2a3 README: add news item for Spanner.
  > a632a5b spanner: fix the exported constant group
  > e4de3dc Cloud Spanner: revert the usage of T.Run() and B.Run()
  > f7b7a16 spanner: make timebound test location-independent
  > 9a01a6c spanner: remove single-line comment cruft in package doc
  > e62b316 spanner: add import path comment, missing license comments
  > 5f6a7ae Cloud Spanner: check in the Cloud Spanner Go client
  > 9b55a8f datastore: simplifies load logic
  > e3c8d4a don't use regexp in internal/version
  > 493be1e storage: fix retry in NewRangeReader on non-2xx responses
  > 5c2083b storage: add WRITER role constant
  > fb73f3a multiple: set client header for generator-based clients
  > 513b07b trace: fix the formatting of the package doc
  > f5cbda1 trace: Add a way to create a span directly from the header value.
  > 0a668fa datastore: if nested struct implements PLS, use it
  > ce65057 cmd/go-cloud-debug-agent: plumb context
  > 3258e69 cmd/go-cloud-debug-agent: exit with code 103 when failing to get application default credentials
  > dd09098 kokoro: adds integration tests to build script
  > a28e325 datastore: fix get internal error when many missing entities
  > 7458748 bigtable: Add create/delete instance to InstanceAdminClient
  > 38283be CONTRIBUTING: adds description of amending changes
  > 2fad13a Slight modification to documentation for pubsub.
  > cd0da87 datastore: add field name keys to protobuf struct literals
  > 466326a CONTRIBUTORS: adds Magnus Hiie
  > 55be5ff bigtable/bttest: Fix DrowRowRange in emulator
  > 46a19d5 bigtable: Be consistent about truncating timestamps.
  > 70d0953 bigtable: Retry on internal errors
  > a370663 datastore: adds DistinctOn support
  > 302910d internal/kokoro: adds continuous.cfg
  > 81b7822 bigtable/bttest: Support ValueRangeFilter and ConditionFilter
  > 6e019fe storage: remove retry from writes
  > a5e721b kokoro: fixes build.sh script
  > a4b1dac bigtable/cmd/cbt: allow overriding TLS certificate chain
  > 66ede4d kokoro: initial setup
  > bacaab6 datastore: handle deferred keys
  > b4ca3d4 bigquery: fix TableExpiration table option
  > b2d9c15 bigquery: add TimePartitioning create table option
  > 54dc627 bigquery: fix table view creation for standard SQL
  > c96c448 CONTRIBUTING.md: Add note about putting codereview tool in PATH.
  > 641b146 regenerate toolkit clients
  > 3a104a7 datastore: update broken doc examples
  > 09686df bigquery: retry Uploader.Put on transient errors.
  > fa26143 bigtable: better messaging for possibly flaky test
  > e0ba508 bigquery: create nested maps when reading a row into a map
  > 4e43699 bigquery: improvements to documentation
  > 3c4c8cc pubsub: fix link to push config attrs
  > 686f0e8 README: add TOC
  > ce810af pubsub: fix test breakage due to go 1.6 time.Duration.String
  > 21c8221 README: add snippet for ADC
  > ef3e445 bigtable: fix admin integration test in production
  > cd98f45 pubsub: nack on Message.Done(false)
  > 520ef37 update toolkit-generated clients
  > 954be29 README: fix language links
  > 526e6be bigtable: use gcloud config-helper for project and creds in cbt
  > 25fe0e2 bigquery: add autodetect support to load job
  > 0e0ec87 datastore: allow pointer to struct type fields
  > 5947c6a version: a common place for version info for headers
  > 78759a6 logging: avoid sending zero latency for request entries
  > aec0e55 README: beta release
  > 310a9a2 logging: Bundler.Close is now Bundler.Stop
  > 05a6e09 bigquery: update package doc
  > 653cbe7 bigquery: update examples for tags, direct struct operations
  > fb7d280 bigquery: fix ValuesSaver for repeated nested fields
  > 933f7f3 bigquery: upload of repeated nested fields
  > 9fd18ed datastore: adds support for top-level "__key__" field
  > 0f26f04 bigquery: load of repeated nested fields
bumping cel.dev/expr 6e3b3e0...9f069b3:
  > 9f069b3 Generated pb.go for eval.proto. (# 470)
  > 61fdabc Updated testsuite result_kind to use nested ErrorSet (# 469)
  > 5949a82 Add upb build targets for CEL C (# 467)
  > 57bfb7b Add tests for repeated enum field accesses (# 464)
  > 252372e Add typecheck tests for edge cases with free type parameters (# 463)
  > 350d5e2 Add tests for type identifiers for time types (# 465)
  > 245748f Add corner test cases related to optional values and maps to codify behavior (# 462)
  > 8309f96 Add/update missing function documentation (# 461)
  > ae30eaa Revert "Remove Unicode space handling from <string>.trim()" (# 460)
  > a004222 Change optional_string field to be optional string type in test_all_types (# 458)
  > c9a2829 Restore duration string conversion supported suffixes (# 459)
bumping golang.org/x/sys 3d9a6b8...751c3c6:
  > 751c3c6 unix: add missing NFT_PAYLOAD_* consts on linux
  > 0c740cc unix: update Go to 1.24.3
  > d62d31c unix: update Linux constants and types to v6.14
bumping github.com/prometheus/procfs cff69b9...61fe412:
  > 61fe412 Fix linting issues (# 734)
  > 61fb25b Add node_guid to infiniband class (# 665) (# 670)
  > ee6ea54 feat: parse StartCode, EndCode, and StartStack in /proc/pid/stat (# 659)
  > 0bcdc45 added zswap, zswapped, secpagetables, filehugepages, hugetlb and unaccepted to meminfo (# 655)
  > a5f79dd Nvidia/Mellanox expose ROCE ECN information on sysfs on the path (# 695)
  > c5a546e feat(mdstat): recognize reshape status (# 679)
  > 0cf1234 Fix linting issue (# 733)
  > 2b1359d parse.go: fix GetDeviceInfo/LayoutGet ordering -- previously had values swapped (# 726)
  > 6176818 sysfs: Add support to collect link status for  PCIe devices (# 728)
  > 0f247ba Update common Prometheus files (# 727)
  > 0e4338f exposing ControllerID (# 731)
  > 65857f3 build(deps): bump golang.org/x/sync from 0.14.0 to 0.15.0 (# 732)
  > 28d508d Supports collection of process shared memory (# 719)
  > 588b88c build(deps): bump golang.org/x/sys from 0.32.0 to 0.33.0 (# 723)
  > d9705f6 build(deps): bump golang.org/x/sync from 0.13.0 to 0.14.0 (# 724)
  > 367ae03 btrfs: correct allocation ratios for raid1c[34] (# 722)
  > 6dab0ae Update common Prometheus files (# 721)
  > 369f902 Update common Prometheus files (# 718)
bumping google.golang.org/grpc c52d025...e9e00cb:
  > e9e00cb Change version to 1.74.2 (# 8470)
  > bd7cb0a Change version to 1.74.2-dev (# 8461)
  > 002a22c Change version to 1.74.1 (# 8455)
  > 6e8e7e4 Retract v1.74.0 and v1.74.1 (# 8457)
  > 48c9e4d Change version to 1.74.1-dev (# 8408)
  > b8b6cff Change version to 1.74.0 (# 8407)
  > 077e2c3 Cherry-pick # 8411, # 8419, # 8422, # 8445 and # 8451 to v1.74.x (# 8454)
  > b34f845 server: allow 0s grpc-timeout header values, as java is known to be able to send them (# 8439) (# 8440)
  > 1787f94 xdsclient: export genericResourceTypeDecoder (# 8406)
  > 15299cc xdsclient: make a function to return the supported resource type implementations (# 8405)
  > 20bd1e7 grpc: revert # 8278: Fix cardinality violations in non-server streaming RPCs (# 8404)
  > bdbe6a2 examples/opentelemetry: demonstrate enabling experimental metrics (# 8388)
  > 0100d21 outlierdetection: cleanup temporary pickfirst health listener attribute (# 8402)
  > bbaca7a stub: Add child balancer in stub.BalancerData (# 8393)
  > e5de1e2 xdsclient_test: Avoid restarting listener in TestServerFailureMetrics_AfterResponseRecv (# 8399)
  > 9c62b1c xds: Fix flaky test HandleListenerUpdate_ErrorUpdate (# 8397)
  > 042139c xds_test: Avoid buffering ack requests in ADS streams (# 8395)
  > 082a927 xds: Roll forward xdsclient migration (# 8391)
  > 5f8fe4f github: Add workflow to replace mergeable (# 8401)
  > 57400b4 roundrobin: Remove unnecessary ExitIdle override (# 8390)
  > a64d933 grpc: Fix cardinality violations in  non-server streaming RPCs (# 8278)
  > d2e8366 xds: revert # 8310: migration of xdsclient to use generic client and dedicated LRS client
  > af0f88e add spiffe config (# 8384)
  > 996aabe xds: migrate internal xdsclient to use generic client and dedicated LRS client (# 8310)
  > ec91b2e xds: Remove temporary environment variable for least request (# 8248)
  > 9319d72 cmd/protoc-gen-go-grpc: use `Error()` since no formatting is performed (# 8378)
  > f6bf86c Add flag guarding SPIFFE Bundle provider (# 8343)
  > 6dfe07c balancer: Make ExitIdle compulsory for Balancers (# 8367)
  > 8d1e6e2 deps: update dependencies for all modules and fix revive findings (# 8372)
  > 9b7bd34 grpc: introduce new Dial and Server Options to set static window size (# 8283)
  > 643bd63 xds/internal: update generic grpctransport codec name to  proto (# 8368)
  > 4275c5b transport: Re-use slice buffer reader for a stream (# 8360)
  > ec4810c grpc: Fix cardinality violations in client streaming and unary RPCs (# 8330)
  > fb223f7 transport: Optimize heap allocations (# 8361)
  > f947a86 balancer/ringhash: Add experimental notice in package comment (# 8364)
  > 05d49d0 [interop client] provide a flag to set google-c2p resolver universe domain (# 8145)
  > 28128e0 xdsclient: Fix flakyness in `TestResourceUpdateMetrics` in the case of repeated NACKs (# 8363)
  > 4cab0e6 balacergroup: cleanup exitIdle() (# 8347)
  > e3ca7f9 xdsclient: fix unexpectedly large LoadReportInterval in initial load report request (# 8348)
  > 443caad delegatingresolver: avoid proxy for resolved addresses in NO_PROXY env (# 8329)
  > 32e57de Rename PSM interop fallback test suite to light (# 8350)
  > 6995ef2 internal/transport: Wait for server goroutines to exit during shutdown in test (# 8306)
  > aaabd60 deps: update dependencies for all modules (# 8331)
  > 0c24af1 balancer/least_request : Fix panic while handling resolver errors (# 8333)
  > f2d3e11 Change version to 1.74.0-dev (# 8324)
  > 1ecde18 xds: generic xds client ads stream tests (# 8307)
  > 5c0d552 removing unused code (# 8316)

Signed-off-by: Knative Automation <automation@knative.team>
2025-08-01 10:18:41 +00:00
github-actions[bot] c7c55da940
chore: update Springboot platform version to 3.5.4 (#2958)
Co-authored-by: Knative Automation <automation@knative.team>
2025-08-01 09:21:41 +00:00
github-actions[bot] 21ab7f4ead
chore: update Quarkus platform version to 3.25.0 (#2957)
Co-authored-by: Knative Automation <automation@knative.team>
2025-07-31 11:58:40 +00:00
Rayyan 5ec715f7ac
fix: update console output to show both host and port (#2953)
* fix: update console output to show both host and port using net.JoinHostPort

Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>

* test: update regex to match new 'Function running on' output format

Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>

* fix(e2e): parse only port from 'Function running on' output

Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>

---------

Signed-off-by: RayyanSeliya <rayyanseliya786@gmail.com>
2025-07-30 05:27:39 +00:00
David Fridrich bdaa7df1e0
linter-fix (#2950) 2025-07-27 12:26:36 +00:00
Luke Kingland d04ff0a378
fix: mismatched container fs permissions (#2946) 2025-07-24 10:54:08 +00:00
github-actions[bot] e06397d5c7
chore: update CA bundle (#2948)
Co-authored-by: Knative Automation <automation@knative.team>
2025-07-24 09:12:09 +00:00
Knative Automation 285913345a
upgrade to latest dependencies (#2920)
bumping knative.dev/pkg 8481e7e...19d3cc2:
  > 19d3cc2 upgrade to latest dependencies (# 3218)
  > a4cc1bd drop dependency on metrics package (# 3215)
  > d3550d4 Update community files (# 3214)
  > ab9aaa0 also add json keys to the top level config (# 3213)
  > 264afa3 add json struct tags to the observability configs (# 3212)
  > 3eb1089 [webhook] enrich webhook traces (# 3209)
  > 16de760 split off pprof server that accepts a configmap (# 3210)
  > ff153ad [controller/observability] adjust metrics reporting for the two lane queue (# 3206)
  > fdc3131 pass options to the TracerProvider constructor (# 3208)
  > d601f66 allow for stdout exporter for tracing - to allow for debugging (# 3207)
  > e959f44 [controller] OTel instrumentation (# 3201)
  > f478764 [webhook] OTel changes (# 3189)
  > 7a5377f Drop OpenCensus use in various test packages (# 3202)
  > 9f3f014 wire zap into the client-go logger (# 3205)
  > 9435aa6 [observability/resource] fix service name calculation (# 3204)
  > 68cdb02 shutdown must be called explicitly since pprof listen is part of the errgroup (# 3203)
  > 13b2dc9 [observability] Default missing endpoint scheme to HTTPS (# 3200)
  > 434d221 When shutting down the OTel providers have a ten second timeout. (# 3199)

Signed-off-by: Knative Automation <automation@knative.team>
2025-07-24 06:05:09 +00:00
github-actions[bot] 27caba92af
update components (#2945)
Co-authored-by: Knative Automation <automation@knative.team>
2025-07-24 05:52:09 +00:00
Kapil Sareen 0157893d8e
mcp: adds labels and envs config tools and resources (#2931)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-07-24 01:22:09 +00:00
github-actions[bot] 860e063c85
update components (#2943)
Co-authored-by: Knative Automation <automation@knative.team>
2025-07-23 21:53:08 +00:00
github-actions[bot] c41c9022a2
chore: update Quarkus platform version to 3.24.5 (#2944)
Co-authored-by: Knative Automation <automation@knative.team>
2025-07-23 21:35:08 +00:00
Luke Kingland a3dac70419
docs: python update (#2932) 2025-07-22 22:38:07 +00:00
Luke Kingland 837988484f
Remove deprecated DSA support (#2941) 2025-07-22 20:55:07 +00:00
Knative Automation 6d85dee462
Update community files (#2922)
Signed-off-by: Knative Automation <automation@knative.team>
2025-07-22 14:27:07 +00:00
David Fridrich 4c0fa017b7
feat: func invoke get requests (#2942) 2025-07-22 13:18:07 +00:00
Kapil Sareen f096936c98
mcp: refactors pkg for easy maintainability (#2928)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-07-14 05:56:08 +00:00
David Fridrich 211df1657f
base builder flag (#2935) 2025-07-11 19:58:06 +00:00
Matej Vašek 30315ea15e
test: simplify func-git service (#2926)
Use k8s primitives pod/svc/ingress instead of knative service.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-11 19:02:06 +00:00
Matej Vašek 589bbe80fe
Update tekton (#2934)
* Update Tekton to v1.1.0

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Quote a string in yaml

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Update git-clone task version

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* test: disable affinity assistant for cluster

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Quote a string in yaml

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Revert "Update git-clone task version"

We still need the older rootfull version.

This reverts commit 4bc82681c1.

* fix: change tekton git-clone task ref to ghcr.io

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Update PaC version

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Remove unnecessary quoting

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-11 18:14:07 +00:00
Matej Vašek 7799a697cf
Rootless func-git pod (#2927)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-10 00:47:04 +00:00
github-actions[bot] 00535383aa
chore: update Quarkus platform version to 3.24.3 (#2930)
Co-authored-by: Knative Automation <automation@knative.team>
2025-07-09 19:17:04 +00:00
Matej Vašek 5a6b4dcb5a
Tests: dualstack improvements (#2919)
* Make patch-hosts ip version aware

Add A and AAAA records for localtest.me depending on whether
the control plane node has IPv4 and/or IPv6 address.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Make test locabalancer ip version aware

Set MetalLB address pool appropriately with respect to IPv4 and IPv6

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-09 18:58:04 +00:00
Kapil Sareen e3759ec0fb
mcp: adds tool and resource for config volumes (#2925)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-07-09 01:11:03 +00:00
Matej Vašek d9389fb2fb
Tests: small ipv6 fixes (#2923)
* Tests: small ipv6 fixes

* Testing gitlab instance listens on ipv6
* Testing Contour installation prefers dualstack

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: listen explicitly on 0.0.0.0

Usually listening on '::' should also listen on 0.0.0.0.
However gitlab or nginx apparently employ IPV6_V6ONLY option so '::'
listens only on '::'.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-08 20:06:03 +00:00
Matej Vašek 6a3ef466f4
fix: refer correct version of schema in func.yaml (#2924)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-08 18:11:02 +00:00
Kapil Sareen 630064caef
mcp: adds resources and prompts for func subcommands (#2890)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-07-08 11:32:02 +00:00
Matej Vašek bb1623fc78
Use localtest.me instead of sslip.io (#2918)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-07 13:49:00 +00:00
Luke Kingland 668175bdcc
Readme update to add link to project roadmap (#2916) 2025-07-03 08:41:55 +00:00
Luke Kingland 6dae0f4604
chore: reduce logging verbosity in mocks (#2913) 2025-07-03 08:14:09 +00:00
Luke Kingland 713aabb666
chore: use stderr for logging in pipelines pkg (#2912) 2025-07-03 08:14:02 +00:00
Luke Kingland c1358dada1
chore: fix build and test tags (#2911)
The current build tagging system was predicated on the idea that
integraion, e2e and unit tests are entirely separate.  The correct way
to treat these is as inclusive with unit tests.  Thus this pr removes
the exclusion of unit test from integration tests runs, treating -tags
integration as indicating "unit tests plus integration tests".
2025-07-03 08:13:55 +00:00
Luke Kingland 7eeef5785a
chore: fix integration test filenames (#2914) 2025-07-03 09:56:25 +02:00
Luke Kingland 96269d0308
chore: adds makefile target for embedded FS check (#2915) 2025-07-03 06:14:55 +00:00
Matej Vašek 879233d668
fix: Python local buildpack build (#2907)
* fix: Python local buildpack build

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fix: sane default for LISTEN_ADDRESS in pack build

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-03 00:34:01 +00:00
Luke Kingland 18a119abff
integration test isolation (#2894)
- Default builder and pusher set to embedded Host Builder/Pusher(oci)
- Most tests clear environment
- Environment defaults can be controlled via environment variables
- Tests which require back-compat `git` binary actively check and skip
  when running with a cleared environment (both integration and unit).
- Bugfixes for when run in tandem with E2E tests
- Ignores go-created directories in the default home path (testdata)
2025-07-03 00:33:54 +00:00
Jefferson Ramos a18f763b6a
test: granting more time to subscriber e2e test before http test trigger, to prevent 503 on some cases (#2909) 2025-07-03 00:05:54 +00:00
github-actions[bot] 00fb58a3d9
chore: update Quarkus platform version to 3.24.2 (#2908)
Co-authored-by: Knative Automation <automation@knative.team>
2025-07-02 12:39:54 +00:00
Matej Vašek 648c7cd346
doc: prefer ipv6 in sample instead of ipv4 (#2905)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-02 08:55:54 +00:00
github-actions[bot] f9ab674651
update components (#2906)
Co-authored-by: Knative Automation <automation@knative.team>
2025-07-02 06:27:53 +00:00
Matej Vašek dfe2109f56
fix: return better error when using pack+python (#2904)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-01 09:20:53 +00:00
Luke Kingland 58fb81a41a
feat: add labels to func describe (#2882)
return typed error on describe of uninitialized Function

adds describe tests
2025-07-01 08:12:53 +00:00
Matej Vašek f9bf9fe9cc
fix: pass LISTEN_ADDRESS to runner (#2901)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-01 01:58:53 +00:00
Matej Vašek 65de4ac2fc
feat: Python,Go func listen dual-stack (#2898)
* feat: py func listen dual-stack

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fix: Go host built image listens on any iface

Previously it was listening only on localhost

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-07-01 00:38:52 +00:00
Luke Kingland a93cbe6785
feat: macos support for dev cluster scripts (#2897) 2025-06-30 11:42:10 +00:00
Luke Kingland 84d2ad08ad
feat: add noninteractive flow to labels config (#2886) 2025-06-30 09:49:17 +00:00
Luke Kingland 1b83f0b294
feat: improved error on remote deploy without local source (#2885) 2025-06-30 09:49:10 +00:00
Luke Kingland 9c992c9409
feat: add LISTEN_ADDRESS to Python default runner (#2880) 2025-06-30 08:37:11 +00:00
Luke Kingland 56e1b0f7f5
feat: add json output to func run (#2893) 2025-06-30 08:02:10 +00:00
Luke Kingland 69bdcbbecd
ci: install Tekton and PAC in cluster by default (#2896)
* ci: install Tekton and PAC in cluster by default

* add PAC and Tekton to hack script versions

* fix tekton affinity workaround
2025-06-30 07:50:16 +00:00
Luke Kingland ec66c1a496
feat: support FUNC_GO env in Host builder (#2877) 2025-06-30 07:50:10 +00:00
Knative Automation 243059b25b
upgrade to latest dependencies (#2895)
bumping knative.dev/serving a56b816...aa58baf:
  > aa58baf Update net-gateway-api nightly (# 15943)

Signed-off-by: Knative Automation <automation@knative.team>
2025-06-30 05:03:09 +00:00
Knative Automation c865638225
upgrade to latest dependencies (#2867)
bumping knative.dev/pkg 05e18ff...8481e7e:
  > 8481e7e parse the endpoint as a URL to allow paths (# 3197)
  > 7681e80 handle no views in the context (# 3196)
  > 5abfb10 [injection/sharedmain] OTel Support (# 3190)
  > 5e2512c New observability package (# 3188)
  > 4ec554b Bump sigs.k8s.io/yaml from 1.4.0 to 1.5.0 (# 3194)
  > 0285e29 group otel updates (# 3193)
  > fe85a65 drop unused functions in webhook testing (# 3191)
  > fd105c6 refactor webhook testing (# 3186)
  > fe477b7 drop cert-manager from downstream tests (# 3187)
bumping go.opentelemetry.io/otel/trace 5ba5e7a...69e8108:
  > 69e8108 Release 1.37.0/0.59.0/0.13.0 (# 6925)
  > 67ca271 chore(deps): update golang.org/x/telemetry digest to fef9409 (# 6929)
  > b4fad0a chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.27.1 (# 6930)
  > 553779c chore: add missing ) in GPG hyperlink (# 6928)
  > 351a51f Use existing schema URLs in tests (# 6924)
  > a365d85 Add test for logging from a span in the opentracing bridge (# 6919)
  > 787518f chore(deps): update google.golang.org/genproto/googleapis/rpc digest to 513f239 (# 6922)
  > fbfb44a chore(deps): update golang.org/x (# 6923)
  > 98f7693 chore: flatten bridge/opentracing/internal package (# 6916)
  > 1b803e1 fix(deps): update module github.com/prometheus/common to v0.65.0 (# 6921)
  > 770617c chore(deps): update golang.org/x/telemetry digest to 90b6ad3 (# 6918)
  > 2da77b1 Ensure context cancellation during metric pipeline produce does not corrupt data (# 6914)
  > 1dc9644 fix(deps): update golang.org/x to b7579e2 (# 6917)
  > 0150494 chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.27.0 (# 6913)
  > c91b3fc chore(deps): update module github.com/charmbracelet/x/ansi to v0.9.3 (# 6912)
  > be4b9e7 chore(deps): update golang.org/x/telemetry digest to 8f04292 (# 6910)
  > 94ab03f Remove internal matchers (# 6907)
  > 2cce189 chore(deps): update module github.com/mgechev/revive to v1.10.0 (# 6841)
  > 7ec1adb chore(deps): update module github.com/go-viper/mapstructure/v2 to v2.3.0 (# 6906)
  > 4ebbbad Add release artifacts signing to the release process (# 6855)
  > 899c211 chore(deps): update module github.com/securego/gosec/v2 to v2.22.5 (# 6905)
  > 1cd3ddf logtest modules to be released with tags (# 6876)
  > cba6502 prometheus: validate exponential histogram scale range (# 6779) (# 6822)
  > f2058fa chore(deps): update python docker tag to v3.13.5 (# 6901)
  > cf7bc3e chore(deps): update golang.org/x/telemetry digest to e50bbf1 (# 6900)
  > a4055c2 Use the cause of the context error in OTLP retry (# 6898)
  > 55c7a70 chore(deps): update python:3.13.4-slim-bullseye docker digest to ec7d08e (# 6894)
  > 49da4db chore(deps): update module github.com/ldez/usetesting to v0.5.0 (# 6895)
  > 96ec0d8 chore(deps): update github/codeql-action action to v3.29.0 (# 6897)
  > 48dbaf8 chore(deps): update golang.org/x/telemetry digest to 9627e99 (# 6896)
  > 12c7d7e chore(deps): update python:3.13.4-slim-bullseye docker digest to faae1a8 (# 6891)
  > 5c2dff1 chore(deps): update module github.com/ldez/exptostd to v0.4.4 (# 6888)
  > 4d6b091 chore(deps): update python:3.13.4-slim-bullseye docker digest to 473d423 (# 6889)
  > bc531cb chore(deps): update golang.org/x/telemetry digest to 4884ade (# 6886)
  > 9955f1b fix(deps): update module go.opentelemetry.io/collector/pdata to v1.34.0 (# 6885)
  > 4ec5489 chore(deps): update golang.org/x/telemetry digest to 60998fe (# 6880)
  > c544baf Use more specific self-hosted runner name (# 6879)
  > 8965f1b chore(deps): update module github.com/ldez/gomoddirectives to v0.7.0 (# 6883)
  > 9ff85bb chore(deps): update module github.com/go-git/go-git/v5 to v5.16.2 (# 6884)
  > 0669ee0 fix(deps): update golang.org/x (# 6877)
  > 82397b2 Only check links in changed files for fail-fast workflow (# 6850)
  > 3d02ee7 chore(deps): update module github.com/sergi/go-diff to v1.4.0 (# 6875)
  > 12acd5b chore(deps): update module golang.org/x/text to v0.26.0 (# 6874)
  > 7a64229 fix(deps): update module google.golang.org/grpc to v1.73.0 (# 6873)
  > 229521d chore(deps): update golang.org/x (# 6872)
  > 9fabec1 chore(deps): update python docker tag to v3.13.4 (# 6871)
  > 1c98377 chore(deps): update module github.com/go-git/go-git/v5 to v5.16.1 (# 6870)
  > 11c9cfe chore(deps): update golang.org/x/telemetry digest to 9a9ac21 (# 6865)
  > e10c31a fix(deps): update googleapis to 513f239 (# 6867)
  > e4b1368 chore(deps): update github/codeql-action action to v3.28.19 (# 6866)
  > a99f9b5 sdk/log: Record.Resource to return *resource.Resource (# 6864)
  > 1636bcd fix(otlptrace,otlpmetric): remove endpoint URL path cleaning (# 6710)
  > 274e939 chore(deps): update module github.com/spf13/cast to v1.9.2 (# 6862)
  > 69613e4 Handle custom metric suffix in `exporter/prometheus` to match otel-contrib (# 6839)
  > 889a486 fix(deps): update golang.org/x to b6e5de4 (# 6860)
  > 3fe11a8 chore(deps): update module github.com/spf13/cast to v1.9.1 (# 6861)
  > ceb8daa fix(deps): update golang.org/x to 65e9200 (# 6859)
  > 246c46a chore(deps): update otel/weaver docker tag to v0.15.2 (# 6858)
  > 65ac8d1 chore(deps): update ossf/scorecard-action action to v2.4.2 (# 6857)
  > dc210e9 sdk/trace: Remove internaltest package (# 6846)
  > 8274f0e Add a CLO monitor exemption for Artifact Hub (# 6853)
  > 37bda2b Add the FOSSA license scan badge shield (# 6852)
  > a4afec7 chore(deps): update golang.org/x/telemetry digest to 25d2f78 (# 6851)
  > 20fe013 Checkout code for codecov upload (# 6849)
  > 801e771 fix(deps): update module go.opentelemetry.io/proto/otlp to v1.7.0 (# 6848)
  > c9c9929 chore(deps): update golang.org/x/telemetry digest to b2b9eea (# 6844)
  > b240b0a chore(deps): update module github.com/abirdcfly/dupword to v0.1.6 (# 6845)
  > 4e08cc3 fix(deps): update googleapis to 200df99 (# 6843)
  > e25861a Fix semconv instrument types (# 6837)
  > dea5295 Upgrade semconv to 1.34.0 in trace (# 6836)
  > 33eb582 Upgrade semconv to 1.34.0 in sdk/trace (# 6835)
  > cc26aaa Upgrade semconv to 1.34.0 in sdk/resource (# 6834)
  > 17741cb Upgrade semconv to 1.34.0 in sdk/metric (# 6833)
  > 91bf875 Upgrade semconv to 1.34.0 in metric (# 6832)
  > 38f3045 Upgrade semconv to 1.34.0 in exporters/prometheus (# 6831)
  > 3b28a1b Upgrade semconv to 1.34.0 in exporters/stdout (# 6830)
  > 31b44a2 Upgrade semconv to 1.34.0 in exporters/zipkin (# 6829)
  > bf8af6f Upgrade semconv to v1.34.0 for OTLP templates (# 6828)
  > 313073b Upgrade semconv to v1.34.0 in OpenTracing bridge (# 6827)
  > 261ed77 fix(deps): update module github.com/go-logr/logr to v1.4.3 (# 6842)
  > 3d0e98e Add migration doc generation to semconvgen (# 6819)
  > 106603b chore(deps): update module github.com/abirdcfly/dupword to v0.1.5 (# 6840)
  > 65b8067 log,sdk/log: add EventName to EnabledParameters (# 6825)
  > e186baa prometheus: remove otel_scope_info (# 6770)
  > ff4ec08 chore(deps): update otel/weaver docker tag to v0.15.1 (# 6838)
  > 6e90db5 chore(deps): update module github.com/golangci/plugin-module-register to v0.1.2 (# 6826)
  > e336757 fix(deps): update module go.opentelemetry.io/collector/pdata to v1.33.0 (# 6824)
  > aa5bd0e fix(deps): update module google.golang.org/grpc to v1.72.2 (# 6823)
  > 9f282a1 Fix/issue 6560 install trace bridge test (# 6814)
  > 69f189f prometheus: Add otel_scope_schema_url and otel_scope_[attribute] labels (# 5947)
  > 1dca080 chore(deps): update module github.com/sashamelentyev/usestdlibvars to v1.29.0 (# 6820)
  > 607db85 bridge/opencensus: add test for OTelSpanContextToOC function (# 6813)
  > e587b18 Semconv v1.34.0 (# 6812)
  > 616494b chore(deps): update module github.com/santhosh-tekuri/jsonschema/v6 to v6.0.2 (# 6818)
  > 38c78fb chore(deps): update module github.com/protonmail/go-crypto to v1.3.0 (# 6817)
  > b16def2 chore(deps): update module github.com/jgautheron/goconst to v1.8.2 (# 6815)
  > 3dbeaca Generate `semconv/v1.33.0` (# 6799)
  > 678d2f1 Update the required approvals policy (# 6783)
  > 482086a chore(deps): update python:3.13.3-slim-bullseye docker digest to f0acec6 (# 6810)
  > 0fc383a Release log/v0.12.2 (# 6806)
  > a571bc1 remove internal/matchers (# 6777)
  > 07d9cab chore(deps): update python:3.13.3-slim-bullseye docker digest to 45338d2 (# 6807)
  > b64535e Retract v0.12.0 for log exporters (# 6804)
  > 4c7da64 Fix broken link in changelog (# 6805)
  > 355c8cc Release experimental logs 0.12.1 (# 6802)
  > c359e91 Fix dependencies to unreleased sdk/logtest (# 6800)
  > a85ae98 Release v1.36.0/v0.58.0/v0.12.0 (# 6793)
  > 3f85c35 logtest: add Desc (# 6796)
  > d2fff76 chore(deps): update module github.com/uudashr/iface to v1.4.0 (# 6798)
  > 2d4c9dc Add `semconv/v1.32.0` (# 6782)
  > fe523bd logtest: add Transform (# 6794)
  > e578799 fix(deps): update googleapis to 55703ea (# 6795)
  > af189e5 chore(deps): update module github.com/golangci/misspell to v0.7.0 (# 6792)
  > 836a2ce chore(deps): update module github.com/alecthomas/chroma/v2 to v2.18.0 (# 6790)
  > 93f8f13 chore(deps): update github/codeql-action action to v3.28.18 (# 6789)
  > 1556ff2 chore(deps): update codecov/codecov-action action to v5.4.3 (# 6785)
  > 88f9885 chore(deps): update golang.org/x/telemetry digest to 98a4f3d (# 6784)
  > a5c4ae5 fix(deps): update module github.com/prometheus/common to v0.64.0 (# 6781)
  > a571c52 all: replace math/rand with math/rand/v2 (# 6732)
  > f410084 propagation: extract of multiple header values (# 5973)
  > 0385f83 chore(deps): update fossas/fossa-action action to v1.7.0 (# 6776)
  > 4d08c1c fix(deps): update module google.golang.org/grpc to v1.72.1 (# 6775)
  > 8a1b0e7 chore(deps): update module github.com/uudashr/iface to v1.3.2 (# 6773)
  > bf7ffa3 log/logtest: Add AssertEqual and remove AssertRecordEqual (# 6662)
  > 5cd1611 otlptracehttp: Add WithHTTPClient option (# 6751)
  > b665425 otlpmetrichttp: Add WithHTTPClient option (# 6752)
  > d468af2 fix(deps): update module go.opentelemetry.io/collector/pdata to v1.32.0 (# 6767)
  > 6c192a4 fix(deps): update googleapis to 5a2f75b (# 6766)
  > cd4819b chore(deps): update lycheeverse/lychee-action action to v2.4.1 (# 6761)
  > 7a1750f chore(deps): update module github.com/abirdcfly/dupword to v0.1.4 (# 6765)
  > 22c7810 chore(deps): update module github.com/manuelarte/funcorder to v0.5.0 (# 6762)
  > ef00c71 chore(deps): update python:3.13.3-slim-bullseye docker digest to 9e3f924 (# 6763)
  > b315c21 chore(deps): update module github.com/securego/gosec/v2 to v2.22.4 (# 6759)
  > ce99f3f chore(deps): update golang.org/x/telemetry digest to 155ddd5 (# 6753)
  > c24fdba chore(deps): update module dario.cat/mergo to v1.0.2 (# 6755)
  > df14048 chore(deps): update actions/setup-go action to v5.5.0 (# 6758)
  > 14bc7af chore(deps): update module github.com/jjti/go-spancheck to v0.6.5 (# 6749)
  > cf8179a otlploghttp: Add WithHTTPClient option (# 6688)
  > 4895ae6 fix(deps): update golang.org/x (# 6748)
  > 7a18e17 fix(deps): update module golang.org/x/tools to v0.33.0 (# 6747)
  > 0739b86 chore(deps): update github/codeql-action action to v3.28.17 (# 6745)
  > caf4740 fix(deps): update golang.org/x (# 6746)
  > 796c247 chore(deps): update actions/upload-artifact action to v4.6.2 (# 6744)
  > 67fc4d7 chore(deps): update actions/setup-go action to v5.4.0 (# 6742)
  > efd7284 chore(deps): update actions/stale action to v9.1.0 (# 6743)
  > b93133a fix(deps): update googleapis to f936aa4 (# 6741)
  > c4d4633 chore(deps): update actions/download-artifact action to v4.3.0 (# 6740)
  > 172c4ad chore(deps): update actions/checkout action to v4.2.2 (# 6739)
  > d4a557c chore(deps): update peter-evans/create-issue-from-file action to v5.0.1 (# 6735)
  > 95fab57 chore(deps): update actions/cache action to v4.2.3 (# 6736)
  > 7ae449c Pin GitHub action digest with semver (# 6724)
  > 1d88248 all: match go conventions for generated code (# 6731)
  > a73e138 fix(deps): update module github.com/golangci/golangci-lint/v2 to v2.1.6 (# 6733)
  > 0227c63 chore(deps): update otel/weaver docker tag to v0.15.0 (# 6729)
  > 5679db3 chore(deps): update module github.com/spf13/cast to v1.8.0 (# 6728)
  > ec57cf4 chore(deps): update github/codeql-action digest to 60168ef (# 6727)
  > 6849a0a Remove harness from internaltest and add doc template (# 6599)
  > 7483f79 fix(deps): update build-tools to v0.23.1 (# 6719)
  > 96fe06d fix(deps): update module go.opentelemetry.io/proto/otlp to v1.6.0 (# 6720)
  > 9579111 chore(deps): update module github.com/alecthomas/chroma/v2 to v2.17.2 (# 6717)
  > 2deefec chore: Add OSS-Fuzz badge (# 6703)
  > 6302fe8 chore(deps): update python:3.13.3-slim-bullseye docker digest to d3f1e48 (# 6715)
  > f4373a8 chore(deps): update module github.com/sonatard/noctx to v0.3.3 (# 6716)
  > 12b0314 chore(deps): update module github.com/charmbracelet/x/ansi to v0.9.2 (# 6714)
  > bbedf1a chore(deps): update python:3.13.3-slim-bullseye docker digest to d344f2c (# 6711)
  > 6f2252f fix(deps): update build-tools to v0.23.0 (# 6713)
  > d8f73ce chore(deps): update python:3.13.3-slim-bullseye docker digest to 9fde509 (# 6708)
  > b4b461d fix(deps): update module go.opentelemetry.io/collector/pdata to v1.31.0 (# 6707)
  > 50ebeda fix(deps): update googleapis to 10db94c (# 6706)
  > 0c13d86 chore(deps): update module github.com/sonatard/noctx to v0.3.2 (# 6705)
  > 121585c chore(deps): update module github.com/tetafro/godot to v1.5.1 (# 6701)
  > f1fa85a chore(deps): update module github.com/sonatard/noctx to v0.3.0 (# 6700)
  > 2a9e97b fix(deps): update googleapis to 7b38467 (# 6699)
  > 2aa00b8 chore(deps): update module go-simpler.org/musttag to v0.13.1 (# 6696)
  > 2e49a0d fix(deps): update module github.com/golangci/golangci-lint/v2 to v2.1.5 (# 6697)
  > ebbd5dc chore(deps): update module github.com/charmbracelet/colorprofile to v0.3.1 (# 6695)
  > b68f9ab chore(deps): update actions/download-artifact digest to d3f86a1 (# 6694)
  > 0a87dc8 Fix tracestate benchmarks (# 6690)
  > ad2be8e chore(deps): update github/codeql-action digest to 28deaed (# 6692)
  > f134d07 fix(deps): update module google.golang.org/grpc to v1.72.0 (# 6679)
  > b9e3f32 Relax grpc errors to allow for upgrade (# 6685)
  > 5e4ff97 Fix semconv generation to support acronyms/initialisms and normative key words (# 6684)
  > 7fb32fb fix(deps): update googleapis to 2d3770c (# 6689)
  > 4d04669 chore(deps): update module github.com/alecthomas/chroma/v2 to v2.17.0 (# 6687)
  > 84d02c0 Do not discourage direct usage of Logs API (# 6675)
  > d6d9966 chore(deps): update module github.com/prometheus/procfs to v0.16.1 (# 6676)
  > 015d51a fix(deps): update googleapis to 61c742a (# 6681)
  > fdf7bec chore(deps): update module github.com/manuelarte/funcorder to v0.3.0 (# 6674)
  > 71361b9 chore(deps): update golang.org/x/telemetry digest to 06ef541 (# 6672)
  > 6b97711 Clarify comments for the `WithRetry` option in exporters (# 6670)
  > 3107d5c chore(deps): update golang.org/x/telemetry digest to dbf0ff6 (# 6671)
  > 7639c93 Update the milestone issue search URL (# 6651)
  > 3ec70fd chore(deps): update module github.com/go-git/go-git/v5 to v5.16.0 (# 6669)
  > 4464175 fix(deps): update module github.com/golangci/golangci-lint/v2 to v2.1.2 (# 6667)
  > f33c095 Rewrite verify_readmes.sh script in Go (# 6598)
  > 1ac6c6f fix(deps): update module go.opentelemetry.io/collector/pdata to v1.30.0 (# 6666)
  > bd1f09d chore(deps): update module github.com/ghostiam/protogetter to v0.3.15 (# 6665)
  > bf56274 chore(deps): update codecov/codecov-action action to v5.4.2 (# 6664)
  > d356635 fix(deps): update googleapis to 207652e (# 6663)
  > 80ce404 chore(deps): update module github.com/ldez/usetesting to v0.4.3 (# 6659)
  > 78de263 chore(deps): update module github.com/ldez/exptostd to v0.4.3 (# 6658)
  > 443fa2a chore(deps): update github.com/golangci/gofmt digest to f2e10e0 (# 6657)
  > ca9661c chore(deps): update module github.com/ghostiam/protogetter to v0.3.14 (# 6656)
  > cd9d7e9 chore(deps): update module mvdan.cc/gofumpt to v0.8.0 (# 6660)
  > 1f9051c fix(deps): update module github.com/golangci/golangci-lint/v2 to v2.1.1 (# 6654)
  > cfab89f fix(deps): update module github.com/golangci/golangci-lint/v2 to v2.1.0 (# 6653)
  > ba37ae0 log/logtest: Change Recorder.Result (# 6507)
  > b712da5 chore(deps): update module github.com/protonmail/go-crypto to v1.2.0 (# 6647)
  > 40025e5 chore(deps): update module github.com/go-git/go-git/v5 to v5.15.0 (# 6646)
  > 5adcee3 chore(deps): update module github.com/mgechev/revive to v1.9.0 (# 6650)
  > a6e302f sdk/log: remove unnecessary b.q.Len() call (# 6641)
  > 8fd3756 fix(deps): update module github.com/prometheus/client_model to v0.6.2 (# 6645)
  > 21e64db chore(deps): update otel/weaver docker tag to v0.14.0 (# 6643)
  > 0648b39 chore(deps): update module github.com/timonwong/loggercheck to v0.11.0 (# 6640)
  > d45384c fix(deps): update build-tools to v0.22.0 (# 6644)
  > cc43e01 chore: move functionality from internal/rawhelpers.go to attribute (# 6578)
  > a486ca5 sdk/trace: Move testing harness to trace (# 6589)
  > 1621644 fix(deps): update googleapis to de1ac95 (# 6634)
  > 3e23959 chore(deps): update module github.com/cloudflare/circl to v1.6.1 (# 6635)
  > a5abd88 Optimize Logs SDK BatchProcessor (# 6569)
  > 345d59b chore(deps): update python:3.13.3-slim-bullseye docker digest to 0d46ec7 (# 6632)
  > 9d8b616 Remove prometheus legacy validation warning (# 6590)
  > d146da5 chore(deps): update python docker tag to v3.13.3 (# 6631)
  > 9a208c6 chore(deps): update module github.com/butuzov/ireturn to v0.4.0 (# 6630)
  > 9b06c4c fix(deps): update golang.org/x/exp digest to 7e4ce0a (# 6629)
  > 6177165 chore(deps): update python:3.13.2-slim-bullseye docker digest to 81b94d2 (# 6628)
  > 1b26365 chore(deps): update golang.org/x/exp/typeparams digest to 7e4ce0a (# 6627)
  > e63b427 chore(deps): update module github.com/ccojocar/zxcvbn-go to v1.0.4 (# 6626)
  > 9dc2769 fix(deps): update module github.com/prometheus/client_golang to v1.22.0 (# 6625)
  > 9ae2409 chore(deps): update github/codeql-action digest to 45775bd (# 6621)
  > e0d4733 fix(deps): update googleapis to ac9807e (# 6619)
  > f987eec chore(deps): update module github.com/pelletier/go-toml/v2 to v2.2.4 (# 6620)
  > b1dd056 fix(deps): update golang.org/x (# 6622)
  > e7ea96e chore(deps): update python:3.13.2-slim-bullseye docker digest to e7c1229 (# 6623)
  > 96b9445 chore(deps): update github/codeql-action digest to fc7e4a0 (# 6618)
  > 0ed4af7 opencensus: add TestOCSpanContextToOTel (# 6600)
  > ec513a2 add extra test SetTag of a span in the opentracing bridge and don't use types, use string literals instead. (# 6597)
  > 9eff17c chore(deps): update module golang.org/x/crypto to v0.37.0 (# 6617)
  > f0261db chore(deps): update module go-simpler.org/sloglint to v0.11.0 (# 6616)
  > a58d9a5 fix(deps): update golang.org/x (# 6615)
  > c2b126b chore(deps): update module go-simpler.org/sloglint to v0.10.1 (# 6613)
  > 9a48143 fix(deps): update googleapis to ee84b53 (# 6612)
  > 65380be chore(deps): update module github.com/fsnotify/fsnotify to v1.9.0 (# 6614)
  > 0204e5e chore(deps): update module github.com/securego/gosec/v2 to v2.22.3 (# 6611)
  > bbccaa9 chore(deps): update golang.org/x/telemetry digest to 97abc5d (# 6605)
  > 0cbc3ec chore(deps): update module github.com/alingse/nilnesserr to v0.2.0 (# 6610)
  > 5a4ad1a chore(deps): update module github.com/firefart/nonamedreturns to v1.0.6 (# 6606)
  > 5feb660 chore(deps): update module go-simpler.org/sloglint to v0.10.0 (# 6608)
  > 75973ec exporters: prometheus: add exponential (native) histogram support (# 6421)
  > dceb2cd chore(deps): update module github.com/bombsimon/wsl/v4 to v4.7.0 (# 6607)
  > 5bf8691 Functionality moved from internal/attribute to attribute (# 6580)
  > f713339  openteracing: test SetTag and bridgeFieldEncoder in the opentracing bridge (# 6570)
  > fd18c1f chore(deps): update golang.org/x/telemetry digest to c00fa4d (# 6601)
  > f60c3a6 Add a unit test to verify the functionality of WithClient for zipkin exporter (# 6576)
  > b433695 chore(deps): update module github.com/polyfloyd/go-errorlint to v1.8.0 (# 6603)
  > f8df2f9 chore(deps): update module github.com/crocmagnon/fatcontext to v0.7.2 (# 6602)
  > c7de0ca Remove the lint-modules make target (# 6586)
  > 8833c1a Reference markdownlint docker image in dependencies.Dockerfile (# 6582)
  > 10008fb opentracing: test `LogFields` and `LogKV` in the opentracing bridge (# 6583)
  > 7239bf4 Add unit test for BaggageItem in opentracing (# 6577)
  > b5ac579 Remove the exporters/zipkin/internal package (# 6566)
  > f23f25a Add example for SetTextMapPropagator (# 6579)
  > 1b32b1d fix(deps): update module google.golang.org/grpc to v1.71.1 (# 6587)
  > 1fd38f4 fix(deps): update module go.opentelemetry.io/collector/pdata to v1.29.0 (# 6585)
  > 2555f94 chore(deps): update lycheeverse/lychee-action action to v2.4.0 (# 6584)
  > 3ae002c chore(deps): update module github.com/ghostiam/protogetter to v0.3.13 (# 6575)
  > 044614c chore(deps): update module github.com/mgechev/revive to v1.8.0 (# 6581)
  > 7512a2b Add the `golines` golangci-lint formatter (# 6513)
  > b59d059 internal/internaltest: Remove errors.go (# 6559)
  > 9d555cd Replace env var functionality from `internaltest` in `sdk/resource` and `sdk/log` (# 6557)
  > bdc123d chore: update lint-markdown to run as dockeruser (# 6558)
  > b17e974 Remove Unused env.go and env_test.go; Update gen.go in internal (# 6556)
  > 03fa67d chore(sdk): Replace all uses of the internaltest package in metric (# 6551)
  > 63f3cfe sdk/trace: Manage trace environment variables in testing package (# 6552)
  > f88f3f1 zipkin: test zipkin exporter model conversion for bool, float64, and string slices (# 6554)
  > 2e21e19 Remove unused get_main_pkgs.sh script (# 6555)
  > f18af3b internaltest: remove alignment.go from internaltest (# 6550)
  > da3a67a chore(deps): update module golang.org/x/net to v0.38.0 (# 6568)
  > 9e81492 chore(deps): update module github.com/antonboom/testifylint to v1.6.1 (# 6567)
  > 1852b39 Refactor `fail` method in matchers (# 6517)
  > 7376a33 Update release process in RELEASING.md (# 6504)
  > dbcd24f fix(deps): update module github.com/prometheus/common to v0.63.0 (# 6442)
  > ee66d2c Fix codeql permission (# 6518)
  > 905684c Ignore deprecation warnings about NameValidationScheme (# 6449)
  > f0ca595 chore(deps): update module github.com/kunwardeep/paralleltest to v1.0.14 (# 6553)
  > b98dd5e chore(deps): update module github.com/sagikazarmark/locafero to v0.9.0 (# 6528)
  > b81fe7d chore(deps): update module github.com/charmbracelet/colorprofile to v0.3.0 (# 6516)
  > ee442f9 chore(deps): update github.com/golangci/golines digest to b35a614 (# 6512)
  > 1c10855 chore(deps): update module github.com/spf13/viper to v1.20.1 (# 6515)
  > 2d77e1a fix(deps): update build-tools to v0.21.0 (# 6510)
  > 590bcee fix(deps): update module github.com/golangci/golangci-lint to v2 (# 6499)
  > afb9322 chore(deps): update module github.com/tomarrell/wrapcheck/v2 to v2.11.0 (# 6508)
  > a12c0aa chore(deps): update module github.com/kunwardeep/paralleltest to v1.0.13 (# 6505)
  > 95e5bba Generate `v1.31.0` semconv (# 6479)
  > ff6be9e chore(renovate): ignore go.opentelemetry.io/otel/sdk/log/logtest (# 6501)
  > dbc3bce log/logtest: Remove RecordFactory (# 6492)
  > 796596a fix(deps): update module google.golang.org/protobuf to v1.36.6 (# 6496)
  > 1d74b27 fix(deps): update googleapis to b45e905 (# 6500)
  > 84ff4da sdk/log: remove EnabledParameters.Resource (# 6494)
  > 37b70ce chore(deps): update github/codeql-action digest to 1b549b9 (# 6495)
  > ecfb735 chore(deps): update module github.com/daixiang0/gci to v0.13.6 (# 6484)
  > 66cb30e chore(deps): update module github.com/ckaznocha/intrange to v0.3.1 (# 6481)
  > 88a51b6 chore(deps): update fossas/fossa-action action to v1.6.0 (# 6482)
  > f39f16c sdk/log/logtest: new module (# 6466)
  > f556bd3 prometheus: use a sync.Pool instead of allocating metricdata.ResourceMetrics in Collect (# 6472)
  > 1b8fe16 log/logtest: new module (# 6465)
  > 2a49562 chore(deps): update actions/cache digest to 5a3ec84 (# 6474)
  > 7636cf0 chore(deps): update actions/upload-artifact digest to ea165f8 (# 6475)
  > b97f8b3 chore(deps): update actions/download-artifact digest to 95815c3 (# 6467)
  > 90a9d1d Do not inline `noopSpan.tracerProvider` (# 6456)
  > 650b5a7 chore(deps): update github/codeql-action digest to 5f8171a (# 6473)
  > d0bba04 chore(deps): update module github.com/go-critic/go-critic to v0.13.0 (# 6468)
  > fc48482 fix(deps): update module go.opentelemetry.io/collector/pdata to v1.28.1 (# 6469)
  > b057a76 chore(deps): update actions/setup-go digest to 0aaccfd (# 6470)
  > 8dc08e2 attribute: preallocate map in NewAllowKeysFilter and NewDenyKeysFilter (# 6455)
  > e15c058 chore(deps): update module github.com/prometheus/client_golang to v1.21.1 (# 6463)
  > 7111f2c chore(deps): update module github.com/prometheus/procfs to v0.16.0 (# 6462)
  > 921e0e6 chore(deps): update github.com/prometheus/client_golang to v1.21.1 (# 6433)
  > ed1a3be chore(deps): update module github.com/ghostiam/protogetter to v0.3.12 (# 6457)
  > c51818f fix(deps): update module go.opentelemetry.io/collector/pdata to v1.28.0 (# 6461)
  > 80fa15f chore(deps): update python:3.13.2-slim-bullseye docker digest to c527a33 (# 6459)
  > a3e15ad fix(deps): update module github.com/golangci/golangci-lint to v1.64.8 (# 6458)
  > 8edbf50 chore(deps): update module github.com/burntsushi/toml to v1.5.0 (# 6460)
  > 2e8d5a9 Fix close stale value to be relative (# 6451)
  > 0997b5f chore(deps): update module github.com/xen0n/gosmopolitan to v1.3.0 (# 6454)
  > 934bfe1 chore(deps): update github.com/burntsushi/toml digest to d10101f (# 6452)
  > 45874c6 chore(deps): update module github.com/antonboom/nilnil to v1.1.0 (# 6453)
  > e2e668d chore(deps): update module github.com/spf13/viper to v1.20.0 (# 6447)
  > bd5f1b6 chore(deps): update module github.com/sagikazarmark/locafero to v0.8.0 (# 6446)
  > 2433ca5 chore(deps): update module github.com/macabu/inamedparam to v0.2.0 (# 6448)
  > 3fbe305 chore(deps): update module github.com/spf13/afero to v1.14.0 (# 6445)
  > 11cea34      feat(retry): update backoff to v5, fix the breaking changes in that version (# 6419)
  > 2b4e1a3 chore(deps): update module github.com/spf13/afero to v1.13.0 (# 6444)
  > 57903dc fix(deps): update googleapis to e70fdf4 (# 6441)
  > 05de07b chore(deps): update module github.com/antonboom/testifylint to v1.6.0 (# 6440)
  > a43e266 chore(deps): update module github.com/antonboom/errname to v1.1.0 (# 6439)
  > b7ca1e1 trace/auto pass stack allocated span context var to ebpf (# 6434)
  > fabeef0 chore(deps): update module github.com/breml/errchkjson to v0.4.1 (# 6436)
  > f27dc63 chore(deps): update module github.com/breml/bidichk to v0.3.3 (# 6435)
  > d1d12d0 chore(deps): update module github.com/catenacyber/perfsprint to v0.9.1 (# 6437)
  > fd08677 fix(deps): update googleapis to 81fb87f (# 6430)
  > 114ec03 fix(deps): update module github.com/golangci/golangci-lint to v1.64.7 (# 6432)
  > efe325a Stop percent-encoding the header environment variables in otlplog exporters (# 6392)
  > fb89a38 fix(deps): update googleapis (# 6429)
  > fcc7b6d chore(deps): update module github.com/ghostiam/protogetter to v0.3.10 (# 6427)
  > 1df8d4a chore(deps): update golang.org/x/telemetry digest to fdfaad8 (# 6428)
  > 0c49ece chore(deps): update github.com/golangci/dupl digest to f665c8d (# 6425)
  > 3daca50 Promote Alex Kats to triager (# 6420)
  > 6b89462 Update exporters README.md - otlploggrpc added (# 6423)
  > 5051038 chore(deps): update github/codeql-action digest to 6bb031a (# 6424)
  > 838643a Bump Go version for schema (# 6418)
  > 7a63439 fix(deps): update module go.opentelemetry.io/collector/pdata to v1.27.0 (# 6330)
  > 0be6253 fix(deps): update module github.com/jcchavezs/porto to v0.7.0 (# 5867)
  > a918054 fix(deps): update golang.org/x (# 6413)
  > 8b45ecc chore(deps): update module github.com/openpeedeep/depguard/v2 to v2.2.1 (# 6415)
  > 15b9c58 chore(deps): update module honnef.co/go/tools to v0.6.1 (# 6414)
  > 09ff8b1 Drop support for Go 1.22 (# 6381)
bumping google.golang.org/genproto/googleapis/api b45e905...513f239:
  > 513f239 chore(all): update all (# 1221)
  > 200df99 chore(all): update all (# 1220)
  > 55703ea chore(all): update all (# 1219)
  > 5a2f75b chore(all): auto-regenerate .pb.go files (# 1217)
  > fcd927c chore(all): update all (# 1218)
  > f936aa4 chore(all): auto-regenerate .pb.go files (# 1214)
  > 80320d0 chore(all): update all (# 1215)
  > c3e32d0 feat(googleapis/devtools/clouddebugger/v2): remove googleapis/devtools/clouddebugger (# 1216)
  > 10db94c chore(all): update all (# 1213)
  > 7b38467 chore(all): auto-regenerate .pb.go files (# 1212)
  > 2d3770c chore(all): auto-regenerate .pb.go files (# 1208)
  > 61c742a chore(all): update all (# 1211)
  > 207652e chore(all): update all (# 1209)
  > de1ac95 chore(all): auto-regenerate .pb.go files (# 1207)
  > ac9807e chore(all): update all to ee84b53 (# 1206)
  > ee84b53 chore(all): update all (# 1205)
bumping github.com/go-logr/logr 1205f42...38a1c47:
  > 38a1c47 build(deps): bump github/codeql-action from 3.28.17 to 3.28.18
  > f08bedd build(deps): bump actions/setup-go from 5.4.0 to 5.5.0
  > 6295e99 build(deps): bump golangci/golangci-lint-action from 7.0.0 to 8.0.0
  > 028840d build(deps): bump github/codeql-action from 3.28.15 to 3.28.17
  > 511e5fa Merge pull request # 367 from go-logr/dependabot/github_actions/github/codeql-action-3.28.15
  > 158c311 Merge pull request # 366 from thockin/master
  > d806463 build(deps): bump github/codeql-action from 3.28.13 to 3.28.15
  > 20a64ba build(deps): bump github/codeql-action from 3.28.12 to 3.28.13
  > c79ddb3 Update to support golangci-lint v2
  > 0385e14 Add comments around slog exceptions
  > 8fd86d2 Revert "Remove one exception from Slog testing"
  > 22d21f0 Update github actions
  > 1e06d3d Remove one exception from Slog testing
  > c439f61 Fix slog tests for 1.25
  > fd59c10 Merge pull request # 359 from go-logr/dependabot/github_actions/actions/upload-artifact-4.6.2
  > 50c533c Merge pull request # 358 from go-logr/dependabot/github_actions/github/codeql-action-3.28.12
  > 2b467c4 build(deps): bump actions/upload-artifact from 4.6.1 to 4.6.2
  > 8476b37 Merge pull request # 357 from go-logr/dependabot/github_actions/golangci/golangci-lint-action-6.5.2
  > 9a1211d build(deps): bump github/codeql-action from 3.28.11 to 3.28.12
  > eec33c4 build(deps): bump golangci/golangci-lint-action from 6.5.0 to 6.5.1
  > 8de8c51 Merge pull request # 356 from go-logr/dependabot/github_actions/actions/setup-go-5.4.0
  > 140789c build(deps): bump golangci/golangci-lint-action from 6.5.1 to 6.5.2
  > 525d37c Merge pull request # 354 from go-logr/dependabot/github_actions/github/codeql-action-3.28.11
  > 207008c build(deps): bump actions/setup-go from 5.3.0 to 5.4.0
  > 95b588a Merge pull request # 352 from go-logr/dependabot/github_actions/github/codeql-action-3.28.10
  > f597e8b build(deps): bump github/codeql-action from 3.28.10 to 3.28.11
  > 1c2d47a Merge pull request # 351 from go-logr/dependabot/github_actions/ossf/scorecard-action-2.4.1
  > 18c61bc build(deps): bump github/codeql-action from 3.28.9 to 3.28.10
  > 7805e15 Merge pull request # 353 from go-logr/dependabot/github_actions/actions/upload-artifact-4.6.1
  > e374c47 build(deps): bump ossf/scorecard-action from 2.4.0 to 2.4.1
  > 4af26d9 build(deps): bump golangci/golangci-lint-action from 6.3.1 to 6.5.0
  > 80045e5 build(deps): bump actions/upload-artifact from 4.6.0 to 4.6.1
  > 1a48fc0 build(deps): bump golangci/golangci-lint-action from 6.2.0 to 6.3.1
  > 743e080 build(deps): bump github/codeql-action from 3.28.8 to 3.28.9
  > cfd110a build(deps): bump github/codeql-action from 3.28.5 to 3.28.8
  > 6a2281a Merge pull request # 346 from go-logr/dependabot/github_actions/actions/setup-go-5.3.0
  > ccd6555 Merge pull request # 345 from go-logr/dependabot/github_actions/github/codeql-action-3.28.5
  > e2e4b0e build(deps): bump actions/setup-go from 5.2.0 to 5.3.0
  > c233155 Merge pull request # 344 from go-logr/dependabot/github_actions/golangci/golangci-lint-action-6.2.0
  > 677a7c2 build(deps): bump github/codeql-action from 3.28.1 to 3.28.5
  > b8ba189 Merge pull request # 343 from go-logr/dependabot/github_actions/actions/upload-artifact-4.6.0
  > 96397cb build(deps): bump golangci/golangci-lint-action from 6.1.1 to 6.2.0
  > 7fb2590 Merge pull request # 342 from go-logr/dependabot/github_actions/github/codeql-action-3.28.1
  > 0a1e3b8 build(deps): bump actions/upload-artifact from 4.4.3 to 4.6.0
  > 1cb5846 build(deps): bump github/codeql-action from 3.27.9 to 3.28.0
  > 08afa36 build(deps): bump github/codeql-action from 3.28.0 to 3.28.1
  > 28c3e59 Merge pull request # 339 from go-logr/dependabot/github_actions/github/codeql-action-3.27.9
  > e0b26f2 Merge pull request # 338 from go-logr/dependabot/github_actions/actions/setup-go-5.2.0
  > d860f7f build(deps): bump github/codeql-action from 3.27.6 to 3.27.9
  > 8849d8d build(deps): bump github/codeql-action from 3.27.5 to 3.27.6
  > 1210f7d build(deps): bump actions/setup-go from 5.1.0 to 5.2.0
  > a64db0b Merge pull request # 334 from go-logr/dependabot/github_actions/github/codeql-action-3.27.5
  > 5342602 build(deps): bump github/codeql-action from 3.27.0 to 3.27.4
  > cf0063c build(deps): bump github/codeql-action from 3.27.4 to 3.27.5
  > f151316 Merge pull request # 330 from go-logr/dependabot/github_actions/actions/checkout-4.2.2
  > e072c1a Merge pull request # 331 from go-logr/dependabot/github_actions/github/codeql-action-3.27.0
  > 35ea6fd build(deps): bump actions/checkout from 4.2.1 to 4.2.2
  > ddf199b Merge pull request # 329 from go-logr/dependabot/github_actions/actions/setup-go-5.1.0
  > afe9b4a build(deps): bump github/codeql-action from 3.26.13 to 3.27.0
  > 1ce1e2e build(deps): bump github/codeql-action from 3.26.12 to 3.26.13
  > c5df16e build(deps): bump actions/setup-go from 5.0.2 to 5.1.0
  > 8d6912c build(deps): bump actions/upload-artifact from 4.4.0 to 4.4.3
  > 8d9adce build(deps): bump github/codeql-action from 3.26.11 to 3.26.12
  > 6f2dcb8 build(deps): bump actions/checkout from 4.2.0 to 4.2.1
  > 5d59669 GitHub: bump Go version used for apidiff
  > 685f8d1 Merge pull request # 323 from go-logr/dependabot/github_actions/github/codeql-action-3.26.11
  > 1108ded Merge pull request # 322 from go-logr/dependabot/github_actions/golangci/golangci-lint-action-6.1.1
  > 85e5c25 build(deps): bump github/codeql-action from 3.26.9 to 3.26.11
  > a3fdc92 build(deps): bump actions/checkout from 4.1.7 to 4.2.0
  > 5014e65 build(deps): bump golangci/golangci-lint-action from 6.1.0 to 6.1.1
  > 8c14043 build(deps): bump github/codeql-action from 3.26.8 to 3.26.9
  > bb9f20d Merge pull request # 319 from go-logr/dependabot/github_actions/github/codeql-action-3.26.8
  > e2720e1 build(deps): bump github/codeql-action from 3.26.6 to 3.26.7
  > 98f267c build(deps): bump github/codeql-action from 3.26.7 to 3.26.8
  > 275154a Merge pull request # 317 from go-logr/dependabot/github_actions/github/codeql-action-3.26.6
  > abec0d5 Merge pull request # 316 from go-logr/dependabot/github_actions/actions/upload-artifact-4.4.0
  > 3bf2a10 build(deps): bump github/codeql-action from 3.26.5 to 3.26.6
  > 14f036d Merge pull request # 315 from go-logr/dependabot/github_actions/github/codeql-action-3.26.5
  > 35ef369 build(deps): bump actions/upload-artifact from 4.3.6 to 4.4.0
  > 4743538 Merge pull request # 314 from go-logr/dependabot/github_actions/github/codeql-action-3.26.2
  > dd81768 build(deps): bump github/codeql-action from 3.26.2 to 3.26.5
  > 1033a72 build(deps): bump golangci/golangci-lint-action from 6.0.1 to 6.1.0
  > edcd2be build(deps): bump github/codeql-action from 3.26.0 to 3.26.2
  > 79c4c21 build(deps): bump github/codeql-action from 3.25.15 to 3.26.0
  > d95a0df build(deps): bump actions/upload-artifact from 4.3.4 to 4.3.6
  > a340533 Merge pull request # 309 from thockin/master
  > 90d9f9d build(deps): bump github/codeql-action from 3.25.13 to 3.25.15
  > 0103ab5 Silence spurious lint warnings
  > 6386269 build(deps): bump ossf/scorecard-action from 2.3.3 to 2.4.0
  > 26eb1a2 build(deps): bump github/codeql-action from 3.25.12 to 3.25.13
  > 781996a build(deps): bump actions/setup-go from 5.0.1 to 5.0.2
  > 76dab72 build(deps): bump github/codeql-action from 3.25.11 to 3.25.12
  > 2110dbe Merge pull request # 302 from go-logr/dependabot/github_actions/actions/upload-artifact-4.3.4
  > c65c5f6 Merge pull request # 301 from go-logr/dependabot/github_actions/github/codeql-action-3.25.11
  > e04bf87 build(deps): bump actions/upload-artifact from 4.3.3 to 4.3.4
  > eb84a8c Merge pull request # 300 from go-logr/dependabot/github_actions/actions/checkout-4.1.7
  > cd5acd5 build(deps): bump github/codeql-action from 3.25.10 to 3.25.11
  > d69364f Merge pull request # 299 from go-logr/dependabot/github_actions/github/codeql-action-3.25.10
  > cdbf6fb build(deps): bump actions/checkout from 4.1.6 to 4.1.7
  > 8ce0cab Merge pull request # 298 from go-logr/dependabot/github_actions/github/codeql-action-3.25.8
  > 6b90080 build(deps): bump github/codeql-action from 3.25.8 to 3.25.10
  > 375c22d Merge pull request # 297 from go-logr/dependabot/github_actions/github/codeql-action-3.25.7
  > a9e97bc build(deps): bump github/codeql-action from 3.25.7 to 3.25.8
  > 976cd73 Merge pull request # 296 from go-logr/dependabot/github_actions/github/codeql-action-3.25.6
  > 2bb10dc build(deps): bump github/codeql-action from 3.25.6 to 3.25.7
  > e99951c build(deps): bump github/codeql-action from 3.25.5 to 3.25.6
bumping golang.org/x/oauth2 65c15a3...cf14319:
  > cf14319 oauth2: fix expiration time window check
  > 32d34ef internal: include clientID in auth style cache key
  > 2d34e30 oauth2: replace a magic number with AuthStyleUnknown
  > 696f7b3 all: modernize with doc links and any
  > 471209b oauth2: drop dependency on go-cmp
  > 6968da2 oauth2: sync Token.ExpiresIn from internal Token
  > d2c4e0a oauth2: context instead of golang.org/x/net/context in doc
  > 883dc3c endpoints: add various endpoints from stale CLs
  > 1c06e87 all: make use of oauth.Token.ExpiresIn
bumping knative.dev/client/pkg 1e24794...1c3b47c:
  > 1c3b47c upgrade to latest dependencies (# 2002)

Signed-off-by: Knative Automation <automation@knative.team>
2025-06-29 23:58:10 +00:00
Luke Kingland e8ccb1bdcf
feat: add --address option to func run (#2887) 2025-06-27 09:17:07 +00:00
Luke Kingland ffd997c448
feat: add noninteractive path to func config envs remove (#2879) 2025-06-27 07:37:07 +00:00
Luke Kingland c990659a11
feat: check and warn on local to remote branches mismatch (#2884) 2025-06-27 07:26:08 +00:00
Luke Kingland a384d6e728
feat: add noninteractive flow to volume config (#2883) 2025-06-27 07:10:14 +00:00
Luke Kingland 347a901c16
fix: remove redundant initialized check (#2881) 2025-06-27 07:10:08 +00:00
Luke Kingland 238e061a1c
chore: add missing .PHONY statements to Makefile (#2878) 2025-06-27 06:57:13 +00:00
Luke Kingland b31a3a4ad3
feat: support FUNC_GIT env in Host builder (#2876) 2025-06-27 06:57:06 +00:00
Kapil Sareen a90f07fdfb
mcp: extends flags support for existing tools (#2889)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-06-27 03:37:06 +00:00
github-actions[bot] 9a71fa4725
chore: update Quarkus platform version to 3.24.1 (#2888)
Co-authored-by: Knative Automation <automation@knative.team>
2025-06-26 03:10:05 +00:00
github-actions[bot] d47949c685
chore: update Quarkus platform version to 3.23.4 (#2871)
Co-authored-by: Knative Automation <automation@knative.team>
2025-06-25 02:25:04 +00:00
Kapil Sareen 327e404908
mcp: adds delete tool and adds remote flag to deploy tool (#2863)
* rebases

* adds remote flag to deploy tool

Signed-off-by: kapil <kapilsareen584@gmail.com>

---------

Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-06-25 02:00:04 +00:00
Kapil Sareen 824911c55f
mcp: adds resource provider and prompt for root cmd docs (#2875)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-06-24 10:03:03 +00:00
Jefferson Ramos 1cccfd3220
test: fix disk space error on nightly podman test (#2866) 2025-06-17 15:01:57 +00:00
Knative Automation edd66501d4
upgrade to latest dependencies (#2856)
bumping golang.org/x/sync 506c70f...8a14946:
  > 8a14946 errgroup: remove duplicated comment
  > 1869c69 all: replace deprecated ioutil
  > d1ac909 sync/errgroup: PanicError.Error print stack trace
bumping go.opentelemetry.io/otel/trace edc378f...5ba5e7a:
  > 5ba5e7a Release v1.35.0/v0.57.0/v0.11.0 (# 6407)
  > 3908b67 chore(deps): update module github.com/securego/gosec/v2 to v2.22.2 (# 6412)
  > 50172b1 chore(deps): update module github.com/ryancurrah/gomodguard to v1.4.1 (# 6411)
  > cea6d2b fix(deps): update module google.golang.org/grpc to v1.71.0 (# 6409)
  > e2aee3a Move trace sdk tests from trace_test into trace package (# 6400)
  > 38f4f39 fix(deps): update build-tools to v0.20.0 (# 6403)
  > 2911449 Look at stale issues in ascending order (# 6396)
  > 7cb322a chore(deps): update github.com/golangci/dupl digest to 44c6a0b (# 6398)
  > 0c3651e fix(deps): update module github.com/golangci/golangci-lint to v1.64.6 (# 6394)
  > f04e951 chore(deps): update mvdan.cc/unparam digest to 0df0534 (# 6391)
  > 8878690 fix(deps): update golang.org/x to dead583 (# 6389)
  > d2d49f4 chore(deps): update module 4d63.com/gocheckcompilerdirectives to v1.3.0 (# 6388)
  > 5ccc9b5 chore(deps): update module github.com/kkhaike/contextcheck to v1.1.6 (# 6387)
  > 053f109 chore(deps): update actions/cache digest to d4323d4 (# 6384)
  > c6e2814 chore(deps): update module github.com/go-git/go-git/v5 to v5.14.0 (# 6385)
  > b18d593 chore(deps): update module github.com/protonmail/go-crypto to v1.1.6 (# 6383)
  > 9be18c1 sdk/trace: Fix gorountine leak in batchSpanProcessor.ForceFlush (# 6369)
  > 23c76d3 chore(deps): update module github.com/catenacyber/perfsprint to v0.9.0 (# 6379)
  > aec954c chore(deps): update codecov/codecov-action action to v5.4.0 (# 6380)
  > 44d5045 sdk/trace: Fix goroutine leak in simpleSpanProcessor.Shutdown (# 6368)
  > 7f724db chore(deps): update actions/download-artifact digest to cc20338 (# 6377)
  > 86d783c fix(deps): update build-tools to v0.19.0 (# 6376)
  > bb42ffa chore(deps): update module github.com/bombsimon/wsl/v4 to v4.6.0 (# 6373)
  > d903b7b chore(deps): update module go.opentelemetry.io/build-tools to v0.19.0 (# 6374)
  > 9e57b0d chore(deps): update python:3.13.2-slim-bullseye docker digest to 31b581c (# 6370)
  > 6192b14 [chore] clean up revive configuration (# 6353)
  > 4d7fcb6 chore(deps): update module golang.org/x/crypto to v0.35.0 (# 6366)
  > 70f52c4 chore(deps): update python:3.13.2-slim-bullseye docker digest to d3852c9 (# 6367)
  > 8f4a5c6 chore(deps): update module github.com/gaijinentertainment/go-exhaustruct/v3 to v3.3.1 (# 6361)
  > 87e328b chore(deps): update golang.org/x (# 6355)
  > cbb4e24 fix(deps): update module github.com/google/go-cmp to v0.7.0 (# 6359)
  > 863a0b2 chore(deps): update ossf/scorecard-action action to v2.4.1 (# 6358)
  > c0d043a chore(deps): update github/codeql-action digest to b56ba49 (# 6354)
  > 1e573f2 chore(deps): update actions/upload-artifact digest to 4cec3d8 (# 6356)
  > 010790d chore(deps): update module github.com/ldez/exptostd to v0.4.2 (# 6357)
  > 597e1d7 chore(deps): update module github.com/quasilyte/go-ruleguard to v0.4.4 (# 6348)
  > 92a7481 chore(deps): update golang.org/x/telemetry digest to 165e2f8 (# 6346)
  > 2509d78 [chore] Add OpenSSF Best Practices badge (# 6345)
  > 7f64adf [chore] Add a policy on adding tests (# 6334)
  > f65062e chore(deps): update module github.com/kisielk/errcheck to v1.9.0 (# 6340)
  > fb8b0f2 Add FOSSA scanning workflow (# 6331)
  > dfe20c4 chore(deps): update module github.com/catenacyber/perfsprint to v0.8.2 (# 6339)
  > 8231483 fix(deps): update googleapis to 56aae31 (# 6338)
  > 6239155 chore(deps): update actions/cache digest to 0c907a7 (# 6337)
  > 1ee7c79 sdk/log: Add FilterProcessor and EnabledParameters (# 6317)
  > b80639c chore(deps): update module github.com/nunnatsa/ginkgolinter to v0.19.1 (# 6311)
  > e033250 fix(deps): update golang.org/x to aa4b98e (# 6336)
  > 963190b fix(deps): update golang.org/x to eff6e97 (# 6325)
  > 14dc8ea chore(deps): update module github.com/4meepo/tagalign to v1.4.2 (# 6327)
  > af9dcb0 chore(deps): update module github.com/spf13/cobra to v1.9.1 (# 6324)
  > 26493d7 chore(deps): update module github.com/mgechev/revive to v1.7.0 (# 6326)
  > 8562bdf [chore] Use public Linux ARM64 runners (# 6320)
  > c08d161 chore(deps): update module github.com/tetafro/godot to v1.5.0 (# 6323)
  > 1d1f79c chore(deps): update module github.com/tdakkota/asciicheck to v0.4.1 (# 6322)
  > f2a1518 chore(deps): update golang.org/x/telemetry digest to 6f9b61d (# 6321)
  > 55ff06f sdk/log: Change BenchmarkLoggerNewRecord to BenchmarkLoggerEmit (# 6315)
  > 8261e7b chore(deps): update otel/weaver docker tag to v0.13.2 (# 6318)
  > da2d2f8 fix(deps): update module github.com/golangci/golangci-lint to v1.64.5 (# 6319)
  > a9cbc3d chore(deps): update module github.com/tdakkota/asciicheck to v0.4.0 (# 6316)
  > 9d4c2f7 [chore] Fix go-work Make target with the highest required Go version (# 6285)
  > d9ab149 chore(deps): update module github.com/securego/gosec/v2 to v2.22.1 (# 6314)
  > f62232f Replace tenv with usetesting (# 6313)
  > 44ea53b Add support for Go 1.24 (# 6304)
  > 8d2c38d fix(deps): update googleapis to 5a70512 (# 6308)
  > 4b7d52a chore(deps): update module github.com/gostaticanalysis/forcetypeassert to v0.2.0 (# 6312)
  > d4b0597 chore(deps): update golang.org/x/telemetry digest to 7530529 (# 6305)
  > dfc43f0 fix(deps): update module github.com/golangci/golangci-lint to v1.64.4 (# 6310)
  > fd8eb0b chore(deps): update otel/weaver docker tag to v0.13.1 (# 6309)
  > 47c4b11 chore(deps): update module github.com/mgechev/revive to v1.6.1 (# 6306)
  > 3c1286a Document and check resource comparability (# 6272)
  > afbe545 fix(deps): update module github.com/golangci/golangci-lint to v1.64.2 (# 6301)
  > 6c8583d chore(deps): update module github.com/ldez/exptostd to v0.4.1 (# 6300)
  > 1971f5f fix(deps): update golang.org/x (# 6297)
  > d40491f chore(deps): pin actions/stale action to 5bef64f (# 6295)
  > 7d503b7 Close stale issues and PRs after 2 years of inactivity (# 6284)
  > 6e3724a chore(deps): update module github.com/catenacyber/perfsprint to v0.8.1 (# 6294)
  > ab254c2 chore(deps): update module go-simpler.org/sloglint to v0.9.0 (# 6293)
  > 6e1c433 chore(deps): update module 4d63.com/gochecknoglobals to v0.2.2 (# 6291)
  > ae0cc74 chore(deps): update otel/weaver docker tag to v0.13.0 (# 6292)
  > fabdac2 fix(deps): update googleapis to e9438ea (# 6289)
  > 42273a6 chore(deps): update module golang.org/x/crypto to v0.33.0 (# 6290)
  > b42504e chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.26.1 (# 6288)
  > 834e574 chore(deps): update github/codeql-action digest to 9e8d078 (# 6287)
  > b25505b fix(deps): update golang.org/x to f9890c6 (# 6282)
  > 558dbdd chore(deps): update python docker tag to v3.13.2 (# 6283)
  > 6894f1b Add an OpenSSF badge to README.md (# 6269)
  > 25ee2bd Default github workflow permission read-all (# 6268)
  > d46bfb0 Fix comment of the RecordOnly sampling decision (# 6257)
  > 51cf2d7 chore(deps): update golang.org/x/telemetry digest to 557cf9c (# 6279)
  > c9bb09c chore(deps): pin dependencies (# 6278)
  > 9ea576a Use renovate best-practices (# 6267)
  > 8667c15 fix(deps): update module google.golang.org/protobuf to v1.36.5 (# 6277)
  > 5879a01 fix(deps): update build-tools to v0.18.0 (# 6276)
  > 0c62fd1 chore(deps): update actions/upload-artifact action to v4 (# 6266)
  > ac173ac chore(deps): update ossf/scorecard-action action to v2.4.0 (# 6265)
  > ee272d4 chore(deps): update golang.org/x/telemetry digest to c67c2d1 (# 6264)
  > e1472c4 chore(deps): update actions/checkout action to v4.2.2 (# 6263)
  > 092ed4e chore(deps): update actions/upload-artifact digest to ff15f03 (# 6262)
  > 69c3c61 Create scorecard.yml to enable OSSF Scorecard reporting (# 6247)
  > 85fab8b chore(deps): update module github.com/catenacyber/perfsprint to v0.8.0 (# 6261)
  > 13b6133 chore(deps): update lycheeverse/lychee-action action to v2.3.0 (# 6258)
  > 589d959 chore(deps): update module github.com/cloudflare/circl to v1.6.0 (# 6259)
  > eb988d7 fix(deps): update module go.opentelemetry.io/collector/pdata to v1.25.0 (# 6255)
  > 4778db7 fix(deps): update module go.opentelemetry.io/otel/trace to v1.34.0 (# 6256)
  > 3dbdfb2 chore(deps): update module google.golang.org/grpc to v1.70.0 (# 6254)
  > 18dadf4 chore(deps): update golang.org/x/telemetry digest to 3af0d96 (# 6253)
  > 2d050f9 fix(deps): update googleapis to 7023788 (# 6251)
  > 74923b2 chore(deps): update module golang.org/x/text to v0.22.0 (# 6252)
  > 1ba3e46 chore(deps): update google.golang.org/genproto/googleapis/rpc digest to 29210b9 (# 6250)
  > 6b3868e fix(deps): update golang.org/x (# 6249)
  > 9aae208 Add an auto-instrumentable no-op implementation to the `trace` package (# 6203)
  > fa5a782 Generate `semconv/v1.30.0` (# 6240)
  > 078a4a8 sdk/log: Assign fltrProcessors on provider creation instead of lazy (# 6239)
  > 2260929 Use archive URL for weaver registry (# 6235)
  > 27aaa7a Generate the `semconv/v1.28.0` package (# 6236)
  > 987efa6 chore(deps): update module github.com/polyfloyd/go-errorlint to v1.7.1 (# 6237)
  > 8324155 Weaver (# 5898)
  > a81250c chore(deps): update module github.com/skeema/knownhosts to v1.3.1 (# 6231)
  > 007fb1f chore(deps): update module github.com/spf13/pflag to v1.0.6 (# 6224)
  > 1994f63 Update codespell target (# 6223)
  > d10a36b stdoutlog: Emit Record.EventName field (# 6210)
  > e52d3a1 fix(deps): update golang.org/x to e0ece0d (# 6222)
  > 712ecdc chore(deps): update dependency codespell to v2.4.1 (# 6221)
  > b9819d2 fix(deps): update golang.org/x to 3edf0e9 (# 6219)
  > 98da0d1 chore(deps): update module github.com/cyphar/filepath-securejoin to v0.4.1 (# 6218)
  > dc7c33a fix(deps): update googleapis to 29210b9 (# 6217)
  > a027f11 chore: Update Logs API design doc (# 6206)
  > ae7ac48 otlplog: Emit Record.EventName field (# 6211)
  > 5d25818 fix(deps): update module google.golang.org/protobuf to v1.36.4 (# 6214)
  > d3119b0 chore(deps): update codecov/codecov-action action to v5.3.1 (# 6213)
  > de5d214 fix(deps): update googleapis to 65684f5 (# 6212)
  > 3585b80 fix(deps): update module google.golang.org/grpc to v1.70.0 (# 6208)
  > a8e5482 chore(deps): update codecov/codecov-action action to v5.3.0 (# 6207)
  > 6605083 chore(deps): update module github.com/go-git/go-git/v5 to v5.13.2 (# 6204)
  > 0c97148 Update module github.com/prometheus/common to v0.62.0 and fix tests (# 6198)
  > b0d0bb9 chore: Group renovate build-tools updates (# 6201)
  > 5363a52 fix(deps): update module go.opentelemetry.io/build-tools/multimod to v0.17.0 (# 6200)
  > b5ef234 fix(deps): update module go.opentelemetry.io/build-tools/semconvgen to v0.17.0 (# 6202)
  > 70b8f7e fix(deps): update module go.opentelemetry.io/build-tools/gotmpl to v0.17.0 (# 6199)
  > a85d0c1 fix(deps): update module go.opentelemetry.io/build-tools/crosslink to v0.17.0 (# 6197)
  > eba4618 fix(deps): update googleapis to 138b5a5 (# 6194)
  > 6d9bb01 chore(deps): update codecov/codecov-action action to v5.2.0 (# 6195)
  > 62e4225 sdk/log: Add EventName (# 6193)
  > 185547c log: Add EventName (# 6187)
  > e108415 fix(deps): update github.com/opentracing-contrib/go-grpc/test digest to 2f9c7e3 (# 6190)
  > 01a7584 fix(deps): update module github.com/opentracing-contrib/go-grpc to v0.1.1 (# 6191)
  > d7ebb7a log: Add ValueFromAttribute and KeyValueFromAttribute  (# 6180)
  > 538e869 chore(deps): update dependency codespell to v2.4.0 (# 6189)
  > 3a0023d chore(deps): update module github.com/pjbgf/sha1cd to v0.3.2 (# 6188)
  > 41e697f chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.26.0 (# 6186)
  > e8cd4aa chore(deps): update golang.org/x/telemetry digest to 04cd7ba (# 6176)
bumping k8s.io/client-go c106b23...e7397e5:
  > e7397e5 Update dependencies to v0.33.1 tag
  > ecbbb06 bump etcd 3.5.21 sdk
  > 2086688 Merge pull request # 129970 from mortent/AddResourceV1beta2API
  > e359642 Merge pull request # 130556 from sreeram-venkitesh/kep-4960-container-stop-signals
  > dba34c7 Run make update
  > 3bf0a05 Merge pull request # 130797 from jm-franc/configurable-tolerance
  > 7a03a3b Generated files
  > 1676beb Refresh autogenerated files following the configurable tolerance updates.
  > 387edb8 Merge pull request # 130967 from aojea/listers
  > a27e26d Merge pull request # 129872 from seans3/websocket-https-proxy
  > 21dc3b4 benchmark to show inefficient  linear search lookup
  > e782ad6 Merge pull request # 130764 from cici37/partitionableDevice
  > c77f9e4 Websocket HTTPS proxy support
  > 379ed45 Auto gen
  > b0ed730 Merge pull request # 130844 from danwinship/improved-traffic-distribution
  > a9cdb02 Merge pull request # 130447 from pohly/dra-device-taints
  > 789d60d update generate docs for PreferSameTrafficDistribution
  > 169f1af Merge pull request # 130906 from serathius/streaming-validation
  > 71c858c DRA: generated files for device taints API
  > ac9f6ff Merge pull request # 130901 from deads2k/perms
  > 9475320 Update kube-openapi and integrate streaming tags validation
  > 7ed5fa7 Implement KEP 4876 Mutable CSINode (# 130007)
  > c8ae9cf add API approvers to generated applyconfigurations
  > c5b5cae Merge pull request # 129954 from iholder101/swap/capacity-on-node-sys-info
  > b4e9c91 Merge pull request # 130721 from yanhuan0802/fix-informer-typo
  > 9a7d64c add auto-generated files: ./hack/update-codegen.sh
  > 97feb5b Merge pull request # 130347 from Jefftree/remove-v2beta1-agg-discovery
  > 4ba25ca fix: shared informer typos
  > 8ddf440 Gate apidiscovery/v2beta1 serving with a feature gate
  > 595b7ca Merge pull request # 130725 from jpbetz/replication-controller-minimums-to-declarative
  > 5f67685 Merge pull request # 129345 from pohly/log-client-go-workqueue
  > d6ee382 Add declarative default for RC.Spec.MinReadySeconds
  > 7faeb31 Merge pull request # 130751 from Jefftree/cle-promote-beta
  > a96aa53 client-go workqueue: add optional logger
  > 5adc342 Add declarative default for RC.Spec.Replicas
  > 8489267 Merge pull request # 130693 from novahe/fix/test-cases
  > 0a56d35 generated
  > 8ee5c99 Merge pull request # 130748 from jpbetz/revert-125102
  > 5c7f206 Fix test cases that may potentially cause a panic.
  > dbe73bc Add LeaseCandidate v1beta1
  > bcd3642 Revert PR 125102: Add unit tests to client-go/tools/cache/listers.go
  > 92865bf Merge pull request # 125102 from 0xMALVEE/unit-tests-listers.go
  > 65ca8d8 Merge pull request # 128499 from stlaz/ctb_betav1
  > 8410e24 testes written for cache/listers.go
  > 2241515 generate code
  > a50f4a6 Merge pull request # 130555 from thockin/k_k_randfill
  > 1459662 Vendor randfill
  > 4a6072d Use randfill, do API renames
  > b3c8744 Merge pull request # 130569 from dims/update-to-latest-cadvisor-v0.52.0
  > d42a6bb Merge pull request # 130352 from natasha41575/kubelet-pod-observedgen
  > dd81c64 update to v1.22.0-rc.0
  > 0445543 Merge pull request # 130635 from zimnx/fix-websocket-read-error
  > 3c80fbb run 'make update'
  > 9cfcaac update to latest cadvisor @ v0.52.0
  > d5f336d Merge pull request # 130489 from p0lyn0mial/upstream-fake-client-pass-opts
  > c1ee4cc Return correct error upon websocket message read failure
  > a48b937 Merge pull request # 130470 from p0lyn0mial/upstream-fake-client-opts-watch
  > 7b0f098 ./hack/update-codegen.sh
  > ca10b28 Merge pull request # 128586 from mortent/DRAPrioritizedList
  > 2790aee client-go/gentype/fake: sets opts.Watch true
  > ec8a292 Merge pull request # 130515 from Jefftree/revert-cle-beta-types
  > 2143ace Run make update
  > 05e64ee Merge pull request # 128919 from dashpole/update_otel
  > 41d7de3 Revert "LeaseCandidate alpha -> beta,"
  > 030621a update go.opentelemetry.io dependencies to v1.33.0/v0.58.0
  > 29076db Revert "generated"
  > cb16ee3 Merge pull request # 130474 from dims/bump-x/crypto-and-x/oauth2
  > ebce4d7 Merge pull request # 130291 from Jefftree/cle-beta
  > 9dffd3c Bump x/oauth2 and x/crypto
  > 8247f1e Merge pull request # 129338 from pohly/log-client-go-certificates
  > 50aba71 generated
  > b46275a Merge pull request # 129688 from cpanato/update-main-go124
  > d0f5d55 client-go certificate: context-aware APIs and logging
  > e6e6fcf LeaseCandidate alpha -> beta,
  > a126675 bump go.mod to set min go1.24
  > 8dd5edb Merge pull request # 130359 from my-git9/assertion1
  > 8fa90a0 Merge pull request # 130187 from mansikulkarni96/129084
  > d8b34c3 fix wrong assertion on tests
  > c92258a Drop winsymlink go 1.23 workaround
  > 9c375bc Merge pull request # 129790 from aojea/event_name
  > d067ae2 Merge pull request # 130269 from tmmorin/fix-optimitically-typo
  > 023460f events: ensure the name is valid
  > 84ec134 Merge pull request # 130047 from HirazawaUi/modify-loopback-cert-valid-period
  > 89a3804 fix typo: optimitically -> optimistically
  > 72c2d4d Merge pull request # 130249 from seans3/bump-websockets-version
  > 5c24986 adjusting loopback certificate validity in kube-apiserver
  > 7392886 Update gorilla/websockets library from 1.5.0 to latest 1.5.3
  > 90ccd59 Merge pull request # 130105 from seans3/websocket-logging-level
  > bf05f9c Merge pull request # 130039 from p0lyn0mial/upstream-fake-client-improve-unit-test
  > 3ead27a Update websocket logging levels for better debuggability
  > 8683d2d Merge pull request # 130049 from aojea/avoid_ginkgo_dep
  > 2b1c073 fake/clientset: improve TestNewSimpleClientset
  > fb7de29 reduce dependencies in apimachinery net testing utils
  > 07d61b6 Merge pull request # 129341 from pohly/log-client-go-watch
  > 362c5e8 Merge pull request # 129568 from deads2k/tighten-fifo-interface
  > 57bc261 client-go watch: NewIndexerInformerWatcherWithContext -> WithLogger
  > f203084 Merge pull request # 129330 from pohly/log-client-go-transport
  > f2d9cfb switch to using the real FIFO
  > e8a7cb0 client-go informers: provide ListWatch *WithContext variants
  > ce24f3c Merge pull request # 129815 from dims/linter-to-ensure-go-cmp/cmp-is-used-only-in-tests
  > 82fcce0 client-go/transport: structured, contextual logging
  > 43bf1a1 make a real FIFO implementation
  > bad1caa client-go + apimachinery watch: context support
  > de67e02 Linter to ensure go-cmp/cmp is used ONLY in tests
  > 52af3bd Remove cache.ErrRequeue
  > 97f3d26 Merge pull request # 128546 from atiratree/pod-replacement-policy-terminating-pods
  > d853ccf Remove Queue.AddIfNotPresent
  > df7621a update generated files and feature gates
  > f29637f shrink the cache.Queue interface to what is actually used
  > 9f1cce4 `client-go`: transform `watchErrorStream` to wrap the underlying error (# 129765)
  > 3b09c13 Merge pull request # 128971 from aojea/servicecidr_ga
  > 3617101 Merge pull request # 127709 from pohly/log-client-go-rest
  > a9177f9 make update
  > be86cb5 client-go rest: store logger in Result
  > 5d128ad client-go/rest: finish conversion to contextual logging
  > 7aa9904 client-go/rest: backoff with context support
  > 2b2015d client-go/test: warning handler with contextual logging
  > 9897373 Merge pull request # 129631 from kishen-v/update-client-go-docs
  > 49eb6dc Merge pull request # 129633 from skitt/revert-go-difflib-go-spew
  > ea0b82e Update compatibility matrix and maintenance status upto release-1.32
  > 2d999b8 Revert to go-difflib and go-spew releases
  > 151d631 Merge pull request # 129615 from pohly/log-client-go-tools-cache-apis-fix
  > 40cace8 client-go/tools/cache: fix TestAddWhileActive
  > e421aed Merge pull request # 129139 from tklauser/client-setconfigdefaults-noerror
  > 26c6fd6 Merge pull request # 129343 from pohly/log-client-go-v1-event
  > 9f31100 Update generated clients after removing always-nil setConfigDefaults error return value
  > ca1e525 Merge pull request # 129349 from dims/bump-x/net-to-v0.33.0
  > 1047529 client-go event: add WithContext expansion methods
  > 2ad95cf Merge pull request # 128872 from alvaroaleman/generics
  > 6584190 Bump x/net to v0.33.0
  > 91ed5e1 Update github.com/google/btree
  > da6e294 Merge pull request # 129420 from pohly/client-go-tools-cache-testhammercontroller-fix
  > 498e3ef client-go cache: fix TestHammerController
  > ea791f2 Merge pull request # 126387 from pohly/log-client-go-tools-cache-apis
  > 67da6d1 Merge pull request # 129212 from Jefftree/add-clientgo-readme
  > 5d289bc client-go/tools/cache: add APIs with context parameter
  > d5ac3db Merge pull request # 1394 from Jefftree/patch-1
  > ec0ec91 Add client-go README
  > b836a27 client-go/tools/cache: goroutine leak checking
  > 61ee2c5 Merge pull request # 129213 from Jefftree/k-openapi
  > a6e6f66 Delete README.md
  > 540fb4f bump kube-openapi
  > ab443a5 Merge pull request # 128659 from saschagrunert/google-go-protobuf
  > fae881e Merge pull request # 129041 from aojea/flowcontrol
  > be40e97 Replace `github.com/golang/protobuf` with `google.golang.org/protobuf`
  > 633c24c Merge pull request # 129195 from dims/update-x/crypto/ssh-dependency
  > 92b4ec7 flowcontrol: remove testing dependencies
  > e82d0c2 Update x/crypto/ssh dependency
  > 1df7a02 Merge pull request # 129054 from pohly/remove-import-name
  > 706280d Merge pull request # 128753 from skitt/skitt-reviewer-client-go
  > 70a4950 remove import doc comments
  > 8e21410 Merge pull request # 129103 from liggitt/drop-winreadlinkvolume
  > 111d4bc Add myself to client-go reviewers
  > e95e61c Drop use of winreadlinkvolume godebug option
  > f118320 Merge pull request # 129083 from liggitt/go1.23windows
  > 06af948 Revert to go1.22 windows filesystem stdlib behavior
  > 3704508 Merge pull request # 126503 from skitt/generic-fake-client
  > eb282ed Align fake client-go clients with the main interface
bumping cel.dev/expr bfe4f8b...6e3b3e0:
  > 6e3b3e0 Minor update to the field name and numbering for test suites (# 457)
  > 4180ac5 Add basic conformance tests for some comprehensions v2 macros (# 454)
  > 4051f62 Extracted context input as a separate oneof out of test input (# 456)
  > 4631ec6 Remove Unicode space handling from <string>.trim() (# 453)
  > 29ba111 Add py_proto_library targets (# 452)
  > 89c537f Bzlmod update regen (# 451)
  > ed0181b update grammar and tests to differentiate reserved tokens (# 437)
  > 6f8806d Add java_lite messages to test_all_types messages (# 450)
  > ae6fb0d Add a separate field for expressions under input bindings map  (# 449)
  > 0ae0913 Upgrade the googleapis repo deps, remove switched_rules (# 447)
  > b0b1083 Add a doc field on Function and update content advice (# 446)
  > d564205 Add test_suite and test_config under conformance (# 441)
  > b2bd60e Fix misspellings again (# 443)
  > f8cfe20 Fix typeo in string_ext.textproto (# 442)
  > 261e335 Fix and document string.format (# 436)
bumping golang.org/x/net 7d6e62a...6e41cae:
  > 6e41cae go.mod: update golang.org/x dependencies
  > 15f7d40 http2: correctly wrap ErrFrameTooLarge in Framer.ReadFrame
  > ef33bc0 internal/http3: use bubbled context in synctest tests
  > 919c6bc http2: use an array instead of a map in typeFrameParser
  > bae01a7 trace: add missing td tag
bumping google.golang.org/grpc 6135a73...c52d025:
  > c52d025 Change version to 1.73.0 (# 8322)
  > ac60db1 Add flag guarding SPIFFE Bundle provider (# 8343) (# 8382)
  > 183c148 balancer/ringhash: Add experimental notice in package comment (# 8364) (# 8365)
  > b610465 delegatingresolver: avoid proxy for resolved addresses in NO_PROXY env (# 8329) (# 8354)
  > 96c4308 balancer/least_request : Fix panic while handling resolver errors (# 8333) (# 8338)
  > af5146b grpc: update contributing.md (# 8318)
  > 09166b6 cleanup: remove unused constants in generic xdsclient (# 8315)
  > e3f13e7 transport: Prevent sending negative timeouts (# 8312)
  > b89909b leakcheck: Fix flaky test TestCheck (# 8309)
  > 709023d grpcsync/event: Simplify synchronization (# 8308)
  > d36b02e transport: Propagate status code on receiving RST_STREAM during message read (# 8289)
  > ee7f0b6 resolver/delegatingresolver: wait for proxy resolver build before update in tests (# 8304)
  > 96e31db transport: Reject non-positive timeout values in server (# 8290)
  > d3d2702 cleanup: replace dial with newclient (# 8196)
  > d46d6d8 Update CONTRIBUTING.md (# 8300)
  > 950a7cf health: Add List method to gRPC Health service (# 8155)
  > 4680429 credentials/local: implement ValidateAuthority (# 8291)
  > b3d63b1 xds: add MetricsReporter for generic xds client (# 8274)
  > d00f4ac resolver/delegatingresolver: wait for proxy resolver to be built in test (# 8302)
  > 0e656b2 xds: modify generic clients grpctransport to accept optional custom grpc new client function (# 8301)
  > c84fab0 grpc: Update ClientStream.CloseSend docs (# 8292)
  > c7aec4d transport: skip Status.Proto() without details in writeStatus (# 8282)
  > 35aea9c weightedroundrobin: Remove nil embedded SubConn from endpointWeight (# 8297)
  > 41095ae [alts] add keepalive params to the alts handshaker client dial option (# 8293)
  > ee8a53a internal/delegatingresolver: avoid proxy if networktype of target address is not tcp (# 8215)
  > 7fb5738 xds_test: Wait for server to enter serving mode in RBAC test (# 8287)
  > d2f02e5 stats/opentelemetry: separate out interceptors for tracing and metrics (# 8063)
  > 00be1e1 [alts] Add plumbing for the bound access token field in the ALTS StartClient request. (# 8284)
  > 763d093 otel: Test streaming rpc sequence numbers (# 8272)
  > 75d25ee xds: generic lrs client for load reporting (# 8250)
  > 080f956 credentials, transport, grpc : add a call option to override the :authority header on a per-RPC basis (# 8068)
  > 6821606 grpc: regenerate protos (# 8277)
  > 399e2d0 credentials/alts: Optimize Reads (Roll forward # 8236) (# 8271)
  > 4cedec4 grpc_test: add tests for client streaming (# 8120)
  > 030938e xds: Remove redundant proto checks (# 8273)
  > 515f377 github: replace actions/upload-release-asset@v1 with gh cli (# 8264)
  > ec2d624 xds: generic xds client resource watching e2e (# 8183)
  > 82e25c7 xds: fix TestServer_Security_WithValidAndInvalidSecurityConfiguration data race (# 8269)
  > 2640dd7 atls: Clarify usage of dst in ALTSRecordCrypto interface docs (# 8266)
  > 58d1a72 [Security] Add verification logic using SPIFFE Bundle Maps in XDS (# 8229)
  > f7d488d credentials: expose NewContextWithRequestInfo publicly (# 8198)
  > 54e7e26 balancer/ringhash: move LB policy from xds/internal to exported path (# 8249)
  > 223149b github: add printing of new packages to dependency checker (# 8263)
  > aec1381 cleanup: status formatting bug and comment grammar fix (# 8260)
  > 7d68bf6 ringhash: fix flaky e2e tests (# 8257)
  > 718c4d8 xds: Make locality ID string representation consistent with A78 (# 8256)
  > eb4b687 examples/features/opentelemetry: demonstrate tracing using OpenTelemetry plugin (# 8056)
  > 8b2dbbb New A72 changes for OpenTelemetry # 8216 (# 8226)
  > cb1613c xds: make least request available by default (# 8253)
  > d36887b balancer/pickfirstleaf: Avoid reading Address.Metadata (# 8227)
  > 560ca64 xds: fix data file name in test (# 8254)
  > f0676ea Update lrs_stream.go fix use of wrong err (# 8224)
  > 6319a2c ringhash: normalize uppercase in requestHashHeader from service config (# 8243)
  > 68205d5 xdsclient: update watcher API as per gRFC A88 (# 7977)
  > 732f3f3 stats/opentelemetry: fix trace attributes message sequence numbers to start from 0 (# 8237)
  > 6bfa0ca Rollback # 8232 and # 8204 (# 8236)
  > 25c7509 ringhash: implement gRFC A76 (# 8159)
  > 09dd4ba testdata: Wrap lines to 80 columns in markdown file (# 8235)
  > be25d96 credentials/alts: Add comments to clarify buffer sizing (# 8232)
  > db81a2c benchmark: Specify passthrough resolver to avoid resolution failures (# 8231)
  > b368379 credentials/alts: Optimize reads (# 8204)
  > 4b5505d [Security] Add support for SPIFFE Bundle Maps in XDS bundles (# 8180)
  > ce35fd4 stats/opentelemetry: add trace event for name resolution delay (# 8074)
  > 52c643e deps: update dependencies for all modules (# 8221)
  > 51d6a43 Change version to 1.73.0-dev (# 8220)
bumping k8s.io/apiserver c09fadd...338d7b8:
  > 338d7b8 Update dependencies to v0.33.1 tag
  > 1fb809d Merge remote-tracking branch 'origin/master' into release-1.33
  > 6aae451 Stop exposing list-via-watch from the server
  > 345c8cf Merge remote-tracking branch 'origin/master' into release-1.33
  > 11e6080 Merge pull request # 131196 from siyuanfoundation/forward-api
  > e87c9db Move to released version of prometheus/client_golang v1.22.0 from rc.0
  > 9ca332f bug fix: fix version order in emulation forward compatibility.
  > d4f2fc5 Merge pull request # 131020 from wojtek-t/fix_asynchronous_error
  > beaef1d Merge pull request # 131103 from ahrtr/etcd_sdk_20250328
  > b9e86eb Fix race for sending errors in watch
  > 1776f0c Parallelize cacher list tests
  > e228aea Don't start etcd for skipped test
  > 29a5d82 Stop cacher in TestWatchStreamSeparation to speed up shutdown
  > 30b60eb Fix flake, non-consistent list doesn't give any guarantees about staleness
  > aed144f Ensure that cacher is terminated in TestGetListRecursivePrefix
  > 51e9232 bump etcd 3.5.21 sdk
  > 26bd744 Merge pull request # 127053 from dashpole/tracing_context_propagation
  > 37736ec Merge pull request # 129872 from seans3/websocket-https-proxy
  > 6898b83 restrict trace context propagation to system:master and system:monitoring
  > b1b5987 Merge pull request # 130937 from serathius/watchcache-unify-delegate-list
  > 3b2a820 Websocket HTTPS proxy support
  > 6811fde Unify should delegate list
  > b1020ce Merge pull request # 130423 from serathius/watchcache-continue
  > 3a206e1 Merge pull request # 130930 from siyuanfoundation/help
  > 5a05907 Serve LISTs with exact RV and continuations from cache
  > a11f874 Merge pull request # 130121 from yongruilin/featuregate-unversion-clean
  > b94acad chore: update emulation version help msg.
  > 8702b38 chore: Remove unused unversioned feature gate map by consolidating feature gate files
  > 7d24a9e Merge pull request # 130925 from serathius/watchcache-snapshotter-interface
  > 23be1a4 Merge pull request # 130924 from serathius/watchcache-delegate-precedense
  > fa558b1 Create Snapshotter interface to fake the implementation
  > dfc7cb5 Merge pull request # 130922 from serathius/watchcache-delegate-state
  > 91724cf Change precedence order for continue and legacy exact match
  > a581683 Merge pull request # 130899 from serathius/watchcache-error
  > edd1d1f Extend shouldDelegateList testing incorportating state of cacher
  > 1a83f0c Merge pull request # 128402 from richabanker/mvp-agg-discovery
  > 50f48ce Implement watchcache returning error from etcd that caused cache reinitialization
  > 2566cd2 Merge pull request # 130115 from danmillwood/danmillwood-dispatcher-test-patch
  > ae08979 Replace StorageVersion API with aggregated discovery to fetch served resources by a peer for MVP
  > 7db8aee Merge pull request # 130906 from serathius/streaming-validation
  > 10c2760 Fix intermittent test failure
  > f50e0ed Update kube-openapi and integrate streaming tags validation
  > 98865c8 Merge pull request # 130863 from serathius/watchcache-negative-RV-consistent
  > 0f51ac5 Merge pull request # 130560 from stlaz/remote-uid-config-beta
  > c59961a Test continue with negative RV for reading consistent RV
  > 52e218f Merge pull request # 130873 from serathius/watchcache-consistency-typo
  > a9904ee bump RemoteRequestHeaderUID featuregate to Beta, on by default
  > 3482808 Merge pull request # 130866 from serathius/watchcache-delegate-helper
  > 4da0062 Fix missing recursive in consistency check, enable panic on failed check and fix typo in logs
  > aac1558 Merge pull request # 130875 from aramase/aramase/f/fix_email_verified_godoc
  > cc5ef43 Extract delegator.Helper interface to allow making delegate decision based on cache state
  > 3a95207 Add unit test to validate email_verified in claim validation rules
  > 67dfc24 fix godoc for email_verified requirement when username contains claims.email
  > d750e2f Merge pull request # 130595 from tkashem/omit-admission
  > ba3fbbb Merge pull request # 130688 from serathius/watchcache-validate
  > 4c88a5c skip admission for unsafe delete
  > fa03ee3 Merge pull request # 130347 from Jefftree/remove-v2beta1-agg-discovery
  > 7a33f52 Use ValidateListOptions in watch cache
  > 544ce3d Merge pull request # 130741 from googs1025/fix/data_race
  > cba5376 Gate apidiscovery/v2beta1 serving with a feature gate
  > 5df5358 Merge pull request # 130811 from serathius/watchcache-test-negative-rv
  > 7af2504 flake: fix data race for TestApfWatchHandlePanic unit test
  > 2265efa Merge pull request # 130815 from serathius/watchcache-simplify-bypass-test
  > 6f6da8e Add test cases for negative resource version in TestList
  > 8aa636f Merge pull request # 130813 from serathius/watchcache-consistent-list-flake
  > 3a2e1b5 Simplify bypass test by just testing shouldDelegateList function
  > a679925 Test bypass for negative RV
  > 05ed2e0 Merge pull request # 130437 from srivastav-abhishek/fix-unsafe-conversions-test
  > 6ace22f Fix flaky RunTestConsistentList
  > b640464 Merge pull request # 130588 from serathius/watchcache-test-recursive
  > 1b0427a Removed parallel execution for test/subtest where AllocsPerRun is used
  > 84cc815 Merge pull request # 130354 from siyuanfoundation/forward-api
  > f76f81a Test recursive in TestGetListCacheBypass and separate overrides
  > 70820c9 Merge pull request # 130019 from yongruilin/version-intro
  > 942f114 Add option to explicitly enable future gv or gvr in runtime-config.
  > a91b001 Merge pull request # 130788 from jpbetz/fix-subresources
  > 2b4f068 refactor: detach Info from apimachinery util version
  > 5a72bc8 Add emulation forward compatibility into api enablement and RemoveDeletedKinds.
  > 543428d Merge pull request # 130775 from serathius/watchcache-consistent-read
  > 24d512c Fix subresource parsing for declarative validation
  > b671788 feat: extend version information with more detailed version fields
  > d88392f Merge pull request # 130754 from aaron-prindle/validation-gen-add-metric-and-runtime-verification-review-comments-upstream
  > 3cb2448 Fix detecting consistent read when watchcache starts handling continue
  > c31bd99 Merge pull request # 130751 from Jefftree/cle-promote-beta
  > 4fe686a chore: change Info->Error log level related to declarative validation runtime tests and refactor panic wrapper names
  > 79feac1 Merge pull request # 130777 from serathius/watchcache-consistency-test
  > 1623f66 Promote CLE to beta
  > 7b991eb Merge pull request # 124360 from carlory/kep-3751-quota-2
  > 36c1a58 Fix typo and pass the environment variable required to enable watchcache consistency checking in GCE tests
  > 8e8b957 Merge pull request # 130693 from novahe/fix/test-cases
  > 2156078 Add quota support for PVC with VolumeAttributesClass
  > 6056c27 Merge pull request # 130752 from serathius/watchcache-simplify-delagate
  > a2c8b55 Fix test cases that may potentially cause a panic.
  > ae901d5 Merge pull request # 130648 from jpbetz/semver-tolerant
  > 6ed4233 Simplify shouldDelegateList
  > 96b9726 Merge pull request # 130705 from aaron-prindle/validation-gen-add-metric-and-runtime-verification-upstream
  > 408f503 Apply feedback
  > 3832c30 Merge pull request # 130708 from fuweid/reduce-spans-in-writer
  > b8750e7 feat: add declarative validation metrics and associated runtime verification tests
  > 92171c8 Add normalization support to CEL semver library, enable in base env
  > 1a6db11 Merge pull request # 129407 from serathius/streaming-proto-list-encoder
  > 9ff9bbb *: reduce tracing events during streaming JSON objects
  > 97b6cb1 chore: change error_matcher.go to use test interface instead of importing testing pkg
  > 782d907 Add tolerant parse option to semver
  > b2bc62b Merge pull request # 130475 from serathius/watchcache-consistency
  > 67ec836 Implement streaming proto encoding
  > 67d2550 Merge pull request # 130530 from pacoxu/v1.33-fg-cleanup
  > 23e9b2c Implement consistency checking
  > dccab55 Merge pull request # 130637 from serathius/watchcache-unify-validation
  > d44a862 remove feature gate AdmissionWebhookMatchConditions that was GAed in v1.30
  > 855c0d4 Merge pull request # 130555 from thockin/k_k_randfill
  > 73e72d1 Unify ListOptions validation between cache and etcd
  > bd0e774 remove AggregatedDiscoveryEndpoint that was GAed in v1.30
  > 7ee837d Vendor randfill
  > 01307e4 remove feature gate RemainingItemCount that was GAed in v1.29
  > 9641d30 Use randfill, do API renames
  > c2e94ca Merge pull request # 130569 from dims/update-to-latest-cadvisor-v0.52.0
  > 7377dfa Merge pull request # 130417 from serathius/watchcache-compact
  > e36558f update to v1.22.0-rc.0
  > 4305a14 Separate compactWatchCache from increaseRV
  > 337542d update to latest cadvisor @ v0.52.0
  > d3e44df Merge pull request # 130589 from serathius/watchcache-opts
  > c5b8df4 Merge pull request # 130543 from thockin/error_matcher_and_origin
  > f422062 Pass storage.ListOptions to WaitUntilFreshAndList
  > 163865f Merge pull request # 130320 from Jefftree/relax-openapi-verify
  > 0b0eaa3 Fix up ErrorMatcher from feedback
  > b12d7a1 Allow OpenAPI verification to pass both with and without strict alpha
  > 5edb11a Merge pull request # 130571 from hakuna-matatah/debug-upstream
  > 821b679 Merge pull request # 130587 from serathius/watchcache-subtests
  > 6faeace Debug latencies in request handler
  > 79ec453 Run lists tests in subtests
  > 345ad05 Merge pull request # 130549 from jpbetz/validation-gen-pr2
  > 7c0ba21 Add declarative validation utility for use from strategies
  > 70fe4e2 Merge pull request # 128919 from dashpole/update_otel
  > 9b3bebd update go.opentelemetry.io dependencies to v1.33.0/v0.58.0
  > 990bed7 Merge pull request # 130450 from JoelSpeed/fix-contains-cidr
  > 6a65641 Merge pull request # 129334 from serathius/streaming-json-list-encoder
  > 6479174 Fix implementation of ContainsCIDR to allow non-equal addresses
  > f2b1ab6 Merge pull request # 130474 from dims/bump-x/crypto-and-x/oauth2
  > 38b01a1 Streaming JSON encoder for List
  > 69cfb42 Merge pull request # 129688 from cpanato/update-main-go124
  > e1e2202 Bump x/oauth2 and x/crypto
  > 205c0f5 Merge pull request # 130281 from z1cheng/issue_130264
  > 585eff5 bump go.mod to set min go1.24
  > 82c8af5 Merge pull request # 130443 from serathius/watchcache-limit
  > c576a62 Implement chunking for gzip encoder in deferredResponseWriter
  > e03f7e4 Merge pull request # 130400 from serathius/storage-current-rv
  > 9e52394 Remove limit support from btree store
  > 3ad9385 Move GetCurrentResourceVersion to storage.Interface
  > 2ebe70a Merge pull request # 130412 from serathius/watchcache-progress
  > 0230ffb Merge pull request # 130399 from serathius/cache-delegator
  > a458717 Move watch progress to separate package.
  > a64613c Rename CacheProxy to CacheDelegator
  > ed3efcd Merge pull request # 130060 from carlory/fix-quota-scope
  > 1e7b28d Merge pull request # 129657 from p0lyn0mial/upstream-cacher-resilient-init-back-off
  > 13a27b8 Fix a bug where the `ResourceQuota` admission plugin does not respect ANY scope change when a resource is being updated. i.e. to set/unset an existing pod's `terminationGracePeriodSeconds` field.
  > fcfce5a Merge pull request # 130279 from serathius/watchcache-snapshot
  > 3aea777 storage/cacher/ready: dynamically calculate the retryAfterSeconds
  > 4a787e9 Merge pull request # 130344 from tosi3k/wc-upper-bound-capacity
  > 09c0e7d Add snapshotting of watch cache behind a feature gate
  > 710763d Merge pull request # 130118 from lucasrattz/update-anp
  > efe7a1b Add watch cache capacity upper bound adjusting logic
  > d522031 Ensure that btree threadedStoreIndexer implements orderedLister
  > 8dccd76 Merge pull request # 130359 from my-git9/assertion1
  > 4831145 Bump konnectivity-client to v0.31.2
  > 95d27c9 Merge pull request # 130187 from mansikulkarni96/129084
  > a3d85c2 enable go-required check
  > 3a55230 Drop winsymlink go 1.23 workaround
  > afb79f8 fix wrong assertion on tests
  > 644f8e6 Merge pull request # 130242 from serathius/watchcache-test
  > 476d81d Test continuations and exact revision LISTs
  > b9bc02f Merge pull request # 130280 from serathius/watchcache-test-refactor
  > b9f760c Merge pull request # 130297 from 249043822/br0004
  > 1e6e6f0 Refactor TestList and validate continuations to allow testing pagination and more exact RVs in the future
  > 9da16fa Fix non-recursive list should also read RequestWatchProgress feature when consistent list from cache is enabled
  > f98455c Merge pull request # 122646 from liggitt/deletionTimestamp
  > 8dd4460 Merge pull request # 130047 from HirazawaUi/modify-loopback-cert-valid-period
  > 1bac1a3 prevent deletionTimestamp from moving into the past
  > b6fda29 Merge pull request # 130190 from nkeert/test-validate-deferredResponseWriter-for-multiple-writes
  > c533eff adjusting loopback certificate validity in kube-apiserver
  > 938d466 Merge pull request # 130249 from seans3/bump-websockets-version
  > 11288ef Add a test to validate deferredResponseWriteron multiple write calls
  > ff5a72e Update gorilla/websockets library from 1.5.0 to latest 1.5.3
  > 52dde33 Merge pull request # 130126 from fuweid/fix-128314
  > 35a4ee0 Merge pull request # 129852 from p0lyn0mial/upstream-clock-test-cache
  > 2a04234 proxy: should add PingPeriod for websocket translator
  > 08a05f9 Merge pull request # 130113 from AwesomePatrol/129931-fix-3
  > 23e8a6c cacher: decrease the running time of TestConsistentReadFallback
  > 87cccf7 Limit ResourceQuota LIST requests to times when informer is not synced
  > 8a149c9 cacher/cacher_whitebox_test: newTestCacherWithoutSyncing allow passing a clock
  > c471778 Merge pull request # 129934 from serathius/graduate-btree
  > 4628bb8 Merge pull request # 129416 from siyuanfoundation/refactor
  > c1a2d59 Graduate BtreeWatchCache feature gate to GA
  > 9bb5fd5 Merge pull request # 129929 from serathius/deprecate-separate-rpc
  > 9bb4aa7 Refactor compatibility version code
  > 7b8dc61 Merge pull request # 129930 from serathius/deprecate-watch-from-storage
  > 66f7881 Flip SeparateCacheWatchRPC feature gate to false and deprecate it.
  > 0198fdb Merge pull request # 129921 from srivastav-abhishek/fix-etcd-test
  > 0167eb5 Deprecate WatchFromStorageWithoutResourceVersion
  > 2ce508c Merge pull request # 129844 from cici37/bumCEL
  > 55da1af Additional timeout to receive all watchEvents
  > 39a73cd Merge pull request # 129813 from yongruilin/golangci-featuregate-add
  > 69f7857 Update the env option.
  > 52f2fda Merge pull request # 129596 from cici37/cvTest
  > ee59411 feat: add a lint rule to prevent Add unversioned featuregate
  > 7e0cbb5 Bump cel-go to v0.23.2.
  > 6c0d90b Merge pull request # 129751 from pacoxu/EfficientWatchResumption
  > 3a132bf Add test for compatible version
  > 2911f5b Merge pull request # 129815 from dims/linter-to-ensure-go-cmp/cmp-is-used-only-in-tests
  > a2ab8dc remove GAed EfficientWatchResumption since v1.24
  > 0a703e3 Linter to ensure go-cmp/cmp is used ONLY in tests
  > f6d3d88 Merge pull request # 129786 from JoelSpeed/drop-netip-variables
  > a3f27ce Drop declaration of IP/CDIR type CEL variables
  > e35b5a7 Merge pull request # 129732 from dims/switch-to-v2.6.3-of-gopkg.in/go-jose/go-jose.v2
  > cf7237e Merge pull request # 127709 from pohly/log-client-go-rest
  > 736476d update github.com/coreos/go-oidc to v2.3.0
  > 6885e99 Merge pull request # 129538 from hzxuzhonghu/http2-clean
  > c2262d5 client-go/rest: backoff with context support
  > 6e7ca2c Switch to gopkg.in/go-jose/go-jose.v2 @ v2.6.3
  > 0e1bb96 Merge pull request # 129679 from pacoxu/remove-APIListChunking
  > 29de537 Cleanupï: only initiate http2 server options when http2 is not disabled
  > b66aedf remove APIListChunking which was GAed since v1.29
  > 626adbf Merge pull request # 129303 from sttts/sttts-vap-jsonpatch-typeresolver-tests
  > ae92d91 Merge pull request # 129628 from 249043822/br004
  > ca7102a apiserver/admission/cel: add unit tests for JSONPatch expressions
  > 2387b5d Merge pull request # 129633 from skitt/revert-go-difflib-go-spew
  > e802cf6 remove duplicate getAttrsFunc calls to reduce temporary memory allocations
  > 2c1a1fa Merge pull request # 129547 from serathius/watchcache-bypass-test-valid
  > 695a3a4 Revert to go-difflib and go-spew releases
  > cd99ead Merge pull request # 129622 from dims/update-to-latest-kustomize-v5.6.0
  > a6c0914 Only test requests that pass validation
  > 37d4665 Merge pull request # 127375 from omerap12/issue_126311
  > 5f060d9 Drop github.com/asaskevich/govalidator
  > 76f1672 Merge pull request # 129590 from wojtek-t/cleanup_feature_gates
  > 7ca4de7 lint: removed empty line
  > 30363fd Remove WatchBookmark feature gate
  > 81ab7e0 Add test for CEL reserved symbols without double underscore
  > 5edcd3c Merge pull request # 124087 from krzysdabro/tests-apiserver-options-kms
  > e62b626 Merge pull request # 129443 from serathius/watchcache-proxy
  > 2146712 apiserver: decrease timeout for TestKMSHealthzEndpoint
  > 6c47046 Merge pull request # 129439 from serathius/refactor-delegate-2
  > 74be087 Extract and unify cache bypass logic by creating a CacheProxy struct
  > b431778 Refactor shouldDelegateList
  > a2cdf2c Merge pull request # 129540 from serathius/test-list-cache-bypass
  > 2241ea0 Merge pull request # 129542 from serathius/watchcache-benchmark-namespace
  > 3c47ed7 Test all possible combinations of input for shouldDelegateList
  > 8161d73 Add benchmarking of namespace index
  > c7ea661 Merge pull request # 129441 from serathius/watchcache-benchmark
  > 893803d Merge pull request # 129440 from serathius/watchcache-extract-list-response
  > fd21d18 Improve benchmark to handle multiple dimensions
  > 2cad252 Merge pull request # 129430 from MadhavJivrajani/go124-webhook-regex-ut
  > 62c90b1 Extract list response struct to manage all the response fields
  > e6eb589 Merge pull request # 129349 from dims/bump-x/net-to-v0.33.0
  > 7c924dc webhook: alter regex to account for x509sha1 GODEBUG removal
  > 006dd59 Merge pull request # 128872 from alvaroaleman/generics
  > 825f36b Bump x/net to v0.33.0
  > 84b3c4c Use generic btree in watchcache
  > a53d8f1 Update github.com/google/btree
  > 494066f Merge pull request # 128279 from Jefftree/compat-133
  > 15b54ba Expand emulated version range to n-3 with 1.31 floor
  > c7fb780 Merge pull request # 129074 from siyuanfoundation/fgv
  > 0daeb9f Add Validation to versioned feature specs.
  > b3597c0 Merge pull request # 129205 from tosi3k/wc-configurable-retention
  > f5b4a60 Merge pull request # 129213 from Jefftree/k-openapi
  > 0dcf3e9 Configure watch cache history window based on request timeout
  > 665a8df Merge pull request # 128343 from Jefftree/responsewriter-test
  > 68ddbb0 bump kube-openapi
  > b62222b Merge pull request # 129195 from dims/update-x/crypto/ssh-dependency
  > ada3ee1 add test for inmemory response writer
  > 6ecac9f Merge pull request # 128844 from cheftako/updateANP
  > dbfbe37 Update x/crypto/ssh dependency
  > 988c0f8 Merge pull request # 129054 from pohly/remove-import-name
  > c8d9720 Bump konnectivity-client to v0.31.1
  > 0a3c895 Merge pull request # 128890 from kei01234kei/output_log_when_server_shutdown_is_failed
  > b846629 remove import doc comments
  > 47024d9 Merge pull request # 128862 from MariamFahmy98/map-unit-tests
  > 753940e 📝 output log when server shutdown is failed
  > ea0b9ce Merge pull request # 128621 from kmala/master
  > b858201 fix: remove duplicated unit tests in JSONPatch and ApplyConfiguration
  > df1723c Merge pull request # 127897 from modulitos/add-x509-uid-to-user
  > d513755 update the github.com/golang-jwt/jwt/v4 dependency
  > 3658357 Merge pull request # 129103 from liggitt/drop-winreadlinkvolume
  > 026bd87 set user.DefaultInfo.UID from x509 cert
  > 9add4d0 Drop use of winreadlinkvolume godebug option
  > 99abade Merge pull request # 129081 from stlaz/fg_remote_uid
  > 79e6f1f Merge pull request # 129083 from liggitt/go1.23windows
  > 5047b8f featuregate UID in RequestHeader authenticator
  > aaeb01b Revert to go1.22 windows filesystem stdlib behavior
  > cccad30 Merge pull request # 128722 from dims/possible-fix-for-alpha-feature-breaking-tests
  > 51b4b49 Possible fix for alpha CI jobs failing with AllowUnsafeMalformedObjectDeletion switched on
bumping knative.dev/pkg 3c3a920...05e18ff:
  > 05e18ff pull configmap parsing into separate package (# 3185)
  > 4e27b2e bump min k8s version to 1.32 (# 3184)
  > 1da18b7 Bump the golang-x group with 3 updates (# 3183)
  > 2c412af Bump google.golang.org/grpc from 1.72.2 to 1.73.0 (# 3182)
bumping github.com/google/cel-go 8ad600b...1bf2472:
  > 1bf2472 Minor update on cost order (# 1119)
  > fb3fe56 Bump github.com/golang/glog (# 1115)
  > d8351df Modify cost updates to be more extension friendly (# 1113)
  > 2f7606a Cost tracking for two-variable comprehensions and bindings (# 1104)
  > 7621362 Add optional.unwrap() / .unwrapOpt() function (# 1103)
  > 9f925d8 Bump the npm_and_yarn group across 1 directory with 2 updates (# 1110)
  > 91fb306 Update PruneAst to support constants of optional type (# 1109)
  > 33a7f97 Default enable using hidden accumulator name. (# 1099)
  > ee426f4 Add base_config and partial_config files under restricted_destination testdata (# 1106)
  > 43bc483 Add test cases for `string.format` covering various edge cases (# 1101)
  > 628543b Fixes for google import. (# 1102)
  > fa6eb32 Add option to use inaccessible accumulator var (# 1097)
  > 7c5909e Update README.md (# 1098)
  > 98789f3 Address non-const format string lint findings (# 1096)
  > a108e9e Add syntax for escaped field selectors. (# 1002)
  > 8b07a00 Policy nested rule fix (# 1092)
  > aacca17 Add support for typed conformance tests. (# 1089)
  > 0091f8d Replace checks for valid UTF-8 in strings with go-maintained calls (# 1094)
  > bd1ec92 Fix two-variable comprehension pruning (# 1083)
  > 6202a67 improve debug output to properly quote byte strings (# 1088)
  > c096438 Fix a crash in mismatched output check for nested rules (# 1086)
  > 000958d Add versioning support for extensions (# 1075)
  > 2e67731 Fix partial evaluation with the new folder objects used with comprehensions (# 1084)
  > 5910569 Improve policy compiler error message for incompatible outputs. (# 1082)
  > 5d18e93 First and last (# 1067)
  > 933f926 Fix nil-type when two-var comprehension has a dyn range (# 1077)
  > ff1302f Fix optional test to be functional (# 1076)
  > 4b73ba3 Add two-variable comprehension support to cel-policy (# 1074)
  > ba74bf6 Additional nil-safety checks with corresponding test updates (# 1073)
  > 72e0977 Rename conformance proto import for ease of syncing (# 1071)
  > 24ec244 Fix format string issue (# 1072)
  > 7184cb0 Update docs on IO methods (# 1070)
  > da44524 Expose public methods to convert function and variable decl to v1 Decl (# 1069)
  > f8ecaa2 Harden legacy macros, add support for existsOne macro (# 1064)
bumping github.com/klauspost/compress 72cd4a9...8e79dc4:
  > 8e79dc4 Deprecate Go 1.21 and add 1.24 (# 1055)
  > df8e99c build(deps): bump the github-actions group with 2 updates (# 1053)
  > 7787431 zstd: fix unused debug code (# 1052)
  > 0bf3ecb flate: Cleanup & reduce casts (# 1050)
  > e0f89a9 flate: Fix matchlen L5+L6 (# 1049)
  > c8a8470 s2: Improve small block compression speed w/o asm (# 1048)
  > b05b993 s2: Add block decode fuzzer (# 1044)
  > aafbabd flate: Simplify matchlen (remove asm) (# 1045)
  > dbaa9c1 flate: Simplify l4-6 loading (# 1043)
  > 4fa2036 Add unsafe little endian loaders (# 1036)
  > 7d9f61a zstd: use `slices.Max` for max value in slice (# 1041)
  > a2a2e44 refactor: use built-in `min` function (# 1038)
  > 6ad807b build(deps): bump the github-actions group with 2 updates (# 1035)
  > b08929a docs: Description typo fixed (# 1031)
  > bbaf27d zstd: fix: check `r.err != nil` but return a nil value error `err` (# 1028)
  > 4d8527a build(deps): bump the github-actions group with 2 updates (# 1026)
  > 11e333d zstd: Read doc typo (# 1023)
  > 826a08c zstd: remove unreachable debugging code raising insecure_file_permissions security detection (# 1022)
  > 3915ad5 chore: fix comment(bit-->byte) (# 1021)
  > 7883c2d build(deps): bump the github-actions group with 2 updates (# 1020)
bumping k8s.io/apimachinery 59e9003...173776a:
  > 173776a Merge pull request # 131708 from tigrato/automated-cherry-pick-of-# 131702-upstream-release-1.33
  > a3d1fde fix: fixes a possible panic in `NewYAMLToJSONDecoder`
  > 955939f bump etcd 3.5.21 sdk
  > e8a77bd Merge pull request # 130910 from googs1025/fix/datarace
  > 7e8c77e Merge pull request # 130906 from serathius/streaming-validation
  > 27fd396 flake: fix data race for func TestBackoff_Step
  > 8bcc6f1 Update kube-openapi and integrate streaming tags validation
  > 6ce776c Merge pull request # 130857 from thockin/kk_small_vg_diffs
  > f2c94d6 Comment on origin and JSON schema
  > b63ba07 Use origin in validateFalse's own test
  > beddba4 Use test.Helper in helper funcs
  > eaf4038 Merge pull request # 130354 from siyuanfoundation/forward-api
  > c8bf404 Merge pull request # 130019 from yongruilin/version-intro
  > 39750cd Add emulation forward compatibility into api enablement and RemoveDeletedKinds.
  > a04ff37 Merge pull request # 122550 from danwinship/tighten-ip-validation
  > 18f4642 refactor: detach Info from apimachinery util version
  > 2eee037 Merge pull request # 130705 from aaron-prindle/validation-gen-add-metric-and-runtime-verification-upstream
  > 7186701 Fix IP/CIDR validation to allow updates to existing invalid objects
  > a78ae8b feat: extend version information with more detailed version fields
  > 2687636 Merge pull request # 130739 from jpbetz/declarative-validation-test-infra
  > f33bb5d chore: change error_matcher.go to use test interface instead of importing testing pkg
  > 72340d2 Add legacy versions of IsValidIP/IsValidCIDR
  > d9e6c50 Introduce versioned validation test utilitizes and add fuzz tester
  > 8aa42c4 Slightly improve EndpointSlice address validation
  > e79d000 Merge pull request # 129407 from serathius/streaming-proto-list-encoder
  > 5b974f2 Add validation.IsValidInterfaceAddress
  > 87bb4f9 Merge pull request # 130730 from jpbetz/minimum-tag
  > e0ec816 Implement streaming proto encoding
  > a18d60b Add +k8s:minimum validation tag
  > 6e3d6ca Merge pull request # 128786 from danwinship/bad-ip-warnings
  > 56015c7 Merge pull request # 130699 from thockin/master_validation-gen_odd_cases
  > fe80b85 Add utilvalidation.GetWarningsForIP and .GetWarningsForCIDR
  > 40f26b3 Merge pull request # 130695 from yongruilin/validation-gen_coveredbydeclarative
  > af97bd6 Prevent usage patterns we don't want to support
  > ba7db19 Split out IP validation functions into their own file
  > 06dde8a Add CoveredByDeclarative to field error struct
  > ee322b2 Merge pull request # 130666 from thockin/yaml_json_ambiguous_decode
  > e25aab0 Merge pull request # 130555 from thockin/k_k_randfill
  > 9b3d085 Better handling of YAML that tastes like JSON
  > a18d7f2 Vendor randfill
  > 78ddbb8 Use randfill, do API renames
  > ac04c7e Merge pull request # 130569 from dims/update-to-latest-cadvisor-v0.52.0
  > a3f7d4e Merge pull request # 130543 from thockin/error_matcher_and_origin
  > 7802db1 update to v1.22.0-rc.0
  > a70cc77 Fix up ErrorMatcher from feedback
  > 4dfd1a6 update to latest cadvisor @ v0.52.0
  > b5eba29 Merge pull request # 130511 from z1cheng/issue_130395
  > e93b7f2 Merge pull request # 130549 from jpbetz/validation-gen-pr2
  > e8d821e Implement tests for encoding collections in Proto
  > 39f6713 Add declarative validation to scheme
  > 9dca0b5 Merge pull request # 130349 from jpbetz/validation-gen-pr1
  > 14ab970 Add validators: immutable
  > 93247ca Add validators: optional/required/forbidden
  > f6058d5 Add validators: eachkey, eachval, subfield
  > 77caaf9 Add validation-gen test infrastructure
  > 13b1842 Introduce validation-gen
  > 4e96674 Merge pull request # 128919 from dashpole/update_otel
  > ded50ec update go.opentelemetry.io dependencies to v1.33.0/v0.58.0
  > a3e3122 Merge pull request # 130388 from thockin/error_matcher_and_origin
  > 7d0dbe2 Merge pull request # 129334 from serathius/streaming-json-list-encoder
  > 46d8d84 Add an error matcher, convert 2 tests
  > 609a765 Merge pull request # 130474 from dims/bump-x/crypto-and-x/oauth2
  > 1e89b89 Streaming JSON encoder for List
  > fa95ab3 Fix nits from PR 130355
  > 6c5685c Merge pull request # 130355 from yongruilin/validation_origin
  > f7c9d8b Bump x/oauth2 and x/crypto
  > 758f86d Merge pull request # 129688 from cpanato/update-main-go124
  > 0571dbf test: convert ValidateEndpointsCreate to use error Origin field in test
  > 68b2a81 Switch to private instances of rand for seeding for tests
  > da1b1a9 feat: Add Origin field to Error and related methods
  > aac66c8 bump go.mod to set min go1.24
  > ee1e055 Merge pull request # 130220 from serathius/streaming-json-tests
  > a783532 Merge pull request # 130187 from mansikulkarni96/129084
  > e38241d Add tests for encoding collections in JSON for KEP-5116
  > 0a41670 Drop winsymlink go 1.23 workaround
  > 47e7fa9 Merge pull request # 130151 from marosset/windows-unit-tests-externaljwt-plugin-fixes
  > 11b535c fixing various unit tests on Windows that create abstract sockets
  > 46c230e Merge pull request # 130049 from aojea/avoid_ginkgo_dep
  > a19f1f8 Merge pull request # 129792 from likakuli/fix-errshortbuffer
  > d8c2c0a reduce dependencies in apimachinery net testing utils
  > 1235242 Merge pull request # 129341 from pohly/log-client-go-watch
  > f7fd8b3 fix: Fix the issue of relist caused by client-side timeout
  > a2cb7d3 Merge pull request # 125046 from tklauser/min-max-builtins
  > 675c4f7 client-go + apimachinery watch: context support
  > 4c61591 Merge pull request # 129815 from dims/linter-to-ensure-go-cmp/cmp-is-used-only-in-tests
  > b93cf32 Use Go 1.21 min/max builtins
  > d5dedd0 Linter to ensure go-cmp/cmp is used ONLY in tests
  > 45d29dc Merge pull request # 129611 from carlory/cleanup-WatchBookmark
  > c74304d Merge pull request # 129346 from pohly/log-client-go-apimachinery-wait
  > 5036924 remove WatchBookmark feature-gate comment from types.go
  > f863467 Merge pull request # 129633 from skitt/revert-go-difflib-go-spew
  > b6d30bd apimachinery wait: support contextual logging
  > 808ab77 Revert to go-difflib and go-spew releases
  > 3e8e52d Merge pull request # 129349 from dims/bump-x/net-to-v0.33.0
  > c485e50 Bump x/net to v0.33.0
  > 307a3dd Merge pull request # 126387 from pohly/log-client-go-tools-cache-apis
  > a1a247a Merge pull request # 129257 from liggitt/coerce-labels-annotations
  > 6091c6a k8s.io/apimachinery: add HandleCrashWithLogger and HandleErrorWithLogger
  > 8d8a7ac Coerce null label and annotation values to empty string
  > 767f17a Merge pull request # 129213 from Jefftree/k-openapi
  > ff1373e bump kube-openapi
  > cfa44a1 Merge pull request # 128659 from saschagrunert/google-go-protobuf
  > 5765d81 Replace `github.com/golang/protobuf` with `google.golang.org/protobuf`
  > 7249ce1 Merge pull request # 129195 from dims/update-x/crypto/ssh-dependency
  > f228881 Update x/crypto/ssh dependency
  > d2cfef5 Merge pull request # 129170 from benluddy/cyclic-marshaler-cache-race
  > 146e532 Merge pull request # 129054 from pohly/remove-import-name
  > 373952f Fix data race in CBOR serializer's custom marshaler type cache.
  > 6e120e1 Merge pull request # 127897 from modulitos/add-x509-uid-to-user
  > 15f29b9 remove import doc comments
  > 8c60292 Merge pull request # 129103 from liggitt/drop-winreadlinkvolume
  > aa837c2 set user.DefaultInfo.UID from x509 cert
  > f9c043a Drop use of winreadlinkvolume godebug option
  > a0ca814 Merge pull request # 129083 from liggitt/go1.23windows
  > 65d79dc Revert to go1.22 windows filesystem stdlib behavior
  > 96b97de Merge pull request # 127513 from tkashem/delete-undecryptable
bumping google.golang.org/genproto/googleapis/api 56aae31...b45e905:
  > b45e905 chore(all): update all (# 1204)
  > e70fdf4 chore(deps): bump golang.org/x/net to 0.37.0 (# 1202)
  > 33a14cd chore(deps): bump golang.org/x/net from 0.35.0 to 0.36.0 (# 1201)
  > 5d019e2 chore(deps): bump golang.org/x/net in /googleapis/bytestream (# 1200)
  > 81fb87f chore(all): auto-regenerate .pb.go files (# 1199)
  > 29e43e6 chore(all): auto-regenerate .pb.go files (# 1195)
  > a0af3ef chore(all): update all (# 1196)
  > 55c9018 chore(all): auto-regenerate .pb.go files (# 1194)
  > 546df14 chore(all): update all (# 1193)
  > 9fdb1ca chore(all): update Go to 1.24 (# 1191)
bumping k8s.io/apiextensions-apiserver ab6ba90...a0cfc63:
  > a0cfc63 Update dependencies to v0.33.1 tag
  > c066cbe Merge remote-tracking branch 'origin/master' into release-1.33
  > 08c3d2f Move to released version of prometheus/client_golang v1.22.0 from rc.0
  > 7c1033e fix narrow spaces of %e for x/net bump
  > cdf67dd bump etcd 3.5.21 sdk
  > b8b1528 Merge pull request # 129872 from seans3/websocket-https-proxy
  > d5c7de8 Websocket HTTPS proxy support
  > de39b8d Merge pull request # 130899 from serathius/watchcache-error
  > 7022eab Merge pull request # 130020 from mozillazg/patch-3
  > 58ab281 Implement watchcache returning error from etcd that caused cache reinitialization
  > 718a2c7 Merge pull request # 130906 from serathius/streaming-validation
  > 3b74a18 test: fix a typo
  > 19127f7 Update kube-openapi and integrate streaming tags validation
  > c5a4a03 Merge pull request # 130019 from yongruilin/version-intro
  > a62c99e Merge pull request # 130783 from jpbetz/versioned-formats
  > d369bde feat: extend version information with more detailed version fields
  > 0f37230 Support emulation versioning of formats
  > c40f0a3 Merge pull request # 129407 from serathius/streaming-proto-list-encoder
  > 6b43ac7 Implement streaming proto encoding
  > 59a6ab4 Merge pull request # 130555 from thockin/k_k_randfill
  > e10116f Vendor randfill
  > 5964630 Use randfill, do API renames
  > 77f6333 Merge pull request # 130569 from dims/update-to-latest-cadvisor-v0.52.0
  > 0bf3773 Merge pull request # 130489 from p0lyn0mial/upstream-fake-client-pass-opts
  > 239dba5 update to v1.22.0-rc.0
  > aca9073 Merge pull request # 130422 from bertinatto/propagate-error-custom-resource-storage-2
  > 57aa770 ./hack/update-codegen.sh
  > 18929b9 update to latest cadvisor @ v0.52.0
  > a804ce5 Propagate error when creating CustomResourceStorage instead of panic'ing
  > 21d0c2f Merge pull request # 130349 from jpbetz/validation-gen-pr1
  > 9707584 Bump gengo/v2 to latest
  > 044c7fa Merge pull request # 128919 from dashpole/update_otel
  > 4542a04 update go.opentelemetry.io dependencies to v1.33.0/v0.58.0
  > e4e2dee Merge pull request # 129334 from serathius/streaming-json-list-encoder
  > 1dcd2da Merge pull request # 130474 from dims/bump-x/crypto-and-x/oauth2
  > 7573a01 Streaming JSON encoder for List
  > 8da24ea Merge pull request # 129688 from cpanato/update-main-go124
  > bb85abc Bump x/oauth2 and x/crypto
  > 76fd6eb bump go.mod to set min go1.24
  > 376adbc Merge pull request # 130118 from lucasrattz/update-anp
  > 282cf37 Merge pull request # 130187 from mansikulkarni96/129084
  > f47401f Bump konnectivity-client to v0.31.2
  > 37468b9 Drop winsymlink go 1.23 workaround
  > 00d4af5 Merge pull request # 130249 from seans3/bump-websockets-version
  > c6bde84 Merge pull request # 130013 from yongruilin/crd-racheting-ga
  > 28b2cb9 Update gorilla/websockets library from 1.5.0 to latest 1.5.3
  > 1ecd29f Merge pull request # 129341 from pohly/log-client-go-watch
  > 2d32bba feat: promote CRDValidationRatcheting to GA
  > 6e7b624 Merge pull request # 129416 from siyuanfoundation/refactor
  > 749c892 client-go informers: provide ListWatch *WithContext variants
  > 67f8de6 Refactor compatibility version code
  > ee10ccf Merge pull request # 129844 from cici37/bumCEL
  > 3f4850c Merge pull request # 125046 from tklauser/min-max-builtins
  > 1cfe458 Add more tests for optional.
  > 5d3ea2d Merge pull request # 129732 from dims/switch-to-v2.6.3-of-gopkg.in/go-jose/go-jose.v2
  > 7a9169a Use Go 1.21 min/max builtins
  > 26455c9 Fixed the estimated cost for opt map.
  > ad534d8 Merge pull request # 127709 from pohly/log-client-go-rest
  > ce3c316 update github.com/coreos/go-oidc to v2.3.0
  > 33823bd Bump cel-go to v0.23.2.
  > cecfb1c client-go/rest: backoff with context support
  > 0403de5 Switch to gopkg.in/go-jose/go-jose.v2 @ v2.6.3
  > a79d7c9 Merge pull request # 129028 from sttts/sttts-cel-test
  > e38d692 Merge pull request # 129633 from skitt/revert-go-difflib-go-spew
  > cf58e61 Address comments
  > 71a2dc8 Revert to go-difflib and go-spew releases
  > 93db62f apiextensions: add pkg/test with CEL unit test helpers
  > b2930d0 Merge pull request # 129622 from dims/update-to-latest-kustomize-v5.6.0
  > 9198625 Drop github.com/asaskevich/govalidator
  > 93f7497 Merge pull request # 129506 from JoelSpeed/fix-status-ratcheting
  > d524468 Merge pull request # 129298 from omerap12/fix-discovery-controller-panic
  > 30b06d4 U…

Signed-off-by: Knative Automation <automation@knative.team>
2025-06-17 08:37:56 +00:00
Kapil Sareen e9e88e5264
mcp: adds build tool (#2865)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-06-17 01:28:56 +00:00
github-actions[bot] 20479af33c
chore: update Quarkus platform version to 3.23.3 (#2862)
Co-authored-by: Knative Automation <automation@knative.team>
2025-06-12 14:56:48 +00:00
Kapil Sareen 90ed2421a0
mcp: adds list tool (#2861)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-06-12 08:09:47 +00:00
Kapil Sareen e5b34ecb1f
mcp: adds create and deploy tools (#2859)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-06-11 13:01:46 +00:00
github-actions[bot] f43b09b74d
update components (#2860)
Co-authored-by: Knative Automation <automation@knative.team>
2025-06-10 14:20:45 +00:00
github-actions[bot] 3da9704df8
chore: update Quarkus platform version to 3.23.2 (#2858)
Co-authored-by: Knative Automation <automation@knative.team>
2025-06-09 09:32:52 +00:00
Kapil Sareen 0ed0efbe27
mcp: adds func mcp command (#2836)
Signed-off-by: KapilSareen <kapilsareen584@gmail.com>
2025-06-09 01:41:30 +00:00
github-actions[bot] fd73021f34
chore: update Springboot platform version to 3.5.0 (#2851)
Co-authored-by: Knative Automation <automation@knative.team>
2025-06-05 05:27:27 +00:00
Knative Automation 13444c3238
upgrade to latest dependencies (#2850)
bumping knative.dev/networking eea9fd8...e132e24:
  > e132e24 upgrade to latest dependencies (# 1065)
bumping knative.dev/eventing 40bac3c...da948cb:
  > da948cb Return assigned port for HTTPEventReceiver (# 8596)
  > 3edf526 [main] Upgrade to latest dependencies (# 8595)
bumping knative.dev/pkg 44579e9...3c3a920:
  > 3c3a920 Bump google.golang.org/grpc from 1.72.1 to 1.72.2 (# 3181)
bumping knative.dev/serving c36383e...794c02f:
  > 794c02f Update net-kourier nightly (# 15912)
  > fbeabf6 upgrade to latest dependencies (# 15906)
  > 5470b9f Update net-contour nightly (# 15911)
  > 0a95f77 Update net-kourier nightly (# 15909)
  > 0d710f5 Update net-gateway-api nightly (# 15910)
  > d5907a3 Update net-kourier nightly (# 15901)
  > 817f739 Bump chainguard-dev/actions in the github-actions group (# 15905)
  > 92b23aa Update net-istio nightly (# 15902)
  > 6d6d25e Fix labels and annotations propagation to k8s service on update (# 15892)
bumping google.golang.org/grpc 4cf3cf7...6135a73:
  > 6135a73 Change version to v1.72.2 (# 8357)
  > eef8c9c delegatingresolver: avoid proxy for resolved addresses in NO_PROXY env (# 8329) (# 8353)
  > 3b5fa74 balancer/least_request : Fix panic while handling resolver errors (# 8333) (# 8339)
  > edf643f Change version to v1.72.2-dev (# 8326)

Signed-off-by: Knative Automation <automation@knative.team>
2025-06-05 05:16:26 +00:00
Tin 33ab476607
Changed volume uploader pod image pull policy to "Always" (#2852) 2025-06-02 15:57:24 +00:00
Matej Vašek 01b5c3eef6
Improve Go templates README (#2848)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-05-28 14:18:18 +00:00
Matej Vašek 22e4f6d53a
Fix non-containerized build/run /w external deps (#2847)
It's necessary to call "go mod tidy" on scaffolded code.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-05-28 13:45:18 +00:00
Tin 3150fedb57
Issue #2835 - Tekton task "func-buildpacks" prepare/results steps use non-multi-arch bash:5.1.4 image, causing exec format errors on ARM64 (#2842) 2025-05-27 13:41:24 +00:00
Jefferson Ramos f598fa45d0
chore: add tasks related images to func environment (#2839) 2025-05-27 13:41:18 +00:00
Matej Vašek 15b30dcd05
Fix quarkus buildpack image reference (#2838)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-05-27 13:22:18 +00:00
Jefferson Ramos 70720edadc
test: fix python e2e http test (#2831) 2025-05-27 13:10:19 +00:00
Knative Automation 535d6de273
upgrade to latest dependencies (#2830)
bumping golang.org/x/sync 396f3a0...506c70f:
  > 506c70f errgroup: propagate panic and Goexit through Wait
bumping golang.org/x/text 4890c57...700cc20:
  > 700cc20 go.mod: update golang.org/x dependencies
bumping golang.org/x/net b8d8877...7d6e62a:
  > 7d6e62a go.mod: update golang.org/x dependencies
  > ea0c1d9 internal/timeseries: use built-in max/min to simplify the code
  > 3e7a445 quic: skip packet numbers for optimistic ack defense
  > 3f563d3 quic: use an enum for sentPacket state
  > a3b6e77 quic: don't re-lose packets when discarding keys
  > 22500a6 quic: decode packet numbers >255 in tests
  > dd0b200 quic: remove go1.21 build constraint
bumping knative.dev/networking 16635c6...eea9fd8:
  > eea9fd8 upgrade to latest dependencies (# 1064)
  > 6f71a25 upgrade to latest dependencies (# 1063)
  > a06da1d upgrade to latest dependencies (# 1062)
bumping golang.org/x/sys 01aaa83...3d9a6b8:
  > 3d9a6b8 windows: add WSADuplicateSocket
  > c0a9559 cpu: add crypto extensions detection for riscv64
  > 8e9e046 windows: add virtual key codes and console input consts
  > 7138967 windows: fix slicing of NTUnicodeString values
  > 6a85559 windows: fix dangling pointers in (*SECURITY_DESCRIPTOR).ToAbsolute
bumping knative.dev/pkg d5e74d2...44579e9:
  > 44579e9 Bump google.golang.org/grpc from 1.72.0 to 1.72.1 (# 3180)
  > 873230f upgrade to latest dependencies (# 3179)
  > 19a1383 group golang.org/x dependencies (# 3178)
  > 1c0e799 Bump golang.org/x/net from 0.39.0 to 0.40.0 (# 3177)
  > d09148e Bump golang.org/x/tools from 0.32.0 to 0.33.0 (# 3176)
  > cb6cfa2 Bump golang.org/x/sync from 0.13.0 to 0.14.0 (# 3175)
bumping golang.org/x/term 5d2308b...2ec7864:
  > 2ec7864 go.mod: update golang.org/x dependencies
  > a809085 term: support pluggable history
bumping knative.dev/eventing 06f8dc9...40bac3c:
  > 40bac3c Eventing TLS: add tests for dynamically added CA trust bundles (# 7726)
  > a2cf308 [Automated] Update eventing-eventing-integrations nightly (# 8591)
  > 7a5486b [main] Upgrade to latest dependencies (# 8590)
  > 5eb1a5f Try to ensure ordering of referenced source CMs, by name (# 8589)
  > 3788fcc [main] Upgrade to latest dependencies (# 8587)
bumping knative.dev/serving a01a078...c36383e:
  > c36383e Add support for Kubernetes “image” volume type (# 15878)
  > 3f7000d TestSystemInternalTLS set min-scale to not lose logs (# 15895)
  > 16b1076 Update net-kourier nightly (# 15897)
  > e56dd0e upgrade to latest dependencies (# 15894)
  > 8a39d5e upgrade to latest dependencies (# 15881)
  > 99655d2 Update net-gateway-api nightly (# 15885)
  > bbf34f6 Update net-contour nightly (# 15887)
  > 4e4420a Update net-kourier nightly (# 15886)
  > ebcedc8 Update net-istio nightly (# 15888)
  > 589b6ab bump cluster version (# 15879)
bumping knative.dev/hack c4037b0...f525e18:
  > f525e18 Bump min kube version to 1.32 (# 424)
bumping google.golang.org/grpc a43eba6...4cf3cf7:
  > 4cf3cf7 Change version to 1.72.1 (# 8319)
  > 537fe8d transport: Propagate status code on receiving RST_STREAM during message read (# 8289) (# 8317)
  > f32eab3 cherry-pick # 8302 and # 8304 to v1.72.x branch (# 8303)
  > 7fcfc87 internal/delegatingresolver: avoid proxy if networktype of target address is not tcp (# 8215) (# 8296)
  > ad1e120 Change version to 1.72.1-dev (# 8219)
bumping golang.org/x/crypto 959f8f3...aae6e61:
  > aae6e61 go.mod: update golang.org/x dependencies
  > 9c1aa6a ssh/test: reset the random source before capturing a recording
  > 8819902 ssh/test: enable Diffie-Hellman key exchange algorithms
  > 3f311e4 acme: return error from pre-authorization when unsupported
  > 1f7c62c ssh/test: skip unsupported tests on js/wasm
  > a5f8048 acme/autocert: use standard functions to pick the cache directory
  > 958cde8 Revert "chacha20: add loong64 SIMD implementation"
  > 51f005c Revert "salsa20: add loong64 SIMD implementation"
  > 7c35866 Revert "argon2: add loong64 SIMD implementation"
  > 0091fc8 Revert "blake2s: add loong64 SIMD implementation"
  > 388684e argon2: add loong64 SIMD implementation
  > 953e809 chacha20: add loong64 SIMD implementation
  > 18f7707 salsa20: add loong64 SIMD implementation
  > 2ebaafc blake2s: add loong64 SIMD implementation
  > 4bc0711 acme: use built-in max/min to simplify the code
  > c96bba2 ssh: add mlkem768x25519-sha256 Key Exchange algorithm
  > 6b13eef ssh: add integration tests against a reference implementation

Signed-off-by: Knative Automation <automation@knative.team>
2025-05-27 11:58:18 +00:00
Matej Vašek 0ce5759cef
Fix: build correct func-util binary for give arch (#2843)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-05-26 20:04:17 +00:00
Matej Vašek 805cb5dcc5
Fix detection of hostname resolution failure (#2841)
It appears that newer version of docker outputs different error when
registry hostname is not resolvable.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-05-26 19:15:17 +00:00
Matej Vašek 4c4fd28c23
More granular image references (#2837)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2025-05-26 15:51:17 +00:00
github-actions[bot] a062cd2872
chore: update Springboot platform version to 3.4.6 (#2834)
Co-authored-by: Knative Automation <automation@knative.team>
2025-05-22 16:02:30 +00:00
github-actions[bot] 8a9583e30f
chore: update CA bundle (#2833)
Co-authored-by: Knative Automation <automation@knative.team>
2025-05-20 15:47:28 +00:00
github-actions[bot] ecdcf868cb
chore: update Quarkus platform version to 3.22.3 (#2832)
Co-authored-by: Knative Automation <automation@knative.team>
2025-05-16 14:38:49 +00:00
David Fridrich 55df89a874
unify flags, codecov revamp a bit (#2773)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-05-12 13:25:44 +00:00
github-actions[bot] ff63772166
chore: update Quarkus platform version to 3.22.2 (#2828)
Co-authored-by: Knative Automation <automation@knative.team>
2025-05-08 07:08:59 +00:00
github-actions[bot] bcd141d7cb
update components (#2827)
Co-authored-by: Knative Automation <automation@knative.team>
2025-05-07 05:54:58 +00:00
Knative Automation 7467ce1f39
upgrade to latest dependencies (#2826)
bumping knative.dev/serving 803fdbf...a01a078:
  > a01a078 Update net-gateway-api nightly (# 15875)

Signed-off-by: Knative Automation <automation@knative.team>
2025-05-05 13:49:53 +00:00
Knative Automation 76519f5bc7
upgrade to latest dependencies (#2825)
bumping knative.dev/serving eaad792...803fdbf:
  > 803fdbf Update net-istio nightly (# 15876)

Signed-off-by: Knative Automation <automation@knative.team>
2025-05-04 16:12:11 +00:00
Knative Automation 688a39ec24
upgrade to latest dependencies (#2821)
bumping knative.dev/serving 9dfd12d...eaad792:
  > eaad792 Bump the github-actions group with 3 updates (# 15874)
  > 5032acc Update net-contour nightly (# 15872)
  > 0cb5678 Bump github.com/golang-jwt/jwt/v4 from 4.5.1 to 4.5.2 (# 15871)
  > 25fccfb upgrade to latest dependencies (# 15868)
  > 7decfdc feat: reduce duplicate code (# 15867)
bumping knative.dev/networking 6268d93...16635c6:
  > 16635c6 Update community files (# 1061)
  > e2c18ca Update community files (# 1060)

Signed-off-by: Knative Automation <automation@knative.team>
2025-05-02 06:13:08 +00:00
github-actions[bot] e3a957662f
chore: update Quarkus platform version to 3.22.1 (#2824)
Co-authored-by: Knative Automation <automation@knative.team>
2025-04-30 23:39:06 +00:00
Matej Vašek c6c6aa2e12
Make docker.io/heroku/ builders trusted (#2818)
fixes #2516
2025-04-30 08:40:06 +00:00
Matej Vašek 41666714f2
Fix: do not override uid/git in buildpack builder (#2819)
* Fix: do not override uid/git in buildpack builder

Zero value implies override (to root presumably),
we must set it to negative value.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fixup tests

Since we do not override uid/gid==0 we need to make mounted data less
readable to all.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-30 02:45:05 +00:00
Jefferson Ramos f6b5e39b7c
test: upgrade podman-next packages to fedora 41 for nightly podman test (#2820) 2025-04-29 23:09:05 +00:00
Knative Automation de6022bf43
upgrade to latest dependencies (#2817)
bumping knative.dev/hack c577ed9...c4037b0:
  > c4037b0 Update community files (# 423)
  > cfde8c9 Update community files (# 422)
bumping google.golang.org/genproto/googleapis/rpc e9438ea...56aae31:
  > 56aae31 chore(all): update all (# 1190)
  > 5a70512 chore(all): remove toolchain from go.mod (# 1189)
bumping knative.dev/client/pkg 96721e5...1e24794:
  > 1e24794 Update community files (# 2001)
bumping knative.dev/pkg ed3e215...d5e74d2:
  > d5e74d2 Update community files (# 3174)
  > 757c99c Bump google.golang.org/grpc from 1.71.1 to 1.72.0 (# 3173)
  > a877090 Update community files (# 3171)
bumping google.golang.org/genproto/googleapis/api e9438ea...56aae31:
  > 56aae31 chore(all): update all (# 1190)
  > 5a70512 chore(all): remove toolchain from go.mod (# 1189)
bumping knative.dev/serving a4c4491...9dfd12d:
  > 9dfd12d Update net-kourier nightly (# 15865)
  > abd03b2 Update net-istio nightly (# 15864)
  > c2645f0 Update net-contour nightly (# 15863)
  > 0c57eaf Update net-gateway-api nightly (# 15859)
  > 6c949a5 Update community files (# 15862)
  > 9665028 Update net-kourier nightly (# 15860)
bumping cel.dev/expr 7f03cb5...bfe4f8b:
  > bfe4f8b Add java_lite_proto_library targets to canonical CEL protos. Deprecate explain.proto. (# 440)
  > 1435466 Indicate that CEL is an official Google product (# 439)
  > 23e240d Add conformance tests for quoted field selectors. (# 431)
  > 25227dd Fix strings.format tests (# 435)
  > 19866ce clarify Unicode handling (# 423)
  > 8fdb299 tests to verify parsers ignore whitespace and comments (# 430)
  > 2bf1deb typo, formatting, and link fixes (# 422)
  > 0b43925 clarify error behavior for e.exists(x, p) (# 427)
  > b9cf1a1 Add additional type check tests (# 419)
  > b1b7fa0 Correct 'worst-cast' typos (# 418)
bumping google.golang.org/grpc cdbdb75...a43eba6:
  > a43eba6 Change version to 1.72.0 (# 8218)
  > 48f48c1 balancer/pickfirstleaf: Avoid reading Address.Metadata (# 8227) (# 8259)
  > fd6f585 Cherry-pick # 8159 and # 8243 to v1.72.x (# 8255)
  > 79ca174 stats/opentelemetry: fix trace attributes message sequence numbers to start from 0 (# 8237) (# 8252)
  > 57a2605 xdsclient: fix TestServerFailureMetrics_BeforeResponseRecv test to wait for watch to start before stopping the listener (# 8217)
  > 5edab9e xdsclient: add grpc.xds_client.server_failure counter mertric (# 8203)
  > 78ba661 regenerate protos (# 8208)
  > 6819ed7 delegatingresolver: Stop calls into delegates once the parent resolver is closed (# 8195)
  > a51009d resolver: convert EndpointMap to use generics (# 8189)
  > b0d1203 resolver: create AddressMapV2 with generics to replace AddressMap (# 8187)
  > 43a4a84 internal/balancer/clusterimpl: replace testpb with testgrpc (# 8188)
  > d8924ac xds: fix support for load reporting in LOGICAL_DNS clusters (# 8170)
  > ce2fded xds: fix support for circuit breakers in LOGICAL_DNS clusters (# 8169)
  > eb744de resolver: Make EndpointMap's Get, Set and Delete operations O(1) (# 8179)
  > 8d8571e stats: Improved sequencing documentation for server-side stats events and added tests. (# 7885)
  > 0af5a16 grpc: fix bug causing an extra Read if a compressed message is the same size as the limit (# 8178)
  > 1703656 xds: generic xDS client transport channel and ads stream implementation (# 8144)
  > c27e6dc xdsclient: read bootstrap config before creating the first xDS client in DefaultPool (# 8164)
  > 1f6b0cf [Security] Add support for SPIFFE Bundle Maps in certificate providers (# 8167)
  > 775150f stats/opentelemetry: use TextMapProvider and TracerProvider from TraceOptions instead of otel global (# 8166)
  > d860daa example/features/retry: fix grpc.NewClient call in documentation (# 8163)
  > 75d4a60 [Security] Add support for parsing SPIFFE Bundle Maps (# 8124)
  > 5ac9042 balancer/rls: allow maxAge to exceed 5m if staleAge is set (# 8137)
  > bdba42f xds: emit resource-not-found logs at Warning level (# 8158)
  > a0a739f xds: ensure node ID is populated in errors from the server (# 8140)
  > 5668c66 resolver/manual: allow calling UpdateState with an un-Built resolver (# 8150)
  > 5199327 grpc: Add endpoints in resolverWrapper.NewAddresses (# 8149)
  > f49c747 balancer/pickfirst/pickfirstleaf: fix race condition in tests (# 8148)
  > af07815 xds: introduce generic xds clients xDS and LRS Client API signatures (# 8042)
  > 8c080da priority: Send and validate connection error in test (# 8143)
  > e8c412d *: Regenerate protos (# 8142)
  > 0914bba interop: Wait for server to become ready in alts interop tests (# 8141)
  > bffa4be xds: ensure xDS node ID is populated in errors from xds resolver and cds lb policy (# 8131)
  > 8ae4b7d clusterresolver: Lower log level when ExitIdle is called with no child (# 8133)
  > 0d6e39f transport: Send RST stream from the server when deadline expires (# 8071)
  > 7505bf2 xds: introduce simple grpc transport for generic xds clients (# 8066)
  > 01080d5 stats/openetelemetry: refactor and make e2e test stats verification deterministic (# 8077)
  > b0f5027 cleanup: replace dial with newclient (# 7970)
  > 52a257e cleanup: replace dial with newclient (# 7967)
  > d48317f github: change test action to cover the legacy pickfirst balancer (# 8129)
  > a510cf5 xds, pickfirst: Enable additional addresses in xDS, set new pick_first as default (# 8126)
  > e9c0617 xds: simplify code handling certain error conditions in the resolver (# 8123)
  > feaf942 cds: stop child policies on resource-not-found errors (# 8122)
  > dbf92b4 deps: update dependencies for all modules (# 8108)
  > aa629e0 balancergroup: Make closing terminal (# 8095)
  > e0ac3ac xdsclient: Add error type for NACKed resources (# 8117)
  > 65c6718 examples/features/dualstack: Demonstrate Dual Stack functionality (# 8098)
  > c75fc8e chore: enable early-return and unnecessary-stmt and useless-break from revive (# 8100)
  > c7db760 xdsclient: ensure xDS node ID in included in NACK and connectivity errors (# 8103)
  > 42fc25a weightedroundrobin: Move functions to manage Endpoint weights into a new internal package (# 8087)
  > 607565d Change version to 1.72.0-dev (# 8107)
bumping knative.dev/eventing b99e57b...7146629:
  > 7146629 fix a typo in broker readme: kantive (# 8573)
  > 31cc92d [Automated] Update eventing-eventing-integrations nightly (# 8571)
  > 61731d3 [main] Update community files (# 8570)

Signed-off-by: Knative Automation <automation@knative.team>
2025-04-29 14:29:05 +00:00
github-actions[bot] e013e6ed31
chore: update Springboot platform version to 3.4.5 (#2813)
Co-authored-by: Knative Automation <automation@knative.team>
2025-04-28 05:26:28 +00:00
Knative Automation 4e9fc0922f
upgrade to latest dependencies (#2800)
bumping knative.dev/serving 7f044f1...a4c4491:
  > a4c4491 update min go version to 1.24 (# 15856)
  > e74fe1a drop code clearing out the user agent (# 15857)
  > 128550c bump latest contour and istio (# 15858)
bumping knative.dev/eventing a7b2f1c...b99e57b:
  > b99e57b [main] Upgrade to latest dependencies (# 8567)
bumping knative.dev/client/pkg 6c6ddcd...96721e5:
  > 96721e5 [main] Upgrade to latest dependencies (# 1997)

Signed-off-by: Knative Automation <automation@knative.team>
2025-04-24 13:48:24 +00:00
github-actions[bot] 3d4d7da487
update components (#2812)
Co-authored-by: Knative Automation <automation@knative.team>
2025-04-24 13:01:26 +00:00
David Fridrich 69cbc75f7b
e2e scenarion config test errorf format fix (#2810)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-04-24 12:18:28 +00:00
David Fridrich ace7703e29
fix e2e errorf formatting for 1.24 (#2809)
* fix e2e errorf formatting for 1.24

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* add %

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-04-24 10:32:24 +00:00
github-actions[bot] 0e1be8d1ed
chore: update Quarkus platform version to 3.21.4 (#2808)
Co-authored-by: Knative Automation <automation@knative.team>
2025-04-24 06:06:24 +00:00
Knative Automation d0deccb81b
Update community files (#2807)
Signed-off-by: Knative Automation <automation@knative.team>
2025-04-24 02:04:23 +00:00
github-actions[bot] 8eb33ded0c
update components (#2791)
Co-authored-by: Knative Automation <automation@knative.team>
2025-04-22 11:33:38 +00:00
Knative Automation 69a21a8e31
upgrade to latest dependencies (#2798)
bumping knative.dev/serving c7e3075...7f044f1:
  > 7f044f1 Enable Mount Propagation as a Optional Feature (# 15758)
  > 5653ad0 Update net-gateway-api nightly (# 15853)
  > ae7b265 Update net-kourier nightly (# 15855)
  > 4730c99 Update net-istio nightly (# 15854)
  > 880ea71 Update net-contour nightly (# 15852)
  > 93023e8 feat: add support for CSI volumes (# 15815)
  > c7f03af Support exec readiness probes for sidecar containers (# 15773)
  > a221c53 Update net-kourier nightly (# 15849)
  > e88d4dc upgrade to latest dependencies (# 15845)
  > 1d9855f Update net-gateway-api nightly (# 15847)
  > e6c1839 Update community files (# 15848)
bumping knative.dev/networking f1b08e6...6268d93:
  > 6268d93 upgrade to latest dependencies (# 1059)
  > 5a309fd upgrade to latest dependencies (# 1058)
bumping knative.dev/client/pkg 80472e3...6c6ddcd:
  > 6c6ddcd Update community files (# 2000)
bumping knative.dev/eventing 7c466cb...a7b2f1c:
  > a7b2f1c [Automated] Update eventing-eventing-integrations nightly (# 8566)

Signed-off-by: Knative Automation <automation@knative.team>
2025-04-22 05:56:38 +00:00
Matej Vašek 370ca50313
Use pre-build binary packages for cpython buildpack (#2799)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-22 05:42:37 +00:00
Knative Automation 179ba2fcaa
upgrade to latest dependencies (#2797)
bumping knative.dev/eventing c0cf4f4...7c466cb:
  > 7c466cb [main] Update community files (# 8565)

Signed-off-by: Knative Automation <automation@knative.team>
2025-04-17 04:57:03 +00:00
Knative Automation 0892ac62ee
Update community files (#2796)
Signed-off-by: Knative Automation <automation@knative.team>
2025-04-17 02:01:03 +00:00
github-actions[bot] c2b5d49ed4
chore: update Quarkus platform version to 3.21.3 (#2795)
Co-authored-by: Knative Automation <automation@knative.team>
2025-04-16 17:31:13 +00:00
Knative Automation dfc317563a
upgrade to latest dependencies (#2794)
bumping knative.dev/eventing 5f466ad...c0cf4f4:
  > c0cf4f4 [main] Upgrade to latest dependencies (# 8564)

Signed-off-by: Knative Automation <automation@knative.team>
2025-04-16 17:08:13 +00:00
Knative Automation 0921e950eb
upgrade to latest dependencies (#2793)
bumping knative.dev/pkg 4e8ebbe...ed3e215:
  > ed3e215 upgrade to latest dependencies (# 3170)
bumping knative.dev/serving e193904...c7e3075:
  > c7e3075 Update net-kourier nightly (# 15843)

Signed-off-by: Knative Automation <automation@knative.team>
2025-04-16 06:33:12 +00:00
Matej Vašek ce44678262
Do not run builder build unnecessary (#2790)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-15 13:08:17 +00:00
Matej Vašek 33b9f15654
Enable arm64 python buildpack (#2789)
* Enable Python buildpack build for arm64

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix: force arm64 arch for Go buildpack

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix: ensure correct arch for sub-buildpacks

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fixup linter issues

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-15 11:44:12 +00:00
Matej Vašek 8e0b752edc
Apply linter suggestions (#2786)
* Refactor: if-elif-else => switch

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: calls to embedded fields

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix: add missing err checks

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: fix format of error messages

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: omit type where possible

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: apply De Morgan's law

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: call ReplaceAll where possible

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: fix format of error messages

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: fix format of error messages

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-15 09:43:13 +00:00
Knative Automation 36e27203a9
upgrade to latest dependencies (#2787)
bumping knative.dev/pkg a8e20d9...4e8ebbe:
  > 4e8ebbe Bump golang.org/x/tools from 0.31.0 to 0.32.0 (# 3169)
  > 1ae6a39 Bump golang.org/x/net from 0.38.0 to 0.39.0 (# 3168)
bumping knative.dev/eventing 6365d89...5f466ad:
  > 5f466ad Compare the entire PodTemplateSpec, instead of just its PodSpec (# 8558)
  > d7a0359 [main] Upgrade to latest dependencies (# 8559)
  > f14c335 [main] Upgrade to latest dependencies (# 8556)
bumping knative.dev/networking 5ce28a2...f1b08e6:
  > f1b08e6 upgrade to latest dependencies (# 1054)
  > 0d887a8 bump to golangci yaml v2 (# 1057)
  > a46e5f4 bump to golangci yaml v2 (# 1056)
bumping knative.dev/serving 3d830a0...e193904:
  > e193904 Update net-istio nightly (# 15844)
  > a5e15ba Update net-gateway-api nightly (# 15841)
  > 4699601 Update net-contour nightly (# 15842)
  > 44559d5 upgrade to latest dependencies (# 15840)

Signed-off-by: Knative Automation <automation@knative.team>
2025-04-15 09:28:13 +00:00
Jefferson Ramos 09c934dcb0
test: update e2e ci workflow to test against arm for go and quarkus (#2788) 2025-04-14 13:58:18 +00:00
Matej Vašek f12acd34de
Refactor if-elif-else => switch (#2785)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-14 12:02:16 +00:00
Matej Vašek 0896b9011d
Bump golangci-lint version (#2784)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-14 10:27:16 +00:00
Matej Vašek d02801355d
Make base jammy stack multi-arch (#2780)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-14 05:43:16 +00:00
Knative Automation 100d9ce56c
upgrade to latest dependencies (#2783)
bumping knative.dev/eventing bbc9696...6365d89:
  > 6365d89 Migrate golanglint-ci config to v2 (# 8557)
bumping knative.dev/networking ad8767c...5ce28a2:
  > 5ce28a2 Update community files (# 1055)
bumping gomodules.xyz/jsonpatch/v2 17d7994...ffbac60:
  > ffbac60 Merge pull request # 40 from lacroixthomas/bugfixes/fix-lossy-in64
  > 4c723fc fix: handle lossy int64
bumping knative.dev/serving bc0feed...3d830a0:
  > 3d830a0 autoscaler: ignore ScaleDownDelay if not reachable (# 15831)
  > 8ee578e upgrade to latest dependencies (# 15839)
  > a2b3da5 bump to golangci yaml v2 (# 15838)
  > 3c4cbd0 Update net-contour nightly (# 15837)
bumping knative.dev/pkg 7b91ff1...a8e20d9:
  > a8e20d9 Bump gomodules.xyz/jsonpatch/v2 from 2.4.0 to 2.5.0 (# 3154)

Signed-off-by: Knative Automation <automation@knative.team>
2025-04-14 05:30:15 +00:00
Dave Protasowski a518101187
bump dependencies manually (#2782) 2025-04-11 14:05:14 +00:00
Matej Vašek c12828fd08
Migrate golangci-lint config to v2 (#2781)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-11 13:27:14 +00:00
Matej Vašek b67d8d4405
Refactor builder (#2779)
* Cleanup: remove unnecessary code

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Cleanup: moved code outside of a loop

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-11 12:01:13 +00:00
github-actions[bot] 910e862804
chore: update Quarkus platform version to 3.21.2 (#2776)
Co-authored-by: Knative Automation <automation@knative.team>
2025-04-10 02:47:11 +00:00
Matej Vašek 841555ab0a
Update rust buildpack (#2778)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-09 19:36:12 +00:00
Matej Vašek 8a061c4ed1
Mirror buildpack run images in ghcr.io/knative (#2775)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-09 19:24:12 +00:00
Matej Vašek fffde39adb
Fix buildpacks builder update task (#2777)
The paketo project moved some buildpack from gcr.io to docker.io.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-09 19:04:15 +00:00
Matej Vašek c93de80381
Fix builder updater (#2774)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-09 13:47:14 +00:00
Matej Vašek 3e75e25506
Fix Python S2I On-Cluster build (#2770)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-04 05:27:11 +00:00
Matej Vašek c98b9f67c3
Fix: Go scaffolding uses correct module name (#2769)
* Fix: Go scaffolding uses correct module name

Using incorrect name works for a functions with flat structure -- no
sub-packages. When sub-packages are used we need to refer the user
module by its true name.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup tests

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-04 05:27:05 +00:00
Matej Vašek e720bbcc8c
Add guideline for private Go module usage (#2771)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-04 05:13:05 +00:00
github-actions[bot] a2469fe9da
chore: update Quarkus platform version to 3.21.1 (#2767)
Co-authored-by: Knative Automation <automation@knative.team>
2025-04-03 10:57:05 +00:00
Matej Vašek aae2683231
Make build binds more similar to runtime binds (#2768)
* Make build binds more similar to runtime binds

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Added comments on struct

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-03 10:19:05 +00:00
Matej Vašek fc750a283a
S2I (source-to-image) host binds (#2766)
* Added tests for s2i build with private Go module

The test is for now skipped since host binds are not yet implemented for s2i.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* User "host" network mode for s2i build on Linux

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Implement host binds for local s2i build

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-03 09:13:05 +00:00
Matej Vašek 2d3962401d
Improvements for Go s2i assembler (#2765)
* Return error code when compilation was not done
* Run `go mod tidy` on scaffoded code

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-02 17:17:05 +00:00
Luke Kingland 9f6a135702
Python Middleware v2 Scaffolding (#2685)
* refactor python http template

* python http scaffolding

* add python to make update-runtimes

* integrate python scaffolding with func run

* python http template

* reorganize python scaffolding

* cancellation stopgap

* documentation and logging cleanup

* Python Middleware v2 - Scaffolding

* base layer cache

* remove wsgi and flask templates

Inbuilt templates should be limited to a base http and cloudevent
integration, with anything beyond this falling to the officially
supported functions samples repository.

* update python cloudevents runtime in makefile

* python cloudevents middleware

* add python .venvs to gitignore

* clean up venvs on make

* add missing dependencies to python http tempklate

* set python cloudevents manifest

* further cleanup of repository impl

* cleanup

* ignore venv when building runtime container

* set listen address on python container

* remove unnecessary python runtime update from makefile

* remove debug statements and improved comments

* enable scaffolding python funcs in s2i builder

* set listen address on all containers built by s2i

* python s2i integration

* regen fs

* cleanup

* enable host builder

* fix manifest inheritance

* regen fs

* bug fixes

* regen docs

* cleanup and linter error fixes

* conditional python host builder test

* misspellings

* disable python E2E

Until the Python middleware is supported by the Pack builder, the E2E
tests will need to be disabled.

* install python for presubmit tests

* use linux for test builder runs

The target platform for a test needs to be a platform which is available
in all test base images.  That's usually linux.  Using current OS would
fail, for example, building python containers on MacOS because the
official Python base image has no darwin layer.

* fix ineffasign

* set python ce template to python 3.9

* regen fs

* windows python tests

* python templates README
2025-04-02 10:44:05 +00:00
Matej Vašek 36803160d5
Use s2i in standard mode, not "as-dockerfile" (#2764)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-02 06:15:03 +00:00
Matej Vašek b6bfb2d960
Allow host mounts for build phahse (#2753)
* Allow host mounts for build pahse.

This is in particular useful for using paket bindings,
e.g. to inject git credentials into build process.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Mark test as a integration test

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: style

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-04-01 15:37:03 +00:00
Knative Automation c7a95dd81b
Update community files (#2763)
Signed-off-by: Knative Automation <automation@knative.team>
2025-03-31 02:07:06 +00:00
github-actions[bot] d8f6ceba07
chore: update Quarkus platform version to 3.21.0 (#2761)
Co-authored-by: Knative Automation <automation@knative.team>
2025-03-26 18:33:44 +00:00
github-actions[bot] d4506e32dd
update components (#2760)
Co-authored-by: Knative Automation <automation@knative.team>
2025-03-25 12:45:45 +00:00
Kapil Sareen 335b6c29fa
removes redundant default labels and annotations (#2746)
Signed-off-by: KapilSareen <kapilsareen584@gmail.com>
2025-03-24 11:42:57 +00:00
github-actions[bot] 234c442421
chore: update Springboot platform version to 3.4.4 (#2758)
Co-authored-by: Knative Automation <automation@knative.team>
2025-03-21 06:52:16 +00:00
Shubham Rasal e9dfba995c
Update CONTRIBUTING.md (#2755)
Typo fixes.
2025-03-20 11:45:16 +00:00
github-actions[bot] 7216de194d
chore: update Quarkus platform version to 3.19.4 (#2754)
Co-authored-by: Knative Automation <automation@knative.team>
2025-03-20 11:19:16 +00:00
Matej Vašek 77e43bc8c6
Test adjustments (#2751)
* Use tiny instead of base BP builder.
* Decrease minimal required Go version.
* Make the self-signed certificate CA==true so it works with update-ca-trust utility.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-03-19 14:05:15 +00:00
Jefferson Ramos 598c5e237f
test: adding workflow to test against podman nightly build (#2743) 2025-03-19 12:17:14 +00:00
David Fridrich 817c77bbec
fix flaky unit test (#2749)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-03-18 14:56:14 +00:00
Matej Vašek 525761a199
Trust loopback builders (#2750)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-03-18 12:46:17 +00:00
Matej Vašek 24a7fedadd
Add testcase for Go private repositories (#2748)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-03-17 03:49:36 +00:00
Matej Vašek 90624a8725
Add git BP to our Go detection group (#2747)
* Add git BP to our Go detection group

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* make git bp optional

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-03-17 03:03:36 +00:00
Matej Vašek a351afdc9b
Fix http port 433 => 443 (#2742) 2025-03-14 06:30:38 +00:00
github-actions[bot] a051e829e2
chore: update Quarkus platform version to 3.19.3 (#2744)
Co-authored-by: Knative Automation <automation@knative.team>
2025-03-13 06:55:38 +00:00
David Fridrich 180b1eea0e
golangci bump (#2741)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-03-11 15:55:37 +00:00
David Fridrich f66b67aa8f
Add a retry functionality to workflows (#2739)
* retry functionality for lifestyle e2e test

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* attempt multiple cluster allocs

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* delete cluster before retry

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* better output

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* retry allocate in all workflows

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* add a timer

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* add timers to ci

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-03-11 12:32:37 +00:00
Knative Automation e0e79957f1
upgrade to latest dependencies (#2740)
bumping knative.dev/serving 636392e...c09ff6c:
  > c09ff6c Update net-gateway-api nightly (# 15806)
bumping knative.dev/eventing eb3dd80...ec8a208:
  > ec8a208 [Automated] Update eventing-eventing-integrations nightly (# 8516)

Signed-off-by: Knative Automation <automation@knative.team>
2025-03-11 06:16:35 +00:00
Matej Vašek 2b831f9b2e
Remove direct dep on golang.org/x/exp (#2695)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-03-10 18:14:36 +00:00
github-actions[bot] fa79d313e0
update components (#2738)
Co-authored-by: Knative Automation <automation@knative.team>
2025-03-10 11:37:04 +00:00
Knative Automation 7e357eb574
upgrade to latest dependencies (#2737)
bumping knative.dev/eventing fe83e25...eb3dd80:
  > eb3dd80 Enable Cert Manager (# 8509)
  > 615a071 Allow storage-version-migration job to successfully run when optional CRDs are not installed (inmemorychannels, etc) (# 8510)

Signed-off-by: Knative Automation <automation@knative.team>
2025-03-06 14:06:07 +00:00
github-actions[bot] 0bb27b7bcc
chore: update Quarkus platform version to 3.19.2 (#2735)
Co-authored-by: Knative Automation <automation@knative.team>
2025-03-06 14:06:00 +00:00
Kapil Sareen 4ade4ab3d9
refactor data member of the InvokeMessage to be []byte (#2733)
Signed-off-by: KapilSareen <kapilsareen584@gmail.com>
2025-03-06 13:45:00 +00:00
David Fridrich 51a14ccf23
fix action version (#2736)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-03-06 12:24:01 +00:00
Knative Automation 7ce6373fd0
upgrade to latest dependencies (#2734)
bumping knative.dev/serving e067066...636392e:
  > 636392e Update net-kourier nightly (# 15804)
  > ee523c0 Update net-istio nightly (# 15805)

Signed-off-by: Knative Automation <automation@knative.team>
2025-03-06 07:27:00 +00:00
Knative Automation fd43db95a6
upgrade to latest dependencies (#2730)
bumping knative.dev/serving 0210658...e067066:
  > e067066 Update net-gateway-api nightly (# 15803)
  > f2aa6e3 Update net-kourier nightly (# 15796)
  > b06a773 Bump the github-actions group with 3 updates (# 15800)

Signed-off-by: Knative Automation <automation@knative.team>
2025-03-04 06:52:57 +00:00
Kapil Sareen 04100c8dd8
Adds Inline JSON schema reference in func.yaml (#2729)
Signed-off-by: KapilSareen <kapilsareen584@gmail.com>
2025-03-03 05:06:14 +00:00
Knative Automation c14ff995c6
upgrade to latest dependencies (#2728)
bumping knative.dev/eventing 3153b47...fe83e25:
  > fe83e25 EventTransform: add reconciler unit tests (# 8513)
  > 1e889be SinkBinding: Set specific conditions for reconciler steps (# 8508)
  > 6073039 [main] Upgrade to latest dependencies (# 8512)
bumping knative.dev/serving 87c07ee...0210658:
  > 0210658 upgrade to latest dependencies (# 15793)
bumping knative.dev/networking 2cde432...863b7af:
  > 863b7af fix linter config (# 1049)
  > 1aaade7 upgrade to latest dependencies (# 1047)
  > d23278a Update community files (# 1048)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-28 06:10:32 +00:00
Knative Automation d4cfaa93e0
upgrade to latest dependencies (#2726)
bumping github.com/google/go-cmp c3ad843...9b12f36:
  > 9b12f36 Detect proto.Message types when failing to export a field (# 370)
  > 4dd3d63 fix: type 'aribica' => 'arabica' (# 368)
  > 391980c Support compare functions with SortSlices and SortMaps (# 367)
bumping knative.dev/pkg 9e26561...0372c08:
  > 0372c08 Bump github.com/google/go-cmp from 0.6.0 to 0.7.0 (# 3152)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-27 06:20:28 +00:00
github-actions[bot] e81df11734
chore: update Quarkus platform version to 3.19.1 (#2725)
Co-authored-by: Knative Automation <automation@knative.team>
2025-02-26 20:22:30 +00:00
Kapil Sareen 91daa09682
Bug: Fixes Incorrect Implementation of --file Option (#2715)
Signed-off-by: KapilSareen <kapilsareen584@gmail.com>
2025-02-26 19:23:29 +00:00
Knative Automation 0f0b53630b
upgrade to latest dependencies (#2723)
bumping knative.dev/eventing adaafa2...3153b47:
  > 3153b47 EventTransform: Inject tracing configurations (# 8479)
  > db0cf43 Update to the correct file (# 8507)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-26 16:09:29 +00:00
Matej Vašek 809ccc6db6
Update pack dep (#2696)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-02-26 13:39:29 +00:00
Knative Automation 98fd887cac
upgrade to latest dependencies (#2722)
bumping knative.dev/eventing 714deeb...adaafa2:
  > adaafa2 [Automated] Update eventing-eventing-integrations nightly (# 8506)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-26 13:06:29 +00:00
Kapil Sareen a1589c9130
updates node templates to ignore node_modules in .gitignore (#2713)
Signed-off-by: KapilSareen <kapilsareen584@gmail.com>
2025-02-26 12:48:28 +00:00
Knative Automation cad00d7a16
upgrade to latest dependencies (#2718)
bumping knative.dev/eventing ae049c8...714deeb:
  > 714deeb Update k8s version in e2e tests (# 8503)
  > 54a2402 Fix golangci exclude config (# 8502)
  > 80dd84e Guard reserved access with lock and create vpods in tests (# 8457)
  > 5bcee30 Inject integration images from ConfigMap (# 8500)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-25 15:35:21 +00:00
Knative Automation 8ab6083972
upgrade to latest dependencies (#2714)
bumping knative.dev/eventing 51637df...ae049c8:
  > ae049c8 Jsonata Event transform e2e tests (# 8499)
  > c828898 Generic code for Certificates (# 8489)
  > 351898d fix: verify trigger is not ready before pingsource dependency exists (# 8494)
  > c651616 Add initial iteration of eventing-integration resources (# 8493)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-25 09:36:21 +00:00
github-actions[bot] 9ef6c337f7
chore: update CA bundle (#2716)
Co-authored-by: Knative Automation <automation@knative.team>
2025-02-25 08:27:21 +00:00
github-actions[bot] c4e4cc7119
chore: update Springboot platform version to 3.4.3 (#2712)
Co-authored-by: Knative Automation <automation@knative.team>
2025-02-24 10:46:19 +00:00
Knative Automation 3239d06c9b
upgrade to latest dependencies (#2711)
bumping knative.dev/eventing 732ec62...51637df:
  > 51637df IntegrationSink prefactors (# 8486)
  > c429fc5 Remove unused code (# 8485)
bumping knative.dev/serving 09ec3f5...87c07ee:
  > 87c07ee Update net-istio nightly (# 15789)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-21 15:03:16 +00:00
github-actions[bot] 8d056d0ece
chore: update Quarkus platform version to 3.18.4 (#2708)
Co-authored-by: Knative Automation <automation@knative.team>
2025-02-20 06:26:47 +00:00
Knative Automation 65e3812a45
upgrade to latest dependencies (#2709)
bumping knative.dev/serving 99a8b20...09ec3f5:
  > 09ec3f5 Update net-gateway-api nightly (# 15788)
  > 1124aff Update net-contour nightly (# 15787)
bumping knative.dev/eventing 5998cfe...732ec62:
  > 732ec62 Partial implementation of certmanager for integration sink (# 8481)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-20 06:16:48 +00:00
David Fridrich d649adaf56
fix: update comment of knative-component auto PR (#2707)
* comment

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix format

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-02-19 15:22:48 +00:00
David Fridrich 104e90ce5c
codecov v5 (#2705)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-02-19 14:43:48 +00:00
Knative Automation 68deddf80b
upgrade to latest dependencies (#2706)
bumping knative.dev/client/pkg 109d3da...a051025:
  > a051025 Update community files (# 1996)
bumping knative.dev/pkg c925de2...9e26561:
  > 9e26561 Update community files (# 3151)
bumping knative.dev/serving 6da3d87...99a8b20:
  > 99a8b20 Update net-istio nightly (# 15786)
  > 8d80bbe Update community files (# 15785)
bumping knative.dev/eventing 9a7c6d5...5998cfe:
  > 5998cfe [main] Update community files (# 8480)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-19 13:55:47 +00:00
github-actions[bot] 88afd64d40
update components (#2700)
Co-authored-by: Knative Automation <automation@knative.team>
2025-02-19 13:12:48 +00:00
David Fridrich d7f4b8341f
update depracated function (#2701)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-02-19 12:19:47 +00:00
Luke Kingland 1d26629b51
feat: remote storage class (#2693)
* feat: remote storage class

* why isn't the schema regenerated on each make
2025-02-19 07:35:47 +00:00
Knative Automation d548e3fe45
upgrade to latest dependencies (#2703)
bumping knative.dev/hack ce4c934...306ce74:
  > 306ce74 Update community files (# 414)
bumping knative.dev/serving 582f453...6da3d87:
  > 6da3d87 Update net-kourier nightly (# 15784)
bumping knative.dev/client/pkg 7dc2a92...109d3da:
  > 109d3da upgrade to latest dependencies (# 1995)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-19 07:19:47 +00:00
Knative Automation f38fbab231
Update community files (#2702)
Signed-off-by: Knative Automation <automation@knative.team>
2025-02-19 02:02:47 +00:00
David Fridrich 67d17c2d51
fix name (#2699)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-02-18 17:01:52 +00:00
Knative Automation 9c01642552
upgrade to latest dependencies (#2698)
bumping knative.dev/serving 7125e03...582f453:
  > 582f453 upgrade to latest dependencies (# 15783)
bumping knative.dev/eventing cee6e8c...9a7c6d5:
  > 9a7c6d5 [main] Upgrade to latest dependencies (# 8468)
bumping knative.dev/networking e6fc9bb...2cde432:
  > 2cde432 upgrade to latest dependencies (# 1046)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-18 16:08:51 +00:00
David Fridrich a9cb5b7a93
Have static knative component versions in hack/, update in automatic PR (#2677)
* gomod

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* create hack/main.go, delegate, init dynamic updatic of version in allocate.sh, bump github version, unify those versions to v68

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* new file, fix, more updates

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* bump

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* simplify

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* pr exists, check

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* simplify, fix some stuff

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* simplify further

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix sed error, more comments

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* return to main, dont exit

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* single execute, dont force push, return Run()

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix printing because no 'ready' is at the end

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* misspell

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* context moved to main

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* updt-builder

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* update-knative-components fixes, pagination, simplify using go templates, json file as source of truth

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix error check

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* add json, add kind version, comments

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix versions json

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* add newline

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* add tests, fix structs, locally generate files

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix comment inline

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* redo the structure to use cmd/ instead of big hack/main, separate, add \n to generated .json

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* simplify test, fix linter errors

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* small additions, comments

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* update autogen comment

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* gomod

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* localize const to test

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* suggestions

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* makefile

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* makefile, update builder target

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* prefix target with wf

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-02-18 15:55:51 +00:00
Knative Automation c28d5ba441
upgrade to latest dependencies (#2697)
bumping knative.dev/serving 02800e8...7125e03:
  > 7125e03 upgrade to latest dependencies (# 15782)
bumping knative.dev/pkg ae2c6bc...c925de2:
  > c925de2 upgrade to latest dependencies (# 3150)
bumping knative.dev/eventing 75195a5...cee6e8c:
  > cee6e8c EventTransform: Support transforming response from Sink (# 8469)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-18 06:27:50 +00:00
Knative Automation a25e3274d7
upgrade to latest dependencies (#2694)
bumping golang.org/x/net 8da7ed1...df97a48:
  > df97a48 go.mod: update golang.org/x dependencies
  > 2dab271 route: treat short sockaddr lengths as unspecified
  > b914489 internal/http3: refactor in prep for sharing transport/server code
  > ebd23f8 route: fix parsing network address of length zero
  > 938a9fb internal/http3: add request/response body transfer
  > 145b2d7 internal/http3: add RoundTrip
  > 5bda71a internal/http3: define connection and stream error types
  > 3c1185a internal/http3: return error on mid-frame EOF
  > a6c2c7f http2, internal/httpcommon: factor out common request header logic for h2/h3
  > c72e89d internal/http3: QPACK encoding and decoding
  > 93c1957 internal/http3: add Transport and ClientConn
  > 45432b5 internal/socket, webdav: use testing.T.TempDir
  > 56691ee quic: don't return EOF from ReadByte when we have a byte
  > 7ad0ebf internal/http3: qpack wire primitives
  > f6b2e53 internal/http3: basic stream read/write operations
  > 78717f9 internal/http3: error codes
  > 84b528b internal/http3: new package
  > 445eead http2: encode :protocol pseudo-header before regular headers
  > 5566b43 quic: add the ability to create an endpoint with a fake network
  > 97dd44e http2, internal/gate: move Gate type to an internal package
  > 35e1007 quic, internal/quic/quicwire: split wire encode/decode functions to new package
  > 0a5dcdd http2: disable extended CONNECT by default
  > 03179ce quic: report error string when peer closes connection
  > 4428704 quic: surface connection errors in stream methods
  > dc3b8a8 quic: return error from Stream.Flush
  > 2e60102 quic, internal/testcert: move test cert to internal package
bumping google.golang.org/genproto/googleapis/api 19429a9...e9438ea:
  > e9438ea chore(all): auto-regenerate .pb.go files (# 1187)
  > 7023788 chore(all): auto-regenerate .pb.go files (# 1186)
  > 29210b9 chore(all): update all (# 1185)
  > 65684f5 chore(all): auto-regenerate .pb.go files (# 1184)
  > 138b5a5 chore(all): update all (# 1183)
  > 1a7da9e chore(all): update all (# 1182)
  > 5f5ef82 chore(all): update all (# 1181)
  > 6982302 chore: bump to min Go to 1.22 (# 1180)
  > 26aa7a2 chore(all): update all (# 1178)
  > 3abc09e chore(all): update all (# 1177)
  > 6b3ec00 fix: update golang.org/x/net to v0.33.0 (# 1176)
  > bd15449 chore(all): auto-regenerate .pb.go files (# 1175)
  > 9240e9c chore(all): update all (# 1174)
  > e6fa225 chore(all): update all (# 1173)
  > a4fef06 chore(all): auto-regenerate .pb.go files (# 1172)
bumping golang.org/x/crypto 8929309...9290511:
  > 9290511 go.mod: update golang.org/x dependencies
  > fa5273e x509roots/fallback: update bundle
  > a8ea4be ssh: add ServerConfig.PreAuthConnCallback, ServerPreAuthConn (banner) interface
  > 71d3a4c acme: support challenges that require the ACME client to send a non-empty JSON body in a response to the challenge.

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-17 14:32:56 +00:00
David Fridrich bc6fad7635
podman available in def package repo ubuntu 24 (#2692)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-02-14 19:46:53 +00:00
github-actions[bot] de0d248e2f
chore: update Quarkus platform version to 3.18.3 (#2691)
Co-authored-by: Knative Automation <automation@knative.team>
2025-02-13 06:41:51 +00:00
Matej Vašek 9c0c216193
Optimise func-utils image (#2686)
* Use command instad of script in some tkn tasks

The "script" requires /bin/sh present in the image.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Add s2i-generate command to func-util image

The command encompasses some logic previously implemented as shell
script defined in tekton task. This allows us to remove sh/shell from
the func-util image.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Make func-util image "FROM scratch"

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Change func-utils image tag latest->v2

Since there are backward incompatible changes we must not change how
'latest' tag work (at least for some time).

For this reason we change tag to v2, so newer versions of func use that
and older use 'latest' that is compatible with them.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-02-06 07:02:13 +00:00
Knative Automation f8db896f85
upgrade to latest dependencies (#2684)
bumping knative.dev/eventing 5fb693f...4a6e7d2:
  > 4a6e7d2 [main] Upgrade to latest dependencies (# 8444)
bumping knative.dev/networking 4376124...e6fc9bb:
  > e6fc9bb upgrade to latest dependencies (# 1045)
  > a4342aa fix codegen by using newer scripts (# 1042)
  > 5afdd71 upgrade to latest dependencies (# 1044)
bumping knative.dev/serving 9c35416...a9c5467:
  > a9c5467 upgrade to latest dependencies (# 15749)
  > 9be0816 Bump go-containerregistry (# 15751)
  > 220c826 Update net-gateway-api nightly (# 15750)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-06 06:48:13 +00:00
github-actions[bot] c34974e3a1
chore: update Quarkus platform version to 3.18.2 (#2689)
Co-authored-by: Knative Automation <automation@knative.team>
2025-02-05 18:15:13 +00:00
Knative Automation 6c57bfaa6d
upgrade to latest dependencies (#2683)
Signed-off-by: Knative Automation <automation@knative.team>
2025-02-04 06:46:24 +00:00
Knative Automation e6ebd1c2f5
upgrade to latest dependencies (#2682)
bumping knative.dev/eventing 73357a6...5fb693f:
  > 5fb693f [main] Upgrade to latest dependencies (# 8431)

Signed-off-by: Knative Automation <automation@knative.team>
2025-02-03 07:47:27 +00:00
David Fridrich 2228c9dbe0
fix: struct naming in instanced go http templates synced (#2670)
* sync names

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* zz

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-01-31 18:53:57 +00:00
Matej Vašek d20eb9685f
Create test symlinks dynamically (#2681)
Some tools dislike having questionable symlinks in git repository so we
must create this symlinks dynamically in the test instead of having it
committed into the repository.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2025-01-31 16:24:57 +00:00
Knative Automation 4b1cc39731
upgrade to latest dependencies (#2680)
bumping knative.dev/serving f13695f...fbfa937:
  > fbfa937 Update net-contour nightly (# 15743)
  > c1e4644 Update net-gateway-api nightly (# 15741)
  > cbc236e Update net-istio nightly (# 15742)
bumping knative.dev/eventing d243b91...73357a6:
  > 73357a6 Add `sinks.knative.dev` to namespaced ClusterRole (# 8432)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-31 09:05:56 +00:00
Knative Automation e1758e86f6
upgrade to latest dependencies (#2663)
bumping go.opentelemetry.io/otel/trace bc2fe88...7cfbd86:
  > 7cfbd86 Release v1.32.0/v0.54.0/v0.8.0/v0.0.11 (# 5960)
  > 2be617e fix(deps): update github.com/opentracing-contrib/go-grpc/test digest to 51a56c3 (# 5959)
  > 6db18df fix(deps): update module github.com/opentracing-contrib/go-grpc to v0.1.0 (# 5958)
  > ef12bf8 chore(deps): update golang.org/x (# 5957)
  > 85eb76f Allow GC to collect unneeded slice elements (# 5804)
  > 1492efa Fix incorrect metrics getting generated from multiple readers (# 5900)
  > d2b0663 fix(deps): update module go.opentelemetry.io/build-tools/multimod to v0.15.0 (# 5951)
  > 394cbd2 chore(deps): update lycheeverse/lychee-action action to v2.1.0 (# 5950)
  > 37b2537 fix(deps): update github.com/opentracing-contrib/go-grpc digest to e3cbcab (# 5952)
  > 7f68356 fix(deps): update module go.opentelemetry.io/build-tools/semconvgen to v0.15.0 (# 5953)
  > 030ffdf fix(deps): update module go.opentelemetry.io/build-tools/crosslink to v0.15.0 (# 5948)
  > b89de2d fix(deps): update module go.opentelemetry.io/build-tools/gotmpl to v0.15.0 (# 5949)
  > b62a3fd Override insecure when endpoint URL is set (# 5944)
  > 937813d fix(deps): update github.com/opentracing-contrib/go-grpc digest to d08aa2b (# 5945)
  > ff07838 prometheus: Add instrumentation scope attributes to otel_scope_info (# 5932)
  > 1230566 log: Update package documentation (# 5942)
  > a62c45a chore(deps): update googleapis to dd2ea8e (# 5943)
  > 6e4c922 prometheus: Refactor getAttrs (# 5937)
  > 7fd5942 chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.23.0 (# 5939)
  > fb2b32b docs: updating outdated comments (# 5940)
  > 06ee6f2 Remove examples (# 5930)
  > 2a50fab otlplog: Add instrumentation scope attributes (# 5933)
  > afd1311 otlpmetric: Add instrumentation scope attributes (# 5935)
  > 692cb35 otlptrace: Add instrumentation scope attributes (# 5934)
  > 3cc4857 opentracing: Make schemaURL and scope attributes as identifying for Tracer (# 5931)
  > 4f94b1e log/logtest: Add Attributes to ScopeRecords (# 5927)
  > 6a2f7de Make scope attributes as identifying for Logger (# 5925)
  > ee56fb9 Make scope attributes as identifying for Meter (# 5926)
  > 3742c54 Make scope attributes as identifying for Tracer (# 5924)
  > 30c0f3f sdk/instrumentation: Add Attributes to Scope (# 5903)
  > 078b2dd Add Cheng-Zhen as a triager (# 5922)
  > 5cf73e7 fix(deps): update module github.com/prometheus/common to v0.60.1 (# 5919)
  > c0f7c95 Switch arm builds out of actuated and into the CNCF runners (# 5923)
  > 664a075 Fix exemplars being added to gauge metrics in the prometheus exporter (# 5912)
  > 30c4a9a Allow additional context to be added when WithHeaders is used in OTLP gRPC traces exporter (# 5915)
  > 3429e15 Revert Cleanup interaction of exemplar and aggregation (# 5913)
  > 7a153a0 chore(deps): update benchmark-action/github-action-benchmark action to v1.20.4 (# 5916)
  > 97f8401 Keep metadata for gRPC in context for log signal (# 5911)
  > 86a51dc [chore] Remove unnecessary type declaration in templated transforms (# 5906)
  > 92ccad7 [chore] Use errors.Join to unify errors (# 5907)
  > 1a964cc chore(deps): update googleapis to 324edc3 (# 5908)
  > 8041156 Cleanup interaction of exemplar and aggregation (# 5899)
  > bf6a7e1 otlpmetricgrpc: Keep metadata for gRPC in context (# 5892)
  > bd88af9 Generate `semconv/v1.27.0` (# 5894)
  > 2578acc otel: conceal unwrapping for global async instrument registration (# 5881)
  > 81b2a33 Add selector of exemplar reservoir providers to metric.Stream configuration (# 5861)
  > cd754a6 Remove company from emeritus (# 5887)
  > a234754 chore(deps): update googleapis to 796eee8 (# 5888)
  > d70f3da fix(deps): update module github.com/prometheus/client_golang to v1.20.5 (# 5886)
  > ba4a2ab chore(deps): update lycheeverse/lychee-action action to v2.0.2 (# 5885)
  > fe5c3f8 Run the test compatibility check even if tests failed (# 5879)
  > b3c313f chore(deps): update lycheeverse/lychee-action action to v2.0.1 (# 5884)
  > 6b251b8 Allow configuring the exemplar filter on the metrics SDK (# 5850)
bumping google.golang.org/genproto/googleapis/rpc dd2ea8e...19429a9:
  > 19429a9 chore(all): update all (# 1171)
  > e639e21 chore(all): update all (# 1170)
  > 65e8d21 Fix: GitHub workflow script injection (# 1169)
  > e0fbfb7 chore(all): update all (# 1168)
bumping go.opentelemetry.io/otel bc2fe88...7cfbd86:
  > 7cfbd86 Release v1.32.0/v0.54.0/v0.8.0/v0.0.11 (# 5960)
  > 2be617e fix(deps): update github.com/opentracing-contrib/go-grpc/test digest to 51a56c3 (# 5959)
  > 6db18df fix(deps): update module github.com/opentracing-contrib/go-grpc to v0.1.0 (# 5958)
  > ef12bf8 chore(deps): update golang.org/x (# 5957)
  > 85eb76f Allow GC to collect unneeded slice elements (# 5804)
  > 1492efa Fix incorrect metrics getting generated from multiple readers (# 5900)
  > d2b0663 fix(deps): update module go.opentelemetry.io/build-tools/multimod to v0.15.0 (# 5951)
  > 394cbd2 chore(deps): update lycheeverse/lychee-action action to v2.1.0 (# 5950)
  > 37b2537 fix(deps): update github.com/opentracing-contrib/go-grpc digest to e3cbcab (# 5952)
  > 7f68356 fix(deps): update module go.opentelemetry.io/build-tools/semconvgen to v0.15.0 (# 5953)
  > 030ffdf fix(deps): update module go.opentelemetry.io/build-tools/crosslink to v0.15.0 (# 5948)
  > b89de2d fix(deps): update module go.opentelemetry.io/build-tools/gotmpl to v0.15.0 (# 5949)
  > b62a3fd Override insecure when endpoint URL is set (# 5944)
  > 937813d fix(deps): update github.com/opentracing-contrib/go-grpc digest to d08aa2b (# 5945)
  > ff07838 prometheus: Add instrumentation scope attributes to otel_scope_info (# 5932)
  > 1230566 log: Update package documentation (# 5942)
  > a62c45a chore(deps): update googleapis to dd2ea8e (# 5943)
  > 6e4c922 prometheus: Refactor getAttrs (# 5937)
  > 7fd5942 chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.23.0 (# 5939)
  > fb2b32b docs: updating outdated comments (# 5940)
  > 06ee6f2 Remove examples (# 5930)
  > 2a50fab otlplog: Add instrumentation scope attributes (# 5933)
  > afd1311 otlpmetric: Add instrumentation scope attributes (# 5935)
  > 692cb35 otlptrace: Add instrumentation scope attributes (# 5934)
  > 3cc4857 opentracing: Make schemaURL and scope attributes as identifying for Tracer (# 5931)
  > 4f94b1e log/logtest: Add Attributes to ScopeRecords (# 5927)
  > 6a2f7de Make scope attributes as identifying for Logger (# 5925)
  > ee56fb9 Make scope attributes as identifying for Meter (# 5926)
  > 3742c54 Make scope attributes as identifying for Tracer (# 5924)
  > 30c0f3f sdk/instrumentation: Add Attributes to Scope (# 5903)
  > 078b2dd Add Cheng-Zhen as a triager (# 5922)
  > 5cf73e7 fix(deps): update module github.com/prometheus/common to v0.60.1 (# 5919)
  > c0f7c95 Switch arm builds out of actuated and into the CNCF runners (# 5923)
  > 664a075 Fix exemplars being added to gauge metrics in the prometheus exporter (# 5912)
  > 30c4a9a Allow additional context to be added when WithHeaders is used in OTLP gRPC traces exporter (# 5915)
  > 3429e15 Revert Cleanup interaction of exemplar and aggregation (# 5913)
  > 7a153a0 chore(deps): update benchmark-action/github-action-benchmark action to v1.20.4 (# 5916)
  > 97f8401 Keep metadata for gRPC in context for log signal (# 5911)
  > 86a51dc [chore] Remove unnecessary type declaration in templated transforms (# 5906)
  > 92ccad7 [chore] Use errors.Join to unify errors (# 5907)
  > 1a964cc chore(deps): update googleapis to 324edc3 (# 5908)
  > 8041156 Cleanup interaction of exemplar and aggregation (# 5899)
  > bf6a7e1 otlpmetricgrpc: Keep metadata for gRPC in context (# 5892)
  > bd88af9 Generate `semconv/v1.27.0` (# 5894)
  > 2578acc otel: conceal unwrapping for global async instrument registration (# 5881)
  > 81b2a33 Add selector of exemplar reservoir providers to metric.Stream configuration (# 5861)
  > cd754a6 Remove company from emeritus (# 5887)
  > a234754 chore(deps): update googleapis to 796eee8 (# 5888)
  > d70f3da fix(deps): update module github.com/prometheus/client_golang to v1.20.5 (# 5886)
  > ba4a2ab chore(deps): update lycheeverse/lychee-action action to v2.0.2 (# 5885)
  > fe5c3f8 Run the test compatibility check even if tests failed (# 5879)
  > b3c313f chore(deps): update lycheeverse/lychee-action action to v2.0.1 (# 5884)
  > 6b251b8 Allow configuring the exemplar filter on the metrics SDK (# 5850)
bumping knative.dev/pkg c43477f...efddeac:
  > efddeac Update community files (# 3143)
  > e5aa25f Bump google.golang.org/grpc from 1.69.4 to 1.70.0 (# 3142)
  > 7fca699 Bump google.golang.org/protobuf from 1.36.3 to 1.36.4 (# 3141)
  > dcf1593 Update community files (# 3140)
  > 3386f37 Bump google.golang.org/protobuf from 1.36.2 to 1.36.3 (# 3139)
  > 1ca59d1 Bump google.golang.org/grpc from 1.69.2 to 1.69.4 (# 3138)
  > a37a847 drop use of code-generator/generate-groups.sh (# 3136)
bumping knative.dev/serving da5e7fd...f13695f:
  > f13695f upgrade to latest dependencies (# 15739)
  > 45ca4c6 Update net-gateway-api nightly (# 15736)
  > e41df09 Update net-istio nightly (# 15737)
  > 81db3b8 Update net-contour nightly (# 15734)
  > 2215525 Update net-kourier nightly (# 15735)
  > bb3d521 Update community files (# 15733)
  > 6fca262 Update net-gateway-api nightly (# 15728)
  > 8f2c4a7 Update net-contour nightly (# 15726)
  > 6174c65 Update net-istio nightly (# 15727)
  > 72500e7 Update community files (# 15725)
  > b64b468 Update net-gateway-api nightly (# 15723)
  > 6265a8e Fix configuration timeout defaulting  (# 15617)
  > 5842f16 Update net-contour nightly (# 15718)
  > 1a30e12 Allow paths without leading slash in probes (# 15681)
  > 59f6633 Update net-gateway-api nightly (# 15720)
  > f10e715 Update net-kourier nightly (# 15719)
  > 309d4ef Update net-istio nightly (# 15717)
bumping knative.dev/hack c142b48...5f7f0f5:
  > 5f7f0f5 Update community files (# 412)
  > b38a2ca Update community files (# 411)
bumping google.golang.org/genproto/googleapis/api dd2ea8e...19429a9:
  > 19429a9 chore(all): update all (# 1171)
  > e639e21 chore(all): update all (# 1170)
  > 65e8d21 Fix: GitHub workflow script injection (# 1169)
  > e0fbfb7 chore(all): update all (# 1168)
bumping knative.dev/networking 67d1c27...4376124:
  > 4376124 Update community files (# 1043)
  > b235386 Update community files (# 1041)
bumping knative.dev/client/pkg 9baddba...7dc2a92:
  > 7dc2a92 Update community files (# 1994)
  > 178db32 Update community files (# 1993)
  > f734724 upgrade to latest dependencies (# 1992)
  > 7e6928b upgrade to latest dependencies (# 1989)
bumping google.golang.org/protobuf 12c6ebd...259e665:
  > 259e665 all: release v1.36.4
  > 5f93d99 internal_gengo: avoid allocations in rawDescGZIP() accessors
  > 2005adb reflect/protodesc: fix panic when working with dynamicpb
  > aee8a9c internal_gengo: switch back from string literal to hex byte slice
  > 0c3cc2f internal_gengo: use unsafe.StringData() to avoid a descriptor copy
  > cc8d1c2 internal_gengo: store raw descriptor in .rodata section
  > 132f042 all: start v1.36.3-devel
  > 54ef969 all: release v1.36.3
  > 7cbd915 reflect/protodesc: fix panic when working with dynamicpb
  > 2f60868 proto: add example for GetExtension, SetExtension
  > de043b9 runtime/protolazy: replace internal doc link with external link
  > 42e0fa9 all: split flags.ProtoLegacyWeak out of flags.ProtoLegacy
  > 5fee2a7 internal/impl: remove unused exporter parameter
  > 84924f7 internal/impl: switch to reflect.Value.IsZero
  > fe8430d cmd/protoc-gen-go: remove json struct tags from unexported fields
  > 84f7738 internal/impl: clean up unneeded Go<1.12 MapRange() alternative
  > 9acc8f2 types/dynamicpb: switch atomicExtFiles to atomic.Uint64 type
  > ad89419 all: start v1.36.2-devel
bumping google.golang.org/grpc b615b35...98a0092:
  > 98a0092 Change version to 1.70.0 (# 7984)
  > bf380de Cherrypick # 7998,  # 8011, # 8010 into 1.70.x (# 8028)
  > 54b3eb9 experimental/credentials: Add credentials that don't enforce ALPN (# 7980) (# 8012)
  > 62b9185 clustetresolver: Copy endpoints.Addresses slice from DNS updates to avoid data races (# 7991) (# 8004)
  > 724f450 examples/features/csm_observability: use helloworld client and server instead of echo client and server (# 7945)
  > e8d5feb rbac: add method name to :path in headers (# 7965)
  > e912015 cleanup: Fix usages of non-constant format strings (# 7959)
  > 681334a cleanup: replace dial with newclient (# 7943)
  > 063d352 internal/resolver: introduce a new resolver to handle target URI and proxy address resolution (# 7857)
  > 10c7e13 outlierdetection: Support health listener for ejection updates (# 7908)
  > bce0535 test: Add a test for decompression exceeding max receive message size (# 7938)
  > f32168c envconfig: enable xDS client fallback by default (# 7949)
  > e957825 test: Workaround slow SRV lookups in flaking test (# 7957)
  > e5a4eb0 deps: update crypto dependency to resolve CVE-2024-45337 (# 7956)
  > 56a14ba cleanup: replace dial with newclient (# 7920)
  > b3bdacb test: switching to stubserver in tests instead of testservice (# 7925)
  > e8055ea grpcs: update `WithContextDialer` documentation to include using passthrough resolver (# 7916)
  > d0716f9 examples/features/csm_observability: Make CSM Observability example server listen on an IPV4 address (# 7933)
  > cc161de xds: Add support for multiple addresses per endpoint (# 7858)
  > 3f76275 xdsclient: stop caching xdsChannels for potential reuse, after all references are released (# 7924)
  > 7ee073d experimental/stats: re-add type aliases for migration (# 7929)
  > 38a8b9a health, grpc: Deliver health service updates through the health listener (# 7900)
  > c1b6b37 Update README.md (# 7921)
  > e4d084a examples: replace printf with print for log message in gracefulstop (# 7917)
  > b1f70ce test: replace grpc.Dial with grpc.NewClient
  > 0027558 internal/transport: replace integer status codes with http constants (# 7910)
  > 66ba4b2 examples/features/gracefulstop: add example to demonstrate server graceful stop (# 7865)
  > adad26d test/kokoro: Add psm-fallback build config (# 7899)
  > f53724d serviceconfig: Return errors instead of skipping invalid retry policy config (# 7905)
  > 645aadf deps: update dependencies for all modules (# 7904)
  > d7286fb Change version to 1.70.0-dev (# 7903)
bumping knative.dev/eventing 9cec50f...d243b91:
  > d243b91 JobSink with Istio config for Job spec (# 8430)
  > c636346 [main] Update community files (# 8429)
  > cdc6144 Rename `apiextentions` to `apiextensions` (# 8428)
  > 1b3287e [main] Update community files (# 8424)
  > 28c489e Reduce mt-broker-controller memory usage with namespaced endpoint informer (# 8418)
bumping go.opentelemetry.io/otel/metric bc2fe88...7cfbd86:
  > 7cfbd86 Release v1.32.0/v0.54.0/v0.8.0/v0.0.11 (# 5960)
  > 2be617e fix(deps): update github.com/opentracing-contrib/go-grpc/test digest to 51a56c3 (# 5959)
  > 6db18df fix(deps): update module github.com/opentracing-contrib/go-grpc to v0.1.0 (# 5958)
  > ef12bf8 chore(deps): update golang.org/x (# 5957)
  > 85eb76f Allow GC to collect unneeded slice elements (# 5804)
  > 1492efa Fix incorrect metrics getting generated from multiple readers (# 5900)
  > d2b0663 fix(deps): update module go.opentelemetry.io/build-tools/multimod to v0.15.0 (# 5951)
  > 394cbd2 chore(deps): update lycheeverse/lychee-action action to v2.1.0 (# 5950)
  > 37b2537 fix(deps): update github.com/opentracing-contrib/go-grpc digest to e3cbcab (# 5952)
  > 7f68356 fix(deps): update module go.opentelemetry.io/build-tools/semconvgen to v0.15.0 (# 5953)
  > 030ffdf fix(deps): update module go.opentelemetry.io/build-tools/crosslink to v0.15.0 (# 5948)
  > b89de2d fix(deps): update module go.opentelemetry.io/build-tools/gotmpl to v0.15.0 (# 5949)
  > b62a3fd Override insecure when endpoint URL is set (# 5944)
  > 937813d fix(deps): update github.com/opentracing-contrib/go-grpc digest to d08aa2b (# 5945)
  > ff07838 prometheus: Add instrumentation scope attributes to otel_scope_info (# 5932)
  > 1230566 log: Update package documentation (# 5942)
  > a62c45a chore(deps): update googleapis to dd2ea8e (# 5943)
  > 6e4c922 prometheus: Refactor getAttrs (# 5937)
  > 7fd5942 chore(deps): update module github.com/grpc-ecosystem/grpc-gateway/v2 to v2.23.0 (# 5939)
  > fb2b32b docs: updating outdated comments (# 5940)
  > 06ee6f2 Remove examples (# 5930)
  > 2a50fab otlplog: Add instrumentation scope attributes (# 5933)
  > afd1311 otlpmetric: Add instrumentation scope attributes (# 5935)
  > 692cb35 otlptrace: Add instrumentation scope attributes (# 5934)
  > 3cc4857 opentracing: Make schemaURL and scope attributes as identifying for Tracer (# 5931)
  > 4f94b1e log/logtest: Add Attributes to ScopeRecords (# 5927)
  > 6a2f7de Make scope attributes as identifying for Logger (# 5925)
  > ee56fb9 Make scope attributes as identifying for Meter (# 5926)
  > 3742c54 Make scope attributes as identifying for Tracer (# 5924)
  > 30c0f3f sdk/instrumentation: Add Attributes to Scope (# 5903)
  > 078b2dd Add Cheng-Zhen as a triager (# 5922)
  > 5cf73e7 fix(deps): update module github.com/prometheus/common to v0.60.1 (# 5919)
  > c0f7c95 Switch arm builds out of actuated and into the CNCF runners (# 5923)
  > 664a075 Fix exemplars being added to gauge metrics in the prometheus exporter (# 5912)
  > 30c4a9a Allow additional context to be added when WithHeaders is used in OTLP gRPC traces exporter (# 5915)
  > 3429e15 Revert Cleanup interaction of exemplar and aggregation (# 5913)
  > 7a153a0 chore(deps): update benchmark-action/github-action-benchmark action to v1.20.4 (# 5916)
  > 97f8401 Keep metadata for gRPC in context for log signal (# 5911)
  > 86a51dc [chore] Remove unnecessary type declaration in templated transforms (# 5906)
  > 92ccad7 [chore] Use errors.Join to unify errors (# 5907)
  > 1a964cc chore(deps): update googleapis to 324edc3 (# 5908)
  > 8041156 Cleanup interaction of exemplar and aggregation (# 5899)
  > bf6a7e1 otlpmetricgrpc: Keep metadata for gRPC in context (# 5892)
  > bd88af9 Generate `semconv/v1.27.0` (# 5894)
  > 2578acc otel: conceal unwrapping for global async instrument registration (# 5881)
  > 81b2a33 Add selector of exemplar reservoir providers to metric.Stream configuration (# 5861)
  > cd754a6 Remove company from emeritus (# 5887)
  > a234754 chore(deps): update googleapis to 796eee8 (# 5888)
  > d70f3da fix(deps): update module github.com/prometheus/client_golang to v1.20.5 (# 5886)
  > ba4a2ab chore(deps): update lycheeverse/lychee-action action to v2.0.2 (# 5885)
  > fe5c3f8 Run the test compatibility check even if tests failed (# 5879)
  > b3c313f chore(deps): update lycheeverse/lychee-action action to v2.0.1 (# 5884)
  > 6b251b8 Allow configuring the exemplar filter on the metrics SDK (# 5850)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-30 07:43:55 +00:00
github-actions[bot] dbdc5ca671
chore: update Quarkus platform version to 3.18.1 (#2678)
Co-authored-by: Knative Automation <automation@knative.team>
2025-01-30 01:16:55 +00:00
Matej Vašek 18ce3488e8
Fix multiarch image build (#2679)
This action will install qemu static binaries and setup binfmt.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-30 00:45:55 +00:00
Matej Vašek ee3a2b9f39
Pin platform of builder image (#2675)
Previously I thought the platform does not matter for 'scratch'.
However the image build is failing in CI.
It worked on my machine with both podman and moby.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-29 04:17:54 +00:00
Knative Automation 60d9126dc7
Update community files (#2673)
Signed-off-by: Knative Automation <automation@knative.team>
2025-01-28 09:45:54 +00:00
Matej Vašek 4de372564a
Go tar (#2672)
* Fixed pod readiness check

Detect also if pod did not exited prematurely.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Removed dependency on sh/tar from alpine image

This commit removes depencency on sh and tar binaries by implementing
the logic in our func-util binary.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-28 00:45:56 +00:00
github-actions[bot] 23668cbf36
chore: update Springboot platform version to 3.4.2 (#2669)
Co-authored-by: Knative Automation <automation@knative.team>
2025-01-27 20:38:56 +00:00
Knative Automation 20a173a6de
Update community files (#2667)
Signed-off-by: Knative Automation <automation@knative.team>
2025-01-23 02:02:33 +00:00
github-actions[bot] e024ae699c
chore: update Quarkus platform version to 3.17.8 (#2666)
Co-authored-by: Knative Automation <automation@knative.team>
2025-01-23 00:26:11 +00:00
David Fridrich 0cbf721539
bump versions (#2664)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-01-22 15:38:11 +00:00
David Fridrich 020dd96d61
test for func run with digested image override (#2650)
* run test for digested img

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* misspell

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-01-21 18:48:09 +00:00
Matej Vašek d2aa94d30a
Remove usage of ttl.sh (#2653)
* Remove usage of ttl.sh

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix detection of host resolution failure

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-21 06:32:09 +00:00
Knative Automation 6c5b7613a1
upgrade to latest dependencies (#2662)
Signed-off-by: Knative Automation <automation@knative.team>
2025-01-21 06:21:09 +00:00
Knative Automation 56099e7017
upgrade to latest dependencies (#2661)
bumping knative.dev/client/pkg 5f15fd3...8d10f67:
  > 8d10f67 Remove dependency on deprecated client-pkg (# 1990)
bumping knative.dev/networking 04878f0...67d1c27:
  > 67d1c27 upgrade to latest dependencies (# 1040)
bumping knative.dev/eventing a40a0a7...9cec50f:
  > 9cec50f [main] Upgrade to latest dependencies (# 8414)
bumping knative.dev/serving d4766be...df7f168:
  > df7f168 Update net-gateway-api nightly (# 15710)
  > db13cc2 Update net-kourier nightly (# 15711)
  > a327979 Update net-contour nightly (# 15708)
  > 72fdded Update net-istio nightly (# 15709)
  > b1e9a0c upgrade to latest dependencies (# 15707)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-20 15:59:10 +00:00
Knative Automation fe8ca74840
upgrade to latest dependencies (#2660)
bumping knative.dev/networking 6797968...04878f0:
  > 04878f0 upgrade to latest dependencies (# 1039)
bumping knative.dev/serving a5988eb...d4766be:
  > d4766be Disable probe tests for kourier tls runtime (# 15702)
  > fe0e53f upgrade to latest dependencies (# 15701)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-20 06:11:07 +00:00
Matej Vašek 527b917f07
Remove dependency on docker hub (#2654)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-19 11:04:07 +00:00
Knative Automation 68cd559356
upgrade to latest dependencies (#2658)
bumping knative.dev/eventing 90edfe6...a40a0a7:
  > a40a0a7 [main] Upgrade to latest dependencies (# 8413)
bumping knative.dev/pkg 0c2a238...c43477f:
  > c43477f upgrade to latest dependencies (# 3137)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-18 04:35:05 +00:00
Luke Kingland 02b331d8d2
setup go via shared action (#2657) 2025-01-17 06:30:04 +00:00
Knative Automation a72c3301bd
upgrade to latest dependencies (#2656)
bumping knative.dev/serving c3f2bfe...a5988eb:
  > a5988eb Set k8s default container label (# 15694)
  > 5ede174 fix builds on arm/v7 (# 15699)
  > bee28f3 Configure deployments to have no own revisionHistoryLimit (# 15698)
bumping knative.dev/hack f8be0cc...c142b48:
  > c142b48 Refactor release script to gh CLI (# 408)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-17 06:19:04 +00:00
David Simansky 09e2eef5c9
Update deps to match latest Knative versions (#2652)
* Update deps to match latest Knative versions

* Update openshift-pipelines/pipelines-as-code to latest version v0.31.0

* Update structured-merge-diff to fix missing field
2025-01-16 15:07:05 +00:00
github-actions[bot] f734f82385
chore: update Quarkus platform version to 3.17.7 (#2651)
Co-authored-by: Knative Automation <automation@knative.team>
2025-01-16 06:49:03 +00:00
Matej Vašek 59a442c03f
Bump s2i dep (#2649)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-14 15:04:03 +00:00
Matej Vašek 28225ceede
Remove unnecessary Makefile recipe dependency (#2648)
The CA root should be updated automatically by GH Action.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-14 10:40:01 +00:00
David Fridrich cd59f97595
Remove gauron image references in code (#2647)
* remove gauron image references

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* remove image

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* remove gauron username

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2025-01-10 19:03:17 +00:00
Knative Automation 7bf35e599c
upgrade to latest dependencies (#2646)
bumping knative.dev/serving 8556b88...8a37b89:
  > 8a37b89 Update net-kourier nightly (# 15671)
bumping knative.dev/hack e92a16a...f8be0cc:
  > f8be0cc Update community files (# 407)
bumping knative.dev/pkg 4c90159...4ba3f1b:
  > 4ba3f1b Update community files (# 3128)
bumping knative.dev/eventing 134c4c0...350f81b:
  > 350f81b [main] Update community files (# 8403)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-10 06:18:17 +00:00
Knative Automation 7412b1a6e1
Update community files (#2645)
Signed-off-by: Knative Automation <automation@knative.team>
2025-01-09 13:46:16 +00:00
Knative Automation 39bfc3b1e1
upgrade to latest dependencies (#2643)
bumping knative.dev/serving 0d589da...8556b88:
  > 8556b88 fix dependency name (# 15674)
  > 83fe1c2 fix dependabot config (# 15672)
  > 79f8c3f fix dependabot config (# 15668)
bumping knative.dev/eventing 52792ea...134c4c0:
  > 134c4c0 Event lineage builder should accept client interfaces (# 8402)
  > bb6c53c Don't swallow errors in Lineage package (# 8401)
  > 81a37ff Lineage constructor to accept clients instead of creating them (# 8399)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-09 07:28:59 +00:00
github-actions[bot] 3b414f3197
chore: update Quarkus platform version to 3.17.6 (#2644)
Co-authored-by: Knative Automation <automation@knative.team>
2025-01-09 06:56:58 +00:00
github-actions[bot] a3c8645c91
chore: update Quarkus platform version to 3.17.5 (#2640)
Co-authored-by: Knative Automation <automation@knative.team>
2025-01-08 00:18:57 +00:00
Knative Automation 8d8d4f3803
upgrade to latest dependencies (#2641)
bumping knative.dev/serving df03027...0d589da:
  > 0d589da Add support for hostPath (# 15648)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-07 06:47:56 +00:00
Matej Vašek 00ddf7af83
Update deps (#2639)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-07 03:54:03 +00:00
Matej Vašek e2474a6bf1
Enable Go ARM64 buildpack (#2636)
* Enable Go ARM64 buildpack

Added adjustments that enable Go buildpack build on arm64 machines.
Paketo buildpack do not distribute serveral buildpacks in arm64
variant, so we need to build them.

Namely we need to build:
go
go-dist
go-build
go-mod-vendor
git

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Remove unused struct

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Prealloc slice

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix typo

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix typo

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Remove debugging envvar

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-07 03:53:57 +00:00
github-actions[bot] cb53c62391
chore: update Springboot platform version to 3.4.1 (#2637)
Co-authored-by: Knative Automation <automation@knative.team>
2025-01-06 22:25:56 +00:00
Matej Vašek bf603390b6
Set annotations on builder images (#2635)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2025-01-06 14:42:55 +00:00
Knative Automation 8d7b4e90e6
upgrade to latest dependencies (#2634)
bumping knative.dev/eventing c9047a1...52792ea:
  > 52792ea [main] Upgrade to latest dependencies (# 8397)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-06 06:47:55 +00:00
github-actions[bot] e9b8b37e40
chore: update CA bundle (#2633)
Co-authored-by: Knative Automation <automation@knative.team>
2025-01-03 10:42:52 +00:00
Knative Automation 05d94420d2
upgrade to latest dependencies (#2632)
bumping knative.dev/eventing 4dbc2ba...c9047a1:
  > c9047a1 [main] Update community files (# 8396)
bumping knative.dev/pkg 40afb7c...4c90159:
  > 4c90159 Update community files (# 3126)
bumping knative.dev/client/pkg 441372a...a045990:
  > a045990 Update community files (# 1983)
bumping knative.dev/hack 1978b3a...e92a16a:
  > e92a16a set min to 1.30 (# 405)
  > cad8c71 Update community files (# 406)
bumping knative.dev/serving 06281eb...df03027:
  > df03027 fix: fixed the pinned dependencies issue (# 15475)
  > da8d2d1 Allow securityContext.Privileged to be configurable (# 15643)
  > c0f181d Update net-contour nightly (# 15665)
  > 746e72f Update net-gateway-api nightly (# 15658)
  > 750f9a2 Drop k8s v1.28 from kind testing and update cluster version to 1.30 in e2e (# 15655)
  > daae9fd Update net-contour nightly (# 15660)
  > b4c8ac9 Update community files (# 15661)
  > 095f876 Update net-kourier nightly (# 15659)

Signed-off-by: Knative Automation <automation@knative.team>
2025-01-03 10:32:52 +00:00
Knative Automation 8dd856c1e3
Update community files (#2631)
Signed-off-by: Knative Automation <automation@knative.team>
2024-12-23 13:54:56 +00:00
Knative Automation b4f862ffbe
upgrade to latest dependencies (#2626)
bumping knative.dev/networking bbd3279...8b69a35:
  > 8b69a35 Make maximum delay of prober in its backoff configurable (# 1001)
  > bf671a6 Update community files (# 1024)
bumping knative.dev/serving d1e308e...06281eb:
  > 06281eb upgrade to latest dependencies (# 15656)
  > 033225d pin chainguard action version (# 15657)
bumping knative.dev/eventing b00da59...4dbc2ba:
  > 4dbc2ba Scheduler: LastOrdinal based on replicas instead of FreeCap (# 8388)
  > 06355af [main] Upgrade to latest dependencies (# 8392)

Signed-off-by: Knative Automation <automation@knative.team>
2024-12-23 13:11:21 +00:00
Matej Vašek 8475f864b9
Fix deadlock (#2630)
* Fix deadlock

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Rework digest detection

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-20 12:59:12 +00:00
Matej Vašek 1122bf76f4
Fix buildpack builder script (#2629)
* Pass Go context.Context where appropriate

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Fix buildpack builder script

Bypass Moby bug where 500 is returned instead of 404.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: update go.mod

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-20 00:23:11 +00:00
Knative Automation e3a24d3c4e
upgrade to latest dependencies (#2620)
bumping knative.dev/eventing 4087c3a...b00da59:
  > b00da59 Register eventshub image for JobSink (# 8390)
  > 2f165f1 Update golang.org/x/crypto to 0.31.0 (# 8389)
bumping knative.dev/pkg f3ab560...40afb7c:
  > 40afb7c fix script (# 3123)
bumping knative.dev/serving 2d5a1e9...d1e308e:
  > d1e308e [performance/real-traffic-test] Enable AllowHTTPFullDuplexFeature (# 15654)

Signed-off-by: Knative Automation <automation@knative.team>
2024-12-19 06:10:10 +00:00
Matej Vašek 77489858d0
Use library GH keychain instead of our own (#2624)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-18 18:13:10 +00:00
Matej Vašek 770949b7d2
Fix authorization (#2622)
Fixed authorization by setting keychain for the pack client.
This is required since recently we set pull policy to "always".

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-18 16:59:10 +00:00
Matej Vašek d5dc82c34b
Build arm64 tiny buildpack builder image (#2617)
Enable arm64 support for tiny builder (Java,Go).
This commit actually enables only Java since some additinal work has to
be done for Go because upstream paketo buildpack do not support Go fully
yet.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-18 05:31:09 +00:00
David Fridrich d05857a9f3
bump crypto package (#2618)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2024-12-17 12:47:11 +00:00
David Fridrich 5d9dafbffe
add case for DNS resolve fail (#2619)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2024-12-17 12:23:09 +00:00
David Fridrich 8dc529f80b
bump: setup-node action version in workflows (#2613)
* fix ndoe version action

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* one more

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2024-12-17 05:38:08 +00:00
Knative Automation cc550c47cf
upgrade to latest dependencies (#2615)
bumping knative.dev/eventing 414af5c...4087c3a:
  > 4087c3a Going OIDC for Integration Source (# 8383)
  > 3a69e30 add new integration CRDs to storage version migrator tool (# 8386)

Signed-off-by: Knative Automation <automation@knative.team>
2024-12-17 05:28:10 +00:00
Knative Automation e5aea14162
upgrade to latest dependencies (#2614)
bumping knative.dev/eventing f577063...414af5c:
  > 414af5c Add EventPolicy to storage version migrator (# 8384)
  > f82811b Remove conversion webhook config in EventPolicy CRD (# 8379)
  > 7c1a62d Add health check config and clean up duplicated code (# 8308)
  > bff7b03 Remove unused filter function (# 8375)
  > 8d8b6c9 RequestReply: Added feature flag for default timeout (# 8361)
  > 7bb320c Chore: field semantic correction  (# 8370)
  > 3345c86 Clean up remove session token (# 8369)
  > 6e7e3d4 Adding sns sink to Integration Sink (# 8365)
  > d4357e3 MT-Broker: return retriable status code based on the state to leverage retries (# 8366)
  > 795e4a3 Move image to map (# 8362)
  > 408db83 We changed the event type on the images (# 8364)
bumping knative.dev/serving 5717d19...2d5a1e9:
  > 2d5a1e9 Update net-kourier nightly (# 15647)

Signed-off-by: Knative Automation <automation@knative.team>
2024-12-16 05:07:33 +00:00
Luke Kingland b033bb5a4f
use knative go setup action (#2612)
Keeps the Go version used by Knative projects in sync with each-other
and tooling.
2024-12-13 04:20:54 +00:00
github-actions[bot] 6384d079ae
chore: update Quarkus platform version to 3.17.4 (#2611)
Co-authored-by: Knative Automation <automation@knative.team>
2024-12-12 07:24:53 +00:00
github-actions[bot] 03079c6bab
chore: update Quarkus platform version to 3.17.3 (#2610)
Co-authored-by: Knative Automation <automation@knative.team>
2024-12-05 05:13:45 +00:00
Matej Vašek 70f96bb8ac
Fix some linter errors in integration tests (#2608)
* Fix some linter errors

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: set func registry

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-04 13:36:45 +00:00
github-actions[bot] 90626ab4c0
chore: update Springboot platform version to 3.4.0 (#2609)
Co-authored-by: Knative Automation <automation@knative.team>
2024-12-03 12:41:44 +00:00
Matej Vašek 0742d9be96
Fixed some deprecation warnings (#2607)
* Fixed some deprecation warnings

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: update deps

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-03 08:40:44 +00:00
David Fridrich 582536f922
add repository to the credentials prompt (#2596)
* simplify more

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix creds test

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* name fix

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* naming

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2024-12-02 16:22:45 +00:00
Matej Vašek 0e150e0a4b
Update deps (#2604)
Update pack
Update source-to-image
Update required Go version

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-02 15:50:43 +00:00
Matej Vašek 3d19d9bda3
Update golangci-lint (#2606)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-02 14:40:48 +00:00
Matej Vašek cd24d856e5
Update pack dep (#2605)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-12-01 11:05:46 +00:00
github-actions[bot] 9a6bb271ec
chore: update Quarkus platform version to 3.17.2 (#2603)
Co-authored-by: Knative Automation <automation@knative.team>
2024-11-29 15:10:44 +00:00
Knative Automation 1926b3d062
upgrade to latest dependencies (#2602)
bumping knative.dev/eventing 545c14c...f577063:
  > f577063 Align label generation and apply on container-source as well (# 8355)
  > cb31cb2 Add integrationsinks-addressable-resolver cluster role (# 8356)
bumping knative.dev/client/pkg 747ac98...441372a:
  > 441372a Add target platform flag to build script (# 1981)
bumping knative.dev/serving 8cbbe8f...5717d19:
  > 5717d19 Update net-kourier nightly (# 15636)
  > 15ac5b1 Update net-contour nightly (# 15634)

Signed-off-by: Knative Automation <automation@knative.team>
2024-11-29 06:04:43 +00:00
Knative Automation 61ddbac37a
upgrade to latest dependencies (#2578)
bumping google.golang.org/grpc 3f95b38...acba4d3:
  > acba4d3 Change version to 1.68.0 (# 7743)
  > 5363dca credentials: Apply defaults to TLS configs provided through GetConfigForClient (# 7754) (# 7813)
  > 056dc64 status: Fix status incompatibility introduced by # 6919 and move non-regeneratable proto code into /testdata (# 7724) (# 7793)
  > b79fb61 mem: use slice capacity instead of length, to determine whether to pool buffers or directly allocate them (# 7702) (# 7792)
  > 54841ef  stats/opentelemetry/csm: Get mesh_id local label from "CSM_MESH_ID" environment variable, rather than parsing from bootstrap file (# 7740)
  > ad81c20 pickfirstleaf: minor simplification to reconcileSubConnsLocked method (# 7731)
  > b850ea5 transport : wait for goroutines to exit before transport closes (# 7666)
  > 00b9e14 pickfirst: New pick first policy for dualstack (# 7498)
  > 18a4eac testutils: add couple of log statements to the restartable listener type (# 7716)
  > fdc2ec2 xdsclient: deflake TestADS_ResourcesAreRequestedAfterStreamRestart (# 7720)
  > 4115c21 xds: return all ServerConfig dial options together (# 7718)
  > b8ee37d pickfirst: Move var for mocking the shuffle func from internal/internal to pickfirst/internal (# 7698)
  > d9d8f34 revert xds: return all ServerConfig dial options together (# 7712)
  > 5f178a8 xdsclient: fix test build breakage (# 7710)
  > f17ea7d xds: return all ServerConfig dial options together (# 7680)
  > bdd444d xds: address merge conflict gotcha and missed review comment from previous PRs (# 7705)
  > d365be6 transport: prevent deadlock in transport Close when GoAway write hangs (# 7662)
  > 6c6c9b6 xdsclient: e2e style tests for ads stream restart (5/N) (# 7696)
  > 5e6f4b9 xds: misc test cleanup (4/N) (# 7695)
  > 3adcd41 xdsclient: make load reporting tests e2e style (3/N) (# 7694)
  > 98d1550 xdsclient: switch more transport tests to e2e style (2/N) (# 7693)
  > 9afb232 xdsclient: invoke watch callback when new update matches cached one, but previous update was NACKed (1/N) (# 7692)
  > ab5af45 Revert "protoc-gen-go-grpc: remove `use_generic_streams_experimental`  flag (defaults to true) (# 7654) (# 7703)
  > e8a70c6 vet: add check to ensure terminating newline (# 7645)
  > 5fd9853 examples: improve package comments (# 7658)
  > 859602c vet : add check for tabs in text files (# 7678)
  > 67e47fc xds: Fix flaky test TestUnmarshalListener_WithUpdateValidatorFunc (# 7675)
  > ca4865d balancer: automatically stop producers on subchannel state changes (# 7663)
  > 941102b xds/server: Fix xDS Server leak (# 7664)
  > 7aee163 xds: add xDS transport custom Dialer support (# 7586)
  > 9affdbb internal/credentials/xds: add unit tests for `HandshakeInfo.Equal` (# 7638)
  > 3196f7a protoc-gen-go-grpc: remove `use_generic_streams_experimental` flag (defaults to true) (# 7654)
  > 218811e balancer/rls: Add picker and cache unit tests for RLS Metrics (# 7614)
  > a9ff62d clusterresolver/e2e_test: Avoid making real DNS requests in TestAggregateCluster_BadEDS_BadDNS (# 7669)
  > e7a8097 cleanup: replace grpc.Dial with grpc.NewClient in tests (# 7640)
  > bcf9171 transport: Fix reporting of bytes read while reading headers (# 7660)
  > 8ea3460 balancer: fix logic to prevent producer streams before READY is reported (# 7651)
  > 6c48e47 replace tab with spaces in text files (# 7650)
  > 1418e5e clusterimpl: use gsb.UpdateClientConnState instead of switchTo, on receipt of config update (# 7567)
  > ac41314 .*: Add missing a newline at the end (# 7644)
  > 11c44fb vet: add comment explaining reason for revive lineter disabled rules (# 7634)
  > 3b626a7 *: fix more typos (# 7619)
  > 04e78b0 .*: fix lint issues of not having comments for exported funcs and vars along with any remaining issues and enable remaining disabled rules (# 7575)
  > 31ffeee Deps: Bump Go version in Dockerfiles and test/kokoro/xds.sh (# 7629)
  > 393fbc3 Update dependencies after 1.67 branch cut (# 7624)
  > cf5d541 stubserver: support xds-enabled grpc server (# 7613)
  > b6fde8c vet: add check for trailing spaces (# 7576)
  > 7fb7ac7 mem: replace flate.Reader reference (# 7595)
  > 8f920c6 Change version to 1.68.0-dev (# 7601)
bumping golang.org/x/mod 46a3137...dec0365:
  > dec0365 sumdb: make data tiles by Server compatible with sum.golang.org
  > c8a7319 x/mod: fix handling of vendored packages with '/vendor' in non-top-level paths
  > 9cd0e4c x/mod: remove vendor/modules.txt from module download
bumping google.golang.org/genproto/googleapis/api ddb44da...8af14fe:
  > 8af14fe chore(all): update all (# 1159)
  > 7e3bb23 chore(all): auto-regenerate .pb.go files (# 1158)
  > f6391c0 chore(all): update all (# 1156)
  > 3fd189d chore(googleapis): update cloud/gkeconnect/gateway/v1beta1/alias.go (# 1157)
  > 4ba0660 chore: update datastore and bigtable (# 1155)
  > fc7c04a feat: move SoT for datastore proto definitions (# 1154)
  > 278611b chore(all): update all (# 1153)
bumping google.golang.org/protobuf 158d2b3...c72053a:
  > c72053a all: release v1.35.2
  > b985635 internal/impl: fix TestMarshalMessageSetLazyRace (was a no-op!)
  > 76135f9 proto: switch messageset_test to use makeMessages() injection point
  > 29947bb internal/testprotos/test: add nested message field with [lazy=true]
  > 5c14d72 encoding/prototext: use testmessages_test.go approach, too
  > 496557b proto: refactor equal_test from explicit table to use makeMessages()
  > 0517e5a testing/protocmp: document behavior when combining Ignore and Sort
  > d14ebce all: implement strip_enum_prefix editions feature
  > fb995f1 encoding/protojson: allow missing value for Any of type Empty
  > d340238 all: start v1.35.1-devel
bumping golang.org/x/oauth2 6d8340f...3e64809:
  > 3e64809 x/oauth2: add Token.ExpiresIn
  > 16a9973 jwt: rename example to avoid vet error
  > b52af7d endpoints: add GitLab DeviceAuthURL
bumping knative.dev/hack b799531...1978b3a:
  > 1978b3a Update community files (# 404)
bumping google.golang.org/genproto/googleapis/rpc ddb44da...8af14fe:
  > 8af14fe chore(all): update all (# 1159)
  > 7e3bb23 chore(all): auto-regenerate .pb.go files (# 1158)
  > f6391c0 chore(all): update all (# 1156)
  > 3fd189d chore(googleapis): update cloud/gkeconnect/gateway/v1beta1/alias.go (# 1157)
  > 4ba0660 chore: update datastore and bigtable (# 1155)
  > fc7c04a feat: move SoT for datastore proto definitions (# 1154)
  > 278611b chore(all): update all (# 1153)
bumping knative.dev/pkg 7b333a0...f3ab560:
  > f3ab560 Update community files (# 3118)
  > a7fd9b1 Bump google.golang.org/protobuf from 1.35.1 to 1.35.2 (# 3117)
  > 215048a Bump golang.org/x/tools from 0.26.0 to 0.27.0 (# 3114)
  > 47a6f9f Bump google.golang.org/grpc from 1.67.1 to 1.68.0 (# 3116)
bumping knative.dev/client/pkg f94c31b...747ac98:
  > 747ac98 Update community files (# 1982)
  > 60a31f3 [main] Upgrade to latest dependencies (# 1972)
  > bfc00b8 Fix package location for build flags (# 1978)
bumping knative.dev/client-pkg 7b4bb48...14f4a3a:
  > 14f4a3a Update community files (# 198)
bumping knative.dev/serving 95d2c9b...8cbbe8f:
  > 8cbbe8f Update net-gateway-api nightly (# 15635)
  > 5911aee Update community files (# 15633)
  > 3e45e8f Update net-kourier nightly (# 15622)
  > 0a61ece Update net-gateway-api nightly (# 15620)
  > 85ce915 upgrade to latest dependencies (# 15623)
  > 9f24a9c Update net-contour nightly (# 15621)
  > bd9050e upgrade to latest dependencies (# 15618)
  > b51a57d upgrade to latest dependencies (# 15613)
  > ebe9d03 Update net-kourier nightly (# 15612)
  > 75a7530 Update net-contour nightly (# 15610)
  > 0b936fa Update net-gateway-api nightly (# 15611)
bumping knative.dev/eventing 9d67389...545c14c:
  > 545c14c Change JobSink execution mode variable to `K_EXECUTION_MODE` (# 8350)
  > 91f1c79 Avoid using twice hardcoded strings for the names of the Kube Secret keys, for AWS access/secret key vals (# 8345)
  > cb29ac1 [main] Update community files (# 8354)
  > aef3a14 [main] Format Go code (# 8349)
  > 65da6fc Update integrationsink crd  (# 8347)
  > 01c8068 JobSink: Inject a `KNATIVE_EXECUTION_MODE` environment variable with value `batch` (# 8346)
  > 366ff26 IntegrationSink: rek-test templating support for bool annotations (# 8342)
  > 7176ce6 Add IntegrationSink CRD  (# 8304)
  > 5ad7dab feat: add RequestReply types and CRD (# 8337)
  > 7f313d7 fix: rename `job-sink` to `job_sink` (# 8335)
  > 4f6535a chore: correct comments (# 8336)
  > ebe99e6 Introducing common integration helper and change package name (# 8327)
  > 201e096 [main] Format Go code (# 8334)
  > 6f5edf5 [main] Upgrade to latest dependencies (# 8328)
  > f21370a Integration Api moved to versioned common (# 8325)
  > 63d4da5 Update Integration API and use custom tags on structs for better readability (# 8321)
  > 7abb04d JobSink: Delete secrets associated with jobs when jobs are deleted (# 8331)
  > 8fed0be Allow configuring (opt-in) IMC async handler  (# 8311)
  > bc6e878 fix: remove duplicated observedGeneration from jobsinks.sinks.knative.dev (# 8326)
  > 6b4ff7f [main] Upgrade to latest dependencies (# 8324)
  > cd31c1b [main] Upgrade to latest dependencies (# 8322)
bumping knative.dev/networking 8a88798...bbd3279:
  > bbd3279 upgrade to latest dependencies (# 1023)
  > 929a5d5 upgrade to latest dependencies (# 1022)
  > 5272a36 upgrade to latest dependencies (# 1021)
  > 4c9d5b8 upgrade to latest dependencies (# 1020)

Signed-off-by: Knative Automation <automation@knative.team>
2024-11-28 16:45:43 +00:00
David Fridrich 0d92f6f401
bump builder image (#2601)
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2024-11-28 11:01:43 +00:00
Knative Automation 0d9c329de5
Update community files (#2599)
Signed-off-by: Knative Automation <automation@knative.team>
2024-11-28 08:30:43 +00:00
Matej Vašek 8815c53e79
Fix missing workspaces decl in the scaffold task (#2587)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-11-28 00:16:13 +00:00
github-actions[bot] 319462a354
chore: update Quarkus platform version to 3.17.0 (#2598)
Co-authored-by: Knative Automation <automation@knative.team>
2024-11-27 18:04:12 +00:00
github-actions[bot] a537f9ca2b
chore: update CA bundle (#2597)
Co-authored-by: Knative Automation <automation@knative.team>
2024-11-27 06:02:12 +00:00
Matej Vašek 1dd2e43344
Improved build caching for s2i local build (#2581)
* Improve build caching for s2i local build

Use 'RUN --mount=type=cache...' to cache build artifacts,
e.g. the local maven repostory.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Update podman version in tests

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: set buildopt version to buildkit

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-11-22 14:40:02 +00:00
github-actions[bot] 27110e1655
chore: update Quarkus platform version to 3.16.4 (#2585)
Co-authored-by: Knative Automation <automation@knative.team>
2024-11-21 16:24:02 +00:00
Luke Kingland 2fd4982e05
fix: set DOCKER_CONFIG prior to build (#2580) 2024-11-19 11:59:01 +00:00
Tarun Chinthakindi bf9a70a648
Add Validation check to see if func is already initialized (#2574)
* Add Validation check to see if func is already initialized

* Refactor func init check in build.go
2024-11-15 13:07:43 +00:00
github-actions[bot] c95f77ed2a
chore: update Quarkus platform version to 3.16.3 (#2579)
Co-authored-by: Knative Automation <automation@knative.team>
2024-11-14 06:40:42 +00:00
Knative Automation b553a2b2c8
upgrade to latest dependencies (#2577)
bumping golang.org/x/sys 23b0dab...e0753d4:
  > e0753d4 Revert "windows/mkwinsyscall: use syscall.SyscallN instead of syscall.Syscall{6,9,12,15}"
  > c29efe3 windows: add iphlpapi functions for change notifications
  > 8f2aa9f cpu: conditionally re-enable AVX512 support on darwin/amd64
  > 054f1fc README: don't recommend go get
  > ca04041 unix: extend z/OS support
  > 18e038c unix: move NETLINK_* consts to own section
  > d045236 windows: implement Ftruncate using a single syscall on Windows
  > cff53d5 unix: gofmt after CL 610296
  > 123459f unix: update z/OS implementation of fcntl and mmap
  > df4a4da unix/linux: adjust Dockerfile ENV key value format
  > 696d342 unix: gofmt after CL 621375
  > 60d7877 unix: add PTP_PF_* constants on Linux
  > 256d1df unix: add PTP IOCTLs on Linux
  > adbb8bb windows/mkwinsyscall: use syscall.SyscallN instead of syscall.Syscall{6,9,12,15}
  > a57fdb8 unix: add IoctlGetHwTstamp/IoctlGetHwTstamp on Linux
  > 3932916 unix: switch to Ubuntu 24.10 in Dockerfile
  > 2dfefb6 all: execute gofmt
  > e5eee7e unix: add IoctlGetEthtoolTsInfo on Linux
  > fe162ba unix: add ClockSettime on Linux
  > 7143f4a windows: manually initialize NewNTUnicodeString
bumping golang.org/x/term 9d5441a...b725e36:
  > b725e36 go.mod: update golang.org/x dependencies
  > 54df7da README: don't recommend go get
bumping knative.dev/serving 37aaaae...95d2c9b:
  > 95d2c9b upgrade to latest dependencies (# 15609)
bumping golang.org/x/crypto adef4cc...6018723:
  > 6018723 go.mod: update golang.org/x dependencies
  > 71ed71b README: don't recommend go get
  > 750a45f sha3: add MarshalBinary, AppendBinary, and UnmarshalBinary
  > 36b1725 sha3: avoid trailing permutation
  > 80ea76e sha3: fix padding for long cSHAKE parameters
  > c17aa50 sha3: avoid buffer copy
  > 7cfb916 ssh: return unexpected msg error when server fails keyboard-interactive auth early
  > b61b08d chacha20: extend ppc64le support to ppc64
  > 6c21748 internal/poly1305: extend ppc64le support to ppc64
bumping knative.dev/pkg 0a99635...7b333a0:
  > 7b333a0 Bump golang.org/x/net from 0.30.0 to 0.31.0 (# 3113)
bumping golang.org/x/sync 411f99e...151027e:
  > 151027e README: don't recommend go get
bumping golang.org/x/text 3043346...efd25da:
  > efd25da go.mod: update golang.org/x dependencies
  > 8a0e65e README: don't recommend go get
  > fefda1a internal/texttest: remove Run and Bench helpers
  > a457f47 all: normalize subtest names to NFC
bumping golang.org/x/net 6cc5ac4...334afa0:
  > 334afa0 go.mod: update golang.org/x dependencies
  > d7f220d quic: add LocalAddr and RemoteAddr to quic.Conn
  > 858db1a http2: surface errors occurring very early in a client conn's lifetime
  > 0aa844c http2: support unencrypted HTTP/2 handoff from net/http
  > f35fec9 http2: detect hung client connections by confirming stream resets
  > e883dae README: don't recommend go get
  > 511cc3a html: add Node.{Ancestors,ChildNodes,Descendants}()
  > 4783315 http2: limit 1xx based on size, do not limit when delivered
  > 5716b98 internal/socket: execute gofmt
  > 42b1186 http2: support ResponseController.EnableFullDuplex
bumping knative.dev/networking d5387fa...8a88798:
  > 8a88798 Update community files (# 1019)
  > 7341b46 upgrade to latest dependencies (# 1018)

Signed-off-by: Knative Automation <automation@knative.team>
2024-11-12 06:07:40 +00:00
Knative Automation 05c0fc2bea
upgrade to latest dependencies (#2576)
bumping knative.dev/serving 25edfee...37aaaae:
  > 37aaaae Update net-kourier nightly (# 15605)
bumping knative.dev/eventing f53d038...9d67389:
  > 9d67389 [chore] Do not generate SSL env vars for each struct entry, just once per containersource/image (# 8315)
  > 35d8c63 [chore] Use a generic access/secret key in the secret for AWS connections (# 8312)

Signed-off-by: Knative Automation <automation@knative.team>
2024-11-11 08:33:03 +00:00
Knative Automation 1ba63b39af
upgrade to latest dependencies (#2568)
bumping knative.dev/eventing fa6b4c5...f53d038:
  > f53d038 [main] Update community files (# 8307)
  > df34028 Add missing copyright boilerplate (# 8305)
  > 3f2b75b Use GetServiceHostname when passing URL to JobSink (# 8303)
bumping knative.dev/serving 423e654...25edfee:
  > 25edfee Update net-contour nightly (# 15604)
  > f640bbb Update net-gateway-api nightly (# 15603)
  > 64b8325 Update community files (# 15602)
bumping knative.dev/client/pkg 117a365...f94c31b:
  > f94c31b Update community files (# 1974)
bumping knative.dev/pkg 25f6002...0a99635:
  > 0a99635 Update community files (# 3112)
bumping knative.dev/hack ef6e7e9...b799531:
  > b799531 Update community files (# 403)

Signed-off-by: Knative Automation <automation@knative.team>
2024-11-07 06:07:59 +00:00
github-actions[bot] 459aa0c0b6
chore: update Quarkus platform version to 3.16.2 (#2575)
Co-authored-by: Knative Automation <automation@knative.team>
2024-11-06 20:17:59 +00:00
Knative Automation 407c22d66a
Update community files (#2573)
Signed-off-by: Knative Automation <automation@knative.team>
2024-11-06 02:03:59 +00:00
Matthias Wessendorf ff6053a92d
💄 make array when filters is nil (#2569)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-11-05 14:05:39 +00:00
Knative Automation 2b83bac27f
upgrade to latest dependencies (#2564)
bumping knative.dev/serving 135b667...423e654:
  > 423e654 Fix configuration metadata inconsistency (# 15601)
bumping knative.dev/eventing 7bca815...fa6b4c5:
  > fa6b4c5 Add jobsinks-addressable-resolver cluster role (# 8298)
  > b4b609a Add observedGeneration in JobSink OpenAPI schema (# 8297)
  > 2e4d353 Allow imc-controller to list JobSinks (# 8294)

Signed-off-by: Knative Automation <automation@knative.team>
2024-11-05 04:29:39 +00:00
Knative Automation b95785db32
upgrade to latest dependencies (#2559)
bumping knative.dev/eventing 7c97e6f...7bca815:
  > 7bca815 IntegrationSource CRD (# 8238)
  > c859efd [main] Format Go code (# 8289)

Signed-off-by: Knative Automation <automation@knative.team>
2024-11-04 06:45:54 +00:00
github-actions[bot] 97bd9e0be4
chore: update Quarkus platform version to 3.16.1 (#2558)
Co-authored-by: Knative Automation <automation@knative.team>
2024-10-31 08:30:51 +00:00
Knative Automation 3b349a0a73
upgrade to latest dependencies (#2556)
bumping knative.dev/serving f215fdb...135b667:
  > 135b667 Update net-kourier nightly (# 15598)
bumping knative.dev/eventing ef6b31a...7c97e6f:
  > 7c97e6f Schduler: MAXFILLUP strategy will spread vreplicas across multiple pods (# 8263)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-30 05:12:49 +00:00
Knative Automation 53428b1449
upgrade to latest dependencies (#2555)
bumping knative.dev/eventing 65aeab5...ef6b31a:
  > ef6b31a fix: et autocreate makes eventtype id required (# 8288)
  > 4faf9c8 [main] Upgrade to latest dependencies (# 8287)
bumping knative.dev/client/pkg b3b6b86...117a365:
  > 117a365 Allow to change the message for the spinner (# 1973)
bumping knative.dev/serving 16d2da8...f215fdb:
  > f215fdb Update net-contour nightly (# 15597)
  > 7dc3e95 Update net-gateway-api nightly (# 15596)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-29 06:51:48 +00:00
Knative Automation ba18c79720
upgrade to latest dependencies (#2554)
bumping knative.dev/pkg 6af2bf9...25f6002:
  > 25f6002 upgrade to latest dependencies (# 3111)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-28 07:35:47 +00:00
Knative Automation d395b6c8d6
upgrade to latest dependencies (#2553)
bumping knative.dev/networking c254dbf...d5387fa:
  > d5387fa upgrade to latest dependencies (# 1017)
bumping knative.dev/eventing 291c0a8...65aeab5:
  > 65aeab5 [main] Upgrade to latest dependencies (# 8275)
  > 03ba8f4 feat: autocreate v1beta3 eventtypes (# 8276)
bumping knative.dev/hack 2191456...ef6e7e9:
  > ef6e7e9 Export KO_FLAGS for consuming scripts (# 401)
bumping knative.dev/serving 331c097...16d2da8:
  > 16d2da8 upgrade to latest dependencies (# 15595)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-25 14:48:03 +00:00
Knative Automation 0e8a754b27
upgrade to latest dependencies (#2551)
bumping knative.dev/serving 6a27004...331c097:
  > 331c097 upgrade to latest dependencies (# 15593)
  > a22343c Update net-gateway-api nightly (# 15590)
  > e8e7de5 Update net-kourier nightly (# 15592)
  > 9d859b5 Update net-contour nightly (# 15589)
  > 83a09f0 Update net-istio nightly (# 15591)
  > d792207 Update net-contour nightly (# 15587)
  > 19b4ce9 Update net-gateway-api nightly (# 15586)
  > 4a9936a Update net-kourier nightly (# 15585)
  > 67460f5 Update net-istio nightly (# 15584)
bumping knative.dev/networking 60e29ff...c254dbf:
  > c254dbf upgrade to latest dependencies (# 1016)
  > d954288 upgrade to latest dependencies (# 1014)
  > 49760c2 Update community files (# 1013)
bumping knative.dev/pkg 9b9d535...6af2bf9:
  > 6af2bf9 upgrade to latest dependencies (# 3110)
  > 76cfa12 Fix `WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP` env-var (# 3107)
  > 6d10851 Add `WEBHOOK_DISABLE_NAMESPACE_OWNERSHIP` env-var (# 3103)
  > 6eb75e8 Update community files (# 3105)
bumping knative.dev/hack 05b2fb3...2191456:
  > 2191456 Update community files (# 400)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-25 06:15:03 +00:00
github-actions[bot] 09e597ced0
chore: update Springboot platform version to 3.3.5 (#2552)
Co-authored-by: Knative Automation <automation@knative.team>
2024-10-24 17:23:02 +00:00
David Simansky 462cdc2d9b
Update Knative deps to release 1.16 (#2549) 2024-10-23 09:09:01 +00:00
Knative Automation 6c17586a9b
upgrade to latest dependencies (#2544)
bumping knative.dev/client/pkg 18a2561...dbb49e6:
  > dbb49e6 Update community files (# 1971)
bumping knative.dev/serving 83b6695...77c7e1d:
  > 77c7e1d Update net-contour nightly (# 15578)
  > 5ebf2c7 Update net-kourier nightly (# 15577)
  > b474b3e Update net-gateway-api nightly (# 15576)
  > cb2a9c6 Update net-istio nightly (# 15579)
  > 6544bfe Update community files (# 15574)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-17 04:57:23 +00:00
Knative Automation 096878d4bc
upgrade to latest dependencies (#2541)
bumping knative.dev/eventing aa6f73b...6aa49dc:
  > 6aa49dc [main] Update community files (# 8256)
  > 33a9027 feat: make oidc discovery url configurable (# 8145)
  > eff8465 [main] Upgrade to latest dependencies (# 8255)
bumping knative.dev/networking 9396009...75d9920:
  > 75d9920 Update community files (# 1010)
  > 847994c upgrade to latest dependencies (# 1009)
bumping knative.dev/pkg 59c22a1...95b4b97:
  > 95b4b97 upgrade to latest dependencies (# 3104)
bumping knative.dev/serving 782b6a8...83b6695:
  > 83b6695 Update net-gateway-api nightly (# 15573)
  > b98384c upgrade to latest dependencies (# 15572)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-16 06:09:23 +00:00
Knative Automation e8b18f9387
Update community files (#2543)
Signed-off-by: Knative Automation <automation@knative.team>
2024-10-16 02:07:24 +00:00
Knative Automation b67289415f
upgrade to latest dependencies (#2539)
bumping knative.dev/client/pkg c9f1284...18a2561:
  > 18a2561 Update community files (# 1970)
bumping knative.dev/eventing 67af70b...aa6f73b:
  > aa6f73b [main] Upgrade to latest dependencies (# 8236)
  > db729bc [main] Update community files (# 8237)
bumping knative.dev/hack fc6a845...05b2fb3:
  > 05b2fb3 Update community files (# 399)
bumping knative.dev/pkg 952269c...59c22a1:
  > 59c22a1 Bump google.golang.org/protobuf from 1.34.2 to 1.35.1 (# 3102)
  > e0f65ce Update community files (# 3101)
bumping google.golang.org/protobuf c33baa8...158d2b3:
  > 158d2b3 all: release v1.35.1
  > 94e26c9 all: start v1.35.0-devel
  > ac98177 all: release v1.35.0
  > 03df6c1 proto: Implement proto.Equal fast-path
  > 013dd17 all: drop unnecessary import renames for consistency
  > 1531843 internal/testprotos: declare the extension
  > 9e047b8 internal/impl: skip unnecessary requiredField checks for oneofs
  > ed7b51f proto: extend documentation of GetExtension, SetExtension
  > af06170 all: set Go language version to Go 1.21
  > cf4f382 encoding/prototext: capture current reserved field behavior
  > 5c1f700 internal/encoding/json: remove duplicate test
  > 66faac0 compiler/protogen: remove now-unnecessary UnsafeEnabled checks
  > 21d187a compiler/protogen: support -experimental_strip_nonfunctional_codegen
  > e8b6855 internal/descopts,internal/impl: remove shorthand import aliases
  > 0946f97 all: remove unused purego support
  > b643888 encoding/protojson: use fd.HasPresence() for editions compatibility
  > 94ecbc2 internal/impl: remove unused ExtensionField.SetLazy method
  > b36f8e0 types/known/structpb: add support for more types and json.Number
  > 75479a3 internal: generate extension numbers, fix editions parsing
  > 2a82025 internal/cmd/generate-protos: fix pkg check for editions features
  > 219bda2 internal/conformance: update failing tests list, add comments
  > b46f280 all: plumb the lazy option into filedesc.Field and .Extension
  > df3bd63 compiler/protogen: always report editions support level of the plugin
  > eea33cd protobuf: fix handling of delimited extensions in editions
  > d462176 protojson: changes error message returned by unmarshal
  > 61c6075 all: start v1.34.2-devel
bumping knative.dev/serving c8e131b...782b6a8:
  > 782b6a8 Update net-istio nightly (# 15565)
  > 1a06888 Update net-contour nightly (# 15567)
  > d2229fa Update net-kourier nightly (# 15560)
  > 5c8556d Update net-gateway-api nightly (# 15566)
  > 2a87ffd Update community files (# 15564)
  > 656f3d3 Update net-gateway-api nightly (# 15559)
  > a9e28f0 Update net-contour nightly (# 15558)
  > 60516ad Update net-istio nightly (# 15557)
  > 4eb2e08 upgrade to latest dependencies (# 15556)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-14 14:41:31 +00:00
Knative Automation c48a01c716
Update community files (#2538)
Signed-off-by: Knative Automation <automation@knative.team>
2024-10-14 12:33:32 +00:00
Jefferson Ramos b3b038bcdb
test: enforce branch on test remote repository (#2540) 2024-10-12 19:42:09 +00:00
Matej Vašek e2621f6637
Fix symlink path separators (#2535)
When running on Windows the path separators in symlink target is
backslash. This must be fixed up when uploading source code into docker
daemon or into cluster volume.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-10-11 10:39:08 +00:00
Jefferson Ramos 59aa11c4dd
test: remove dependecy for boson-project git repository on e2e tests (#2537) 2024-10-10 05:22:03 +00:00
Knative Automation e97a6925aa
upgrade to latest dependencies (#2536)
bumping golang.org/x/crypto c9da6b9...adef4cc:
  > adef4cc go.mod: update golang.org/x dependencies
  > a0819fb sha3: fix cSHAKE initialization for extremely large N and or S
  > 42ee18b ssh: return ServerAuthError after too many auth failures
  > 9e92970 bn256: add missing symbols in comment
bumping knative.dev/eventing e6490c3...67af70b:
  > 67af70b workaround DeepDerivative CreationTimestamp comparison (# 8233)
bumping golang.org/x/net 35b4aba...6cc5ac4:
  > 6cc5ac4 go.mod: update golang.org/x dependencies
  > f88258d websocket: update nhooyr.io/websocket to github.com/coder/websocket
  > 7191757 http2: add support for net/http HTTP2 config field
  > 4790dc7 http2: add support for server-originated pings
  > 541dbe5 http2: add Server.WriteByteTimeout
  > 3c333c0 route: fix address parsing of messages on Darwin
bumping golang.org/x/sys a43b625...23b0dab:
  > 23b0dab unix: mark vgetrandom as non-escaping
  > cbf0eb6 unix: fix grep syntax to work on non-GNU greps
  > e7397b9 unix: update to Linux 6.11
  > 981de40 unix: use vDSO for getrandom() on linux
  > 48aad76 linux: add tcp_cc_info and its related types
  > d58f986 all: fix some typos in comment
  > 30de352 unix: fix Test{Fd,}Xattr failure on NetBSD
  > 68ed59b windows/svc: fix printf(var) mistake detected by latest printf checker
  > c08bc6e unix: update Go to 1.23.0
bumping golang.org/x/text 1e3e9fd...3043346:
  > 3043346 x/text: Correct examples in number/doc
  > 38a95c2 all: fix some comments
  > 20097e4 all: fix printf(var) mistakes detected by latest printf checker
bumping golang.org/x/term 2f7b0dd...9d5441a:
  > 9d5441a go.mod: update golang.org/x dependencies
bumping google.golang.org/grpc 6f50403...3f95b38:
  > 3f95b38 Update version to 1.67.1 (# 7682)
  > 4f6c5f2 xds/server: Fix xDS Server leak (# 7664) (# 7681)
  > 935f8cb transport: Fix reporting of bytes read while reading headers (# 7660) (# 7667)
  > 02bbb65 Change version to 1.67.1-dev (# 7605)
bumping knative.dev/pkg 5031733...952269c:
  > 952269c Bump golang.org/x/net from 0.29.0 to 0.30.0 (# 3100)
  > e52e2e4 Bump google.golang.org/grpc from 1.67.0 to 1.67.1 (# 3099)
  > 4e357ed Bump golang.org/x/tools from 0.25.0 to 0.26.0 (# 3098)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-10 05:12:04 +00:00
Jefferson Ramos 47ccd6c4f3
test: making e2e config tests builder agnostic (#2533) 2024-10-07 17:50:00 +00:00
Matej Vašek d7d688e2ab
Updated JS/TS template dependencies (#2534)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-10-07 17:38:00 +00:00
Knative Automation 35eb3a434b
upgrade to latest dependencies (#2526)
bumping knative.dev/eventing e7fca76...e6490c3:
  > e6490c3 Add Convertible interface to job sink (# 8214)
  > b3b29f0 update jobsink TLS comments (# 8215)
  > c8c1f41 [main] Upgrade to latest dependencies (# 8201)
bumping knative.dev/pkg c4843b7...5031733:
  > 5031733 Bump go.uber.org/automaxprocs from 1.5.3 to 1.6.0 (# 3097)
bumping knative.dev/serving 779761a...c8e131b:
  > c8e131b Fix GO-2024-2659 (# 15547)
  > 1a1eb10 Update net-istio nightly (# 15543)
  > 5779cb2 Update net-kourier nightly (# 15544)
  > 07a8480 Update net-gateway-api nightly (# 15541)
  > 9bf0b90 Update net-contour nightly (# 15542)
  > b442fe2 upgrade to latest dependencies (# 15540)

Signed-off-by: Knative Automation <automation@knative.team>
2024-10-07 06:11:26 +00:00
Matej Vašek 12f61f01e4
Update deps (#2531)
* Update cloudevents dep

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* Update cloudevents dep

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* Update node template deps

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* Update python template deps

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

---------

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-10-07 04:34:26 +00:00
Jefferson Ramos f3369409ba
Set default value for REGISTRY param on func-s2i task (#2530) 2024-10-03 12:50:23 +00:00
Jefferson Ramos be3a8a07b6
fix: Remove unnecesary annotations from Pipeline-as-Code template (#2527) 2024-10-01 17:21:21 +00:00
github-actions[bot] 6ee178199c
chore: update Quarkus platform version to 3.15.1 (#2525)
Co-authored-by: Knative Automation <automation@knative.team>
2024-09-30 05:40:06 +00:00
Matej Vašek d481289397
Remove unnecessary 'go get' commands (#2524)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-30 05:22:38 +00:00
Knative Automation 62ca4c7a09
upgrade to latest dependencies (#2521)
bumping knative.dev/serving b2954e1...779761a:
  > 779761a upgrade to latest dependencies (# 15537)
  > 15871f1 Update net-contour nightly (# 15536)
  > 2664a54 Update net-kourier nightly (# 15535)
  > 2b815c5 Update net-gateway-api nightly (# 15534)
  > 293d2bb Update net-istio nightly (# 15533)
  > 0ebef64 Use istio.sidecar.inject label instead of annotation (# 15522)
bumping knative.dev/networking ea90245...9396009:
  > 9396009 upgrade to latest dependencies (# 1008)
bumping knative.dev/eventing 641cbb7...e7fca76:
  > e7fca76 Add Istio inject label (# 8205)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-27 08:17:54 +00:00
Matej Vašek 075bc9bed4
fix: allow sub-pkgs in Go functions (#2523)
* fix: allow sub-pkgs in Go functions

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* fixup

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* fixup

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* fixup

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

---------

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-27 01:02:32 +00:00
Knative Automation e4d9b3d10f
upgrade to latest dependencies (#2519)
bumping knative.dev/serving ca64728...b2954e1:
  > b2954e1 Update net-contour nightly (# 15530)
  > 10579a7 Update net-gateway-api nightly (# 15531)
  > 3a81801 Update net-gateway-api nightly (# 15524)
  > ff475df upgrade to latest dependencies (# 15527)
bumping knative.dev/networking faa7309...ea90245:
  > ea90245 upgrade to latest dependencies (# 1007)
bumping knative.dev/client/pkg fd0126d...c9f1284:
  > c9f1284 💝 Extract reusable part of sink flag (# 1968)
bumping knative.dev/pkg 28b58b8...c4843b7:
  > c4843b7 Give users the ability to disable namespace ownership of webhook configurations (# 3095)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-26 06:13:06 +00:00
Knative Automation ba3bd79a51
upgrade to latest dependencies (#2518)
bumping knative.dev/pkg aabe552...28b58b8:
  > 28b58b8 Use istio.sidecar.inject label instead of annotation (# 3096)
bumping knative.dev/serving 59d17f1...ca64728:
  > ca64728 Update net-contour nightly (# 15526)
  > e896849 Update net-kourier nightly (# 15525)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-25 05:16:59 +00:00
Matej Vašek 783d04d0b0
Remove unnecessary clause from Dockerfile (#2513)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-24 09:18:01 +00:00
Matej Vašek 1702c8e3c4
Update builder.go (#2512) 2024-09-24 09:17:54 +00:00
Knative Automation 674a27ad54
upgrade to latest dependencies (#2514)
bumping knative.dev/networking 6c832c6...faa7309:
  > faa7309 upgrade to latest dependencies (# 1006)
bumping knative.dev/serving 51d95f6...59d17f1:
  > 59d17f1 upgrade to latest dependencies (# 15520)
bumping knative.dev/eventing 2869c6c...641cbb7:
  > 641cbb7 Remove scheduler `wait`s to speed up recovery time (# 8200)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-24 07:41:54 +00:00
github-actions[bot] 8eee93f4e9
chore: update CA bundle (#2515)
Co-authored-by: Knative Automation <automation@knative.team>
2024-09-24 07:28:24 +00:00
Luke Kingland eb17ea77e8
fix: make image digest check more permissive (#2510)
* fix: make image digest check more permissive

* use extant implementation for digest check
2024-09-24 07:14:48 +00:00
Matej Vašek 63e3e52294
Implement minimalistic socat in Go (#2479)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-24 05:57:35 +00:00
Knative Automation 2312afce77
upgrade to latest dependencies (#2511)
bumping cloud.google.com/go/compute/metadata 44b3a7d...7959a9f:
  > 7959a9f bigquery: support struct field parameters
  > a64eb5d bigquery: support array query parameters
  > 2861f2e bigquery: support scalar query parameters
  > a2e776e civil: civil time types
  > 918f8d5 fields: test that a tagged field takes precedence
  > e86221f bigtable/bttest: RowKeyFilter support in emulator.
  > 648bc87 bigquery: support BYTES data type
  > 7bb67ec bigtable/bttest: TimestampRangeFilter improvements
  > 8b767ae fields: simplify dominantField
  > 8ee8376 fields: add Match optimizations
  > 73d4824 fields: test Match against encoding/json
  > 7c5df9f fields: match first field by index
  > 5eaf111 bigquery: support deleting a dataset
  > 7c389bf fields: add Match
  > f673f79 fields: add helper functions tests
  > 0f101d5 fields: add package documentation
  > c15c479 fields: add a cache
  > 13f29f4 fields: support saving additional tag information
  > 65303b0 fields: support the ability to ignore fields
  > 367b809 translate: introduce Format type for Options.Format
  > 6e0acfc bigquery: fix doc, PageInfo.PageToken is now PageInfo.Token
  > 03e650f regenerate from toolkit
  > 0b5cbaa storage: return ErrBucketNotExist from iterator
  > 92f92a9 fields: add a test for an unexported anonymous struct field with a tag
  > 93c784f fields: test that unexported anonymous non-struct fields are ignored
  > 1701ed3 fields: test that unexported, tagged field is ignored
  > 9dad079 fields: test against encoding/json
  > 36c2fc7 trace: assign trace IDs and propagate trace context even for requests
  > 4392112 fields: generalize tag parsing
  > cccf8de fields: implement tag precedence
  > 25ab26a fields: initial support for tags
  > 1b78d3f fields: collect all fields
  > 0031a75 fields: omit unexported fields
  > 097ca06 fields: copy FieldsByNameFunc from reflect
  > 9210f07 translate: tests use OAuth or API key
  > ce8c2af bigtable/cbt Make endpoints confgureable
  > 5aca3b7 bigquery: add Job.Wait.
  > 8503b8f internal: add general retry function
  > 2c3878e bigtable/bttest: Add ColumnRangeFilter to the data client and inmem server/emulator
  > 469af35 doc: add example for table creation with schema
  > d8db4b2 bigquery: fix godoc lint errors
  > 2a25109 translate: fix broken TranslateURL test
  > 75d2be6 bigquery: use int64 for Integer columns
  > 15d44a1 language/apiv1beta1: delete beta client
  > fdfe867 regenerate toolkit clients
  > 9e26c6c translate: add model parameter
  > 6274540 bigtable: Fix cbt required flag enforcement
  > 30b36ef translate: add license to generated file
  > a7939fd README: split off older news into a separate file.
  > f296932 translate: support ClientOptions
  > 742f8a0 translate: new REST client from modified discovery doc
  > a218dd7 language/apiv1: add toolkit-generated client
  > 0f372eb Revert "translate: new REST client from modified discovery doc"
  > dba24f8 translate: new REST client from modified discovery doc
  > 9d7cefd Fixed bigquery doc
  > 3e689fc examples/storage: avoid race when reading the default bucket
  > 6d60404 logging: explicitly compare Entry fields in tests
  > b4053c3 CONTRIBUTING.md: adds GCLOUD_TESTS_API_KEY env var as requirement
  > 6e7f52b .travis.yml: add GCLOUD_TESTS_API_KEY
  > c8933d5 storage: retry iterator test on failure
  > b21cc3a trace: fix old datastore key function
  > d7b9ed3 storage: fix encryption test
  > eb6bba1 README: add news about datastore breaking changes.
  > 4b7ac00 datastore: remove Done
  > 976a286 datastore: Client.Close returns error.
  > 71e53a3 datastore: removes NewKey, NewIncompleteKey
  > 8dd42e8 datastore: removes namespace from context
  > d34ae6f datastore: export Key fields
  > 7cab37c README.md: adds announcement of datastore entity values
  > 2ea6b3e datastore: adds example for entity value flatten
  > 2a64f94 datastore: save nested structs as Entity values by default
  > 9fd7589 Error on res.Row=nil from ApplyReadModifyWrite to avoid panic
  > 4ee1ac9 bigquery: more types for RowIterator.Next
  > f789011 pretty: add Diff
  > e4d16e4 bigquery: get dataset metadata
  > 6c65c9a translate: new translate client
  > 3dcec5a storage: encryption keys should be 32-byte AES-256 keys
  > f987161 bigquery: a ValueLoader for maps
  > 5c18a14 storage: switch to general iterator test function
  > 889746e bigquery: relax table-listing integration test
  > 9d503e9 bigquery: support updating a schema
  > ee8b037 bigquery: refactor integration tests
  > de6327f vision: fix doc
  > d3ea1b1 logging: increase the default entry-count threshold
  > 20998e5 logging: bypass JSON serialization if given a structpb.Struct
  > af761d2 bigtable: Use a single-element RowList for SingleRow
  > 09487f7 examples/bigquery/load: fix NewGCSReference call
  > 53ac597 bigtable/emulator: Disable grpc tracing for emulator server
  > 9cd90cb storage: support customer encryption
  > bd2cfb7 bigquery: expose dataset ProjectID and DatasetID fields.
  > 2fc1b44 logging: removes cleaup deletes from integration tests
  > fe28f83 datastore: adds query.Namespace() chain method
  > 8c2dc61 logging: check for exact # of logs in tests
  > 4791784 logadmin: use generated iterators
  > 384ca55 storage: use pointer receiver for ObjectAttrs
  > bd8a5e8 datastore: add new key functions
  > 09d95d9 bigtable/bttest: add emulator support for DeleteCellsInFamily
  > 7ee19e7 bigquery: restore semantics of ForceZeroQuote
  > f7f94a2 bigquery: clean up implementation of LoadSource
  > f9c9ec4 storage: always send destination in compose request
  > 67f57c5 storage: readObject method for tests
  > 28994ff bigtable: Use connection pool by default for data client.
  > 2fa7e44 internal/bundler: remove
  > 5c042ef README: describe recent bigquery changes.
  > 467d489 bigquery: make NewGCSReference a package-level function
  > 40fedcd bigquery: test inserting data with DML.
  > e6cd632 iam: service account Get/SetPolicy methods.
  > 211ec57 Regenerate clients from toolkit
  > bb227e9 bigquery: add example for ReaderSource
  > 0e0c2bb datastore: remove support for gRPC call options
  > 2b8eb37 Adding a TimestampRangeFilter to big table.
  > 4a66ffc errors: fix example in doc comment
  > cfef0f6 pretty: don't panic if we can't call Interface on a value.
  > 871e500 bigquery: remove redundant test
  > 26c2106 bigquery: media upload
  > 634348d pretty: a simple pretty-printer
  > 8981115 logging: add Latency field to HTTPRequest
  > 1d0367c bigtable/bttest: Return proper status codes in emulator for missing tables
  > e46f105 logging: adds more descriptive failure messages to tests
  > e8a0b85 pubsub: remove Done
  > eb53bbf datastore: support gRPC call options.
  > 284dc4b storage: update storage classes
  > 7450882 logging: adds more error reporting to tests
  > 50a7624 go-cloud-debug-agent: restrict building to Linux
  > d2c474b trace: change SamplingPolicy to also make decisions about requests with
  > c54037b pubsub: support IAM
  > 41e8c5d bigquery: inline most customizeXXX methods.
  > 7d1ca04 bigquery: group methods by function
  > 2f2a859 bigquery: remove Tables type
  > ac529ef bigquery: examples
  > 0a03e3b bigquery: improve package doc
  > 8274d91 bigquery: pass Schema to ValueLoader
  > 7d2c252 bigquery: replace UploadOptions with Uploader fields
  > d1e1a45 bigquery: remove deprecated code, replace Read methods
  > 61a09b4 storage: retry calls
  > 3d8e7fa storage,iam: remove extraneous test logging
  > f03e341 longrunning: use 1.6 context
  > 10d3f88 longrunning: initial design
  > 9429d70 Regenerate from updated toolkit
  > c58fd90 pubsub: fix package doc
  > 0510646 pubsub: deprecate Done
  > 324a60e datastore: fixes loading issue with []struct{[]byte}}
  > 9140aa5 logadmin: link in audit log proto.
  > fc7a628 iam: initial design
bumping knative.dev/eventing 1708881...2869c6c:
  > 2869c6c Enhance tests for v1b3 event type, new attrs (# 8197)
bumping google.golang.org/genproto/googleapis/api 573a115...ddb44da:
  > ddb44da chore: update to 1.21 (# 1152)
  > 8ffd90a chore(all): auto-regenerate .pb.go files (# 1150)
bumping knative.dev/pkg aaab500...aabe552:
  > aabe552 Bump google.golang.org/grpc from 1.66.2 to 1.67.0 (# 3094)
  > a4774ed Bump github.com/gobuffalo/flect from 1.0.2 to 1.0.3 (# 3093)
bumping google.golang.org/genproto/googleapis/rpc 573a115...ddb44da:
  > ddb44da chore: update to 1.21 (# 1152)
  > 8ffd90a chore(all): auto-regenerate .pb.go files (# 1150)
bumping google.golang.org/grpc d0bf90a...6f50403:
  > 6f50403 Change version to 1.67.0 (# 7604)
  > 3c3a025 mem: replace flate.Reader reference (# 7595) (# 7637)
  > 3ffb98b .*: fix revive lints `redefines-builtin-id` (# 7552)
  > 5666049 vet: enforce revive linter (# 7589)
  > c6ad07f protoc: regenerate protos (# 7590)
  > 70f19ee credentials/tls: default GRPC_ENFORCE_ALPN_ENABLED to true (# 7535)
  > 92111dc xds: keep ads flow control local to xdsclient/transport package (# 7578)
  > 535bdce estats: remove dependency on testing package (# 7579)
  > 0f03c74 .*: fix revive lint issues `unused-parameter` (# 7580)
  > 6147c81 stats/opentelemetry: Optimize slice allocations (# 7525)
  > cd05c9e .*: fix revive package-comments lint issues (# 7574)
  > 00514a7 xds/clusterimpl: update UpdateClientConnState to handle updates synchronously (# 7533)
  > 093e099 grpc: fix regression by freeing request bufferslice after processing unary (# 7571)
  > 8320224 .*: revive from unused_parameters (# 7577)
  > 845f62c stats/otel: upgrade grpc version that contains the experimental/stats package (# 7545)
  > 55d820d clusterresolver/e2e_test: Avoid making DNS requests (# 7561)
  > 52961f7 grpc: add docs for generic stream interfaces  (# 7470)
  > 005b092 examples/advancedtls: example code for different security configurations for grpc-go using `advancedtls` (# 7474)
  > 0b6f354 xdsclient: Populate total_issued_requests count in LRS load reports (# 7544)
  > c535946 grpc: Fix flaky picker_wrapper tests (# 7560)
  > 9feed00 balancer/wrr: prefer calling Equal() method of time.Time (# 7529)
  > a8e6e11 .*: Use `strings.ReplaceAll(.....)` (# 7554)
  > 6d97688 xds/xdsclient: Fix flaky test TestLRSClient  (# 7559)
  > cfd14ba encoding: delete v1 proto codec and use one map for registry (# 7557)
  > 3d95421 Fix revive identified linter issues: var-declaration, indent-error-flow, increment-decrement, superfluous-else (# 7528)
  > e4b09f1 Remove trailing whitespace in testing.yml (# 7551)
  > 0a5b8f7 balancer: disallow producer streams until SubConn has reported READY (# 7523)
  > 9ab8b62 Implement new Codec that uses `mem.BufferSlice` instead of `[]byte` (# 7356)
  > 7e12068 bootstrap: add `String` method to ServerConfigs type (# 7537)
  > ee5cbce ringhash: fix bug where ring hash can be stuck in transient failure despite having available endpoints (# 7364)
  > 1e2bb71 doc: update keepalive ClientParameters doc about doubling the interval upon GOAWAY (# 7469)
  > 6a5a283 Use builtin min and max functions (# 7478)
  > 90caeb3 deps: update dependencies for all modules (# 7531)
  > f8d98a4 rbac: fix usage of AuthInfo (# 7522)
  > 4e29cc6 transport: add timeout for writing GOAWAY on http2Client.Close() (# 7371)
  > b45fc41 Change version to 1.67.0-dev (# 7520)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-23 15:29:45 +00:00
Matej Vašek 1937499775
Improve socat conn success detection (#2506)
It appears that Go's MatchReader() returns true only if some new lines
are written to the writer after the searched word. It mostly all right
because socat actually writes several more lines to stderr. However this
new implementation is better it should signal immediately when searched
patter is written to the writer.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-20 06:42:26 +00:00
github-actions[bot] c489f7f32a
chore: update Springboot platform version to 3.3.4 (#2509)
Co-authored-by: Knative Automation <automation@knative.team>
2024-09-19 16:28:42 +00:00
Knative Automation c18b0084f7
upgrade to latest dependencies (#2505)
bumping golang.org/x/mod bc151c4...46a3137:
  > 46a3137 zip: set GIT_DIR in test when using bare repositories
  > 3afcd4e go.mod: set go version to 1.22.0
  > b1d336c go.mod: update required go version to go1.22
bumping knative.dev/pkg 3002873...aaab500:
  > aaab500 Bump golang.org/x/tools from 0.24.0 to 0.25.0 (# 3091)
  > de0796c Bump google.golang.org/grpc from 1.66.0 to 1.66.2 (# 3092)
bumping knative.dev/networking 433920a...6c832c6:
  > 6c832c6 upgrade to latest dependencies (# 1005)
  > ed319d7 upgrade to latest dependencies (# 1004)
bumping google.golang.org/grpc 00d3ec8...d0bf90a:
  > d0bf90a Change version to 1.66.2 (# 7620)
  > c84da66 Cherry pick # 7595 to v1.66.x release branch (# 7621)
  > 12487c8 Cherry pick # 7571 and # 7579 to v1.66.x release branch (# 7616)
  > 7185cf4 Change to version 1.66.2-dev (# 7615)
  > cb81df6 Change to patch release 1.66.1 (# 7603)
  > ecb3e1a Change version to 1.66.1-dev (# 7519)
bumping knative.dev/serving edb073c...51d95f6:
  > 51d95f6 Update net-gateway-api nightly (# 15519)
  > 50bea5d Update net-kourier nightly (# 15517)
  > 00bd844 Update net-contour nightly (# 15518)
  > ed44181 Update net-istio nightly (# 15516)
  > b796321 Unpin github.com/gorilla/websocket (# 15515)
  > 158a5c2 upgrade to latest dependencies (# 15514)
  > 7875c26 Update net-contour nightly (# 15512)
  > 4471f27 Update net-gateway-api nightly (# 15513)
  > cc9b060 Update net-istio nightly (# 15511)
  > cde060b upgrade to latest dependencies (# 15506)
  > 985fc84 Update net-kourier nightly (# 15509)
bumping github.com/gorilla/websocket ac0789b...ce903f6:
  > ce903f6 Reverts to v1.5.0
  > 9ec25ca fixes broken random value generation
  > 1bddf2e bumps go version & removes deprecated module usage
  > 750bf92 adds GHA & Makefile configs
  > b2c246b Revert " Update go version & add verification/testing tools (# 840)"
  > 09a6bab removing error handling while closing connections
  > 58af150 return errors instead of printing to logs
  > e5f1a0a excludes errchecks linter
  > b2a86a1 Do not timeout when WriteControl deadline is zero
  > 695e909 Remove hideTempErr to allow downstream users to check for errors like net.ErrClosed (# 894)
  > d293aa5 feat: format message type
  > 0cfb2ca feat: format message type
  > 3168614 fix: lint example
  > d08ee1a perf: reduce timer in write_control
  > d15aba1 perf: reduce timer in write_control
  > cf50a3e Revert "Print log message"
  > 7d5b8cc Print log message
  > 4965080 Do not return error in SetCloseHandler
  > 9a21405 Do not handle network error in SetCloseHandler()
  > 0f0acef fix: don't use errors.ErrUnsupported, it's available only since go1.21
  > 1e975a0 use http.ResposnseController
  > 4a5e66f make tests parallel
  > 871f6bb docs(echoreadall): fix function echoReadAll comment (# 881)
  > dcea2f0 Remove noisy printf in NextReader()
  > 01b0aae fix: add comment for the readBufferSize and writeBufferSize (# 869)
  > 286c896 fix: replace ioutil.readfile with os.readfile (# 868)
  > 6f5d213 conn.go: default close handler should not return ErrCloseSent. (# 865)
  > 629990d Use status code constant (# 864)
  > b6a0d77 Update README.md, replace master to main (# 862)
  > aa97606 Fixes subprotocol selection (aling with rfc6455) (# 823)
bumping knative.dev/eventing c91a9d8...1708881:
  > 1708881 [main] Upgrade to latest dependencies (# 8191)
  > b48b664 feat: add constructor for full event lineage graph (# 7921)
  > e79f3b6 Make auth package indepent from eventpolicy informer (# 8195)
  > ae6ed99 Fix JobSink to support AuthZ on GET too (# 8196)
  > 608e76c Add broker transformation test to upgrade tests (# 8190)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-19 05:30:03 +00:00
Matej Vašek 42ed4d8096
Fix test failures in OCP prow CI (#2503)
* Fix test failures in OCP prow CI

Ensure that ServeRepo() make copy of repo from ./testdata and serves the
repo from that copy.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* fixup: typo

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

---------

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-16 06:57:35 +00:00
Knative Automation 3cbcc257d6
upgrade to latest dependencies (#2504)
bumping knative.dev/serving 63b0f86...edb073c:
  > edb073c Update net-contour nightly (# 15507)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-16 06:45:12 +00:00
Knative Automation 06a18f92cc
upgrade to latest dependencies (#2500)
bumping knative.dev/serving 74ea38a...63b0f86:
  > 63b0f86 Update net-istio nightly (# 15508)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-15 21:39:21 +00:00
github-actions[bot] d6ba18a676
chore: update Quarkus platform version to 3.14.4 (#2502)
Co-authored-by: Knative Automation <automation@knative.team>
2024-09-15 21:26:50 +00:00
Jefferson Ramos 84f4caf724
test: preventing dubios ownership repository error on git unit tests (#2499) 2024-09-13 13:33:35 +00:00
dependabot[bot] 81169a4d80
chore(deps-dev): bump braces from 3.0.2 to 3.0.3 in /templates/node/cloudevents (#2497)
* chore(deps-dev): bump braces in /templates/node/cloudevents

Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixup: generate/zz_filesystem_generated.go

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matej Vašek <matejvasek@gmail.com>
2024-09-13 09:47:32 +00:00
Knative Automation 636eacd895
upgrade to latest dependencies (#2496)
bumping knative.dev/pkg fdbc0b5...3002873:
  > 3002873 Bump google.golang.org/grpc from 1.65.0 to 1.66.0 (# 3087)
bumping google.golang.org/grpc 2da9769...00d3ec8:
  > 00d3ec8 Change version to 1.66.0 (# 7518)
  > 973e3dc xdsclient: Populate total_issued_requests count in LRS load reports (# 7544) (# 7565)
  > 8e3596c cherry-pick # 7557 to v1.66.x branch (# 7564)
  > 62baa5f cherry-pick # 7356 to v1.66.x branch (# 7546)
  > f857020 cherry-pick # 7523 to v1.66.x branch (# 7547)
  > 35e915e cherry-pick: transport: add timeout for writing GOAWAY on http2Client.Close() # 7371 (# 7540)
  > 63853fd rls: update picker synchronously on configuration update (# 7412)
  > 86135c3 csds: unskip e2e test (# 7502)
  > 5d07b63 transport: change `*http2Client` to interface `ClientTransport` (# 7512)
  > c98235b grpclog: refactor to move implementation to grpclog/internal (# 7465)
  > 7ec3fd2 balancer/rls: Fix RLS Cache metrics (# 7511)
  > 6d7f07c test/tools: update staticcheck version to latest (# 7509)
  > 9706bf8 balancer/rls: Add cache metrics (# 7495)
  > c8951ab *: fix minor typos (# 7487)
  > 3cb3342 .*: fix comments (# 7504)
  > eece43b latency: don't wrap when all the latencies are zero (# 7506)
  > 366decf transport/grpchttp2: add http2.Framer bridge (# 7453)
  > 5c4da09 grpc: fix a bug introduced in # 7461 (# 7505)
  > 1008562 benchmark: wire in new gzip compressor (# 7486)
  > ced812e xds: implement ADS stream flow control mechanism (# 7458)
  > 54b48f7 balancer/weightedroundrobin: Add recording point for endpoint weight not yet usable and add metrics tests (# 7466)
  > 7b9e012 balancer/rls: Add picker metrics (# 7484)
  > 3ee837c *.pb.go: regenerate protos (# 7493)
  > f9b96b8 internal/transport: Unlock mutex before panic (# 7488)
  > d00dd8f xds: env var protection for xds fallback (# 7483)
  > ffaa81e transport/bufWriter: fast-fail on error returned from flushKeepBuffer() (# 7394)
  > 1490d60 transport/grpchttp2: revert # 7477 usage of mem package (# 7485)
  > e6b6318 transport/grpchttp2: change types to include `mem` package (# 7477)
  > 6d0aaae grpc: make client report `Internal` status when server response contains unsupported encoding (# 7461)
  > 338595c balancergroup: remove mentions of locality from comments (# 7476)
  > c8716e5 mem: fix comment typo (# 7482)
  > e524655 tools: Add github.com/mgechev/revive (# 7472)
  > 4a26a49 balancer/leastrequest: Add verbosity check around build log (# 7467)
  > 887d908 mem: introduce `mem` package to facilitate memory reuse (# 7432)
  > 6fa393c transport/grpchttp2: add doc to methods and values (# 7445)
  > 1013847 cmd/protoc-gen-go-grpc: fix typo pancis -> panics (# 7456)
  > 1b1230b resolver_wrapper: add early return in addChannelzTraceEvent (# 7437)
  > 5520cff experimental/stats/metricregistry: Add comments on enum consts for Metrics Type (# 7457)
  > 0b33bfe transport: Discard the buffer when empty after http connect handshake (# 7424)
  > 566aad1 examples/retry: remove waitForReady from service config (# 7450)
  > ec9dff7 cmd/protoc-gen-go-grpc: update version to 1.5.1 (# 7452)
  > 245323c cmd/protoc-gen-go-grpc: remove replace and skip test that requires it for now (# 7451)
  > 3eb0145 balancer/weightedroundrobin: Add emissions of metrics through metrics registry (# 7439)
  > bc03420 cmd/protoc-gen-go-grpc: update version for release
  > 84a4ef1 internal/stats: Add metrics recorder list and usage in ClientConn  (# 7428)
  > 47be8a6 Remove trailing spaces (# 7426)
  > 1feeaec stats: Add optional locality label in cluster_impl picker (# 7434)
  > 9671c4a cmd/protoc-gen-go-grpc: test the embedded struct at registration time for proper usage (# 7438)
  > 40f3998 client: Stabilize WaitForStateChange API (# 7425)
  > aae9e64 docs: fix and improve anti-patterns.md (# 7418)
  > ac5a7fe xds: Fix flaky test Test/ServerSideXDS_WithValidAndInvalidSecurityConfiguration (# 7411)
  > 0231b0d transport/grpcframer: create grpcframer package (# 7397)
  > 2bcbcab stats/opentelemetry: Add usage of metrics registry (# 7410)
  > 64adc81 scripts: regenerate pbs with caching deps to a fixed tmp folder (# 7409)
  > 4ed8180 ringhash: more e2e tests from c-core (# 7334)
  > 61aa949 vet: fix option order when invoking grep (# 7421)
  > b1979b6 vet: remove trailing whitespace (# 7420)
  > 700ca74 xds/balancer/priority: Unlock mutex before returning (# 7417)
  > d27ddb5 internal/grpcsync: support two ways to schedule a callback with the serializer (# 7408)
  > ecbb837 experimental/stats: Add metrics registry (# 7349)
  > c5c0e18 scripts: minor refactor to scripts (# 7403)
  > e7d8822 protoc-gen-go-grpc: add period to end of generated comment (# 7392)
  > ee62e56 xds: fix typos (# 7405)
  > 48b7581 security/advancedtls: remove Go1.19 build constraints (# 7404)
  > eff3e67 *.pb.go: regenerate (# 7402)
  > e54f441 xds: make fallback bootstrap configuration per-process (# 7401)
  > 9c5b31d xds: use locality from the connected address for load reporting (# 7378)
  > 45d44a7 grpc: hold ac.mu while calling resetTransport to prevent concurrent connection attempts (# 7390)
  > f64a6a3 test/channelz: change channelz_test to use write data (# 7396)
  > daab563 examples: Add OpenTelemetry example (# 7296)
  > bb49a88 cmd/protoc-gen-go-grpc: default use_generic_streams_experimental to true (# 7387)
  > 53a5c41 interop/lb: Increase Go PSM LB test timeout to 300min (# 7393)
  > bdd707e scripts: add linter rule for using context.WithTimeout on tests (# 7342)
  > 4e9b596 xds: add support for multiple xDS clients, for fallback (# 7347)
  > 5ac73ac documentation: Update proxy docs to point to `WithContextDialer` (# 7361)
  > d382d84 metadata: stabilize ValueFromIncomingContext (# 7368)
  > c9caa9e metadata: remove String method (# 7372)
  > f199062 xds: Add a test for incorrect load reporting when using pickfirst with servers in multiple localities (# 7357)
  > 6126383 metadata: make Stringer implementation consistent (# 7355)
  > 98e5dee cmd/protoc-gen-go-grpc: enable edition 2023 support (# 7351)
  > 5f5d4d2 doc: fix link to error_details example (# 7345)
  > 1811c6f github: update codecov with token and fail_ci_if_error (# 7348)
  > 3e78e9b MAINTAINERS.md: add new members and move ex-members to emeritus (# 7284)
  > 8c80220 grpclog: remove Debugf method to avoid unnecessary evaluation (# 7330)
  > c8568c9 grpc: Readd pick first name (# 7336)
  > cd7e282 go.mod: update go-control-plane dependency for xDS fallback (# 7340)
  > a0311cd golint fix: context.Context should be the first parameter of a function (# 7338)
  > b8ca292 examples/features/retry: Improve docstring (# 7331)
  > f1b7f41 xds/bootstrap: add testing support to generate config (# 7326)
  > c441d42 github: use latest release of qemu emulator (# 7337)
  > 970f390 test: fix typo in pickfirst_test.go (# 7332)
  > c04b085 internal/transport: minor cleanup of controlBuffer code (# 7319)
  > 07078c4 github: add cache-dependency-path to setup-go (# 7323)
  > 24a6b48 credentials/alts: fix defer in TestDial (# 7301)
  > e37c6e8 fix testclient type in ringhash_balancer_test checkRPCSendOK (# 7324)
  > 8075dd3  stats/opentelemetry: Fix protobuf import (# 7320)
  > 4dd7f55 ringhash: port e2e tests from c-core (# 7271)
  > de51a63 examples: Add CSM Observability example (# 7302)
  > 3267089 stats/opentelemetry: Add e2e testing for CSM Observability (# 7279)
  > c4753c3 scripts: improve regenerate.sh to use the correct proto compiler version (# 7064)
  > e2e7a51 xds/internal/xdsclient: Emit unknown for CSM Labels if not present in CDS (# 7309)
  > e40eb2e deps: update dependencies for all modules (# 7310)
  > dfcabe0 xds: cleanup bootstrap processing functionality (# 7299)
  > dbd24a9 [advancedTLS] Removed deprecated APIs in advancedTLS (# 7303)
  > 30c0cdd vet: remove --quiet from git grep when output is expected (# 7305)
  > 5a289d9 dns: fix constant 30s backoff for re-resolution (# 7262)
  > 9bdf335 Change version to 1.66.0-dev (# 7308)
bumping knative.dev/serving deb99de...74ea38a:
  > 74ea38a upgrade to latest dependencies (# 15505)
bumping knative.dev/networking 37fdbdd...433920a:
  > 433920a Update community files (# 1003)
  > 0efcb4c upgrade to latest dependencies (# 1002)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-13 07:19:29 +00:00
dependabot[bot] 95c2013ea8
chore(deps): bump github.com/docker/docker (#2498)
Bumps [github.com/docker/docker](https://github.com/docker/docker) from 26.1.3+incompatible to 26.1.5+incompatible.
- [Release notes](https://github.com/docker/docker/releases)
- [Commits](https://github.com/docker/docker/compare/v26.1.3...v26.1.5)

---
updated-dependencies:
- dependency-name: github.com/docker/docker
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-09-12 20:36:48 +00:00
Matej Vašek 29fd2eaacc
Revert bad changes (#2495)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-12 20:04:12 +00:00
Knative Automation 04aac41c83
upgrade to latest dependencies (#2494)
bumping knative.dev/eventing 229446d...c91a9d8:
  > c91a9d8 [main] Upgrade to latest dependencies (# 8189)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-12 07:56:32 +00:00
github-actions[bot] cdb15e0a4c
chore: update Quarkus platform version to 3.14.3 (#2492)
Co-authored-by: Knative Automation <automation@knative.team>
2024-09-12 07:32:27 +00:00
Matej Vašek cbf98fdd23
Update Makefile (#2493) 2024-09-11 19:04:20 +00:00
Knative Automation 749f755522
upgrade to latest dependencies (#2491)
bumping golang.org/x/net 4542a42...35b4aba:
  > 35b4aba go.mod: update golang.org/x dependencies
  > 9bf379f websocket: fix printf(var) mistake detected by latest printf checker
bumping golang.org/x/term d598954...2f7b0dd:
  > 2f7b0dd go.mod: update golang.org/x dependencies
  > f867b76 x/term: set missing VIRTUAL_TERMINAL_INPUT flag on Windows
bumping golang.org/x/sys 914deed...a43b625:
  > a43b625 windows: add SIO_UDP_NETRESET constant
  > ed67b15 windows: add console codepage api
  > 9cb830b unix: add missing import to syscall_hurd.go
  > 71132f5 unix: add POLLRDHUP to FreeBSD
  > 3283fc3 cpu: add support for detecting RISC-V extensions
  > 29e55b2 unix: use os.Executable rather than os.Args[0] in tests
  > a8c5219 unix: rename XDPUmemReg field back to Size
  > 59665e5 unix: add Connectx for darwin
  > a0c72ef unix: add f_flag member flags on z/OS
  > c64c51d unix: update riscv64 hwprobe to Linux kernel 6.10
  > da77c6b unix: sync minimum Linux Kernel version with requirements page
bumping knative.dev/pkg 7c0ad27...fdbc0b5:
  > fdbc0b5 Bump golang.org/x/net from 0.28.0 to 0.29.0 (# 3090)
bumping knative.dev/eventing 04c42dc...229446d:
  > 229446d Create paired upgrade tests (# 8158)
bumping golang.org/x/text b2bec85...1e3e9fd:
  > 1e3e9fd all: rename Example test functions to prevent vet errors
bumping golang.org/x/crypto 5bcd010...c9da6b9:
  > c9da6b9 all: fix printf(var) mistakes detected by latest printf checker
  > b35ab4f go.mod: update golang.org/x dependencies
  > bcb0f91 internal/poly1305: Port sum_amd64.s to Avo
  > 7eace71 chacha20poly1305: Avo port of chacha20poly1305_amd64.s
  > 620dfbc salsa20/salsa: Port salsa20_amd64.s to Avo
  > 82942cf blake2b: port blake2b_amd64.s to Avo
  > 0484c26 blake2b: port blake2bAVX2_amd64.s to Avo
  > 38ed1bc blake2s: port blake2s_amd64.s to Avo
  > 38a0b5d argon2: Avo port of blamka_amd64.s
  > bf5f14f x509roots/fallback: update bundle
  > b2d3a6a ssh/agent: ensure to not add duplicated keys

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-11 12:12:58 +00:00
David Fridrich 92856e5627
Fix: create whole config path if it doesnt exist yet (#2490)
* fix

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2024-09-10 14:46:47 +00:00
Knative Automation 1638f62a14
upgrade to latest dependencies (#2489)
bumping knative.dev/client/pkg 9728a1e...fd0126d:
  > fd0126d Update community files (# 1967)
bumping knative.dev/hack 9724320...fc6a845:
  > fc6a845 Update community files (# 398)
bumping knative.dev/serving 7c927b7...deb99de:
  > deb99de Update net-contour nightly (# 15500)
  > be2f70a Update net-kourier nightly (# 15501)
  > 8d8725e Update net-gateway-api nightly (# 15502)
  > 0824bd4 Update net-istio nightly (# 15499)
  > 3c5f2f6 Update community files (# 15498)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-10 13:54:57 +00:00
Matej Vašek a965c0fe0a
Improved ldflags setting in Makefile (#2488)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-09 13:13:51 +00:00
David Fridrich 8dce9bcaa7
fix: HOME with different permissions (#2361)
* fixed integration tests

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* docker config.json credentials test when HOME not defined

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* pack test

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* simplify

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* og creds, small fixes

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* s2i test no home

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* remove unnecessary stuff

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* deploy test without home

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* confict fix after rebase

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* move test, dont delete

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* runtime change

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* node image signals fixed and smaller size for GH actions

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* return err

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* clean up comments

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* creds and test

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* test return commented code

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* config warning

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* cleanup

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* cleanup

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* skip test for windows

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* skip for prow

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix repo on create, move warning up a function

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* fix print

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2024-09-09 07:20:04 +00:00
Knative Automation dacb3ee02e
upgrade to latest dependencies (#2485)
bumping knative.dev/eventing 07d3790...04c42dc:
  > 04c42dc [main] Update community files (# 8187)
  > 8c22bf5 [main] Upgrade to latest dependencies (# 8186)
bumping knative.dev/pkg a1469cf...7c0ad27:
  > 7c0ad27 Update community files (# 3089)
bumping knative.dev/serving bdec909...7c927b7:
  > 7c927b7 Update net-kourier nightly (# 15497)
  > b50a09e Update net-istio nightly (# 15496)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-09 06:35:03 +00:00
Knative Automation 2286e87bde
Update community files (#2484)
Signed-off-by: Knative Automation <automation@knative.team>
2024-09-09 02:04:33 +00:00
Knative Automation f4bd1d8ae0
upgrade to latest dependencies (#2478)
bumping knative.dev/pkg 89743d9...a1469cf:
  > a1469cf upgrade to latest dependencies (# 3088)
bumping knative.dev/hack 06f7aff...9724320:
  > 9724320 Fix premature codegen cleanup exit on 1 (# 397)
bumping knative.dev/serving f07e3d6...bdec909:
  > bdec909 upgrade to latest dependencies (# 15495)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-06 04:49:34 +00:00
github-actions[bot] 8e4acdd35e
chore: update Quarkus platform version to 3.14.2 (#2481)
Co-authored-by: Knative Automation <automation@knative.team>
2024-09-05 05:28:33 +00:00
David Fridrich a13056e4ee
migrate client-pkg to client/pkg (#2477)
* migrate

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* migrate more

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* sort imports

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2024-09-04 10:08:32 +00:00
Knative Automation 799de30aea
upgrade to latest dependencies (#2476)
bumping knative.dev/eventing 34f9cd3...07d3790:
  > 07d3790 SinkBinding wrongly enqueues namespaces (# 8184)
  > 902f9d3 Migrate to kube_codegen.sh (# 8183)
bumping knative.dev/serving 5f5f6d8...f07e3d6:
  > f07e3d6 Fix deepcopy gen (# 15492)
  > 372f5d1 Migrate to kube codegen (# 15491)
bumping knative.dev/client-pkg 22f5989...eb73a58:
  > eb73a58 🗑️ Deprecate knative.dev/client-pkg (# 193)

Signed-off-by: Knative Automation <automation@knative.team>
2024-09-04 05:40:32 +00:00
Matej Vašek e937035dae
Incorporate s2i CLI into func-utils image. (#2473)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-03 13:03:21 +00:00
Matej Vašek 2e4d157162
On cluster s2i build for Go (alternative version) (#2471)
* Prepare util image to accomodate multiple cmds

As of now func-util image has only one command of our own -- "deploy".
This commits prepares grounds for one additional command named "scaffolding".
The commands will be implemented in one binary and dispatched over
argv[0] using symlinks. Kinda like busybox does.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* Add scaffolding for on-cluster build

Added new build step in tekton pipeline that scaffolds main() for Go
porject when using s2i builder.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* Better docker build caching

This will cache dependencies between docker builds.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* fixup: perms

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* fixup: remove broken check

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* fixup: remove test because of 'no space left on device'

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* Make func-util rootfull

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

---------

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-09-03 12:33:17 +00:00
github-actions[bot] 82d0653d8e
chore: update Quarkus platform version to 3.14.1 (#2474)
Co-authored-by: Knative Automation <automation@knative.team>
2024-08-30 05:42:19 +00:00
Knative Automation 82541511e5
upgrade to latest dependencies (#2475)
bumping knative.dev/eventing ecae895...34f9cd3:
  > 34f9cd3 Disable controller default health probes in the IMC dispatcher (# 8125)

Signed-off-by: Knative Automation <automation@knative.team>
2024-08-30 05:24:19 +00:00
David Fridrich ca61712d4b
allow digested images to be 'run' (#2445)
* init fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* dont override direct deploy tag, more tests

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* dont validate with tagged image, fix comment

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* init run fix for --image

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* init

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* int test, add valid untdigested images to run

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* check images passed to runner for func run command

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix build/deploy image passing bug add test

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* remove extra printing

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* merge functions to digested

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* misspell

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* simplify

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* quick fix

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

* remove prints, comment

Signed-off-by: David Fridrich <fridrich.david19@gmail.com>

---------

Signed-off-by: gauron99 <fridrich.david19@gmail.com>
Signed-off-by: David Fridrich <fridrich.david19@gmail.com>
2024-08-28 06:13:02 +00:00
Knative Automation bbb3c47b4b
upgrade to latest dependencies (#2470)
bumping knative.dev/eventing 833f4aa...ecae895:
  > ecae895 AuthZ: Provide function to update AppliedEventPoliciesStatus based on a given list of applying policies (# 8173)

Signed-off-by: Knative Automation <automation@knative.team>
2024-08-28 04:07:56 +00:00
Knative Automation 8f7dd2c2b2
upgrade to latest dependencies (#2468)
bumping knative.dev/eventing 36e0721...833f4aa:
  > 833f4aa Split AuthZ e2e tests (# 8181)

Signed-off-by: Knative Automation <automation@knative.team>
2024-08-27 05:02:13 +00:00
github-actions[bot] 4775ad973c
chore: update Springboot platform version to 3.3.3 (#2465)
Co-authored-by: Knative Automation <automation@knative.team>
2024-08-26 06:48:26 +00:00
Knative Automation c6c215e321
upgrade to latest dependencies (#2463)
bumping knative.dev/eventing 5fc4c0f...36e0721:
  > 36e0721 Broker class based defaults (# 7631)
  > e4b6d68 [main] Upgrade to latest dependencies (# 8172)
  > 24a43e8 chore: refactor cross namespace test to make it reusable (# 8157)
  > da10b71 Support dispatcher format for triggers (# 8151)
  > 477588c JobSink: Reject unauthorized requests (# 8169)

Signed-off-by: Knative Automation <automation@knative.team>
2024-08-26 06:13:02 +00:00
Knative Automation 2a6317c272
upgrade to latest dependencies (#2461)
bumping knative.dev/serving c51ee6c...5f5f6d8:
  > 5f5f6d8 Update net-kourier nightly (# 15476)
bumping knative.dev/eventing bf945f9...5fc4c0f:
  > 5fc4c0f Fix JobSink to have ObservedGeneration in status (# 8168)
  > ed71838 Fix: Use correct readyness check in AuthZ conformance tests (# 8167)

Signed-off-by: Knative Automation <automation@knative.team>
2024-08-22 05:14:41 +00:00
github-actions[bot] 2f852d1b32
chore: update Quarkus platform version to 3.13.3 (#2462)
Co-authored-by: Knative Automation <automation@knative.team>
2024-08-20 22:25:33 +00:00
Knative Automation 0f2bdfa605
upgrade to latest dependencies (#2459)
bumping knative.dev/eventing 90a88fc...bf945f9:
  > bf945f9 Support authorization in Channel ingress (# 8162)
  > b57ac3a Fix: propagate EventPolicy filter to underlying Channels EventPolicy (# 8163)
  > 2b92299 Add filters to event policy (# 8122)

Signed-off-by: Knative Automation <automation@knative.team>
2024-08-19 13:25:42 +00:00
Knative Automation ad6ba2e48a
upgrade to latest dependencies (#2458)
bumping knative.dev/pkg cd3311c...89743d9:
  > 89743d9 upgrade to latest dependencies (# 3085)
bumping knative.dev/serving 446e690...c51ee6c:
  > c51ee6c Update net-contour nightly (# 15471)
  > 25e5f48 Update net-gateway-api nightly (# 15470)
  > 6fe1b33 upgrade to latest dependencies (# 15469)
bumping knative.dev/eventing 1123cfa...90a88fc:
  > 90a88fc [main] Upgrade to latest dependencies (# 8159)

Signed-off-by: Knative Automation <automation@knative.team>
2024-08-16 06:40:11 +00:00
Knative Automation b23e16b17e
upgrade to latest dependencies (#2457)
bumping knative.dev/hack 452e340...06f7aff:
  > 06f7aff tag images using ko (# 393)
bumping knative.dev/serving 64ac199...446e690:
  > 446e690 upgrade to latest dependencies (# 15462)
  > 64820f2 update schema-config (# 15467)
  > b7026be Update net-contour nightly (# 15463)
  > 221b632 Update net-gateway-api nightly (# 15464)
bumping knative.dev/networking f170238...d4c57cd:
  > d4c57cd Update community files (# 999)
  > fb56e09 upgrade to latest dependencies (# 998)
bumping knative.dev/eventing 7a90257...1123cfa:
  > 1123cfa feat: reduced unnecessary creation of filters (# 8118)
  > 71d5d5f Add AuthZ conformance e2e test suite (# 8150)
  > e41da98 [main] Upgrade to latest dependencies (# 8153)

Signed-off-by: Knative Automation <automation@knative.team>
2024-08-15 08:27:48 +00:00
github-actions[bot] 9e75491546
chore: update Quarkus platform version to 3.13.2 (#2456)
Co-authored-by: Knative Automation <automation@knative.team>
2024-08-13 07:42:26 +00:00
Knative Automation 7e9c878f75
upgrade to latest dependencies (#2455)
Signed-off-by: Knative Automation <automation@knative.team>
2024-08-13 07:03:35 +00:00
Knative Automation 3668b5f608
upgrade to latest dependencies (#2452)
Signed-off-by: Knative Automation <automation@knative.team>
2024-08-08 11:56:32 +00:00
github-actions[bot] ce67f86d45
chore: update Quarkus platform version to 3.13.1 (#2453)
Co-authored-by: Knative Automation <automation@knative.team>
2024-08-08 09:58:24 +00:00
Knative Automation edaad509b5
Update community files (#2454)
Signed-off-by: Knative Automation <automation@knative.team>
2024-08-08 02:02:50 +00:00
Knative Automation e6856fca51
upgrade to latest dependencies (#2449)
Signed-off-by: Knative Automation <automation@knative.team>
2024-08-06 15:24:26 +00:00
github-actions[bot] 72f41cd064
chore: update Quarkus platform version to 3.13.0 (#2451)
Co-authored-by: Knative Automation <automation@knative.team>
2024-08-01 19:11:55 +00:00
Knative Automation d8d8fe2235
Update community files (#2450)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-30 13:39:35 +00:00
Matej Vašek ae4c7d927c
Remove superfluous equals sign from envvar (#2446)
* Remove superfluous equals sign from envvar

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

* Update rust templates Cargo.lock

Signed-off-by: Matej Vašek <matejvasek@gmail.com>

---------

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-07-26 16:02:19 +00:00
Jefferson Ramos 3c1490b351
test: adding GO s2i to e2e test suite (#2401) 2024-07-25 06:53:19 +00:00
Knative Automation a511cd9301
upgrade to latest dependencies (#2442)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-24 17:40:07 +00:00
Knative Automation 5752e8e9c6
upgrade to latest dependencies (#2437)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-24 05:35:59 +00:00
Matej Vašek 2fdca6cc0f
Include go.sum in the Go CloudEvent template (#2441)
The go.sum must be in place otherwise "go list -f {{.Incomplete}}"
returns true which breaks s2i build.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-07-23 20:13:25 +00:00
Matej Vašek 7a75fecfec
Fix failure in GHA caused by missing cargo bin (#2440)
It appears that the cargo in no longer part of GHA image at least for macOS.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-07-23 12:48:58 +00:00
github-actions[bot] 531af8fd72
chore: update Springboot platform version to 3.3.2 (#2436)
Co-authored-by: Knative Automation <automation@knative.team>
2024-07-22 17:02:01 +00:00
Knative Automation 3fa143ec06
upgrade to latest dependencies (#2435)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-22 14:22:29 +00:00
Knative Automation 8d4a254926
upgrade to latest dependencies (#2434)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-22 06:50:46 +00:00
Matej Vašek 362bdf64c8
fix: springboot updater missing EOL (#2433)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-07-22 05:35:14 +00:00
Matej Vašek aed23cf9a1
Fix PaC detection for Red Hat's Sandbox cluster (#2429)
The sandbox cluster installs PaC cm into tekton-pipelines NS.

Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-07-19 09:37:20 +00:00
github-actions[bot] c093c38239
chore: update Quarkus platform version to 3.12.3 (#2427)
Co-authored-by: Knative Automation <automation@knative.team>
2024-07-18 07:05:46 +00:00
Knative Automation e5eba96164
upgrade to latest dependencies (#2426)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-17 05:52:20 +00:00
David Fridrich bda9487aa8
fix: Allow undigested images to be deployed directly (#2390)
* init fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* dont override direct deploy tag, more tests

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* dont validate with tagged image, fix comment

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* simplify

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* comments

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

---------

Signed-off-by: gauron99 <fridrich.david19@gmail.com>
2024-07-16 14:08:55 +00:00
Knative Automation 6a75f57923
upgrade to latest dependencies (#2425)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-15 07:15:26 +00:00
Matej Vašek e641bba0b5
Cron GH Action to update CA bundle (#2422)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-07-12 06:36:45 +00:00
Knative Automation 8da75c4909
upgrade to latest dependencies (#2421)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-12 06:21:27 +00:00
github-actions[bot] 4d96d7d3b0
chore: update Quarkus platform version to 3.12.2 (#2424)
Co-authored-by: Knative Automation <automation@knative.team>
2024-07-10 21:26:15 +00:00
Matej Vašek 4dbe11376b
chore: linter should ignore test data symlinks (#2423)
Signed-off-by: Matej Vašek <matejvasek@gmail.com>
2024-07-10 14:30:41 +00:00
Knative Automation 210950ec55
upgrade to latest dependencies (#2417)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-09 18:10:44 +00:00
Matej Vašek a2a97dbd85
Fix linter issues (#2420)
* chore: fixed typos

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: removed trailing whitespaces

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: added EoLs at EoFs

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-07-09 13:48:22 +00:00
github-actions[bot] 03a2e24d85
chore: update Quarkus platform version to 3.12.1 (#2419)
Co-authored-by: Knative Automation <automation@knative.team>
2024-07-09 08:50:55 +00:00
Matej Vašek f8c54a5698
chore: update CA bundle (#2415)
* chore: update CA bundle

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* style: add EoLs

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* style: removed trailing whitespace

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-07-09 07:45:09 +00:00
Knative Automation 98dac41400
upgrade to latest dependencies (#2414)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-08 15:39:58 +00:00
Knative Automation 5dfa8c076a
upgrade to latest dependencies (#2413)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-08 05:57:00 +00:00
Knative Automation 7a46ca51ac
upgrade to latest dependencies (#2410)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-04 19:21:17 +00:00
Knative Automation 61508c44ca
Update community files (#2412)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-04 02:01:43 +00:00
Matej Vašek df90a4f680
chore: do not publish removed tkn tasks (#2408)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-07-03 04:43:47 +00:00
Knative Automation e08155dd0c
upgrade to latest dependencies (#2400)
Signed-off-by: Knative Automation <automation@knative.team>
2024-07-02 03:56:28 +00:00
Giurgiu Razvan f004ce031b
update typescript template dependencies (#2406) 2024-07-01 05:57:47 +00:00
Matej Vašek 3eab5fc25d
chore: removed unused constants (#2402)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-27 05:21:29 +00:00
Matej Vašek d7c4f1bbb1
chore: updated Go linter (#2403)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-27 05:07:00 +00:00
Matej Vašek 3e8dc4ddc1
feat: embed tkn tasks in func binary (#2396)
* feat: embed tkn tasks in func binary

Embed Tekton tasks for direct on cluster build.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* feat: embed tkn tasks in func binary

Embed Tekton tasks for PaC build.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* feat: added tkn-tasks sub-command

This new command prints tektons tasks in form of multi-document yaml,
these tekton tasks may requird to be installed for some advanced
functionality.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: remove unused files

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* feat: make deployer image settable via linker

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-26 17:48:06 +00:00
Knative Automation 3ef5608a05
upgrade to latest dependencies (#2397)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-26 13:13:50 +00:00
github-actions[bot] a24a8e3d03
chore: update Quarkus platform version to 3.12.0 (#2399)
Co-authored-by: Knative Automation <automation@knative.team>
2024-06-26 09:11:30 +00:00
Matej Vašek 9f6a87585a
chore: check FS gen in hack/update-codegen.sh (#2395)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-26 05:28:36 +00:00
Knative Automation 64d73de82b
upgrade to latest dependencies (#2394)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-25 16:19:18 +00:00
Knative Automation a1536e5e4a
upgrade to latest dependencies (#2392)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-25 02:10:36 +00:00
Knative Automation d2554649ab
upgrade to latest dependencies (#2391)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-24 06:00:04 +00:00
Knative Automation fdd17a8301
upgrade to latest dependencies (#2388)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-21 14:28:57 +00:00
Matej Vašek bbdd66b0f3
chore: updated tekton api verison (#2383)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-20 18:01:14 +00:00
Matej Vašek 6f19506822
fix: codegen use "default" NS in generated docs (#2387)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-20 16:52:11 +00:00
Swastik Gour 40eb0eb304
corrected error msg (#2372)
* corrected error msg

Signed-off-by: swastik959 <Sswastik959@gmail.com>

* lintted

Signed-off-by: swastik959 <Sswastik959@gmail.com>

---------

Signed-off-by: swastik959 <Sswastik959@gmail.com>
2024-06-20 14:10:18 +00:00
Knative Automation 9b30089a00
upgrade to latest dependencies (#2386)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-20 13:42:17 +00:00
Matej Vašek 5c9cc0b4a0
fix: docs gen runs agains empty kubeconf (#2385)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-20 12:56:18 +00:00
github-actions[bot] ff97fe2a7c
chore: update Springboot platform version to 3.3.1 (#2384)
Co-authored-by: Knative Automation <automation@knative.team>
2024-06-20 12:34:18 +00:00
Matej Vašek f249714bfe
chore: removed deprecated types (#2378)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-20 06:07:17 +00:00
Knative Automation 398610de93
upgrade to latest dependencies (#2379)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-20 05:57:17 +00:00
github-actions[bot] c1c7fa5e19
chore: update Quarkus platform version to 3.11.3 (#2377)
Co-authored-by: Knative Automation <automation@knative.team>
2024-06-19 16:45:17 +00:00
Knative Automation 4d00523e76
upgrade to latest dependencies (#2376)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-19 16:27:16 +00:00
Matej Vašek 3900d52ea5
chore: update deps (#2374)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-19 05:09:22 +00:00
Knative Automation 472adbe15d
upgrade to latest dependencies (#2370)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-19 02:34:19 +00:00
Swastik Gour 2ac73da081
corrected doc (#2368)
Signed-off-by: swastik959 <Sswastik959@gmail.com>
2024-06-17 06:00:48 +00:00
Knative Automation 74bc6bb2e6
upgrade to latest dependencies (#2369)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-17 05:49:48 +00:00
Knative Automation 75e500bf55
upgrade to latest dependencies (#2367)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-14 17:42:45 +00:00
Matej Vašek 044f82850e
fix: codegen does not use current ns (#2366)
Force empyt kubeconfig so default namespace in --help is "default" not
the current kubeconfig context.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-14 08:07:07 +00:00
Matej Vašek f72b666bd6
test: revert error suppresion (#2363)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-14 06:53:24 +00:00
github-actions[bot] 6bb9a3eafe
chore: update Quarkus platform version to 3.11.2 (#2365)
Co-authored-by: Knative Automation <automation@knative.team>
2024-06-13 17:14:06 +00:00
Knative Automation 001aadd8ff
upgrade to latest dependencies (#2362)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-13 14:43:21 +00:00
Knative Automation c8cf5dfe97
upgrade to latest dependencies (#2360)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-13 02:54:49 +00:00
Matej Vašek 9f7eac80ce
test: better res cleanup (#2349)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-12 16:01:03 +00:00
Knative Automation ac63d528a7
Update community files (#2345)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-12 13:34:25 +00:00
Matej Vašek d6b1822543
test: increased wait period (#2356)
Increased wait period for Gitlab settings change to kick in.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-12 11:14:28 +00:00
Knative Automation 75ee35a728
upgrade to latest dependencies (#2346)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-12 11:02:15 +00:00
Matej Vašek a18957db0a
fix: mount of socket from Docker Desktop (#2350)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-12 09:57:40 +00:00
Matej Vašek 2e7154ca84
Optimized disk usage in GH Action for integration tests (#2355)
* tests: remote unncessary software from GH VM

Previously tests were failing with no space left on device.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: updated generated code

The codegen should have been updated in prior PR but we forget do do it
there.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* test: wait for gitlab setting effect

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-11 18:47:42 +00:00
norbjd d8793d48d9
Clarify registry-insecure flag description (#2348)
Related to #2335
2024-06-11 13:56:01 +00:00
Matej Vašek a898fe79e0
fix: PaC build (#2341)
* Fixed detection of PaC controller URL for unprivileged users.
* Use fn.Deploy.Image before fn.Image since the fn.Image may not be
  populated.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-11 13:38:33 +00:00
Matej Vašek f7451b1a9a
chore: use codegen script for docs (#2352)
* chore: use codegen script for docs

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: codegen updated docs

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-11 13:25:48 +00:00
Knative Automation 1e7dd33251
upgrade to latest dependencies (#2343)
Signed-off-by: Knative Automation <automation@knative.team>
2024-06-07 12:16:34 +00:00
Matej Vašek 80d0e21481
fix: error when setting gitlab settings in test (#2342)
* test: fix error when setting gitlab settings

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* test: replace sleep with active condition check

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-07 11:29:37 +00:00
norbjd 056f3ff744
Honor registry-insecure flag in deploy command (#2335) 2024-06-07 00:04:43 +00:00
Matej Vašek 059f788061
chore: update tekton,PaC (#2340)
* chore: update tekton

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: param introduced in new version of gitlab lib

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: update tekton,PaC used in test env

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: disable affinity assistant for tekton

The affinity assistant is causing troubles in testing KinD cluster.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-06 23:46:43 +00:00
Knative Automation ef2edc5009
upgrade to latest dependencies (#2334)
bumping google.golang.org/genproto/googleapis/rpc 0867130...d264139:
  > d264139 chore(all): update all (# 1128)
  > dc85e6b chore(all): auto-regenerate .pb.go files (# 1129)
  > fc5f0ca chore: min Go version to 1.20 (# 1127)
bumping knative.dev/hack 68e3bfb...3b6d644:
  > 3b6d644 Update community files (# 383)
bumping knative.dev/client-pkg 2d1c4c8...d237eca:
  > d237eca Update community files (# 186)
bumping knative.dev/networking 1d0137a...41aa208:
  > 41aa208 upgrade to latest dependencies (# 987)
  > 1b470c4 upgrade to latest dependencies (# 986)
  > 11202c5 Update community files (# 985)
bumping knative.dev/eventing abdbf14...f9156c8:
  > f9156c8 JobSink: don't start informers twice (# 7964)
  > bff65d2 Triggering long running background jobs when events occurs (# 7954)
  > 3ee2400 fix: sequence updates subscription where possible, instead of recreating it (# 7948)
  > 96e0f09 Bump rekt to main (# 7958)
  > e3604b8 [main] Upgrade to latest dependencies (# 7957)
  > 08b0813 [main] Upgrade to latest dependencies (# 7956)
  > c53b44d [main] Format Go code (# 7953)
  > a58c135 Prototype a MQTT Source  (# 7919)
  > 39d2723 [main] Upgrade to latest dependencies (# 7950)
  > b9cba87 Add EventType v1beta3 conversion (# 7938)
  > 2a11bb8 [main] Update community files (# 7949)
  > 746dc52 fix: no more panic in the execute request method (# 7947)
bumping google.golang.org/api 4b79cc4...b49e3b9:
  > b49e3b9 chore(main): release 0.182.0 (# 2591)
  > b6f615b chore(all): update all (# 2607)
  > c4c51ce feat(all): auto-regenerate discovery clients (# 2609)
  > 0e58f74 feat(all): auto-regenerate discovery clients (# 2608)
  > ceaeabf feat(all): auto-regenerate discovery clients (# 2606)
  > f474c8f feat(all): auto-regenerate discovery clients (# 2604)
  > ece7727 feat(all): auto-regenerate discovery clients (# 2603)
  > a86c4b6 feat(all): auto-regenerate discovery clients (# 2602)
  > 2e7cc39 feat(all): auto-regenerate discovery clients (# 2600)
  > 677f53d feat(all): auto-regenerate discovery clients (# 2599)
  > 7d46b4d feat(all): auto-regenerate discovery clients (# 2597)
  > 07e7104 feat(all): auto-regenerate discovery clients (# 2595)
  > 21295a5 feat(all): auto-regenerate discovery clients (# 2594)
  > e95bd57 feat(all): auto-regenerate discovery clients (# 2590)
bumping knative.dev/pkg 5eeb7ec...58135c2:
  > 58135c2 Extra logging for leases (# 3049)
  > fce44ea Maybe fix controller ha (# 3046)
  > 1709961 Bump google.golang.org/api from 0.181.0 to 0.182.0 (# 3048)
  > 229e527 fix: downstream tests assume release branch was cut (# 3047)
  > 7d52a43 drop special logic when handling kubelet probe header for istio mTLS (# 2997)
  > ff4756a Update community files (# 3044)
bumping knative.dev/serving b5455c9...10b9152:
  > 10b9152 Update net-gateway-api nightly (# 15307)
  > 19055d5 upgrade to latest dependencies (# 15306)
  > 3e53acc Run system-internal-tls tests only for kourier (# 15299)
  > 5a3aa98 Update net-kourier nightly (# 15303)
  > 4c71c49 Update net-istio nightly (# 15301)
  > d3f9a04 Update net-contour nightly (# 15302)
  > 57d2a26 Update net-gateway-api nightly (# 15300)
  > bb51203 upgrade to latest dependencies (# 15297)
  > 2fd8465 [Automated] Update net-gateway-api nightly (# 15292)
  > 8cf5aba Set controller reconcillers to the correct number in tests (# 15290)
  > 92c6a63 upgrade to latest dependencies (# 15294)
  > d1781c5 Update net-contour nightly (# 15291)
  > 4538823 if revision is inactive, scale to zero instead of waiting for last pod retention (# 15161)
  > b0dfed2 Update net-istio nightly (# 15287)
  > 0ddd15e Update net-kourier nightly (# 15283)
  > f5123b6 upgrade to latest dependencies (# 15277)
  > a2459ef Update net-istio nightly (# 15281)
  > f84265a Do not delete ingress Secret in tests for internal tls (# 15280)
  > f53936b revert headless svc change from k8s private svc (# 15275)
  > 85d485a Update net-gateway-api nightly (# 15282)
  > 0b363c0 Update community files (# 15273)
  > 7fab945 Update net-istio nightly (# 15272)
  > 4fe029f Remove certmanager integration tests (# 15261)
  > b15ce9a Test for internal TLS certificate rotation (# 15217)
  > f7f530d Update net-kourier nightly (# 15265)
bumping google.golang.org/genproto/googleapis/api b8a5c65...0867130:
  > 0867130 chore(all): auto-regenerate .pb.go files (# 1125)
  > 024948a chore(all): update all (# 1126)
  > 6275950 chore(all): auto-regenerate .pb.go files (# 1124)

Signed-off-by: Knative Automation <automation@knative.team>
2024-06-06 05:25:31 +00:00
github-actions[bot] 698a1d0806
chore: update Quarkus platform version to 3.11.1 (#2339)
Co-authored-by: Knative Automation <automation@knative.team>
2024-06-05 18:41:30 +00:00
Matej Vašek 0647fc4976
Update pack dependency (#2337)
* refactor: extracted function

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: update pack dep

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: updated imgutil

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: run hack/update-deps.sh

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: remote the now unnecessary rename

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-05 14:32:10 +00:00
Matej Vašek 2aec66735f
chore: ubi9 => ubi8 (#2338)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-06-05 14:13:48 +00:00
David Fridrich aa909bdc44
Run func without HOME defined/ unaccessible .config dir (#2236)
* fixed integration tests

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* def creds back

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* docker config.json credentials test when HOME not defined

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* pack test

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* simplify

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* og creds, small fixes

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* s2i test no home

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* remove unnecessary stuff

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* deploy test without home

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* confict fix after rebase

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* move test, dont delete

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* runtime change

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* node image signals fixed and smaller size for GH actions

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* return err

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* cred test

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* clean up comments

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

---------

Signed-off-by: gauron99 <fridrich.david19@gmail.com>
2024-06-04 00:04:52 +00:00
Knative Automation a2bc6f6ffd
Update community files (#2333)
Signed-off-by: Knative Automation <automation@knative.team>
2024-05-29 14:11:23 +00:00
Knative Automation 91a4ccbf63
upgrade to latest dependencies (#2327)
bumping knative.dev/eventing a3a2ac0...abdbf14:
  > abdbf14 Remove rekt test from GH actions e2e test run (# 7941)
bumping knative.dev/serving fc2ce76...b5455c9:
  > b5455c9 upgrade to latest dependencies (# 15264)
bumping knative.dev/networking 507209b...1d0137a:
  > 1d0137a upgrade to latest dependencies (# 984)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-29 12:41:41 +00:00
github-actions[bot] 05a6534c46
chore: update Quarkus platform version to 3.11.0 (#2332)
Co-authored-by: Knative Automation <automation@knative.team>
2024-05-29 11:47:23 +00:00
Matej Vašek d3b8847792
chore: update images ubi8 => ubi9 (#2328)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-28 16:36:44 +00:00
Matej Vašek 125e4b6665
Use image index not just image (#2284)
* Always try daemon push first

Daemon push is now tried always first withouth using
net.DefaultResolver.LookupHost() to guess if the registry is reachable
from the daemon. If the daemon returns error contaning "no such host"
then use manual push with custom transport.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Rework image pusher tests

Merged daemon push and non-daemon tests to one table driven test.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Use image index not just image

This results in "multi-arch" image with single architecture this may
seems weird but it helps multi-arch clusters to run pods on approprieate
nodes.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: style

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-28 14:27:17 +00:00
Knative Automation c8bc46945c
upgrade to latest dependencies (#2324)
bumping knative.dev/eventing 74253dd...a3a2ac0:
  > a3a2ac0 Enable `eventtype-auto-create` feature flag for e2e tests (# 7940)
bumping knative.dev/serving 79da324...fc2ce76:
  > fc2ce76 Drop the k8s service name from kubectl get revision output (# 15260)
  > 71d1654 fix: Fixed liveness periodseconds to 10 so that crashloopback off doesn't happen which causesexpired lease to get stuck. (# 15256)
  > 57874d7 Update net-contour nightly (# 15246)
bumping knative.dev/pkg 99e1685...5eeb7ec:
  > 5eeb7ec Skip lease with empty holder (# 3042)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-28 12:37:15 +00:00
Knative Automation 0857f0c98b
upgrade to latest dependencies (#2323)
bumping knative.dev/serving 60c003b...79da324:
  > 79da324 delete CORS tests from serving (# 15249)
  > 94c040d Update net-gateway-api nightly (# 15245)
  > ab5c1a0 Bump actions/download-artifact from 3 to 4 (# 15240)
  > e42ed25 Update net-contour nightly (# 15204)
  > a4c98d1 Bump actions/cache from 3 to 4 (# 15242)
  > 374a644 Bump actions/checkout from 3 to 4 (# 15239)
  > 45388c0 fix cluster-local routes being stalled when external-domain-tls is enabled (# 15234)
  > 69c0589 update github actions automatically (# 15225)
  > 7aa7ed8 Fix e2e script to disable cors policy for Contour tests (# 15235)
  > e89957c Update net-kourier nightly (# 15229)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-27 05:53:50 +00:00
github-actions[bot] 1997a232dc
chore: update Springboot platform version to 3.3.0 (#2322)
Co-authored-by: Knative Automation <automation@knative.team>
2024-05-23 16:39:51 +00:00
Knative Automation e04ede8f8d
upgrade to latest dependencies (#2320)
bumping knative.dev/serving a0a1ac7...60c003b:
  > 60c003b Update net-istio nightly (# 15230)
  > fa7eaa2 Cleanup resources from DeploymentFailure upgrade test (# 15227)
  > 5ebffd5 add pod anti affinity rules to activator component (# 15233)
bumping knative.dev/eventing 68920d2...74253dd:
  > 74253dd [main] Upgrade to latest dependencies (# 7932)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-23 16:01:09 +00:00
Matej Vašek 3db3af91f5
chore: cluster log (#2321)
Save logs as an GH artifact

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-23 15:45:51 +00:00
github-actions[bot] 619be59d86
chore: update Springboot platform version to 3.2.6 (#2319)
Co-authored-by: Knative Automation <automation@knative.team>
2024-05-23 13:20:25 +00:00
github-actions[bot] aed0f9c247
chore: update Quarkus platform version to 3.10.2 (#2318)
Co-authored-by: Knative Automation <automation@knative.team>
2024-05-23 08:57:33 +00:00
Knative Automation a4622de232
upgrade to latest dependencies (#2315)
bumping knative.dev/eventing 5355171...68920d2:
  > 68920d2 Fix log message for recordevents receiver (# 7936)
  > 9c0f9cc Update eventtype CRD to include `.spec.reference.address` (# 7935)
  > b5f92c2 Copy message before passing it to eventtype autocreate handler (# 7934)
  > 0e14da4 fix(test): the attribute filter transform test correctly compares slices now (# 7931)
bumping knative.dev/serving 3aa9210...a0a1ac7:
  > a0a1ac7 Update net-gateway-api nightly (# 15228)
  > 93c3c79 upgrade to latest dependencies (# 15224)
bumping knative.dev/networking b31855c...507209b:
  > 507209b Update actions (# 982)
  > 4e598f4 upgrade to latest dependencies (# 981)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-23 04:55:00 +00:00
Matej Vašek 7276955847
fix: pipeline run yaml format for newer PaC (#2317)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-22 19:03:10 +00:00
Matej Vašek feb06f52b0
Fix PaC build (#2314)
* fix: default NS for PaC

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fix: make error non-fatal

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fix: pass correct image to PaC

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: enable gitlab test

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-22 15:19:36 +00:00
Knative Automation 33073d6061
upgrade to latest dependencies (#2311)
bumping google.golang.org/api 6feeaaf...4b79cc4:
  > 4b79cc4 chore(main): release 0.181.0 (# 2582)
  > c3f4828 feat(all): auto-regenerate discovery clients (# 2589)
  > 7d13175 chore: update min version to 1.20 (# 2588)
  > 86c9521 feat(all): auto-regenerate discovery clients (# 2587)
  > afc4685 feat(all): auto-regenerate discovery clients (# 2586)
  > 4177d21 chore(all): update all (# 2584)
  > e35f76f feat(all): auto-regenerate discovery clients (# 2585)
  > 7b18e5d feat(all): auto-regenerate discovery clients (# 2583)
  > 6923ec8 feat(all): auto-regenerate discovery clients (# 2581)
bumping knative.dev/serving 0c301bb...3aa9210:
  > 3aa9210 Update net-kourier nightly (# 15219)
  > 0d0d1e0 Update net-gateway-api nightly (# 15218)
  > c9b17b2 Update net-istio nightly (# 15220)
  > 639f7aa Update net-istio nightly (# 15213)
  > 3b35f54 change private K8s service to be a headless service (# 15170)
  > f2c7238 Update actions (# 15215)
  > 985cf2b Update net-gateway-api nightly (# 15214)
  > 38e22f9 Update net-kourier nightly (# 15212)
  > 11792fc Update net-kourier nightly (# 15206)
bumping knative.dev/pkg 11a3d46...99e1685:
  > 99e1685 Bump google.golang.org/api from 0.180.0 to 0.181.0 (# 3041)
  > b5507d9 Bump google.golang.org/grpc from 1.63.2 to 1.64.0 (# 3040)
  > a6bf0be Bump cloud.google.com/go/storage from 1.40.0 to 1.41.0 (# 3039)
  > 4a9c38d Update actions (# 3037)
bumping google.golang.org/genproto/googleapis/rpc 8cf5692...0867130:
  > 0867130 chore(all): auto-regenerate .pb.go files (# 1125)
  > 024948a chore(all): update all (# 1126)
  > 6275950 chore(all): auto-regenerate .pb.go files (# 1124)
  > b8a5c65 chore(all): update all (# 1123)
bumping knative.dev/eventing 3ea1900...5355171:
  > 5355171 Fix trust bundle propagation (# 7924)
  > 15be248 CrossNamespace: Data Plane Changes for Broker Filter (# 7913)
  > 34f9e43 CrossNamespace: Control Plane Changes for Trigger (# 7889)
  > 308e6b6 SubjectAccessReviews resources correction (# 7925)
  > 9cdc7ba CrossNamespace: Update knsubscribe permissions (# 7926)
  > dbaaedc [main] Update actions (# 7923)
bumping google.golang.org/grpc d32e66c...fa274d7:
  > fa274d7 Change version to 1.64.0 (# 7218)
  > 6b413c8 xds: Surround two `Infof` calls that use `pretty.ToJSON` with `V(2)` checks (# 7216)
  > 2dbbcef resolver/dns: Add docstring to SetMinResolutionInterval (# 7217)
  > 070d9c7 codes: replace %q to %d in error string when invalid code is an integer (# 7188)
  > 5d24ee2 xds: store server config for LRS server in xdsresource.ClusterUpdate (# 7191)
  > c76f686 advancedTLS: Rename get root certs related pieces (# 7207)
  > f591e3b codec: remove option to suppress setting supported compressors in headers (# 7203)
  > b4f7947 github: remove dependabot (# 7208)
  > 0561c78 client: add user-friendly error message of LB policy update timed out (# 7206)
  > 9d9c1fb peer: remove change detector test (# 7204)
  > 9d9a96f peer and metadata: Implement the Stringer interface for Peer and Metadata (# 7137)
  > 911d549 advancedTLS: Combine `ClientOptions` and `ServerOptions` to just `Options` (# 7202)
  > 4879d51 advancedTLS: Swap to DenyUndetermined from AllowUndetermined in revocation settings (# 7179)
  > befc29d advancedTLS: Rename {Min/Max}Version to {Min/Max}TLSVersion (# 7173)
  > f2d6421 test/kokoro: simplify PSM Interop Kokoro buildscripts (# 7171)
  > 9199290 xds: Move bootstrap config to internal/xds (# 7182)
  > f167ad6 test: fix possible leaked goroutine in TestDetailedConnectionCloseErrorPropagatesToRpcError (# 7183)
  > bb9882e Add an optional implementation of streams using generics (# 7057)
  > a87e923 channelz: fix missing Target on SubChannel type (# 7189)
  > 273fe14 *: fix typos (# 7178)
  > c7c8aa8 xds/internal: Replace calls to `Debugf` with `V(2)` checks and `Infof` (# 7180)
  > 796c615 grpc: update clientStreamAttempt context with transport context (# 7096)
  > e4a6ce3 Add atollena to MAINTAINERS.md (# 7126)
  > b433b94 advancedtls: Rename RevocationConfig (# 7151)
  > 5ab1c1a advancedtls: Add notes about required vs. optional for FileWatcherOptions (# 7165)
  > 1e8b9b7 stats/opentelemetry: Add OpenTelemetry instrumentation component (# 7166)
  > dd953fd examples: fix the quickstart link in the routeguide example (# 7162)
  > 750e1de examples: improve grammar in the interceptor example (# 7163)
  > 4e8f9d4 advancedtls: fix docstring for VerificationResults (# 7168)
  > 5a24fc1 xds/internal/xdsclient/xdsresource: Preallocate VirtualHost slice correctly (# 7157)
  > cb9c22d vet: run staticcheck for all sub modules (# 7155)
  > d75b5e2 advancedtls: Rename custom verification function APIs (# 7140)
  > 34de5cf stats/opencensus: Handle PickerUpdated to avoid "Received unexpected stats" error (# 7153)
  > 34c7675 chore: fix function names in comment (# 7117)
  > 5fe2e74 advancedtls: Rename VType (# 7149)
  > 09e6fdd Update docs and examples and tests to use NewClient instead of Dial (# 7068)
  > 9cf408e *: fix regenerate.sh (# 7139)
  > 5e0fa76 transport: make nextID accessed inside t.mu only (# 7148)
  > 54e0a13 transport: misc cleanups (# 7147)
  > 81d3f06 xds/internal/xdsclient/xdslbregistry: remove unused call to type url (# 7130)
  > f268126 Send GOAWAY to server on Client Transport Shutdown (# 7015)
  > 431436d examples: Add custom load balancer example (# 6691)
  > fc8da03 advancedtls: unexport parts of API not meant to be public (# 7118)
  > 006e2ba client: Drop two calls to `pretty.ToJSON` and move code outside of lock (# 7132)
  > a2f8e61 cmd/protoc-gen-go-grpc: reuse route_guide_grpc.pb.go as golden file (# 7134)
  > 0c6d80c chore: fix lint (# 7133)
  > b37cd81 xds: Process telemetry labels from CDS in xDS Balancers (# 7116)
  > a4afd4d deps: remove dependency of github.com/golang/protobuf from main module (# 7122)
  > afaa301 pb.go: regenerate (# 7123)
  > 664e852 stats: mark InPayload.Data and OutPayload.Data for deletion (experimental) (# 7121)
  > adf976b xds: remove -v when running xds e2e tests (# 7120)
  > 308dbc4 xds/internal/xdsclient: Process string metadata in CDS for com.google.csm.telemetry_labels (# 7085)
  > 554f107 Makefile: perfect PHONY (# 7076)
  > 0baa668 test/kokoro: Migrate PSM Interop to Artifact Registry (# 7102)
  > ec257b4 channelz: pass parent pointer instead of parent ID to RegisterSubChannel (# 7101)
  > 6fbcd8a cmd/protoc-gen-go-grpc: add change detector test (# 7072)
  > eb4e411 vet: split vet-proto from vet.sh (# 7099)
  > 28cccf3 pb.go: regenerate (# 7098)
  > 879414f deps: move from github.com/golang/protobuf to google.golang.org/protobuf/proto (# 7059)
  > 8444ae0 resolver/dns: Add SetMinResolutionInterval Option (# 6962)
  > 59be823 grpc: Deprecate WithBlock, WithReturnConnectionError, FailOnNonTempDialError (# 7097)
  > c31cec3 Fix: error message using correct keepalive config value (# 7038)
  > f1cf6bf *: update http2 dependency (# 7081)
  > b7346ae channelz: fix race accessing channelMap without lock (# 7079)
  > 4ec8307 cmd/protoc-gen-go-grpc: replace usages of deprecated API (# 7071)
  > feb968b build(deps): bump the github-actions group with 2 updates (# 7069)
  > 17d1039 grpc: Export header list sizes in DialOption and ServerOption (# 7033)
  > ba1bf9e deps: update dependencies for all modules (# 7061)
  > 57e4391 googlec2p: use the bootstrap parsing code to generate parsed bootstrap config instead of handcrafting it (# 7040)
  > fc3f327 channelz: refactor to move proto API to a separate package (# 7065)
  > b78c0eb examples: Update features/encryption/README.md file (# 7045)
  > c003fdf channelz: add LocalAddr to listen sockets and test (# 7062)
  > a975978 cmd/protoc-gen-go-grpc: don't emit const blocks for services with no methods (# 7055)
  > eb5828b protoc: Change protoc to include generated call option (# 6960)
  > cce1632 Change version to 1.64.0-dev (# 7052)
bumping google.golang.org/genproto/googleapis/api 8c6c420...b8a5c65:
  > b8a5c65 chore(all): update all (# 1123)
  > 8cf5692 chore(all): update all (# 1122)
bumping knative.dev/client-pkg dfb0087...2d1c4c8:
  > 2d1c4c8 Update actions (# 184)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-21 16:44:57 +00:00
Luke Kingland b0418f95bb
feat: s2i Go support (#2203) 2024-05-21 13:12:55 +00:00
Luke Kingland e6fa020f78
fix: test and namespace isolation (#2187)
* fix: namespace logic cleanup and test isolation

- Pulls logic for defaulting to active namespace (K8S) moved UP to CLI during
  flag default calculation.
- Pushes logic of deciding between f.Namespace vs f.Deploy.Namespace down into
  implementations.
- Updates some tests which needed to have their environment cleared.
- Refactors Pipelines tests to use client API.
- Removes namespaces as a state variable all structures, instead passing as
  an argument.
- Moves FromTempDirectory to testing package for use outside cmd.

* fix spelling errors

* fix: pipelines remover always returned (empty) error

* update tekton namespace handling

* fix: remove deprecated GitLab config: max_concurrency
2024-05-17 08:25:46 +00:00
Knative Automation e35f75b5c0
Update actions (#2310)
Signed-off-by: Knative Automation <automation@knative.team>
2024-05-16 13:41:36 +00:00
github-actions[bot] 9d766ee8b2
chore: update Quarkus platform version to 3.10.1 (#2309)
Co-authored-by: Knative Automation <automation@knative.team>
2024-05-16 06:36:52 +00:00
Knative Automation 47a9f37fb9
upgrade to latest dependencies (#2308)
bumping knative.dev/pkg b1fd04d...11a3d46:
  > 11a3d46 Add composite ConfigStore to combine multiple ConfigStore (# 3027)
bumping knative.dev/serving 5624a46...0c301bb:
  > 0c301bb upgrade to latest dependencies (# 15209)
  > 36d41ca Update net-gateway-api nightly (# 15205)
bumping knative.dev/networking 25012a4...b31855c:
  > b31855c upgrade to latest dependencies (# 980)
bumping knative.dev/eventing 884f0da...3ea1900:
  > 3ea1900 [main] Upgrade to latest dependencies (# 7922)
  > 3189fc2 Add attribute filter transform function (# 7909)
  > 3541408 Make transport-encryption a Beta feature (# 7915)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-16 06:16:40 +00:00
Matej Vašek 0967035e3e
chore: upload coverage of unittests together (#2301)
* chore: upload coverage of unittests together

Before this each run for respective OS carried out upload to codecov
server however this consumes codecov tokenless upload limit.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: decrease artifact retention period

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: added the checkout action

I would not expect that this would be needed for codecov upload.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-15 11:16:42 +00:00
Knative Automation 17c15023f9
upgrade to latest dependencies (#2307)
bumping knative.dev/serving 40088e3...5624a46:
  > 5624a46 Update net-istio nightly (# 15207)
bumping knative.dev/eventing 4358574...884f0da:
  > 884f0da Adding uname name mapping for x86_64 in hack/install.sh (# 7917)
  > 6b6f6d1 Sequence and Parallel: announce correct OIDC identities in authstatus (# 7902)
  > 58d7920 Fix IMC metrics for transport encryption (# 7904)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-15 06:15:25 +00:00
github-actions[bot] 98af389ce3
chore: update Springboot platform version to 3.2.5 (#2302)
Co-authored-by: Knative Automation <automation@knative.team>
2024-05-15 06:03:03 +00:00
Knative Automation 98e9d45a70
upgrade to latest dependencies (#2305)
bumping knative.dev/eventing 1572967...4358574:
  > 4358574 CrossNamespace: Testing Code Style (# 7918)
  > 4951b74 [main] Upgrade to latest dependencies (# 7920)
bumping knative.dev/networking 8167799...25012a4:
  > 25012a4 upgrade to latest dependencies (# 979)
bumping knative.dev/serving 3789ff9...40088e3:
  > 40088e3 upgrade to latest dependencies (# 15201)
  > ac5e504 Add e2e test for Contour when CORS policy is enabled (# 15188)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-14 06:23:18 +00:00
Knative Automation e0354f4dd6
upgrade to latest dependencies (#2292)
bumping golang.org/x/crypto d042a39...905d78a:
  > 905d78a go.mod: update golang.org/x dependencies
  > ebb717d ssh: validate key type in SSH_MSG_USERAUTH_PK_OK response
  > 0da2a6a openpgp: fix function name in comment
  > 5defcc1 sha3: fix Sum results for SHAKE functions on s390x
bumping knative.dev/pkg f69d19c...b1fd04d:
  > b1fd04d Bump golang.org/x/net from 0.24.0 to 0.25.0 (# 3036)
  > 89b1857 Bump golang.org/x/tools from 0.20.0 to 0.21.0 (# 3035)
  > 7a27552 Bump google.golang.org/api from 0.177.0 to 0.180.0 (# 3034)
  > 3b2e71c Bump github.com/prometheus/client_golang from 1.19.0 to 1.19.1 (# 3033)
  > 360b72e Update AuthStatus to have list of ServiceAccountNames (# 3032)
  > 1d1616a Update community files (# 3031)
bumping golang.org/x/tools 11c692e...cc29c91:
  > cc29c91 go.mod: update golang.org/x dependencies
  > 397fef9 gopls/internal/protocol: add links to LSP spec
  > e2a352c internal/refactor/inline: extensible API
  > c16c816 go/analysis/passes/stdversion: test *.go < go.mod version
  > 629a7be go/analysis/analysistest: stricter errors and GOWORK setting
  > 4db1697 go/packages/packagestest: fold modules_111.go into modules.go
  > ccdef3c gopls/internal/golang: fix nil panic in InlayHint
  > 74c9cfe go/analysis: add Pass.ReadFile
  > 5ef4fc9 gopls/internal/golang/completion: fix the isEmptyInterface predicate
  > 77f691b internal/gcimporter: use Alias.Rhs, not unsafe hack
  > 0b45163 gopls/internal/cache: use language versions when validating Go version
  > 3c49bb7 gopls: normalize logging attributes
  > 2fa621c gopls/internal/golang: fix resolution of in-package implementations
  > bcec099 internal/refactor/inline: remove eta abstraction inlining assignments
  > fcea13b toolstash: errors output should match errors guarded
  > b00d49e internal/refactor/inline: don't assume strings.Index calls internal/bytealg
  > 1523441 gopls/internal/cache: add more assertions for golang/go# 60890
  > 440f3c3 internal/aliases: expose Enabled
  > a363d11 go/types/typeutil: replace interface{} with any (cleanup)
  > e8c9d81 go/analysis/passes/tests: Use ReportRangef to refactor some code in checkTest
  > 97ea816 all: fix some typos in comments
  > 8db95b7 gopls/internal/golang: check the comment range before emiting semantic tokens
  > daf9460 Revert "gopls/internal/test/integration/misc: reenable staticcheck test"
  > 618670d gopls/internal/test/integration/misc: reenable staticcheck test
  > 2debfbe internal/testfiles: add a helper package for test files
  > c17402c gopls: fix a couple places where temporary files are not removed
  > ee61fb0 go/packages: fix issue number typo in TestIssue37629
  > 3735585 gopls/internal/settings: deprecate "allowImplicitNetworkAccess"
  > f4888c5 gopls/internal/settings: remove support for "allowModfileModifications"
  > d857e85 gopls/internal/settings: enable semantic tokens by default
  > 3f74dc5 gopls/internal/settings: remove experiments
  > e716599 cmd/goimports: support workspace vendoring
  > 7c7d7db gopls/internal/golang: allow "query" CodeActions on generated files
  > cb134f5 gopls/internal/golang: RenderPkgDoc: elide parameters 4+ in index
  > c5094cc internal/imports: a step towards making tests hermetic
  > 5e04895 gopls/internal/settings: update stale documentation for "symbolScope"
  > 0c3722a doc: enforce gotypesalias=0 behavior until go1.23
  > dd0410f go/packages: stop loading packages when context is done
  > dcccb2d x/tools: make tests agnostic as to whether gotypesalias="" => 0 or 1
  > 46a0401 gopls: eliminate the hooks package
  > e388fff gopls/internal/server: don't reset views if configuration did not change
  > d034ae1 gopls/internal/cmd: check: print RelatedInformation
  > 3c000ca gopls/doc: relnote for hover & definition over doc links
  > c859ee9 gopls/internal/test/marker: fix {hover/def}/comment tests
  > 9cef8b1 go/callgraph/cha: more precise resolution of unexported methods
  > 0cc2ffd gopls/internal/cache: fail loudly on command-line-arguments modules
  > c3c5164 gopls/internal/golang: support hover and definition operations over doc links
  > da3408b go/analysis/passes/printf: elaborate the documentation
  > 198a0a8 imports: prefer math/rand/v2 over math/rand
  > 79df971 gopls/internal/server: avoid duplicate diagnoses and loads
  > bcd607e gopls/internal/cache: don't log packages when selectively reloading
  > 6f92c83 gopls: reduce noisy error messages
  > c4c0bf9 gopls/internal/test: skip integration tests on linux-ppc64-power9osu
  > b4b8186 internal/apidiff: support materialized aliases
  > 3520955 go/types/typeutil: implement correct hashing of aliases
  > f6298eb gopls/internal/cache: add debug assertions to refine golang/go# 66732
  > f41d27e gopls/internal/cache: avoid panic when the primary diagnostic is broken
  > c0ab013 go/packages: doc: type symbols are consistent only within one Load
  > 564c0e9 gopls/internal/telemetry/cmd/stacks: improve summary
  > de6db98 internal/check: filter out too-new Go versions for type checking
  > 5c3c2ff gopls/internal/golang: RenderPkgDoc: fix anchors for promoted methods
  > 8a0c6e2 gopls/internal/server: report HTTP panics via telemetry
  > c7b6b8d gopls/internal/cache: analysis: repair start/end and refine bug report
  > cb3eb43 internal/test/integration: parse flags earlier
  > 4794229 gopls/internal/golang: RenderPkgDoc: add <title> element
  > 2db5a34 gopls/internal/golang: RenderPkgDoc: navigational <select>
bumping google.golang.org/protobuf 242df22...4a76e11:
  > 4a76e11 all: release v1.34.1
  > 9d9d8d3 encoding/proto[json|text]: accept lower case names for group-like fields
  > 6c3ebca all: update to protobuf 27.0-rc1 and regenerate protos
  > 2939520 all: start v1.34.0-devel
bumping golang.org/x/net 7bbe320...d27919b:
  > d27919b go.mod: update golang.org/x dependencies
  > e0324fc http2: use net.ErrClosed
  > b20cd59 quic: initiate key rotation earlier in connections
  > f95a3b3 html: fix typo in package doc
  > 0a24555 http/httpguts: speed up ValidHeaderFieldName
  > ec05fdc http2: don't retry the first request on a connection on GOAWAY error
  > b67a0f0 http2: send correct LastStreamID in stream-caused GOAWAY
  > a130fcc quic: don't consider goroutines running when tests start as leaked
bumping knative.dev/serving e3fa8d1...3789ff9:
  > 3789ff9 Update net-contour nightly (# 15196)
  > b3715ac Update net-istio nightly (# 15198)
  > b9777a1 Update net-kourier nightly (# 15199)
  > 2d64d1f Update net-gateway-api nightly (# 15197)
  > 9214bda Update net-kourier nightly (# 15194)
  > 8909878 Update net-contour nightly (# 15184)
  > df11e49 upgrade to latest dependencies (# 15195)
  > 3bf9123 Update net-gateway-api nightly (# 15192)
  > 483cb05 Update net-istio nightly (# 15193)
  > 9046081 Tests for multi-container readiness and liveness probes (# 15180)
  > 3944e73 upgrade to latest dependencies (# 15187)
  > c833b8a Update net-kourier nightly (# 15186)
  > 5d95f7d Update community files (# 15189)
bumping knative.dev/hack abdcdea...68e3bfb:
  > 68e3bfb Update community files (# 382)
bumping knative.dev/networking 6886f78...8167799:
  > 8167799 upgrade to latest dependencies (# 977)
  > a282917 Update community files (# 978)
  > d2ba339 upgrade to latest dependencies (# 976)
bumping github.com/prometheus/client_golang 77d4003...6e3f4b1:
  > 6e3f4b1 Cut 1.19.1 (# 1494)
  > cad1bfa Merge pull request # 1454 from prometheus/small-nits
  > 0aa8c9f Rephrase incompatibility with common v0.48.0
bumping google.golang.org/genproto/googleapis/api 6e1732d...8c6c420:
  > 8c6c420 chore(all): update all to 7cd4c1c (# 1111)
  > 79826c8 chore(all): auto-regenerate .pb.go files (# 1112)
  > 7cd4c1c chore(all): auto-regenerate .pb.go files (# 1110)
  > 26222e5 chore(all): update all (# 1109)
  > 6f501c4 chore(all): auto-regenerate .pb.go files (# 1107)
  > c3f9821 chore(all): update all (# 1108)
  > 454cdb8 chore(all): auto-regenerate .pb.go files (# 1106)
  > beb30f4 chore(all): auto-regenerate .pb.go files (# 1101)
  > 64ea030 chore(all): update all (# 1105)
  > 94a12d6 chore(all): update all (# 1102)
bumping google.golang.org/api a11ef60...6feeaaf:
  > 6feeaaf chore(main): release 0.180.0 (# 2579)
  > e92e3ed chore: regen libraries (# 2580)
  > 6604a5d feat(all): auto-regenerate discovery clients (# 2578)
  > 9fdd500 chore(main): release 0.179.0 (# 2574)
  > 090ff6c fix: bump auth to v0.4.1 (# 2577)
  > a784ae0 feat(all): auto-regenerate discovery clients (# 2575)
  > 887c564 feat(all): auto-regenerate discovery clients (# 2573)
  > 64ed0f8 chore(main): release 0.178.0 (# 2562)
  > 0c976dc feat(all): auto-regenerate discovery clients (# 2571)
  > 8c74bb8 feat(gen): Add internaloption.EnableNewAuthLibrary (# 2519)
  > b5ae946 chore(all): update all (# 2569)
  > f2da582 feat(all): auto-regenerate discovery clients (# 2570)
  > d922e3b feat(all): auto-regenerate discovery clients (# 2568)
  > 76b27f1 feat(all): auto-regenerate discovery clients (# 2567)
  > 5e44215 docs: update commit style in CONTRIBUTING (# 2566)
  > 0843d21 feat(all): auto-regenerate discovery clients (# 2565)
  > fe54ffd feat(google-api-go-client): add x-goog-api-version header (# 2563)
  > b313e4b feat(all): auto-regenerate discovery clients (# 2564)
  > 2d22d11 feat(all): auto-regenerate discovery clients (# 2561)
bumping knative.dev/eventing 07ebf11...1572967:
  > 1572967 Map subscription to graph edges (# 7880)
  > 72585c9 CrossNamespace: Control Plane Changes for Subscription (# 7882)
  > 599c548 Assert EventTypes references for IMC test (# 7899)
  > 1cc8179 Remove SelfSigned issuer from released `transport-encryption` artifacts (# 7905)
  > 4f32823 Refactor NewFiltersFeatureSet to prevent starvation (# 7911)
  > fa46a45 feat: added fake client reactor for subject access reviews (# 7908)
  > 1ce7074 Fix trust bundle propagation already exists error (# 7906)
  > e9b3af6 Update e2e tests for OIDC sender identity matching to be a bit more resilient (# 7903)
  > 1e6e235 fix: trigger tests set annotations correctly now (# 7887)
  > 159d6fc [main] Upgrade to latest dependencies (# 7901)
  > c7401a1 Add e2e test to verify used sender identity is correct (# 7900)
  > 96e5c18 [main] Update community files (# 7897)
  > c3a1c19 EventType tests verify the type under spec.reference  (# 7888)
  > c104df5 [main] Upgrade to latest dependencies (# 7894)
bumping golang.org/x/term 5b15d26...46c790f:
  > 46c790f go.mod: update golang.org/x dependencies
bumping knative.dev/client-pkg 27d5cd9...dfb0087:
  > dfb0087 Update community files (# 183)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-13 15:12:46 +00:00
Matej Vašek 46f6f08feb
fix: pin octokit npm module version to 3 (#2295)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-13 13:42:51 +00:00
Matej Vašek 276f881e53
chore: update GH actions (#2298)
* chore: update checkout action

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: update actions/upload-artifact

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: update java setup action

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fix: set codecov token

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-13 12:27:46 +00:00
Matej Vašek 1a17594eb4
fix: call appropriate script in CI GH action (#2297)
* fix: call appropriate script in CI GH action

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fix: install python for GH actions

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: update setup-java in GH action

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: update upstream-artifacts version

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-13 10:00:37 +00:00
Matej Vašek 6dc929c554
chore: update paketo dep (#2296)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-13 06:20:57 +00:00
Matej Vašek 6649579eb1
Remove axios dependency (#2294)
* fix: downgrade Java version for Spring Boot

The newer version of Spring Boot does not work with Java 21

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: replace axios with fetch()

* Removed dependency on axios by using standard node fetch() function.
* Fixed getLatestPlatform(): using the 'tag_name' property instead of the 'name' property.

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* Revert "fix: downgrade Java version for Spring Boot"

This reverts commit fcfe65a0ad.

* empyt: just trigger CI

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: update setup-java action

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fix: add missing description property

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fix: set distroless for setup-java action

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-05-11 01:32:30 +00:00
Knative Automation 527ef6cce6
Update community files (#2291)
Signed-off-by: Knative Automation <automation@knative.team>
2024-05-07 02:02:25 +00:00
Knative Automation 3e7c406f5b
upgrade to latest dependencies (#2290)
bumping google.golang.org/api 64f40ff...a11ef60:
  > a11ef60 chore(main): release 0.177.0 (# 2545)
  > e6e5ac5 chore(all): update all (# 2552)
  > 3eb92f1 fix: temp patch cloud.google.com/go ambiguity (# 2560)
  > 1b6db6c fix: split large compute file up (# 2546)
  > fb153c0 feat(all): auto-regenerate discovery clients (# 2556)
  > a5d7734 chore(deps): disable otel updates until Go 1.21 (# 2554)
  > 2f46e14 feat(all): auto-regenerate discovery clients (# 2553)
  > 4418f5f feat(all): auto-regenerate discovery clients (# 2551)
  > f9bf96d feat(all): auto-regenerate discovery clients (# 2550)
  > 32a5d10 feat(all): auto-regenerate discovery clients (# 2548)
  > 2f2505b feat: reduce code size by 29% (# 2544)
bumping knative.dev/eventing 0e165f2...07ebf11:
  > 07ebf11 [main] Upgrade to latest dependencies (# 7891)
bumping google.golang.org/genproto/googleapis/rpc 8c6c420...8cf5692:
  > 8cf5692 chore(all): update all (# 1122)
bumping knative.dev/serving 4fe3de5...e3fa8d1:
  > e3fa8d1 Update net-istio nightly (# 15185)
  > 9f695f3 Update net-gateway-api nightly (# 15183)
  > 2ef687c upgrade to latest dependencies (# 15182)
bumping google.golang.org/protobuf ec47fd1...242df22:
  > 242df22 all: release v1.34.0
  > c2b76ee all: fix deprecated
  > e4ad8f9 types/gofeaturespb: move go_feature.proto to be consistent with out languages
  > c2a26e7 encoding/{protojson,prototext}: strengthen wording on stability
  > d0f77ae proto: ensure MarshalOptions are plumbed to all Size calls
  > 94bb78c proto: return an error instead of producing invalid wire format
  > 671c2db [proto] use the correct parent when resolving features for extensions
  > 98873a2 internal/impl: pass ExtensionTypeDescriptor to extensionMap
  > 39bbf13 proto: CSE ProtoReflect() and TypeDescriptor() in proto.HasExtension
  > b30b634 protobuf: fix required/group bug in descriptor proto output of editions files
  > bab4b5d protobuf: support gaps in edition defaults calculation
  > a18684d protobuf: fix delimited fields under editions in go
  > 8a74430 internal/cmd/generate-types: manual CSE of m.messageInfo()
  > 55891d7 proto: add examples for Size, MarshalAppend (regarding allocations)
  > 87fded5 internal/impl: ensure proto.HasExtension does not allocate
  > 3797f00 protogen: update Options documentation. protogen.Run doesn't exist.
  > 4fd828f proto: extend Unmarshal documentation, include an example
  > c69658e proto: extend Marshal documentation, include an example
  > 3ebf7dd proto: fix HasPresence for extensions and missing plugin response
  > dea00b5 all: enable editions support
  > 59034d8 reflect/protodesc: restore edition in protodesc.ToDescriptorProto
  > 3039476 all: implement proto2/proto3 as editions [2/2]
  > 7259b46 all: implement proto2/proto3 as editions [1/2]
  > f563685 all: use subtests to identify the message type
  > e216807 all: start v1.33.0-devel
bumping golang.org/x/oauth2 d0e617c...84cb9f7:
  > 84cb9f7 oauth2: fix typo in comment
  > 4b7f0bd go.mod: update cloud.google.com/go/compute/metadata dependency
  > e11eea8 microsoft: added DeviceAuthURL to AzureADEndpoint
bumping knative.dev/pkg b69fa27...f69d19c:
  > f69d19c Bump golang.org/x/oauth2 from 0.19.0 to 0.20.0 (# 3029)
  > 13af413 Bump google.golang.org/api from 0.176.1 to 0.177.0 (# 3028)
bumping knative.dev/networking 979f637...6886f78:
  > 6886f78 Update community files (# 975)
  > 9188dac Remove requestDelay flag for tests (# 972)
  > 24ed062 Update test dialer to use ip when available (# 970)
  > 5f9768c Update community files (# 969)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-06 15:45:24 +00:00
David Simansky f594551317
fix: Fix Test_deployerNamespace with empty kubeconfig (#2286) 2024-05-06 06:54:25 +00:00
Knative Automation f739aa66c1
upgrade to latest dependencies (#2288)
bumping github.com/prometheus/common 0234594...e54e4df:
  > e54e4df Merge pull request # 620 from bboreham/test-string
  > e25b951 Merge pull request # 619 from bboreham/restore-sort
  > a1ca958 LabelSet: add unit test for String method
  > c1b9b72 Fix up config test (# 621)
  > be294f1 LabelSet.String: restore faster sort call
  > de5ed88 Merge pull request # 487 from GiedriusS/allow_exposing_real_value
  > ea817bb Merge pull request # 618 from grobinson-grafana/grobinson/add-status-at
  > 5ad26bf config: allow exposing real secret value through marshal
  > 506a12c Fix comment
  > fb6970a Add StatusAt method for Alert struct
bumping knative.dev/hack 1133b37...abdcdea:
  > abdcdea Update community files (# 380)
  > 9f6c92e Update community files (# 379)

Signed-off-by: Knative Automation <automation@knative.team>
2024-05-06 06:38:54 +00:00
github-actions[bot] eebea9fcb0
chore: update Quarkus platform version to 3.10.0 (#2283)
Co-authored-by: Knative Automation <automation@knative.team>
2024-05-02 11:32:58 +00:00
David Simansky e3db53309f
fix: Disable flaky unit test Test_deployerNamespace (#2285) 2024-05-02 10:10:55 +00:00
Knative Automation 59940185af
Update community files (#2281)
Signed-off-by: Knative Automation <automation@knative.team>
2024-05-01 02:00:43 +00:00
Knative Automation 4787d9c8de
upgrade to latest dependencies (#2279)
bumping knative.dev/client-pkg f983484...2bc8139:
  > 2bc8139 upgrade to latest dependencies (# 180)
bumping knative.dev/networking a40d058...979f637:
  > 979f637 [release-1.14] Update test dialer to use ip when available (# 971)
bumping knative.dev/eventing 4139fdf...e23ebab:
  > e23ebab Reconcile trigger on OIDC service account changes only, if SA references a trigger for correct broker class (# 7849)
  > ea14296 fix: remove duplicate configMaps (# 7847)
  > 4ba426c [main] Upgrade to latest dependencies (# 7850)
bumping knative.dev/serving e8d8610...afc8a59:
  > afc8a59 Update net-gateway-api nightly (# 15159)
  > f328f96 Update net-gateway-api nightly (# 15158)
  > 0a999c4 Update net-certmanager nightly (# 15157)
  > 7b6fc7b re-enable contour gateway tests (# 15150)
  > f65df07 feat: bubble up kcert status message when it's failed (# 14962)
  > e4d8139 cleanup service after tests completes (# 15147)
  > 076cd07 upgrade to latest dependencies (# 15155)
  > 5128114 Update net-contour nightly (# 15152)
  > 5943c7a Update net-istio nightly (# 15151)

Signed-off-by: Knative Automation <automation@knative.team>
2024-04-30 15:34:28 +00:00
Matej Vašek 7c87e0c4b8
chore: update node to v20 (#2217)
* chore: update node to v20

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: temporarily ingore deletion errors for Node

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-04-30 14:53:54 +00:00
github-actions[bot] d72233b458
chore: update Quarkus platform version to 3.9.5 (#2282)
Co-authored-by: Knative Automation <automation@knative.team>
2024-04-29 05:49:54 +00:00
Knative Automation 9e489e4e28
upgrade to latest dependencies (#2273)
bumping knative.dev/eventing f9d8dea...4139fdf:
  > 4139fdf [main] Update community files (# 7845)
  > 6585a2b [main] Upgrade to latest dependencies (# 7843)
bumping knative.dev/client-pkg a82272d...f983484:
  > f983484 Remove license dir (# 178)
  > 08c9dcb Update community files (# 179)
  > 6ae69d2 upgrade to latest dependencies (# 176)
bumping knative.dev/serving a8e4fea...e8d8610:
  > e8d8610 Update net-kourier nightly (# 15153)
  > 531e7d8 [Automated] Update net-gateway-api nightly (# 15136)
  > 023022a Disable logstream so the Github Action Log Viewer works (# 15146)
  > 8c91dcf Update net-contour nightly (# 15144)
  > 40ec5af bump istio,contour,cert-manager (# 15141)
  > c21fb03 Update net-istio nightly (# 15143)
  > 7a01ca9 Update net-certmanager nightly (# 15142)
  > 96fe770 Update net-istio nightly (# 15139)
  > e64a7e6 Update net-kourier nightly (# 15140)
  > 2d57e34 Update net-contour nightly (# 15138)
  > e3b616b Update net-certmanager nightly (# 15137)
  > 2c23d5a upgrade to latest dependencies (# 15130)
  > 0196ecc Update community files (# 15135)
  > e4cef66 Update net-gateway-api nightly (# 15132)
  > c120704 Update net-certmanager nightly (# 15127)
bumping knative.dev/pkg 2a68697...0f34a88:
  > 0f34a88 upgrade to latest dependencies (# 3018)
bumping knative.dev/networking aaf8f94...a40d058:
  > a40d058 upgrade to latest dependencies (# 968)
  > 594a2f8 identify each request in update test using a query timestamp (# 967)
  > 1d9a7cf upgrade to latest dependencies (# 966)

Signed-off-by: Knative Automation <automation@knative.team>
2024-04-23 11:27:56 +00:00
Matej Vašek 1aed6e04d3
chore: make tkn taks urls setable via linker flags (#2277)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-04-23 11:15:02 +00:00
github-actions[bot] acae72d7fd
chore: update Quarkus platform version to 3.9.4 (#2276)
Co-authored-by: Knative Automation <automation@knative.team>
2024-04-22 22:52:41 +00:00
Knative Automation 323176e3af
Update community files (#2274)
Signed-off-by: Knative Automation <automation@knative.team>
2024-04-18 02:03:31 +00:00
Knative Automation d77c3bebac
upgrade to latest dependencies (#2271)
bumping google.golang.org/grpc c68f456...d32e66c:
  > d32e66c Change version to 1.63.2 (# 7104)
  > 92f6dd0 channelz: pass parent pointer instead of parent ID to RegisterSubChannel (# 7101)
  > 0f6ef0f grpc: un-deprecate Dial and DialContext
  > 58dc749 Change version to 1.63.1-dev (# 7051)
bumping knative.dev/pkg 39d72da...2a68697:
  > 2a68697 Bump google.golang.org/grpc from 1.63.0 to 1.63.2 (# 3017)
  > 2cca32d Revert "drop eventing-rabbitmq downstream testing (# 2969)" (# 3008)
bumping knative.dev/serving 6d6527a...a8e4fea:
  > a8e4fea Update net-gateway-api nightly (# 15126)
  > 11b0900 Update net-contour nightly (# 15125)
  > 2160a47 Update net-kourier nightly (# 15123)
  > 7d3031f Update net-istio nightly (# 15124)

Signed-off-by: Knative Automation <automation@knative.team>
2024-04-16 15:27:49 +00:00
Knative Automation 409cbae9ab
upgrade to latest dependencies (#2266)
bumping golang.org/x/oauth2 85231f9...d0e617c:
  > d0e617c google: add Credentials.UniverseDomainProvider
  > 3c9c1f6 oauth2/google: fix the logic of sts 0 value of expires_in
  > 5a05c65 oauth2/google: fix remove content-type header from idms get requests
  > 3a6776a appengine: drop obsolete code for AppEngine envs <=Go 1.11
bumping golang.org/x/term c5eaf76...5b15d26:
  > 5b15d26 go.mod: update golang.org/x dependencies
bumping golang.org/x/sys 360f961...cabba82:
  > cabba82 windows: use uint32 for serial comm flags for consistency
  > 1a50d97 windows: add serial comm functions
  > 95f07ec x/sys/windows: add func windows.DisconnectNamedPipe(handle Handle) (err error)
  > 4be02d3 unix: expose mmap calls on z/OS
bumping golang.org/x/sync 59c1ca1...14be23e:
  > 14be23e semaphore: cancel acquisition with a done context
bumping knative.dev/pkg 5d4af76...39d72da:
  > 39d72da Bump github.com/prometheus/common from 0.52.2 to 0.52.3 (# 3015)
  > e255c15 Bump golang.org/x/oauth2 from 0.18.0 to 0.19.0 (# 3016)
  > 7de1740 Bump golang.org/x/tools from 0.19.0 to 0.20.0 (# 3012)
  > bc62610 Bump google.golang.org/grpc from 1.62.1 to 1.63.0 (# 3013)
  > a49e72f Bump golang.org/x/net from 0.22.0 to 0.24.0 (# 3011)
  > 1ff9a77 Bump x/net to 0.24 (# 3014)
  > 094f152 Bump github.com/prometheus/common from 0.51.1 to 0.52.2 (# 3010)
  > f9d72b2 Bump golang.org/x/sync from 0.6.0 to 0.7.0 (# 3009)
bumping knative.dev/serving 51a2bd5...6d6527a:
  > 6d6527a upgrade to latest dependencies (# 15122)
  > 2802229 Update net-contour nightly (# 15119)
  > f15401e Update net-gateway-api nightly (# 15117)
  > 96faf8b Update net-kourier nightly (# 15118)
  > a7be35c Update net-istio nightly (# 15116)
  > 79c907b Update net-certmanager nightly (# 15115)
  > dc8bf98 Make route domain error specific (# 15082)
  > 614caa0 Update net-kourier nightly (# 15114)
  > cbe7904 Update net-gateway-api nightly (# 15113)
  > 9ed9f9e Update net-contour nightly (# 15112)
  > f8aa896 Update net-istio nightly (# 15111)
  > 8d8d503 Update net-certmanager nightly (# 15110)
  > 3c6d5fe upgrade to latest dependencies (# 15109)
  > c017185 Update net-istio nightly (# 15108)
  > f9a9480 chore: fix function names in comment (# 15105)
  > 46d1f05 add e2e kind testing with Gateway API and Contour (# 15093)
  > 2a790f8 Update net-contour nightly (# 15107)
  > a498f19 Update net-certmanager nightly (# 15106)
  > 6079207 upgrade to latest dependencies (# 15104)
  > c9bd9bc upgrade to latest dependencies (# 15102)
  > 2c9ae15 Update net-gateway-api nightly (# 15103)
  > 7e7bd93 Update net-istio nightly (# 15100)
bumping knative.dev/eventing ebb311d...f9d8dea:
  > f9d8dea [main] Upgrade to latest dependencies (# 7842)
  > d96c6db feat: add initial pathfinding algorithm (# 7782)
  > 1ed11b7 [e2e] fix ManyTriggers possible starvation of Setup features (# 7831)
  > cb538fc [main] Upgrade to latest dependencies (# 7835)
  > 0264d60 Remove sinkbindings OIDC token secret when not needed and fix status setting (# 7836)
  > 84115ea Map eventtypes into event lineage graph (# 7783)
  > c1611d5 Improve trust bundle propagation (# 7665)
  > 734c413 fix: install script picks up on platform architecture by default (# 7821)
bumping google.golang.org/grpc 9952aa8...c68f456:
  > c68f456 Change version to 1.63.0 (# 7050)
  > 6369167 *: update http2 dependency (# 7082)
  > 8854761 cherry-pick: channelz: fix race accessing channelMap without lock (# 7079) (# 7080)
  > e62770d channelz: add LocalAddr to listen sockets and test (# 7062) (# 7063)
  > 4ffccf1 googlec2p: use xdstp style template for client LDS resource name (# 7048)
  > faf9964 gracefulswitch: add ParseConfig and make UpdateClientConnState call SwitchTo if needed (# 7035)
  > 800a8e0 channelz: re-add state for subchannels (# 7046)
  > dadbbfa channelz: re-add target and state (# 7042)
  > 55cd7a6 channelz: major cleanup / reorganization (# 6969)
  > a1033b1 xds: add LRS named metrics support (# 7027)
  > 4f43d2e chore: remove repetitive words (# 7036)
  > 7c37770 grpc: clean up doc strings and some code around Dial vs NewClient (# 7029)
  > c808322 chore: expose `NewClient` method to end users (# 7010)
  > c31fce8 Update github.com/golang/protobuf and google.golang.org/protobuf modules (# 7028)
  > 55341d7 xdsclient: correct logic used to suppress empty ADS requests on new streams (# 7026)
  > f7c5e6a DNS resolving with timeout (# 6917)
  > 815e2e2 build(deps): bump the github-actions group with 1 update (# 7014)
  > 2a617ca experimental: re-split message/service pb imports (# 7011)
  > 99ded5c examples: update deps of observability example to gcp/observabliity@v1.0.1 (# 7009)
  > e978e43 gcp/observability: update stackdriver dependency to remove dep on prometheus (# 7008)
  > 27c5d98 deps: update dependencies for all modules (# 7007)
  > 90fc697 xdsclient: use dataplane authority for virtualhost lookup (# 6997)
  > c267d5b grpc: add clientconn.CanonicalTarget() to return the canonical target string (# 7006)
  > 51f9cc0 deps: move from github.com/golang/protobuf to google.golang.org/protobuf/proto (# 6961)
  > eb08be4 github: add Go 1.22 testing (# 7005)
  > eb880d5 replace github.com/cncf/udpa/go by github.com/cncf/xds/go (# 7001)
  > 5ccf176 rpc_util: Fix RecvBufferPool deactivation issues (# 6766)
  > 76a23bf fix enabling compression by trimming whitespaces in accept encoding header (# 6952)
  > 7525e98 test: add test for invalid streamID (# 6940)
  > c63d925 examples: fix typo in url (# 6978)
  > 40d6adb transport: Make error-handling for bad HTTP method consistent between HTTP/2 server transport and handler server transport (# 6989)
  > 3c2a44d transport: when using write buffer pooling, use input size instead of size*2 (# 6983)
  > 3ae77e6 grpc: Canonicalize string returned by ClientConn.Target() and resolver.Address.String() (# 6923)
  > 29997a0 grpc: Add StaticMethod CallOption (# 6926)
  > 28d78d4 *: forbid the use of time.After (# 6985)
  > 408139a security/advancedtls: CRL checks improvement (# 6968)
  > f94be9b Set the security level of Windows named pipes to NoSecurity (# 6956)
  > 05db80f server: wait to close connection until incoming socket is drained (with timeout) (# 6977)
  > f135e98  xds/internal/xdsclient: Add comments for exported types (# 6972)
  > f8eef63 Change version to 1.63.0-dev (# 6976)
bumping golang.org/x/mod 766dc5d...aa51b25:
  > aa51b25 modfile: do not collapse if there are unattached comments within blocks
  > 87140ec sumdb/tlog: make NewTiles only generate strictly necessary tiles
  > 18d3f56 modfile: fix crash on AddGoStmt in empty File
bumping knative.dev/networking 75762ca...aaf8f94:
  > aaf8f94 fix TestRetry nil pointer panic (# 965)
  > a3d8b0f Replace all usages of deprecated wait.PollImmediate with wait.PollUntilContextTimeout (# 957)
  > 1a6e0da some conformance tests assume we're getting back a runtime request (# 964)
  > 2a4859c this fixes the probe handler to reflect that it doesn't care about the path (# 963)
  > b321831 upgrade to latest dependencies (# 962)
  > 2002961 🎁  Add test flags for the conformance suite (# 960)
  > ca2ffb8 upgrade to latest dependencies (# 961)
  > 97688e7 Update community files (# 959)
  > 5ce3081 upgrade to latest dependencies (# 958)
bumping golang.org/x/net 7ee34a0...7bbe320:
  > 7bbe320 go.mod: update golang.org/x dependencies
  > c48da13 http2: fix TestServerContinuationFlood flakes
  > 762b58d http2: fix tipos in comment
  > ba87210 http2: close connections when receiving too many headers
  > ebc8168 all: fix some typos
  > 3678185 http2: make TestCanonicalHeaderCacheGrowth faster
  > 448c44f http2: remove clientTester
  > c7877ac http2: convert the remaining clientTester tests to testClientConn
  > d8870b0 http2: use synthetic time in TestIdleConnTimeout
  > d73acff http2: only set up deadline when Server.IdleTimeout is positive
  > 89f602b http2: validate client/outgoing trailers
  > 6e2c99c http2: allow testing Transports with testSyncHooks
  > 9e0498d http2: use synthetic timers for ping timeouts in tests
  > 31d9683 http2: mark several testing functions as helpers
  > 12ddef7 http2: reject DATA frames after 1xx and before final headers
  > d600ae0 http2: add testClientConn for testing client RoundTrips
  > 57a6a7a http2: prevent uninitialized pipe from being written
  > ea095bc http2: only set up positive deadlines
  > 8c07e20 httpproxy: allow any scheme
  > ab271c3 http2: add IdleConnTimeout to http2.Transport
bumping golang.org/x/tools 7656c4c...11c692e:
  > 11c692e gopls/internal/test/marker/testdata: skip hover size tests on 32-bit arm
  > fc660e5 go.mod: update golang.org/x dependencies
  > 6590f47 internal/gcimporter: renable tests of issue50259.go
  > f1d5252 gopls/internal/golang: Hover: show wasted % of struct space
  > 951bb40 gopls/internal/test/integration/misc: fix flaky test
  > c9b0c65 gopls/internal/analysis/fillreturns: skip test if gotypesalias=1
  > c623a28 gopls/internal/cache: fix crash in snapshot.Analyze with patch versions
  > f345449 gopls/internal/server: filter diagnostics to "best" views
  > 42d590c gopls/internal/test/integration: add a WriteGoSum run option
  > 53d35a5 gopls/internal/golang: RenderPackageDoc: fix doc links
  > 222cdde internal/analysisinternal: ZeroValue: support materialized aliases
  > 0a4fc72 internal/gcimporter: support materialized aliases
  > 85b6527 gopls/internal/test: temporarily disable staticcheck with gotypesalias=1
  > 118b98b gopls/internal/golang: RenderPackageDoc: emit anchors for var/const
  > 1e68fee gopls/internal/server: "view package doc" of package under test
  > b303e13 gopls/internal/golang: view pkg doc: display when "disconnected"
  > 41a9213 go/packages: report type errors unconditionally
  > 7204363 gopls/doc/release/v0.16.0.md: augment notes for "view pkg doc"
  > 904c6ba gopls/internal/settings: enable "unusedwrite" analyzer
  > 9663999 gopls/internal/golang: hover: show size/offset info
  > 509ed1c gopls/internal/golang: work around bug in go/doc
  > 9551398 go/callgraph: keep instantiations in DeleteSyntheticNodes
  > 11b4b5e go/analysis/passes/nilness: add longer example to doc
  > 9ed98fa gopls/internal/test: option to suppress LSP logs on failure
  > 867c912 inline: make it possible to gob encode/decode inlineMeFacts
  > db5d12b go/types/internal/play: display method receiver type
  > 2c8dd3e gopls: add explicit Unalias operations
  > 814f676 internal/gcimporter: add tool to inspect export data
  > 4fe2c29 refactor/rename: fix renaming of aliases
  > 71acab9 internal/typesparams: add Deref
  > 63b3b5a internal/imports: fix two "nil pointer in interface" bugs
  > 3f9badb go/ssa: types.Unalias() cleanup.
  > e5cf370 internal/typeparams: factor 2 copies of isParameterized
  > e0a9567 all: fix some comments
  > c3544e2 go/analysis/passes/httpresponse: fix ReceiverNamed usage
  > d0f7dce gopls: update x/vuln to 1.0.4
  > dd52646 go/ssa: create fewer goroutines
  > 813e70a gopls/internal/server: redo completion counters
  > 2ba7cf9 internal/imports: remove obsolete go:generate directive
  > 0fb9b7b gopls: use slices package for reverse slice
  > c21ae4c gopls/internal/golang: don't suggest removeparam when there are errors
  > f3fccee gopls/internal/golang: support removing unused parameters from methods
  > 2d517d5 gopls/internal/golang: fix build breakage due to semantic conflict
  > 6af0295 go/analysis/passes/stdversion: publish
  > 8669bfc gopls/internal/server: add "View package documentation" code action
  > 5628443 gopls/internal/test/marker: remove runtime.GOROOT from format.txt case
  > 6d9ecf2 gopls/internal/cache: rename methods on Package
  > 29d17a0 go/cfg: publish (*CFG).Dot method
  > 03f7b7b x/tools/go/packages: fix Load's "argument list too long" error
  > 67e856b gopls: fix test failures due to quoting of names in go/types errors
  > e256714 gopls: repair premature commit of 562248
  > 887727a gopls: Measure the efficacy of completions
  > ca94c96 gopls/internal/server: update telemetry prompt link
  > d4b1eff gopls/internal/golang: fix crash in package references
  > f89da53 gopls/internal/server: fix crash in SignatureHelp
  > 176e895 gopls/internal/analysis/stdversion: suppress before go1.21
  > c1eaf76 gopls/internal/analysis/stdversion: set RunDespiteErrors
  > c67485c gopls/internal/golang/completion: honor std symbol versions (imported)
  > 1f580da cmd/guru: delete it
  > c6563ca cmd/guru: remove replace directive
  > c178933 gopls/internal/server: set -mod=readonly when checking for upgrades
  > 9e530fc cmd/guru: carve out a separate module
  > 9b64301 gopls/internal/cache: avoid go/types panic on version "go1.2.3"
  > 93c0ca5 gopls/internal/cache: fix spurious diagnostics in multi-root workspaces
  > 31f056a gopls/internal/cache: add assertions for telemetry crash
  > 656fcde go/callgraph/vta: use core type for channels
  > b3a5e0b gopls/internal/golang/completion: honor std symbol versions (unimported)
  > accb00b gopls/internal/server/semantic: highlight the doc links in comments
  > ffaa15b gopls/internal/analysis/stdversion: report refs to too-new std symbols
  > 9a6aed9 internal/typeparams: delete OriginMethod
  > 070fcfb internal/typesinternal: delete SetGoVersion
  > caf5940 gopls/internal/cache: prune broken edges to command-line-arguments pkgs
  > ff00c7b internal/stdlib: manifest of all std symbols since go1.0
  > 029c4ea go/analysis/passes/slog: detect unsatifiable interface args
  > d10b068 go/ssa: handle labeled statements with blank labels
  > 4c85bed all: remove redundant words in comments and fix typo
  > 98c835c gopls/protocol: update LSP to latest version
bumping golang.org/x/crypto 7067223...d042a39:
  > d042a39 go.mod: update golang.org/x dependencies
  > b92bf94 ssh: respect MaxAuthTries also for "none" auth attempts
  > 6f79b5a ssh: add server side multi-step authentication
  > 8d0d405 x/crypto/chacha20: cleanup chacha_ppc64le.s
  > b91329d all: remove redundant words in comments and fix some typos
bumping github.com/prometheus/common e821827...0234594:
  > 0234594 Add support for go 1.20 (# 617)
  > 4433931 Merge pull request # 615 from prometheus/dependabot/go_modules/sigv4/github.com/aws/aws-sdk-go-1.51.11
  > 728e910 Merge pull request # 616 from srebhan/fix_protobuf_decode
  > 5fef1df Bump github.com/aws/aws-sdk-go from 1.50.31 to 1.51.11 in /sigv4
  > 3dec13c Drop support for Go older than 1.18 (# 612)
  > 78585cf fix(protobuf): Correctly decode multi-messages streams
  > 95edf51 Update common Prometheus files (# 613)

Signed-off-by: Knative Automation <automation@knative.team>
2024-04-16 10:59:22 +00:00
Matej Vašek b5232942ea
chore: func-utils image has appropriate labels (#2262)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-04-15 18:30:21 +00:00
Jefferson Ramos a0b9d358ab
chore: prepare/update oncluster e2e test for presubmit (#2270) 2024-04-12 12:57:22 +00:00
github-actions[bot] 6292fb7c71
chore: update Quarkus platform version to 3.9.3 (#2269)
Co-authored-by: Knative Automation <automation@knative.team>
2024-04-10 19:12:40 +00:00
Matej Vašek cf433243cb
chore: update codecov/codecov-action (#2267)
* chore: update codecov/codecov-action

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: pin paketo builder version

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-04-10 11:47:01 +00:00
github-actions[bot] 27c1744d62
chore: update Quarkus platform version to 3.9.2 (#2263)
Co-authored-by: Knative Automation <automation@knative.team>
2024-04-08 16:39:49 +00:00
Knative Automation 568d3092ab
Update community files (#2264)
Signed-off-by: Knative Automation <automation@knative.team>
2024-04-08 16:27:45 +00:00
David Simansky 5a2e58441d
Update Knative deps to latest (#2265) 2024-04-05 09:07:51 +00:00
Matej Vašek bc1463773b
Update deps (#2261)
* chore: updated docker dep

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: update runc lib

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-04-04 18:27:29 +00:00
Luke Kingland e4010db028
src: cleanup setup scripts (#2247)
The current binaries and allocation scrips are very CI-centric, this PR
takes a few steps to make them more friendly to running in a dev
environment; mainly centered around not polluting global scope (keeping
filesystem mutations in a relative local directory).

- binaries (and kind kubeconfig) are installed in ./hack/bin
- adds /hack/bin to .gitignore
- binary paths can be overridden via env vars FUNC_TEST_{name}
- binary fallback is system-installed (when binaries.sh not run)
- Cleanup of the UX, including colors and some shared helpers via
  library.sh
- Removes `yq` as the hack that required it appears to no longer be necessary.
- Adds some notes for Nix users
- Better error messaging when !linux
- Refactors the installers to pipe directly to tar rather than touch
  disk.
- begin to standardize on hyphens in filenames
2024-04-02 08:29:03 +00:00
Matej Vašek 31bebd1bfc
Update Rust BP (#2260) 2024-04-01 13:45:42 +00:00
Matej Vašek c6548e68b7
Fix utils image build (#2258) 2024-03-29 09:55:48 +00:00
Calum Murray 701e258acf
fix: func invoke unmarshals json before setting it in the event (#2256)
Signed-off-by: Calum Murray <cmurray@redhat.com>
2024-03-29 09:55:40 +00:00
Knative Automation 87a027338e
Update community files (#2253)
Signed-off-by: Knative Automation <automation@knative.team>
2024-03-29 08:43:09 +00:00
Matthias Wessendorf 7914454763
make was not called #2234 (#2245)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-03-27 16:45:19 +00:00
Matej Vašek db0a6edf3d
Setup test images before integration test run (#2250)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-03-27 16:33:37 +00:00
github-actions[bot] 617e95b6e1
chore: update Quarkus platform version to 3.9.1 (#2255)
Co-authored-by: Knative Automation <automation@knative.team>
2024-03-27 16:18:55 +00:00
Matej Vašek ff2757d63d
Fixing Rust version to 1.76.0 (#2254)
The version 1.77.0 is not compatible with paketo buildpack.

* Updated version of Rust buildpack 0.35.0 => 0.45.0,
  version 0.45.0 includes Rust 1.76.0.

* Disabling rustup buildpack so latest Rust (1.77.0) is not used,
  instead Rust 1.76.0 from rust-dist buildpack is used.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-03-27 15:01:22 +00:00
Matthias Wessendorf 8ced6269af
Usage of only proper handler API, no longer need for redundant Context (#2249)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-03-26 12:05:16 +00:00
Matej Vašek 6b78b7f5c5
Improve utility image (#2246)
* The socat/tar image is now build in GH Actions.
* We use new tiny deploy binary for deployment instead of whole func.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2024-03-26 11:30:56 +00:00
Luke Kingland 9beea04064
Basic auth (#2242)
* feat: host builder basic auth

* update tests

* mark oci basic auth flags hidden

* cleanup
- Remove debug statements
- Fix test race
- Update licenses

* spelling and linting errors
2024-03-26 09:17:21 +00:00
Knative Automation 9daaea37be
upgrade to latest dependencies (#2232)
bumping knative.dev/networking 3594f84...e1796e7:
  > e1796e7 Update community files (# 947)
  > f56f3aa upgrade to latest dependencies (# 946)
bumping google.golang.org/api 9c2cde8...cb0f433:
  > cb0f433 chore(main): release 0.170.0 (# 2459)
  > 5537676 feat(all): auto-regenerate discovery clients (# 2471)
  > cca46fb chore(deps): bump google.golang.org/protobuf (# 2470)
  > 67f16b6 feat(all): auto-regenerate discovery clients (# 2468)
  > de61eb7 feat(all): auto-regenerate discovery clients (# 2466)
  > 73e8b66 chore(all): update all (# 2462)
  > cc19990 chore(deps): ignore google/go-github package updates (# 2465)
  > c3a2f34 feat(all): auto-regenerate discovery clients (# 2464)
  > e938bf1 feat(all): auto-regenerate discovery clients (# 2461)
  > dc4811a feat(all): auto-regenerate discovery clients (# 2460)
  > fb2b816 feat(all): auto-regenerate discovery clients (# 2458)
bumping google.golang.org/genproto/googleapis/rpc 37d4d3c...a219d84:
  > a219d84 chore(all): auto-regenerate .pb.go files (# 1096)
  > 29370a3 chore(all): auto-regenerate .pb.go files (# 1095)
  > 790db91 chore(all): auto-regenerate .pb.go files (# 1094)
bumping github.com/golang/protobuf 5d5e8c0...75de7c0:
  > 75de7c0 Merge pull request # 1597 from golang/updatedesc
  > b7697bb all: update descriptor.proto to latest version
bumping knative.dev/pkg adefab4...db6f3b0:
  > db6f3b0 Bump google.golang.org/api from 0.169.0 to 0.170.0 (# 2992)
  > 4e6f7e4 Bump github.com/golang/protobuf from 1.5.3 to 1.5.4 (# 2993)
  > 66842ae Bump google.golang.org/grpc from 1.62.0 to 1.62.1 (# 2991)
  > 3d1e17c Bump cloud.google.com/go/storage from 1.39.0 to 1.39.1 (# 2990)
  > 9f523e2 Update community files (# 2988)
bumping knative.dev/eventing b644dad...292e29c:
  > 292e29c feat: add triggers to event lineage graph (# 7746)
  > 74803f8 [main] Upgrade to latest dependencies (# 7800)
  > 63068bd [main] Upgrade to latest dependencies (# 7794)
  > acc6385 [main] Update community files (# 7787)
  > c7db5cb Reduce the scope for the Config validation webhook to only the `knative-eventing` namespace. (# 7792)
  > 0604334 Replace all usages of deprecated wait.PollImmediate with wait.PollUntilContextTimeout (# 7786)
bumping knative.dev/hack b9f6bf0...424e75e:
  > 424e75e Update community files (# 374)
bumping google.golang.org/grpc d715b2e...9952aa8:
  > 9952aa8 Change version to 1.62.1 (# 7020)
  > d7334c4 fix enabling compression by trimming whitespaces in accept encoding header (# 6952)
  > d076e14 rpc_util: Fix RecvBufferPool deactivation issues (# 6766)
  > 9d981b0 cherry-pick # 6997 to 1.62.x release branch (# 6979) (# 7018)
  > 7c4b553 Switch version to 1.62.1-dev (# 6995)
bumping knative.dev/serving 6a15707...ba3f983:
  > ba3f983 Update net-istio nightly (# 15025)
  > 8a10fb0 Update net-certmanager nightly (# 15024)
  > 14ad0fe Update net-kourier nightly (# 15023)
  > da63b4a Update net-gateway-api nightly (# 15022)
  > ffd2796 upgrade to latest dependencies (# 15020)
  > edcb471 Update community files (# 15012)
  > d0529c2 Update net-certmanager nightly (# 15015)
  > cd1e144 Update net-kourier nightly (# 15017)
bumping google.golang.org/genproto/googleapis/api b0ce06b...37d4d3c:
  > 37d4d3c chore(all): update all (# 1089)
  > df926f6 chore(all): auto-regenerate .pb.go files (# 1092)
  > 05fd2b7 chore(all): Update to google.golang.org/genproto/googleapis/rpc without backreference (# 1093)
  > 1f18d85 chore(all): Drop submodule backreferences (# 1087)
  > 6ceb2ff chore: make vet script less error prone (# 1091)
  > c5ed0a4 chore(all): auto-regenerate .pb.go files (# 1084)
  > 9b9be74 chore: updates for Go 1.22 (# 1090)

Signed-off-by: Knative Automation <automation@knative.team>
2024-03-25 17:00:08 +00:00
github-actions[bot] 6abc5e6527
chore: update Springboot platform version to 3.2.4 (#2243)
Co-authored-by: Knative Automation <automation@knative.team>
2024-03-25 16:32:28 +00:00
Luke Kingland c5fcabab4a
remove unrechable condition (#2239) 2024-03-25 16:16:11 +00:00
Luke Kingland e0c4d7bf91
cleanup unused args (#2240) 2024-03-25 08:02:00 +00:00
Knative Automation 24ed28b27a
Update community files (#2229)
Signed-off-by: Knative Automation <automation@knative.team>
2024-03-20 02:05:58 +00:00
github-actions[bot] ba8733e3fd
chore: update Quarkus platform version to 3.8.3 (#2238)
Co-authored-by: Knative Automation <automation@knative.team>
2024-03-19 17:36:30 +00:00
Dave Protasowski 1d0d7611b2
Introduce a --registry-insecure flag (#2234)
* fix env var casing otherwise flags with hyphens will continue to have hyphens

* Introduce an --registry-insecure flag

* fix build tests

* fix TestList

* fix insecure (http) push
2024-03-16 04:45:20 +00:00
Knative Automation 8f3f718a5a
upgrade to latest dependencies (#2231)
bumping knative.dev/serving e640345...6a15707:
  > 6a15707 Update net-gateway-api nightly (# 15016)
  > 8e7a61c Set e2e scripts to test Gateway API and Contour (# 14999)
  > e053fe2 Update net-istio nightly (# 15018)

Signed-off-by: Knative Automation <automation@knative.team>
2024-03-15 02:49:22 +00:00
Knative Automation 940027e366
upgrade to latest dependencies (#2225)
bumping knative.dev/networking 3252e63...3594f84:
  > 3594f84 upgrade to latest dependencies (# 945)
bumping knative.dev/pkg 2c15a6f...adefab4:
  > adefab4 upgrade to latest dependencies (# 2987)
bumping knative.dev/serving 0c8f4f3...e640345:
  > e640345 Update net-contour nightly (# 15008)
  > 3504239 upgrade to latest dependencies (# 15009)
bumping knative.dev/hack e6dedc7...b9f6bf0:
  > b9f6bf0 switch default region to avoid instability (# 373)
bumping knative.dev/eventing bbb9051...b644dad:
  > b644dad [main] Upgrade to latest dependencies (# 7785)

Signed-off-by: Knative Automation <automation@knative.team>
2024-03-14 18:06:46 +00:00
Dave Protasowski 4f48549c8a
update templates to work with func-go (#2230) 2024-03-14 16:03:46 +00:00
Dave Protasowski 4d73d8d055
func-go v1.21.3 - idiomatic handler signatures (#2227)
* 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>
2024-03-14 14:40:36 +00:00
Knative Automation 09537e382d
upgrade to latest dependencies (#2224)
bumping knative.dev/serving a194cb2...0c8f4f3:
  > 0c8f4f3 Format go code (# 15006)
bumping knative.dev/client-pkg f170971...ca457df:
  > ca457df upgrade to latest dependencies (# 154)

Signed-off-by: Knative Automation <automation@knative.team>
2024-03-13 14:17:52 +00:00
github-actions[bot] 1d4dc68aba
chore: update Quarkus platform version to 3.8.2 (#2221)
Co-authored-by: Knative Automation <automation@knative.team>
2024-03-13 09:39:46 +00:00
Dave Protasowski 3f20faa4e9
Drop replace directive (#2212)
* drop replace directive

* fix functionality - add an additional case so we walkthrough the docker default config locations
2024-03-13 04:54:46 +00:00
Jefferson Ramos 508539e119
test: update gitserver test image (#2216) 2024-03-13 04:39:53 +00:00
Knative Automation 1745bea865
upgrade to latest dependencies (#2215)
bumping knative.dev/serving 3e119d5...a194cb2:
  > a194cb2 Add multi-container probing (# 14853)
  > b635c4c Update net-kourier nightly (# 15004)
  > 79498ab Update net-istio nightly (# 15003)
  > 54254a1 Update net-gateway-api nightly (# 15005)
  > 1c9495a Update net-certmanager nightly (# 15002)
  > 173ab17 upgrade to latest dependencies (# 15001)
bumping knative.dev/networking 9417101...3252e63:
  > 3252e63 upgrade to latest dependencies (# 944)
bumping knative.dev/eventing 8a18b16...bbb9051:
  > bbb9051 Fusion Hack  (# 7740)
  > e886832 [main] Upgrade to latest dependencies (# 7781)

Signed-off-by: Knative Automation <automation@knative.team>
2024-03-13 04:39:46 +00:00
Dave Protasowski f01c709472
allow go install knative.dev/func@{version} (#2220) 2024-03-13 02:27:10 +00:00
Matej Vašek 9bfefd5dba
chore: update CA bundle (#2219)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-03-13 01:59:39 +00:00
Knative Automation 8010f88277
upgrade to latest dependencies (#2214)
bumping knative.dev/serving a2ea3a1...3e119d5:
  > 3e119d5 add contour-gateway.yaml to third_party folder (# 14998)
  > 455d3e5 Revert deactivated istio tls tests (# 14995)
  > 88abc84 upgrade to latest dependencies (# 14997)
bumping github.com/prometheus/common 36d0bf9...944239f:
  > 944239f Bump google.golang.org/protobuf from 1.32.0 to 1.33.0 (# 601)
  > 5f10b85 Bump golang.org/x/oauth2 from 0.17.0 to 0.18.0 (# 600)
  > a14ff55 Update common Prometheus files (# 599)
  > 6aadcf4 Remove deprecated version function (# 591)
  > 1e6ac24 Add unit (# 544)
  > 4199f18 Remove unused 'Host' member from HTTPClientConfig (# 597)
  > fa71e6a Bump github.com/aws/aws-sdk-go from 1.50.29 to 1.50.31 in /sigv4 (# 595)
  > 8a9fd7a Bump github.com/aws/aws-sdk-go from 1.50.27 to 1.50.29 in /sigv4 (# 592)
  > 8344367 Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 in /sigv4 (# 593)
  > 0117d2f Update common Prometheus files (# 594)
bumping knative.dev/networking 918a090...9417101:
  > 9417101 upgrade to latest dependencies (# 943)
bumping knative.dev/pkg 106b052...2c15a6f:
  > 2c15a6f Bump github.com/prometheus/common from 0.49.0 to 0.50.0 (# 2986)

Signed-off-by: Knative Automation <automation@knative.team>
2024-03-12 11:31:09 +00:00
Knative Automation 26da996b98
upgrade to latest dependencies (#2201)
bumping google.golang.org/api 548436b...9c2cde8:
  > 9c2cde8 chore(main): release 0.169.0 (# 2451)
  > a488112 feat(all): auto-regenerate discovery clients (# 2457)
  > 2675c0a feat(all): auto-regenerate discovery clients (# 2454)
  > d22da18 feat(all): auto-regenerate discovery clients (# 2450)
  > e84ba36 chore(main): release 0.168.0 (# 2432)
  > 74538f7 chore(all): update module github.com/google/go-github/v58 to v59 (# 2411)
  > 6381123 chore(all): update all (# 2435)
  > b438981 feat(all): auto-regenerate discovery clients (# 2449)
  > af383c7 feat(all): auto-regenerate discovery clients (# 2448)
  > 022c85c feat(all): auto-regenerate discovery clients (# 2447)
  > 4fa90c9 feat(all): auto-regenerate discovery clients (# 2445)
  > ced0c09 feat(all): auto-regenerate discovery clients (# 2443)
  > 9f9c0cf feat(all): auto-regenerate discovery clients (# 2442)
  > 454cba5 chore: make vet script less error prone (# 2441)
  > 82eaa79 chore: updates for Go 1.22 (# 2440)
  > d290e18 feat(all): auto-regenerate discovery clients (# 2438)
  > 4dc71d4 feat(all): auto-regenerate discovery clients (# 2436)
  > 0c30ecc feat(all): auto-regenerate discovery clients (# 2433)
  > e635a5e feat(all): auto-regenerate discovery clients (# 2431)
bumping golang.org/x/net 73d21fd...7ee34a0:
  > 7ee34a0 go.mod: update golang.org/x dependencies
  > c289c7a websocket: re-add documentation for DialConfig
  > 9fb4a8c http2: send an error of FLOW_CONTROL_ERROR when exceed the maximum octets
  > 3dfd003 websocket: add support for dialing with context
  > fa11427 quic: move package out of internal
  > 591be7f quic: fix UDP on big-endian Linux, tests on various architectures
  > 34cc446 quic: temporarily disable networking tests failing on various platforms
  > 4bdc6df quic: expand package docs, and document Stream
  > 22cbde9 quic: set ServerName in client connection TLSConfig
  > 57e4cc7 quic: handle PATH_CHALLENGE and PATH_RESPONSE frames
  > a6a24dd quic: source address and ECN support in the network layer
  > 2a8baea quic: don't record fin bit as sent when it wasn't
  > 5e09712 quic: fast path for stream writes
  > 08d27e3 quic: fast path for stream reads
  > cc568ea internal/quic: use slices.Equal in TestAcksSent
  > dda3687 quic: add Stream.ReadByte, Stream.WriteByte
  > e94da73 quic: reduce ack frequency after the first 100 packets
  > 117945d quic: add throughput and stream creation benchmarks
  > 93be8fe quic: log packet_dropped events
  > 6e383c4 quic: add qlog recovery metrics
  > 840656f quic/qlog: don't output empty slog.Attrs
  > 5a444b4 quic: add Stream.Set{Read,Write}Context, drop {Read,Write,Close}Context
bumping google.golang.org/protobuf 3068604...ec47fd1:
  > ec47fd1 all: release v1.33.0
  > f01a588 encoding/protojson, internal/encoding/json: handle missing object values
  > 235ef28 all: fix integration test on macOS
  > fe89159 internal/filedesc: make descriptor initialization goroutine-safe
  > 6bec1ef proto: move explicit test as a seed into the fuzz test
  > 02e13d2 internal/filedesc: align editions and non-editions HasPresence()
  > 416d517 internal/conformance: make conformance tests work with editions
  > 055c812 encoding/prototext: add proto editions and fuzz tests
  > 2caa6b0 all: format all .proto files
  > f2cb7f1 encoding/protojson: add protojson editions tests including fuzztests
  > 08a11b3 testing/prototest: add extension and required editions messages
  > da0e663 proto: add editions tests for invalid messages
  > f9eb6c7 go_features.proto: move .proto file next to generated .pb.go file
  > 11de0a6 all: add editions support for extensions
  > 7d98b0e all: implement `features.field_presence = LEGACY_REQUIRED` support
  > 6e0d73f proto: add extension tests for editions protos
  > 1944577 proto: add more editions tests for proto.Size and proto.Equal
  > 5e8da94 proto: add decoding fuzz test for proto3 to editions conversion
  > 8f6a661 proto: add fuzztest for proto2 and equivalent editions proto
  > 997075a reflect/protodesc: add editions support
  > f102ec6 all: add more test for editions and fix some bugs in the implementation
  > e391005 reflect/protodesc: propagate field_presence legacy_required properly
  > 020ec10 internal/filedesc: implement runtime editions support
  > f387b03 editions: add some test protos for editions
  > 2040e86 all: implement Go-specific GenerateLegacyUnmarshalJSON
  > 99e193e all: update to protobuf-26.0-rc2 to implement go edition features
  > 82c6b3a protoreflect: remove unnecessary cache so extension types can be GC'ed
  > b70f02b editions: minor fix to resolve editions features correctly
  > 9e454d6 internal/filedesc: refactor editions feature resolution
  > 26a52f3 reflect/protodesc: fix packed field conditional
  > 7c85df2 reflect/protodesc: fix group validation: not supported in proto3
  > 18202d2 testing/protocmp: add MessageTypeResolver.
  > 7b78149 internal/impl: correct reflect.ValueError use
  > 56dad28 all: add Security Policy (SECURITY.md)
  > 9f73929 all: start v1.32.0-devel
bumping golang.org/x/term 353276a...c5eaf76:
  > c5eaf76 go.mod: update golang.org/x dependencies
bumping github.com/prometheus/client_golang 53be91d...77d4003:
  > 77d4003 Add 1.19.0 changelog (# 1451)
  > 14259fa Merge pull request # 1448 from ywwg/owilliams/content-negotiation
  > 353395b Remove support for go 1.19 (# 1449)
  > 6d03920 deps: bump prometheus/common version
  > 9dd5d2a Merge pull request # 1445 from kavu/add_go122_metrics_test
  > 7ac9036 Merge pull request # 1440 from prometheus/dependabot/github_actions/github-actions-ded284d9a8
  > c906a5e Add support for Go 1.22
  > 8c7e30f Merge pull request # 1441 from prometheus/dependabot/go_modules/tutorial/whatsup/github.com/prometheus/common-0.46.0
  > 83d5940 Bump the github-actions group with 2 updates
  > d69fe9a Merge pull request # 1426 from prometheus/dependabot/github_actions/github-actions-37565e1261
  > 08769f8 Bump github.com/prometheus/common in /tutorial/whatsup
  > 38631c6 chore: Move VersionCollector to collectors directory (# 1427)
  > f22329c Bump the github-actions group with 3 updates
  > b7b88fa Merge pull request # 1425 from prometheus/dependabot/go_modules/golang.org/x/sys-0.16.0
  > 6636d6a CI: Hash pin all GH actions + configure dependabot for those. (# 1417)
  > d9be404 Simplification of middleware example (# 1423)
  > 8ee2fdc Bump golang.org/x/sys from 0.15.0 to 0.16.0
  > 185945e Merge pull request # 1422 from prometheus/superq/version
  > 046e320 Merge pull request # 1420 from prometheus/dependabot/go_modules/google.golang.org/protobuf-1.32.0
  > 3d4c27f Add version package
  > 034544a Merge pull request # 1419 from prometheus/dependabot/go_modules/tutorial/whatsup/github.com/prometheus/client_golang-1.18.0
  > 6ebfdd5 Bump google.golang.org/protobuf from 1.31.0 to 1.32.0
  > f87a86c Merge pull request # 1418 from prometheus/dependabot/go_modules/examples/middleware/github.com/prometheus/client_golang-1.18.0
  > 9efc83a Bump github.com/prometheus/client_golang in /tutorial/whatsup
  > a88230e Merge pull request # 1414 from prometheus/release-1.18
  > 71f3940 Bump github.com/prometheus/client_golang in /examples/middleware
  > 96f1aec Merge pull request # 1411 from prometheus/revert-1387-main
  > 0837d36 Merge pull request # 1410 from prometheus/arthursens/cut-1.18.0
  > 2280fb1 Revert "change api http.client to interface"
bumping go.opentelemetry.io/otel e3eb3f7...e6e186b:
  > e6e186b Release v1.24.0/v0.46.0/v0.0.1-alpha (# 4966)
  > a5ec3fc Add experimental-logs module set (# 4961)
  > 27e495d Fix output exponential histogram negative buckets (# 4956)
  > 8df89f6 log: Remove Value.AsAny (# 4963)
  > 7cc660f log: Add allocation tests (# 4957)
  > 6ea99af log: Add benchmark tests (# 4958)
  > 7b3382e log: Implement Value and KeyValue types (# 4949)
  > f793a05 Fix registration of multiple callbacks when using the global meter provider (# 4945)
  > c2fdbca design: log value accessors must not panic (# 4948)
  > dd3b00f Add the `log/noop` package (# 4943)
  > 3fe7401 doc: fix godoc for WithEndpointURL and WithEndpoint (# 4947)
  > b62df52 Implement the log Record type (# 4939)
  > 92a13d5 Fix test name in `trace/noop` pkg (# 4944)
  > d423033 Test Severity const match OTel spec (# 4938)
  > e3e8879 Implement the `LoggerConfig` and add the `LoggerOption`s (# 4937)
  > 6e2bfb6 Rename log List value type to Slice (# 4936)
  > 5941357 Update otel/log package docs (# 4935)
  > 48bb3c8 Add the `log/embedded` package (# 4932)
  > 395800b dependabot updates Sun Feb 18 15:37:06 UTC 2024 (# 4942)
  > 693eb7d Fix typos in docs and comments (# 4940)
  > 8739674 dependabot updates Fri Feb 16 15:32:59 UTC 2024 (# 4934)
  > d3dcb39 Add initial Logs Bridge API scaffolding (# 4907)
  > 02b6123 internal/global,trace: fix spelling error (# 4920)
  > e8973b7 [docs] Log design fix (# 4918)
  > 1568559 Link logs RC in project status of README (# 4917)
  > cd289ee [chore] Update Project Status for Logs (# 4897)
  > b423bfd Bump golang.org/x/sys from 0.16.0 to 0.17.0 in /sdk (# 4904)
  > e3c6c4c Bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (# 4901)
  > befae90 Bump golang from 1.21-alpine to 1.22-alpine in /example/zipkin (# 4905)
  > 9c04afa Bump golang.org/x/vuln from 1.0.3 to 1.0.4 in /internal/tools (# 4902)
  > ec03021 add exemplar support to the OTLP HTTP and gRPC exporters (# 4900)
  > dd5d054 sdk/metrics: Move experimental docs to x package (# 4895)
  > 15b3f4d Fix TestWithIDGenerator (# 4894)
  > c921815 log: Add design doc (# 4809)
  > cfaf1f0 resource: Add testable example (# 4887)
  > 69b2521 Support Go 1.22 (# 4890)
  > c5b112f Release v1.23.1/v0.43.2 (# 4892)
  > 11ebd19 Fix callback registration bug (# 4888)
bumping google.golang.org/genproto/googleapis/rpc 012b6fc...37d4d3c:
  > 37d4d3c chore(all): update all (# 1089)
  > df926f6 chore(all): auto-regenerate .pb.go files (# 1092)
  > 05fd2b7 chore(all): Update to google.golang.org/genproto/googleapis/rpc without backreference (# 1093)
  > 1f18d85 chore(all): Drop submodule backreferences (# 1087)
  > 6ceb2ff chore: make vet script less error prone (# 1091)
  > c5ed0a4 chore(all): auto-regenerate .pb.go files (# 1084)
  > 9b9be74 chore: updates for Go 1.22 (# 1090)
  > b0ce06b chore(all): update all (# 1088)
bumping golang.org/x/tools c5643e9...7656c4c:
  > 7656c4c go.mod: update golang.org/x dependencies
  > 5bf7d00 cmd/callgraph: add 'posn' template helper
  > 283fce2 x/tools: drop go1.18 support
  > 7f348c7 internal/versions: updates the meaning of FileVersions.
  > 38b0e9b x/tools: add explicit Unalias operations
  > a6c03c8 x/tools: update telemetry import (new Start API)
  > 1f7dbdf gopls/internal/cache: add debug assertions for bug report
  > 4d4e802 gopls/doc: address additional comments on workspace.md
  > abe5874 gopls/internal/analysis: add fill switch cases code action
  > fc70354 gopls/internal/test: add test for NPE in control flow highlighting
  > 77c2a67 benchmark/parse: fix format
  > c1f340a gopls: add non nil if check around function result highlight
  > bbdc81d gopls: implement code action to split/group lines
  > 4db4579 cmd/deadcode: avoid ssautil.AllFunctions
  > 9b58909 gopls: upgrade dependencies following the v0.15.0 release
  > 97c51a2 go/analysis/passes/shift: support constants in float syntax
  > 509ff8b gopls/doc: update workspace documentation for zero-config gopls
  > fb020a0 go/cfg: record block kind and associated statement
  > 054c06d gopls: rationalize "deref" helpers
  > a4d9215 gopls/internal/test/marker: add a test for initialization cycle errors
  > c111c4d internal/typesinternal: add ReceiverNamed helper
  > a821e61 gopls/internal/cache: don't create Views for vendored modules
  > 3f67f80 go/packages/gopackages: display module
  > 607b664 gopls/internal/cache: fix two bugs related to workspace packages
  > 51dec25 gopls/internal/golang: highlight typeswitch break correctly
  > 3ac77cb gopls/internal/settings: default "includeReplaceInWorkspace" to false
  > 68515ea gopls/internal/test/integration/fake: set LSP client name
  > 4231a57 cmd/getgo: delete package
  > c61f99f cmd/getgo: create a module in preparation for deprecation
  > 451218f x/tools: address review of CL 564515 (CombinedOutput)
  > 4bc74c3 gopls/internal/golang: enable bug.Report in semantic tokens
  > 32d3139 gopls/internal/golang: add semantic tokens for control labels
  > 0d17194 gopls/internal/golang: SemanticTokens: edits for clarity
  > 2bd7949 x/tools: don't parse CombinedOutput
  > 7240af8 gopls/internal/cache: remove parsego.* aliases
  > babbbed gopls/release: remove obsolete validateHardCodedVersion
  > ea9e542 internal/versions: fix package to accept go1.21.0-bigcorp
  > fef8b62 gopls/internal/server: fix a (mostly) benign race in diagnostics
  > df9c1c7 gopls/internal/server: disambiguate diagnostics by OS,ARCH
  > e325405 gopls/internal/test/integration: ignore telemetry prompt in assertion
  > 5de9cbe go/ssa: show instruction line numbers in -build=FS mode
  > 0f0698e go/analysis/passes/nilness: improve "for range []T(nil)" error
  > f1914cc internal/aliases: use testing.T.Setenv in tests
  > 945a754 gopls/internal/golang: remove a use of panic for flow control
  > e1a6261 internal/jsonrpc2_v2: export WireError type
  > 1b39a8b internal/testenv: always Cleanup to appease go vet
  > afd8428 gopls/internal/test/integration: slightly more ergonomic FolderSettings
bumping golang.org/x/oauth2 ebe81ad...85231f9:
  > 85231f9 go.mod: update golang.org/x dependencies
  > 34a7afa google/externalaccount: add Config.UniverseDomain
  > 95bec95 google/externalaccount: moves externalaccount package out of internal and exports it
bumping golang.org/x/sys 914b96c...360f961:
  > 360f961 unix: add API for fsconfig system call
  > 7ff74af unix: drop go version tags for unsupported versions
  > 6b4eab5 unix: suppress ENOMEM errors from sysctl's implementing Uname(uname *Utsname) on FreeBSD due to truncated fields.
  > 2f2cc5d unix: update IFLA and NETKIT constants with Linux kernel 6.7
bumping golang.org/x/crypto 405cb3b...7067223:
  > 7067223 go.mod: update golang.org/x dependencies
  > 0d2316b ssh/test: work around for TestCiphers failures on macOS
  > 0aab8d0 all: update go.mod x/net dependency
  > 5bead59 ocsp: don't use iota for externally defined constants
  > 1a86580 x/crypto/internal/poly1305: improve sum_ppc64le.s
  > 1c981e6 ssh/test: don't use DSA keys in integrations tests, update test RSA key
  > 62c9f17 x509roots/nss: manually exclude a confusingly constrained root
bumping go.opentelemetry.io/otel/trace e3eb3f7...e6e186b:
  > e6e186b Release v1.24.0/v0.46.0/v0.0.1-alpha (# 4966)
  > a5ec3fc Add experimental-logs module set (# 4961)
  > 27e495d Fix output exponential histogram negative buckets (# 4956)
  > 8df89f6 log: Remove Value.AsAny (# 4963)
  > 7cc660f log: Add allocation tests (# 4957)
  > 6ea99af log: Add benchmark tests (# 4958)
  > 7b3382e log: Implement Value and KeyValue types (# 4949)
  > f793a05 Fix registration of multiple callbacks when using the global meter provider (# 4945)
  > c2fdbca design: log value accessors must not panic (# 4948)
  > dd3b00f Add the `log/noop` package (# 4943)
  > 3fe7401 doc: fix godoc for WithEndpointURL and WithEndpoint (# 4947)
  > b62df52 Implement the log Record type (# 4939)
  > 92a13d5 Fix test name in `trace/noop` pkg (# 4944)
  > d423033 Test Severity const match OTel spec (# 4938)
  > e3e8879 Implement the `LoggerConfig` and add the `LoggerOption`s (# 4937)
  > 6e2bfb6 Rename log List value type to Slice (# 4936)
  > 5941357 Update otel/log package docs (# 4935)
  > 48bb3c8 Add the `log/embedded` package (# 4932)
  > 395800b dependabot updates Sun Feb 18 15:37:06 UTC 2024 (# 4942)
  > 693eb7d Fix typos in docs and comments (# 4940)
  > 8739674 dependabot updates Fri Feb 16 15:32:59 UTC 2024 (# 4934)
  > d3dcb39 Add initial Logs Bridge API scaffolding (# 4907)
  > 02b6123 internal/global,trace: fix spelling error (# 4920)
  > e8973b7 [docs] Log design fix (# 4918)
  > 1568559 Link logs RC in project status of README (# 4917)
  > cd289ee [chore] Update Project Status for Logs (# 4897)
  > b423bfd Bump golang.org/x/sys from 0.16.0 to 0.17.0 in /sdk (# 4904)
  > e3c6c4c Bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (# 4901)
  > befae90 Bump golang from 1.21-alpine to 1.22-alpine in /example/zipkin (# 4905)
  > 9c04afa Bump golang.org/x/vuln from 1.0.3 to 1.0.4 in /internal/tools (# 4902)
  > ec03021 add exemplar support to the OTLP HTTP and gRPC exporters (# 4900)
  > dd5d054 sdk/metrics: Move experimental docs to x package (# 4895)
  > 15b3f4d Fix TestWithIDGenerator (# 4894)
  > c921815 log: Add design doc (# 4809)
  > cfaf1f0 resource: Add testable example (# 4887)
  > 69b2521 Support Go 1.22 (# 4890)
  > c5b112f Release v1.23.1/v0.43.2 (# 4892)
  > 11ebd19 Fix callback registration bug (# 4888)

Signed-off-by: Knative Automation <automation@knative.team>
2024-03-11 14:07:14 +00:00
Luke Kingland a2d55b0a07
chore: func-go v0.20.1 (#2210)
Updates all dependencies, including CloudEvents which fixes a CVE
reported today.
2024-03-08 08:30:38 +00:00
Matej Vašek 475c17161f
chore: bump CE dep (#2208)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-03-07 14:23:26 +00:00
David Simansky 10153edcb1
fix: Fix missing bash function in allocate.sh script (#2207) 2024-03-07 13:20:04 +00:00
Luke Kingland d3c24a22b2
remove redundant workflows (#2205) 2024-03-06 11:16:01 +00:00
David Simansky c9cdfad8d7
chore: Refactor cluster allocation script to use latest Knative bits (#2197) 2024-03-04 09:44:47 +00:00
Knative Automation 5b51bc7f48
upgrade to latest dependencies (#2200)
bumping knative.dev/serving 99f6b66...6dc7097:
  > 6dc7097 Update net-gateway-api nightly (# 14965)
  > 5cfa4a9 Update community files (# 14963)
bumping knative.dev/hack 5f0998e...e6dedc7:
  > e6dedc7 bump various tools (# 372)
  > 7f60be0 Update community files (# 371)
bumping knative.dev/eventing 0bd690a...1a9b0da:
  > 1a9b0da Revert "Run Prow tests on K8s 1.28 (# 7714)" (# 7735)
  > 5e9139b e2e: channel/DataPlaneConformance (# 7650)
  > b595334 [main] Update community files (# 7736)

Signed-off-by: Knative Automation <automation@knative.team>
2024-03-04 08:30:19 +00:00
Matthias Wessendorf fc351c0a7c
🧹 Using upstream lifecycle image that has multi-arch support (#2196)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-03-01 14:40:53 +00:00
Knative Automation 100349580a
Update community files (#2199)
Signed-off-by: Knative Automation <automation@knative.team>
2024-03-01 12:00:14 +00:00
Knative Automation 1a0b421595
upgrade to latest dependencies (#2198)
bumping knative.dev/pkg 97fb318...145b901:
  > 145b901 Update community files (# 2977)
bumping knative.dev/serving 80bb2f6...99f6b66:
  > 99f6b66 Update net-istio nightly (# 14957)
bumping knative.dev/eventing a154f1a...0bd690a:
  > 0bd690a [main] Upgrade to latest dependencies (# 7734)

Signed-off-by: Knative Automation <automation@knative.team>
2024-03-01 10:09:14 +00:00
Luke Kingland ab2bbffb07
feat: host builder metadata envs (#2195) 2024-03-01 09:38:06 +00:00
github-actions[bot] 7bf3e1008b
chore: update Quarkus platform version to 3.8.1 (#2190)
Co-authored-by: Knative Automation <automation@knative.team>
2024-02-29 07:32:06 +00:00
Knative Automation cf51602fe4
upgrade to latest dependencies (#2194)
bumping knative.dev/serving cdb41a4...80bb2f6:
  > 80bb2f6 Update net-gateway-api nightly (# 14960)
  > 1a375ab Update net-kourier nightly (# 14958)
bumping knative.dev/client-pkg e7f1f8d...ae3b852:
  > ae3b852 [main] Upgrade to latest dependencies (# 146)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-29 07:11:20 +00:00
David Simansky 50818214a7
Update setup E2E to match latest Knative release (#2189) 2024-02-28 15:38:47 +00:00
Knative Automation a4a4148379
[main] Upgrade to latest dependencies (#2188)
* upgrade to latest dependencies

bumping go.opentelemetry.io/otel/metric 279c549...e3eb3f7:
  > e3eb3f7 Release v1.23.0/v0.45.1 (# 4885)
  > eabcef4 Return merged Resource on schema conflict (# 4876)
  > 2c7761d Bump benchmark-action/github-action-benchmark from 1.19.2 to 1.19.3 (# 4883)
  > f4e1e04 Bump lycheeverse/lychee-action from 1.9.2 to 1.9.3 (# 4882)
  > 569854e sdk/metric/metricdata: Add MarshalJSON for Extrema (# 4827)
  > 242d23a Remove the Flush method from Exemplar (# 4873)
  > fecb92e Add the experimental exemplar feature (# 4871)
  > d9d9507 stdouttrace: Refine example (# 4872)
  > bf1ae8c [chore] Fix changelog entry for # 4754 (# 4874)
  > 8d3ae4c fix: Fix stdouttrace/example_test to make the trace_id same. (# 4855)
  > e7de571 Add the Histogram Reservoir impl (# 4870)
  > e6e4c95 Bump benchmark-action/github-action-benchmark from 1.18.0 to 1.19.2 (# 4865)
  > dcfec0c Add the random fixed size exemplar reservoir (# 4852)
  > ce3faf1 Bump lycheeverse/lychee-action from 1.9.1 to 1.9.2 (# 4864)
  > 3da38d3 Bump peter-evans/create-issue-from-file from 4 to 5 (# 4867)
  > 402998f dependabot updates Sun Jan 28 22:42:16 UTC 2024 (# 4869)
  > 200b2cf Bump codecov/codecov-action from 3.1.4 to 3.1.5 (# 4866)
  > 79371c1 Add the SampledFilter exemplar Reservoir impl (# 4851)
  > 08beb8b Add the Drop exemplar Reservoir implementation (# 4850)
  > 6f96e67 example/dice: Do not use semconv (# 4849)
  > c573785 Add the `sdk/metric/internal/exemplar` package (# 4835)
  > 1978044 Cache instruments so repeatedly creating identical instruments doesn't leak memory (# 4820)
  > cef39a1 Fix changelog entry (# 4848)
  > 71d13ff Fix ContainerID detector on systemd with colon in cgroup path (# 4449)
  > 3f74d77 Bump go.opentelemetry.io/proto/otlp from 1.0.0 to 1.1.0 in /exporters/otlp/otlptrace (# 4841)
  > edb9b2b Bump go.opentelemetry.io/proto/otlp from 1.0.0 to 1.1.0 in /exporters/otlp/otlptrace/otlptracegrpc (# 4842)
  > 71d2b41 Bump go.opentelemetry.io/proto/otlp (# 4838)
  > f0ea8b7 Bump go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp (# 4844)
  > c158b90 Bump go.opentelemetry.io/proto/otlp (# 4837)
  > b20691d Bump actions/cache from 3 to 4 (# 4839)
  > 33f5cf4 Add WithEndpointURL option to OTLP over HTTP exporters (# 4808)
  > 8778c38 docs: minor update to docstring (# 4833)
  > 1e2555f Release v1.23.0-rc.1 (# 4832)
  > 8f2bdf8 Bump golang.org/x/tools from 0.16.1 to 0.17.0 in /internal/tools (# 4825)
  > cf93d0d Add @dashpole (David Ashpole) as a maintainer (# 4830)
bumping k8s.io/apiextensions-apiserver 1dff568...e1d6769:
  > e1d6769 Update dependencies to v0.29.2 tag
  > f14ac67 Merge pull request # 122369 from cici37/automated-cherry-pick-of-# 122193-upstream-release-1.29
  > eccd921 Merge pull request # 122429 from MadhavJivrajani/tools-bump-129
  > 510e9f2 Keep presence cost to 0 to ensure backward compatibility.
  > 06c0a98 Merge pull request # 122343 from jpbetz/automated-cherry-pick-of-# 122329-origin-release-1.29
  > 4a82ea0 .*: bump golang.org/x/tools to v0.16.1
  > 2d320bc Wire in field dropping for CRDs
  > 249827f update go.mod
  > 4bb4c02 Merge pull request # 121034 from alexzielenski/apiserver/apiextensions/ratcheting-oldself-create
  > f68866b codegen
  > 5321cf0 validate defaults across an update from nil to ensure create ratcheting rules work
  > efc67b4 ratcheting-cel: use Optional[T] for oldSelf when optionalOldSelf is true
  > 0889c57 ratcheting-cel: add optionalOldSelf field
  > 2c1c704 refactor: rename TransitionRule to UsesOldSelf
  > 915de7b Merge pull request # 121573 from tukwila/bump_etcd_v3.5.10
  > d1c742e Merge pull request # 121552 from pohly/klog-update
  > e1b4aee bump to newest etcd: v3.5.10
  > 2a7741d dependencies: klog v2.110.1
  > e964004 Merge pull request # 121575 from apelisse/update-smd
  > 204aa5c Merge pull request # 121577 from cici37/celFixPick
  > 74dc30a Update sigs.k8s.io/structured-merge-diff to v4.4.1
  > e907c44 Merge pull request # 121373 from cici37/crdGA
  > fed8e0b Add set ext library into Kubernetes and pick up the new option cel provides
  > 2d6475f Merge pull request # 121307 from cici37/celUpdate
  > 8286ec3 Remove the usage of feature gate
  > cfee884 Bump cel-go to v0.17.7
  > 7eec8bf Merge pull request # 121460 from jiahuif-forks/feature/crd-validation-expressions/existing-expressions-cost-exempt
  > c16fc96 Add cel new validator into Kubernetes.
  > 78065a7 Merge pull request # 121462 from alexzielenski/apiserver/apiextensions/ratcheting-metrics-actually
  > 7d0a2a9 suppress per-expression cost limit for unmutated versions.
  > d31f930 Merge pull request # 121405 from alexzielenski/apiserver/apiextensions/ratcheting-benchmarks
  > e54efed metrics: publish metrics from ratcheting across a request
  > 182175e Merge pull request # 121524 from carlory/gomega
  > e3bcef4 ratcheting: add benchmark
  > 99f827f bump gomega to 1.29.0
  > db2e96c Merge pull request # 121255 from tukwila/OpenAPIV3-cleanup
  > dcb65b7 Merge pull request # 121338 from dims/working-otel-bump
  > 70a4e71 Remove GAed feature gates OpenAPIV3
  > be4aa6a Merge pull request # 121343 from alexzielenski/apiserver/apiextensions/ratcheting-metrics
  > 305c51a working-config-otel
  > 7d6d9e2 Merge pull request # 121430 from bzsuni/cleanup/fsnotify
  > 72514a2 replace CEL ValidateWithRatcheting with variadic options
  > f0dcf82 Merge pull request # 121455 from cici37/test_cost
  > 49314b9 Bumped the fsnotify from version v1.6.0 to v1.7.0
  > 712c8c0 ratcheting: provide a shared correlated object
  > a00f3f9 Merge pull request # 119186 from seans3/stream-translator-proxy
  > 64f9a54 Add stability tests for CEL cost estimation.
  > b482682 fetch a shared correlated object off the validation options if it exists
  > d459639 Merge pull request # 120397 from ty-dc/StaticCheck
  > 8c1ad11 StreamTranslator and FallbackExecutor for WebSockets
  > d2839fd fix usage
  > 56c7faf Merge pull request # 121016 from alexzielenski/apiserver/apiextensions/ratcheting-cel
  > 37b3e30 cleanup: omit comparison with bool constants
  > fedd88f add variadic options to ValidateUpdate
  > fd7b6ea ratcheting: ratchet CEL expressions for no-op updates
  > d704d8d Merge pull request # 121337 from alexzielenski/apiserver/apiextensions/cleanup-validator
  > dae2c4e Merge pull request # 121364 from sxd/update_grpc
  > 40b0c2a fix typo
  > 10e8e5f Merge pull request # 120757 from alexzielenski/apiserver/openapi/invalid-default
  > d11c518 bump golang.org/grpc to v1.56.3
  > 2aaec3e cleanup: move unstructured check earlier in status update
  > 2fd9bc9 update generated code and openapi
  > 911047c cleanup: remove unused versions of cel validators and structural schemas from CRD strategy
  > 068d4fa pin openapi
  > e6376d9 cleanup: check unstructured for Validate(Update) before validating
  > ca37838 Merge pull request # 121250 from carlory/fix-120882
  > a80d851 Merge pull request # 121085 from jiahuif-forks/fix/crd-validation-expressions/enum-cost
  > 3a34a15 update pretty param description
  > 0c4ba28 Merge pull request # 121010 from Jefftree/decouple-openapi-v2v3-config
  > ab724eb skip CEL validations for enum violation.
  > b15c120 Merge pull request # 121118 from alexzielenski/apiserver/apiextensions/ratcheting-factor-correlation
  > 24792c8 bump kube-openapi
  > 4e531e7 set maxLength to longest enum.
  > fb7d61d Merge pull request # 121096 from alexzielenski/common-schema
  > c82832d ratcheting: disable correlation by index
  > b41f9f4 Fix v3 spec
  > 67b1443 Merge pull request # 120735 from Jefftree/request-body
  > d2c63d3 add rest of accessors to common.Schema
  > 0d199cf cleanup: add header and fix spelling
  > 6bf411d bump kube-openapi
  > c2faef7 refactor: move correlatedObject to its own file
  > 10f014c Merge pull request # 121111 from dashpole/update_otel_deps
  > e18ccb9 refactor: make CachedDeepEqual independent of validation
  > efb81f7 dependencies: update otel-go dependencies
  > c969379 refactor: use common.Schema in CorrelatedObject
  > 16d9312 Merge pull request # 121117 from MadhavJivrajani/bump-x-net
  > 65efe91 refactor: export correlated fields
  > 926e59f .: bump golang.org/x/net to v0.17.0
  > 572541a refactor: add methods for Key and Index on CorrelatedObject
  > 4395afc Merge pull request # 121082 from pohly/ginkgo-gomega-update
  > 2edf24b refactor: factor out object correlation
  > c79aa2d dependencies: ginkgo v2.13.0, gomega v1.28.0
  > 3d3926e refactor: directly implement ValueValidator
  > 993ffb2 Merge pull request # 119865 from charles-chenzz/bump_deps
  > a2f29d7 refactor: remove unnecessary lambda (noop)
  > e82831d Merge pull request # 120836 from jkh52/knp-0.28.0
  > c61c50c bump github.com/emicklei/go-restful/v3 to v3.11.0.
  > 814b880 Bump Konnectivity to 0.28.0
  > 768cdd0 Merge pull request # 119526 from sttts/sttts-idiomatic-cached
  > 5447ad1 hack/update-vendor.sh
  > 5fb788d Fixup kube-openapi/pkg/cached changes
  > f606a30 Merge pull request # 120506 from alexzielenski/import-restrictions
  > 1662f59 Merge pull request # 120575 from benluddy/precompute-cr-accepts
  > edf0fab pin gengo
  > 8a224a3 Reuse SupportedMediaTypes for CR content-type negotiation.
  > f181a5b Merge pull request # 120008 from skitt/drop-intstr-ptr-wrappers
  > bb94040 Merge pull request # 120499 from tukwila/gorilla/websocket_v1.5.0
  > ac3c148 Use ptr.To to retrieve intstr addresses
  > a74bd29 Merge pull request # 120517 from Xunzhuo/patch-2
  > 2f12351 bump: upgrade gorilla/websocket from v1.4.2 to v1.5.0
  > fd3561e fix: update thirdpartyresources refs
  > 766529e Merge pull request # 119334 from kmala/serverapply
  > c19991e Merge pull request # 120368 from Jefftree/openapi-remove-openapiv2-skip-filter
  > b4e4965 update the dependency sigs.k8s.io/structured-merge-diff/v4 to latest tag
  > 81659cd remove SkipFilterSchemaForKubectlOpenAPIV2Validation
  > ab27435 Merge pull request # 120327 from liggitt/json-patch
  > c1cd86f Merge pull request # 120218 from rakshitgondwal/feat/protobuf-version-update
  > 9e3e06b Revert to json-patch 4.12.0
  > 11f7fbc Merge pull request # 120177 from stevekuznetsov/skuznets/generate-crd-applyconfigurations
  > a634982 feat: update google.golang.org/protobuf to v1.31.0
  > 003b8d4 apiextensions-apiserver: generate applyconfigurations
  > 3b8c9f2 Merge pull request # 119508 from nayihz/fix_finalizer_validation
  > dc999a6 Merge pull request # 120060 from jpbetz/cel-features-1_29
  > 6de9313 fix crd finalizer validation
  > 166c3df Merge pull request # 120109 from Jefftree/fix-openapi-test-flakee
  > c18aa20 Bump cel string lib to v2, add tests
  > eec2ef6 Merge pull request # 120097 from jpbetz/fix-ppc64le
  > c47325f Add wait for cache sync
  > 62666cd Bump cel-go to v0.17.6
  > 1c8c9c2 Fix CEL cost handling of zero length replacement strings
  > 712e602 Merge pull request # 119800 from jpbetz/cost-fix
  > 36d7f30 Merge pull request # 118455 from linxiulei/managedFields
  > b1ccb14 Add test coverage of result size of string operations
  > 1b4a228 Merge pull request # 119725 from MadhavJivrajani/bump-net-dep
  > ccb7153 Run hack/update-codegen.sh informers subprojects
  > ffb4444 Bump cel-go to v0.16.1
  > 9bd0aa3 .*: bump golang.org/x/net to v0.13.0
  > 1f93812 Merge pull request # 119653 from sttts/sttts-crd-stored-version-errors
  > cfdb852 apiextensions: fix validation error for status.storedVersions
  > 705af05 Use statusReason for reason under x-kubernetes-validations (# 119544)
bumping google.golang.org/api 87aa1d0...548436b:
  > 548436b chore(main): release 0.167.0 (# 2428)
  > 55a9e5a feat(all): auto-regenerate discovery clients (# 2429)
  > f72b5af feat(all): auto-regenerate discovery clients (# 2427)
  > 133e58b chore(main): release 0.166.0 (# 2418)
  > 446a6bd feat(all): auto-regenerate discovery clients (# 2426)
  > b7d596b chore(all): update all (# 2423)
  > 124a535 feat(all): auto-regenerate discovery clients (# 2425)
  > b3f9c38 feat(all): auto-regenerate discovery clients (# 2424)
  > af6aa38 feat(all): auto-regenerate discovery clients (# 2421)
  > 762eb61 feat(all): auto-regenerate discovery clients (# 2420)
  > c969083 feat(all): auto-regenerate discovery clients (# 2419)
  > 260fc1e feat(all): auto-regenerate discovery clients (# 2417)
  > e451477 chore(main): release 0.165.0 (# 2415)
  > deab77d feat(all): auto-regenerate discovery clients (# 2416)
  > c702880 feat(all): auto-regenerate discovery clients (# 2414)
  > 3ff4bc1 chore(main): release 0.164.0 (# 2407)
  > edbe996 fix(transport): disable universe domain check if token source (# 2413)
  > 05a0882 chore(all): update all (# 2410)
  > 51d5068 feat(all): auto-regenerate discovery clients (# 2412)
  > 246b19f feat(all): auto-regenerate discovery clients (# 2409)
  > f1b37df feat(all): auto-regenerate discovery clients (# 2408)
  > 1bd8304 feat(all): auto-regenerate discovery clients (# 2406)
bumping k8s.io/client-go 94205f8...62c5e9e:
  > 62c5e9e Update dependencies to v0.29.2 tag
  > baea19d Merge pull request # 122429 from MadhavJivrajani/tools-bump-129
  > 3373afd .*: bump golang.org/x/tools to v0.16.1
  > 288368e update go.mod
  > 86d49e7 Merge pull request # 113374 from ahmedtd/kep-3257-projected-types
  > 59c256a Regenerate for ClusterTrustBundlePEM projected volume API
  > ac369c3 Define ClusterTrustBundlePEM projected volume
  > 66e57f7 Merge pull request # 121552 from pohly/klog-update
  > 8b96b9b dependencies: klog v2.110.1
  > c13269d Merge pull request # 116516 from aojea/servicecidr
  > 7523a34 Merge pull request # 121575 from apelisse/update-smd
  > 60aa89a make update with the new API with arrays
  > 965bc8d Merge pull request # 121104 from carlory/kep-3751-api-changes
  > ce4f256 Update sigs.k8s.io/structured-merge-diff to v4.4.1
  > 824910b make update
  > 6278c99 generated changes
  > 477cb78 Merge pull request # 121089 from tkashem/apf-v1
  > 5a34ab5 apiserver: add generated files for flowcontrol api change
  > 20fd67f apiserver: generate code for apf flowcontrol v1 API
  > 30eba26 Merge pull request # 121524 from carlory/gomega
  > 8ec95e1 bump gomega to 1.29.0
  > 4028f5b Merge pull request # 121338 from dims/working-otel-bump
  > 08f1ffe working-config-otel
  > e2e59f3 Merge pull request # 119186 from seans3/stream-translator-proxy
  > c925374 Merge pull request # 120397 from ty-dc/StaticCheck
  > b7d73dd StreamTranslator and FallbackExecutor for WebSockets
  > b003667 Merge pull request # 116065 from sanposhiho/match-label-key-alternative
  > 0447e1f cleanup: omit comparison with bool constants
  > 5f697ab Merge pull request # 121363 from p0lyn0mial/upstream-reflector-consistency-check
  > a462882 feature(scheduler): implement matchLabelKeys in PodAffinity and PodAntiAffinity
  > 33d1400 Merge pull request # 120757 from alexzielenski/apiserver/openapi/invalid-default
  > 0f984dc client-go/reflector: introduce a data consistency mechanism for the watch-list feature.
  > b592521 update generated code and openapi
  > 30f741e pin openapi
  > 435ce6f Merge pull request # 121010 from Jefftree/decouple-openapi-v2v3-config
  > 9f0ec66 Merge pull request # 119802 from takirala/tga/update-ErrGroupDiscoveryFailed
  > f68660d bump kube-openapi
  > 17c66cc Merge pull request # 119026 from AxeZhan/sleepAction
  > 5a38750 fix: add code comments
  > 5cf6418 codegen
  > f936552 client-go: chore: implement `Is` interface for `ErrGroupDiscoveryFailed`
  > 52c50bf Merge pull request # 121229 from aojea/remove_cluster_cidr
  > 46e82c5 Merge pull request # 120248 from pacoxu/grpc-container-probe
  > 656ec39 remove ClusterCIDR
  > bc7002f Merge pull request # 120735 from Jefftree/request-body
  > 92c5c93 remove GAed FG GRPCContainerProbe
  > d02858f Merge pull request # 121106 from aojea/ipaddress_uid
  > c0416e6 bump kube-openapi
  > 57d597c Add shortname ambiguity warning in shortcut expander (# 117668)
  > 55f8f3f make update
  > cf4002b Merge pull request # 121111 from dashpole/update_otel_deps
  > 0b5d6df dependencies: update otel-go dependencies
  > b4ee45c Merge pull request # 121117 from MadhavJivrajani/bump-x-net
  > 9f19d0f .: bump golang.org/x/net to v0.17.0
  > 9518c80 Merge pull request # 121082 from pohly/ginkgo-gomega-update
  > 5b14e64 Merge pull request # 120975 from ardaguclu/close-heartbeat-explicitly
  > fa053c2 dependencies: ginkgo v2.13.0, gomega v1.28.0
  > 0a782d6 Merge pull request # 120729 from pohly/events-context
  > 583e50d Use timeout function to detect transient errors
  > ca71863 Merge pull request # 120984 from p0lyn0mial/upstream-reflector-always-fallback-to-listwatch
  > cf07629 k8s.io/client-go/tools/events: pass context into EventSink methods
  > 9a88950 revert back to IsUnexpectedCloseError check
  > 1e0855a reflector: fallback to the previous mode on any error
  > 3595e52 k8s.io/client-go/tools: support context for event recording
  > e95d92d Close websocket heartbeat explicitly when unexpected closure received
  > fbb1575 Merge pull request # 120980 from p0lyn0mial/upstream-client-go-close-watcher
  > 2c9d749 reflector: close an established watcher when the StopCh was closed
  > d6dc079 Merge pull request # 120716 from xrstf/fix-typos
  > 6b97f71 Merge pull request # 119865 from charles-chenzz/bump_deps
  > 0d1af04 fix typo dervied => derived
  > 52cc500 Merge pull request # 120865 from aojea/remotecmd_flake
  > bf89966 bump github.com/emicklei/go-restful/v3 to v3.11.0.
  > 011db22 deflake TestWebSocketClient_HeartbeatSucceeds
  > 34d1b64 Merge pull request # 120799 from aojea/workqueue_test
  > 657ffa5 Merge pull request # 120752 from p0lyn0mial/upstream-client-go-initial-events-value
  > 374e363 workqueue unit tests to assert collapsing behaviors
  > d0ea06d cache/reflector: check the value of the initial-events-end annotation
  > b5b9332 Merge pull request # 120694 from aojea/ws_healthchec
  > 08f8929 Merge pull request # 119526 from sttts/sttts-idiomatic-cached
  > ea6e035 add loging and bump timers to avoid races
  > 278669d hack/update-vendor.sh
  > 908cc0a Merge pull request # 120513 from devincd/fix-typo
  > 44a68ee Merge pull request # 120508 from aojea/aojea_owner
  > f242a56 fix typo in client-go package
  > a73949f Merge pull request # 120008 from skitt/drop-intstr-ptr-wrappers
  > 5ac9cf8 add aojea as client-go approver
  > a52e8a1 Merge pull request # 120499 from tukwila/gorilla/websocket_v1.5.0
  > f0c65af Use ptr.To to retrieve intstr addresses
  > 951672f bump: upgrade gorilla/websocket from v1.4.2 to v1.5.0
  > 53c02af Merge pull request # 119334 from kmala/serverapply
  > f5a7a42 Merge pull request # 119157 from seans3/websocket-executor
  > 77918e1 update the dependency sigs.k8s.io/structured-merge-diff/v4 to latest tag
  > fd1e22b WebSocket Client and V5 RemoteCommand Subprotocol
  > 4783d28 Merge pull request # 119410 from Jefftree/kubectl-cleanup
  > 5e052e4 Merge pull request # 119870 from Jefftree/agg-discovery-406
  > f02c594 Cleanup kubectl legacy server fallback
  > f28f485 Merge pull request # 120259 from SataQiu/clean-apf-20230830
  > c4ed5da Fallback to legacy discovery on a wider range of conditions in aggregator
  > 5e5ba6b Merge pull request # 120327 from liggitt/json-patch
  > def2075 apf: remove v1alpha1 API
  > fb2e668 Merge pull request # 120218 from rakshitgondwal/feat/protobuf-version-update
  > f6f4d3c Revert to json-patch 4.12.0
  > 5af0bb9 feat: update google.golang.org/protobuf to v1.31.0
  > 4dd144a Merge pull request # 119962 from pohly/dra-api-list-type
  > e8815ff Merge pull request # 118653 from pohly/volume-resource-requirements
  > cb120b6 api: change list type for node lists in PodSchedulingContext
  > 3fe9aa4 Merge pull request # 119790 from seantywork/added-comment
  > 86ae84a generated files
  > c1466ac Merge pull request # 119883 from ls-2018/json
  > ff3618f kubernetes mutual (2-way) x509 comment
  > 9c6b659 Merge pull request # 119937 from RyanAoh/kep-1860-dev
  > a8fc969 Fix: null jsonpath serialization
  > d124e52 Merge pull request # 119806 from enj/enj/i/delete_psp_api
  > 4a487f6 Generated code for IP mode field
  > edce1de Merge pull request # 119728 from pohly/ssa-forbid-extract-calls
  > 1e11b3a Delete PSP API types and generated clients
  > 9a5370b Merge pull request # 119907 from Hii-Arpit/Hii-Arpit-Fixing-Broken-Link
  > ed2b4f0 SSA: prevent usage of Extract calls via forbidigo
  > 54237a5 Merge pull request # 119796 from sttts/sttts-caches-populated
  > f4a635a Update README.md
  > b97d8af Merge pull request # 119554 from davidmccormick/prevent-race-client-go-workqueue-shutdown
  > 00f8b3a client-go: log proper 'caches populated' message, with type and source and only once
  > 856e847 Merge pull request # 118455 from linxiulei/managedFields
  > e9b0103 Fix a race where a call to Shutdown was happening after ShutDownWithDrain() had performed the check q.isProcessing() && q.shouldDrain() and before waitForProcessing() has reached its Wait().  This is because waitForProcessing() is only checking the length part of the condition instead of both the length and whether we still need to drain.
  > 08b51e9 Merge pull request # 118399 from skitt/ioutil-sig-api-machinery
  > 411a118 Run hack/update-codegen.sh informers subprojects
  > 41d4a16 Merge pull request # 117992 from liggitt/gc-discovery-flutter
  > caded3c api-machinery: stop using deprecated io/ioutil
  > da4a4e2 Add 'WithTransform' SharedInformerOption
  > b8a03ab Merge pull request # 119876 from marosset/revert-118895
  > daed746 Add GroupDiscoveryFailedErrorGroups helper method
  > 04dcae2 Merge pull request # 119835 from liggitt/mitigate-aggregated-discovery-npe
  > 32bbd73 Revert "Merge pull request # 118895 from RyanAoh/kep-1860"
  > bf44ac9 Avoid returning nil responseKind in v1beta1 aggregated discovery
  > 49410bf Merge pull request # 119725 from MadhavJivrajani/bump-net-dep
bumping k8s.io/apimachinery 46a872e...dc7e034:
  > dc7e034 Merge pull request # 122429 from MadhavJivrajani/tools-bump-129
  > 7d94fef .*: bump golang.org/x/tools to v0.16.1
  > 3c8c1f2 update go.mod
  > 12dc3f8 Merge pull request # 113374 from ahmedtd/kep-3257-projected-types
  > 03a1b4b LRUExpireCache: Allow removing multiple keys under lock
  > bc0a03b Merge pull request # 119762 from AxeZhan/PollUntilContextCancel
  > 16d50e6 Merge pull request # 121552 from pohly/klog-update
  > 5916a9f add new test cases
  > 6b13b03 dependencies: klog v2.110.1
  > 41ffa42 remove dead code in test
  > 96ae302 Merge pull request # 121575 from apelisse/update-smd
  > abbf317 fix wait.PollUntilContextCancel immediately executes condition once
  > 458fd90 Merge pull request # 120707 from Jefftree/csa-openapiv3
  > 8dbf841 managedfields: Allow duplicates for built-in updates associative lists
  > 850727f Merge pull request # 120592 from AxeZhan/validation_sets
  > 5a8e3a4 use OpenAPIV3 for kubectl diff
  > 96a678f Update sigs.k8s.io/structured-merge-diff to v4.4.1
  > 92fa50e Merge pull request # 121524 from carlory/gomega
  > 092c2b3 generic set
  > 97be40b Use OpenAPI V3 for client side SMP
  > aa1cb92 bump gomega to 1.29.0
  > 0785eb2 Merge pull request # 121338 from dims/working-otel-bump
  > bf719fd working-config-otel
  > c18d2bf Merge pull request # 119186 from seans3/stream-translator-proxy
  > 1e138bd Merge pull request # 120397 from ty-dc/StaticCheck
  > 20301d1 StreamTranslator and FallbackExecutor for WebSockets
  > c047e32 Merge pull request # 120757 from alexzielenski/apiserver/openapi/invalid-default
  > b50b428 cleanup: omit comparison with bool constants
  > 32607c7 pin openapi
  > a1b8da8 Merge pull request # 121010 from Jefftree/decouple-openapi-v2v3-config
  > e0ab1cf Merge pull request # 117411 from tenzen-y/add-multiply-method
  > 315a5b1 bump kube-openapi
  > 51716cc Add a 0 × 0 case
  > 71b21d9 Verify more carefully the results in the TestInt64AmountMul
  > f9de319 Add test cases for mostPositive and mostNegative
  > 9cda16f Add more unit tests
  > 56ec8d7 Multiply by a scalar
  > 0773351 quantity: Add multiplication methods
  > be91880 Merge pull request # 121120 from enj/enj/i/h2_dos
  > e04f17b Merge pull request # 120735 from Jefftree/request-body
  > a0fd4b0 Prevent rapid reset http2 DOS on API server
  > dba4e33 bump kube-openapi
  > 1ca6c69 Merge pull request # 121111 from dashpole/update_otel_deps
  > 624de72 dependencies: update otel-go dependencies
  > 3bbde9f Merge pull request # 121117 from MadhavJivrajani/bump-x-net
  > 0e0e381 .: bump golang.org/x/net to v0.17.0
  > 67d44f9 Merge pull request # 121082 from pohly/ginkgo-gomega-update
  > 63f41b3 dependencies: ginkgo v2.13.0, gomega v1.28.0
  > 839ad94 Merge pull request # 120542 from alvaroaleman/condition-change
  > a017454 Merge pull request # 118761 from TommyStarK/gh_113831
  > 316b59e Apimeta Set/RemoveStatusCondition: Indicate change
  > 64708d3 Merge pull request # 119526 from sttts/sttts-idiomatic-cached
  > 9e33432 move common logic of highestSupportedVersion to util package
  > d60b6e4 hack/update-vendor.sh
  > fd8daa8 Merge pull request # 120008 from skitt/drop-intstr-ptr-wrappers
  > ee8dcbc Merge pull request # 119619 from skitt/intstr-parse-parseint
  > 84bc68b Use ptr.To to retrieve intstr addresses
  > 82362bc Merge pull request # 119334 from kmala/serverapply
  > 79c2b87 Limit intstr.Parse() to 32-bit integer parsing
  > 3514784 Merge pull request # 119157 from seans3/websocket-executor
  > 3a170ca update the dependency sigs.k8s.io/structured-merge-diff/v4 to latest tag
  > 73d12d0 WebSocket Client and V5 RemoteCommand Subprotocol
  > 0d057e5 Merge pull request # 120327 from liggitt/json-patch
  > de716d7 Merge pull request # 119801 from wojtek-t/refactor_watch_encoders
  > 3235353 Revert to json-patch 4.12.0
  > 1629459 Merge pull request # 120218 from rakshitgondwal/feat/protobuf-version-update
  > 00225c4 Refactor WatchServer to prepare for using encoders
  > 9725a00 feat: update google.golang.org/protobuf to v1.31.0
  > 3e2600d cleanup: Update deprecated FromInt to FromInt32 (# 119858)
  > 5f41d7c Merge pull request # 119844 from enj/enj/i/upgrade_regex
  > 4c378f8 Merge pull request # 118989 from crenshaw-dev/better-error-message
  > a1adee5 wsstream: use a single approach to detect connection upgrade
  > 14436eb Merge pull request # 118399 from skitt/ioutil-sig-api-machinery
  > e1b5587 chore: improve error message for unstructured helper method
  > 8071e5f Merge pull request # 119725 from MadhavJivrajani/bump-net-dep
  > 9cc9191 api-machinery: stop using deprecated io/ioutil

Signed-off-by: Knative Automation <automation@knative.team>

* Bump cli-runtime to match rest of k8s.io modules

* Fix renamed volumes field

* Fix one more occurence

---------

Signed-off-by: Knative Automation <automation@knative.team>
Co-authored-by: David Simansky <dsimansk@redhat.com>
2024-02-28 15:15:18 +00:00
Matej Vašek e2ea83ca8e
chore: update docker to v25 (#2160)
* chore: update docker to v25

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: update pack dep

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* chore: unpin moby/buildkit

Signed-off-by: Matej Vašek <mvasek@redhat.com>

* fixup: use upstream source-to-image

Signed-off-by: Matej Vašek <mvasek@redhat.com>

---------

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-02-28 13:28:30 +00:00
David Fridrich 7e95ca2181
Cleanup orphaned func, new image-name calculation (#1962)
* forced namespace change, deletes old func, kind works

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* new .deploy.image field

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* building

* building

* add first iteration of complete functionality with f.Build.Image and f.Deploy.Image that STILL contains a workaround for image digest which is populated on Push instead of Build

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* base tests fixes for compile

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix base tests2 for now, integration test has a possible TODO

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* new generated schema

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix some tests using .Image and create new test

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* remove nested .func

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* get rid of test

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* remove my debug test

* fix namespace change test

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix pipeline run to use .Deploy.Image

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix TestDeploy_ConfigApplied and change pipelines image being used

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix some tests

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix actions - return value, configApplied and registry on subsequent deploy different

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* update empty image in tests issue

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix client.Apply tests with passing image value to .Deploy after push

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* openshift override on namespace change forced, remove useless print

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* printing fixes, reviewdog, buildConfig return

* fix pipelines test by feeding image name to .Deploy, comments

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* update more tests

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* new test, comment

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* misspell

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* remove unnecessary comments

* fix from review

* namespace updated with 2 fields; new error definitions; deploy functionality cleanup

* remove k8s service host var in test

* error definition; fix client tests; cli delete fixup

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* new schema

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* namespace fixes; remover arguments fix

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* delete_test cmd

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* schema, new local remote flag instead of deploy

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix test to have now required namespace

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* add namespace check, test action

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix integration deploy test, comments

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix wrongly removed namespace

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* small changes to remover and ns added to its tests

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* test moving logic to client

* fix deploy bug, remove verbose for better logs

* pipelines, clean remover

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* newline

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* namespace required in remover, and fixed remote deployer - returns ns

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* fix integ test for pipelines.Run

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* cleanup

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* registry update change on deploy, some prints

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* new deploy tests and mock update

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* new tests, ns determination in mocks

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* deploy digested img doesnt populate build

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* comments

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* remove todo

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

---------

Signed-off-by: gauron99 <fridrich.david19@gmail.com>
2024-02-27 10:44:20 +00:00
David Fridrich fcdafd7d1b
unreliable gitlab test skip (#2186)
* unreliable gitlab test skip

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* comm

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

---------

Signed-off-by: gauron99 <fridrich.david19@gmail.com>
2024-02-27 09:37:48 +00:00
github-actions[bot] 51f7a70b9a
chore: update Springboot platform version to 3.2.3 (#2180)
Co-authored-by: Knative Automation <automation@knative.team>
2024-02-25 15:34:56 +00:00
Matthias Wessendorf e3576d3225
🧹 Remove discontinued tanzu builder image (#2178)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-02-22 13:18:08 +00:00
github-actions[bot] 267a03c8c8
chore: update Quarkus platform version to 3.7.4 (#2176)
Co-authored-by: Knative Automation <automation@knative.team>
2024-02-22 11:00:59 +01:00
Knative Automation 32b9492300
Update community files (#2175)
Signed-off-by: Knative Automation <automation@knative.team>
2024-02-21 02:35:59 +00:00
github-actions[bot] 0adbbfbf9b
chore: update Quarkus platform version to 3.7.3 (#2173)
Co-authored-by: Knative Automation <automation@knative.team>
2024-02-21 02:15:12 +00:00
Luke Kingland 9ca1b6d709
feat: host builder nonregular file support (#2156)
* host builder nonregular files

* disallow links outside root

* add back in correct path support for windows

* code review updates

* host builder file test

* windows-specific absolute link check

* windows-specific test

* refactor

Resolve the link target one level higher such that it can be used
when creating the tar header without repetition.

* validate link header targets

* expand link test

* merge os-specific test cases

* remove os filter and unused arg
2024-02-20 03:50:05 +00:00
Matthias Wessendorf b97d841b34
💫 Bump to v0.20.0 (#2170)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-02-19 20:51:12 +00:00
Matthias Wessendorf e0a8a2840f
Updates to MD file (#2169)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-02-19 08:11:44 +00:00
Sanket Teli d2fb76c39d
typo in run cmd (#2168) 2024-02-16 21:10:19 +00:00
Knative Automation acee46ac4f
Update community files (#2163)
Signed-off-by: Knative Automation <automation@knative.team>
2024-02-14 17:34:48 +00:00
Knative Automation 76f680e359
upgrade to latest dependencies (#2164)
bumping knative.dev/client-pkg a722b38...adb84bd:
  > adb84bd Update community files (# 149)
bumping knative.dev/hack d1067f2...6090613:
  > 6090613 Update community files (# 366)
bumping knative.dev/pkg bc60487...b8f9b22:
  > b8f9b22 Update community files (# 2957)
bumping knative.dev/serving 06eac8e...5efa21e:
  > 5efa21e Update net-gateway-api nightly (# 14892)
  > dad0326 Update net-contour nightly (# 14884)
  > 4286c63 Update community files (# 14890)
bumping knative.dev/eventing 7d350ea...97e91c5:
  > 97e91c5 [main] Update community files (# 7675)
  > eac7384 Wait for events with poll interval after finished event received (# 7668)
  > ba77c3d [main] Update community files (# 7672)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-14 17:04:48 +00:00
Knative Automation c684748863
upgrade to latest dependencies (#2162)
bumping knative.dev/serving 280c922...06eac8e:
  > 06eac8e Update net-kourier nightly (# 14885)
  > 3544fa0 Update net-certmanager nightly (# 14883)
  > 7da1f45 Update net-gateway-api nightly (# 14882)
  > 48ca4cd Update net-istio nightly (# 14886)
bumping knative.dev/pkg 405f0c4...bc60487:
  > bc60487 Update community files (# 2956)
bumping knative.dev/eventing 185fbf4...7d350ea:
  > 7d350ea [main] Upgrade to latest dependencies (# 7669)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-14 02:31:44 +00:00
Knative Automation 6cb76a1c65
Update community files (#2161)
Signed-off-by: Knative Automation <automation@knative.team>
2024-02-14 01:57:50 +00:00
Knative Automation bd4a334b04
upgrade to latest dependencies (#2159)
bumping knative.dev/eventing 03ed4ab...185fbf4:
  > 185fbf4 [main] Update community files (# 7671)
bumping knative.dev/pkg 2d2e27d...405f0c4:
  > 405f0c4 Update community files (# 2955)
bumping knative.dev/hack f3881d9...d1067f2:
  > d1067f2 Update community files (# 365)
bumping knative.dev/client-pkg 788b4b0...a722b38:
  > a722b38 Update community files (# 148)
bumping knative.dev/serving 774cca0...280c922:
  > 280c922 Update community files (# 14880)
  > 2125772 Updating DEVELOPMENT.md to remove reference to allowedFields or preserveUnknownFields (# 14865)
  > 7882fa9 upgrade to latest dependencies (# 14878)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-13 16:15:36 +00:00
Knative Automation c50d9d33e3
Update community files (#2158)
Signed-off-by: Knative Automation <automation@knative.team>
2024-02-13 14:23:20 +00:00
Knative Automation d04b7ad76a
upgrade to latest dependencies (#2157)
bumping golang.org/x/net cb5b10f...73d21fd:
  > 73d21fd go.mod: update golang.org/x dependencies
  > 643fd16 html: fix SOLIDUS '/' handling in attribute parsing
  > 73e4b50 dns/dnsmessage: allow name compression for SRV resource parsing
  > b2208d0 internal/quic/qlog: fix typo
  > 0d0b98c http2: avoid goroutine starvation in TestServer_Push_RejectAfterGoAway
  > 07e05fd http2: remove suspicious uint32->v conversion in frame code
  > 26b646e quic: avoid deadlock in Endpoint.Close
bumping golang.org/x/sys 0829ab1...914b96c:
  > 914b96c windows: support ill-formed UTF-16 in UTF16PtrToString
  > 511ec84 Revert "windows: support nil done parameter in ReadFile and WriteFile"
  > 628365d windows: support nil done parameter in ReadFile and WriteFile
  > bef1bd8 unix: move mksyscall regexp to package level variables
  > 5710a32 unix/linux: update Linux kernel to 6.7
  > b3ce6a3 windows: build env_windows_test.go only go Go 1.21 and above
  > c3fa2b8 windows: fix parsing of non-ASCII entries in token.Environ
  > f69d32a unix: in TestDirent, make as many ReadDirent calls as are needed
  > 0d9df52 unix: add more SECCOMP constants
bumping golang.org/x/crypto dbb6ec1...405cb3b:
  > 405cb3b go.mod: update golang.org/x dependencies
  > 913d3ae x509roots/fallback: update bundle
bumping knative.dev/pkg 4104e42...2d2e27d:
  > 2d2e27d Bump golang.org/x/oauth2 from 0.16.0 to 0.17.0 (# 2952)
  > 3b39834 Bump google.golang.org/api from 0.161.0 to 0.163.0 (# 2953)
  > 085f505 Bump golang.org/x/net from 0.20.0 to 0.21.0 (# 2954)
bumping golang.org/x/term ae94145...353276a:
  > 353276a go.mod: update golang.org/x dependencies
bumping google.golang.org/api befbd36...87aa1d0:
  > 87aa1d0 chore(main): release 0.163.0 (# 2402)
  > 2271ef7 feat(all): auto-regenerate discovery clients (# 2405)
  > 47834b5 feat(all): auto-regenerate discovery clients (# 2403)
  > 62ceaad feat(all): auto-regenerate discovery clients (# 2401)
  > 26a1117 chore(main): release 0.162.0 (# 2389)
  > 6862015 fix(transport): enforce 1s timeout on requests to MDS universe_domain (# 2393)
  > a6d137b chore(all): update all (# 2396)
  > 5437df8 chore(all): update module github.com/google/go-github/v52 to v58 (# 2397)
  > eddfeb9 feat(all): auto-regenerate discovery clients (# 2398)
  > 169ead6 feat(all): auto-regenerate discovery clients (# 2395)
  > 140fb54 feat(all): auto-regenerate discovery clients (# 2394)
  > e5a7a15 feat(all): auto-regenerate discovery clients (# 2392)
  > c8e77f6 feat(all): auto-regenerate discovery clients (# 2391)
  > f2f2d22 feat(all): auto-regenerate discovery clients (# 2388)
bumping google.golang.org/genproto/googleapis/rpc a9fa171...1f4bbc5:
  > 1f4bbc5 chore(all): auto-regenerate .pb.go files (# 1083)
  > ef43131 chore(all): auto-regenerate .pb.go files (# 1082)
  > 6c6643b chore(all): update all (# 1078)
bumping golang.org/x/oauth2 39adbb7...ebe81ad:
  > ebe81ad go.mod: update golang.org/x dependencies
  > adffd94 google/internal/externalaccount: update serviceAccountImpersonationRE to support universe domain
  > deefa7e google/downscope: add DownscopingConfig.UniverseDomain to support TPC
bumping knative.dev/eventing 6f2eaed...03ed4ab:
  > 03ed4ab wathola receiver, annotate span by step number (# 7667)
bumping knative.dev/serving 87e6199...774cca0:
  > 774cca0 Update net-istio nightly (# 14873)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-12 13:55:47 +00:00
Knative Automation 0d586b5bd6
upgrade to latest dependencies (#2155)
bumping knative.dev/eventing bcb6100...6f2eaed:
  > 6f2eaed Set default value for scale cache config values (# 7666)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-12 10:56:31 +00:00
Knative Automation cfd1358f2d
upgrade to latest dependencies (#2149)
bumping knative.dev/serving 1760f08...87e6199:
  > 87e6199 feat: Add ability to configure multiple wilcard domains (# 14543)
  > 52b4b09 Update net-istio nightly (# 14870)
bumping knative.dev/eventing 5500bed...bcb6100:
  > bcb6100 e2e: nodeselector in apiserversauce (# 7627)
  > 836f4da feat: replace yaml merge tags (# 7662)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-09 11:52:51 +00:00
Matej Vasek 822c7d2b32
chore: updated BP builder updater (#2153)
Newer version of pack does support adding custom labels to the builder
so the Dockerfile workaround is not needed anymore.
Also the Dockerfile workaround was failing recently due to high
number of layers in full builder.

Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-02-09 08:31:29 +00:00
Matej Vasek 37285a053a
chore: update pack to v0.33.0 (#2148)
Signed-off-by: Matej Vašek <mvasek@redhat.com>
2024-02-09 06:46:41 +00:00
github-actions[bot] fe9e0577a9
chore: update Quarkus platform version to 3.7.2 (#2152)
Co-authored-by: Knative Automation <automation@knative.team>
2024-02-08 17:17:57 +00:00
Knative Automation 69aaed9c77
upgrade to latest dependencies (#2147)
bumping knative.dev/eventing 469d0ac...5500bed:
  > 5500bed Cache statefulset scale update/get requests (# 7651)
  > 7b975fc Update KinD for e2e tests to 0.21.0 (# 7656)
  > 96863ba [main] Upgrade to latest dependencies (# 7657)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-07 12:14:08 +00:00
Knative Automation 17bf178f02
upgrade to latest dependencies (#2146)
bumping knative.dev/eventing 62c74c1...469d0ac:
  > 469d0ac [main] Upgrade to latest dependencies (# 7654)
  > 9d892bf Remove empty labels (# 7648)
  > d258e7d Create teardown script for local development (# 7642)
bumping knative.dev/serving 19f9f30...1760f08:
  > 1760f08 Don't drop traffic when upgrading a deployment fails (# 14795)
  > 05d1927 upgrade to latest dependencies (# 14868)
  > 24bc968 Update net-contour nightly (# 14861)
  > f4bbb19 Update net-kourier nightly (# 14857)
  > 772dd36 Update net-gateway-api nightly (# 14856)
  > b44bea9 Update net-contour nightly (# 14851)
  > 0c2d16b Update net-certmanager nightly (# 14858)
bumping knative.dev/pkg e85c3cf...4104e42:
  > 4104e42 Bump google.golang.org/api from 0.159.0 to 0.161.0 (# 2951)
bumping google.golang.org/api ee5c9cc...befbd36:
  > befbd36 chore(main): release 0.161.0 (# 2387)
  > f29f327 fix(gen): reject repeated object query params (# 2383)
  > 54c764a fix(transport): skip s2a for now if service has direct path enabled (# 2385)
  > 03042ec feat(all): auto-regenerate discovery clients (# 2386)
  > dcb7e96 chore(main): release 0.160.0 (# 2381)
  > fee4c8f feat(all): auto-regenerate discovery clients (# 2384)
  > 5534cf2 feat(all): auto-regenerate discovery clients (# 2382)
  > 8f26f51 feat(all): auto-regenerate discovery clients (# 2380)
bumping knative.dev/networking 060ef7a...66bdffa:
  > 66bdffa Update community files (# 920)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-06 04:15:33 +00:00
Knative Automation e2d8e273d1
Update community files (#2143)
Signed-off-by: Knative Automation <automation@knative.team>
2024-02-02 18:04:50 +00:00
Knative Automation fdfa1f4e65
upgrade to latest dependencies (#2144)
bumping google.golang.org/genproto 989df2b...a9fa171:
  > a9fa171 fix(dataform): Remove broken aliases (# 1080)
  > 9144d31 fix(analytics): Remove broken aliases (# 1079)
  > 35c7eff chore(all): update all (# 1077)
  > 50ed04b chore(all): update all to v4 (# 1076)
  > 0d6446b chore(all): update all (# 1075)
  > 995d672 chore(all): update all (# 1073)
bumping knative.dev/client-pkg 67fca0c...788b4b0:
  > 788b4b0 Update community files (# 147)
bumping knative.dev/hack f3f03ac...f3881d9:
  > f3881d9 Update community files (# 364)
  > ab9b690 Don't hardcode serving as the repo when setting highest semver (# 361)
  > 45dcf10 Update community files (# 360)
  > 40f0ac2 Update community files (# 359)
bumping knative.dev/networking ce0738a...060ef7a:
  > 060ef7a Clean up unused reconciler and certs code (# 919)
  > bdf2c51 upgrade to latest dependencies (# 918)
  > a874708 upgrade to latest dependencies (# 917)
  > ed5f0fa upgrade to latest dependencies (# 916)
  > a21edb5 Update community files (# 915)
  > 1dcd961 Update community files (# 914)

Signed-off-by: Knative Automation <automation@knative.team>
2024-02-01 19:40:23 +00:00
github-actions[bot] 6b7708f19e
chore: update Quarkus platform version to 3.7.1 (#2142)
Co-authored-by: Knative Automation <automation@knative.team>
2024-02-01 18:47:53 +00:00
github-actions[bot] df0c0c6fc6
chore: update Quarkus platform version to 3.6.8 (#2137)
Co-authored-by: Knative Automation <automation@knative.team>
2024-01-30 18:08:53 +00:00
Knative Automation a700b89b10
upgrade to latest dependencies (#2136)
bumping github.com/prometheus/procfs 113c501...ff0ad85:
  > ff0ad85 Update for Go 1.21 (# 575)
  > ce949a5 Add `hw_counters` for infiniband device. (# 549)
  > b2168a3 infiniband: do not fail if board_id is not present (# 556)
  > 647e50e Add inode number to fdinfo (# 552)
  > 9d715e8 Add NSpid to proc status (# 557)
  > 8676d3d dongjiang, add nfs over RDMA proc parse (# 558)
  > 607adcf Fix build tags for isRealProc function (# 560)
  > a5ae62f proc_maps: Parse address and device without allocating (# 572)
  > 5056707 Improve sysfs vulnerability parsing (# 568)
  > 340d4b8 NFSd: handle new wdeleg_getattr attribute in /proc/net/rpc/nfsd (# 574)
  > e8dd544 Fixup nfs naming (# 573)
  > f22604f Update common Prometheus files
  > b6ad5a7 fix code comment error (# 561) (# 562)
  > c05b611 fix gofmt checking fail
  > 301089d dongjiang, support v4 proc4ops 38 operations
  > 8f5b8ca dongjiang, fix nfsd v4 ops index
  > e3cbe53 Bump golang.org/x/sys from 0.10.0 to 0.11.0
  > 75c02c7 Update common Prometheus files
  > e7af452 Fix annotation errors
  > c5d92ab Bump golang.org/x/sys from 0.9.0 to 0.10.0
bumping google.golang.org/protobuf 68463f0...3068604:
  > 3068604 all: release v1.32.0
  > bfcd647 protojson: configurable recursion limit when unmarshalling
  > 24fba63 gha-ci: instruct bazelisk to use previous bazel version
  > 8ed73c7 all: run integration test on longtest builders in CI
  > e8baad6 reflect/protodesc: support editions feature resolution
  > 3bfc0b0 all: drop -mod=vendor in integration test invocations
  > c9d2559 reflect/protoreflect: use go1.20 unsafe interface for strings and slices
  > a1297bf all: set required version to 1.17
  > 2b71f26 all: fix go generate (needs protolegacy build tag for weak fields)
  > 704136e protoc: update to the newest protobuf version (25.1)
  > 2087447 internal/strs: use go1.20 unsafe interface for strings
  > 9b87403 all: remove pre-module support code from integration test
  > a8317fb reflect/protodesc: don't generate invalid syntax values
  > 9492118 internal/benchmarks: make download_benchdata print an error
  > f4a6c1f types/descriptorpb: regenerate using latest protobuf v25.0-rc2 release candidate
  > 86bdc47 internal/impl: preallocate memory when unmarshalling packed repeated fields
  > 322d454 all: avoid non-const reflect.MethodByName calls
  > 6352dec prototext: Fix parsing of unknown repeated message fields
  > 8088bf8 encoding: Add EmitDefaultValues option
  > 01c8445 all: test with Go 1.20 and 1.21
  > 849f2c2 gha-ci: fix builds from cache: add ~/.cache/bazel (+ update actions)
  > 70db1e1 encoding/protojson: ignore unknown enum name if DiscardUnknown=true
  > f9212a8 all: modernize documentation
  > 6d0a5db types/descriptorpb: regenerate using latest protobuf v24.0-rc2 release candidate
  > 31694db types/dynamicpb: make atomicExtFiles the first word of the struct
  > 4396dd4 encoding/protodelim: drop TestUnmarshalFromBufioAllocations
  > 55f120e all: start v1.31.0-devel
bumping google.golang.org/genproto/googleapis/api 49dd2c1...989df2b:
  > 989df2b chore(all): update actions/setup-go action to v5 (# 1074)
  > 3a041ad chore(all): update all to 83a465c (# 1072)
  > 83a465c chore(all): update all (# 1070)
  > 419f025 chore(all): update actions/github-script action to v7 (# 1071)
  > bbf56f3 chore(all): update all (# 1069)
  > d783a09 chore(all): update all (# 1068)

Signed-off-by: Knative Automation <automation@knative.team>
2024-01-24 17:02:23 +00:00
github-actions[bot] 5caabf2087
chore: update Quarkus platform version to 3.6.7 (#2131)
Co-authored-by: Knative Automation <automation@knative.team>
2024-01-24 16:24:30 +00:00
github-actions[bot] 73c08a9f11
chore: update Springboot platform version to 3.2.2 (#2134)
Co-authored-by: Knative Automation <automation@knative.team>
2024-01-24 16:11:36 +00:00
David Simansky 00dabe3242
Remove toolchain directive (#2135) 2024-01-24 15:08:18 +00:00
Matej Vasek 2f3a04845e
fix: sprintboot version auto-updater (#2132)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2024-01-24 06:14:04 +00:00
Matthias Wessendorf ca64536ca7
💫 Bump for GO-GIT 5.11 (#2130)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-01-23 15:43:51 +00:00
Knative Automation bcaaebf9c6
Update community files (#2129)
Signed-off-by: Knative Automation <automation@knative.team>
2024-01-23 12:00:03 +00:00
Matthias Wessendorf c252c4f537
Springboot bumps (#2126)
* 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>
2024-01-22 18:45:03 +00:00
Knative Automation 8e56c521bd
Update community files (#2125)
Signed-off-by: Knative Automation <automation@knative.team>
2024-01-19 15:51:27 +00:00
Gunjan Vyas e6c53eb083
func write: write localsettings to .func/local.yaml (#2121) 2024-01-19 08:56:06 +00:00
github-actions[bot] 8107d7167f
chore: update Quarkus platform version to 3.6.6 (#2124)
Co-authored-by: Knative Automation <automation@knative.team>
2024-01-18 20:17:38 +00:00
Matej Vasek 443b8f3d55
fix: use correct Go version in GH action (#2123)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2024-01-18 18:37:08 +00:00
Matthias Wessendorf 6c3221381b
💫 Testing two sources(brokers) and third invocation for an override on the first (#2118)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-01-16 15:21:28 +00:00
Matthias Wessendorf e4430de1f2
Invoke instanced CE function's handle withNew() (#2119)
* 💄 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>
2024-01-16 15:00:37 +00:00
Matej Vasek 8ecf77d4c4
chore: use Quarkus BP instead of expicit envvars (#2117)
The envvars do not have to be set manually anymore since Quarkus BP will
set them for us.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2024-01-16 13:51:10 +00:00
Matthias Wessendorf b29f702d79
Dont duplicate subscriptions (#2116)
* We do not want to add duplicated subscriptiosn

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* new unit test

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

---------

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-01-16 00:43:09 +00:00
Knative Automation 98e5b255ea
Update community files (#2114)
Signed-off-by: Knative Automation <automation@knative.team>
2024-01-15 20:07:40 +00:00
Matthias Wessendorf 2ebaf5739e
Smooth syntax (#2115)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2024-01-12 06:29:47 +00:00
Jefferson Ramos 7f44e712b3
doc: update func subscribe doc (#2113) 2024-01-11 07:05:16 +00:00
Matej Vasek 152d00901b
fix: GitLab test (#2112)
* fix: GitLab test

Update to URL used in newer versions of GitLab.

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

* fixup: increase resource limit

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2024-01-10 17:35:43 +00:00
Jefferson Ramos cc0121f118
add --path option to subscribe command (#2111) 2024-01-10 13:59:29 +00:00
Jefferson Ramos d57c454453
test: adding e2e test for func subscribe command (#2110) 2024-01-10 13:47:11 +00:00
Knative Automation 4daa88531d
Update community files (#2109)
Signed-off-by: Knative Automation <automation@knative.team>
2024-01-09 10:55:58 +00:00
Luke Kingland 32f6d8de7d
func-go v0.19.0 (#2103) 2023-12-18 09:51:37 +00:00
Matej Vasek b9c11c3a5f
chore: include Quarkus BP in our builders (#2106)
* refactor: rename func

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

* chore: include Quarkus buildpack in our builder

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

* fixup: add err check

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

* fixup: close body after use

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

* fixup: validate path in tar header

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

* fixup: disable symlink support

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

* fixup: sanitize tar file name

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

* fixup: use correct image path

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-12-13 18:43:54 +00:00
Luke Kingland c4d0bc6ca1
fix: replace git-urls with patched fork (#2105)
* fix: replace git-urls with patched fork

* update licenses
2023-12-12 11:01:27 +00:00
Matej Vasek 76fde174de
fix: update Quarkus template readme (#2101)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-12-07 15:35:08 +00:00
Knative Automation 9f1568cf9f
Update community files (#2098)
Signed-off-by: Knative Automation <automation@knative.team>
2023-12-05 02:01:27 +00:00
Matej Vasek fa77c2897d
chore: update Go lint (#2100)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-12-04 17:03:38 +00:00
AdamKorcz 7ebf92dc5b
Log if image is referenced by tag (#2090)
* Log if image is referenced by tag

Signed-off-by: AdamKorcz <adam@adalogics.com>

* fixup: do not warn with standard images

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

---------

Signed-off-by: AdamKorcz <adam@adalogics.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2023-11-29 17:09:23 +00:00
Knative Automation 284da86f51
Update community files (#2095)
Signed-off-by: Knative Automation <automation@knative.team>
2023-11-29 02:00:54 +00:00
Calum Murray 890ba933a0
Added clotributor link to readme (#2093)
Signed-off-by: Calum Murray <cmurray@redhat.com>
2023-11-28 16:04:44 +00:00
github-actions[bot] a8bbec33e7
chore: update Quarkus platform version to 3.5.3 (#2092)
Co-authored-by: Knative Automation <automation@knative.team>
2023-11-21 18:41:47 +00:00
Knative Automation 623c61ff93
upgrade to latest dependencies (#2091)
Signed-off-by: Knative Automation <automation@knative.team>
2023-11-21 18:19:46 +00:00
Evan Anderson f8a428464a
Add consistent SECURITY.md (#2089) 2023-11-20 19:19:37 +00:00
Knative Automation d3821fb74c
upgrade to latest dependencies (#2087)
bumping knative.dev/eventing dc96522...140482e:
  > 140482e Upgrade tests account for last event being interrupted (# 7447)
  > d84daee Gather traces for TestChannelDeadLetterSinkExtensions (# 7441)
  > 2d1bfb5 Fix OIDC token handling in event_dispatcher (# 7457)
bumping knative.dev/serving 7561386...21dc191:
  > 21dc191 Add parallel option (# 14636)

Signed-off-by: Knative Automation <automation@knative.team>
2023-11-20 18:49:41 +00:00
Jefferson Ramos 6f0b90d8aa
test: adding e2e test for config volumes EmptyDir and PersistentVolumeClaim (#2078) 2023-11-20 01:38:11 +00:00
Knative Automation e5f7fa7db3
upgrade to latest dependencies (#2084)
bumping knative.dev/serving ae91326...7561386:
  > 7561386 Create and use the Reconciler constructor for the service controller (# 14623)
bumping knative.dev/eventing 3162518...dc96522:
  > dc96522 Add serviceaccount in parallel (# 7373)
  > 32d7dd8 Allow configuring whether to allow cross namespaces Brokers configuration references (# 7455)
  > 203fa93 Add deprecation warnings for EventType v1beta1 (# 7453)
  > e5f2814 support auto generation of Sequence identity service account [OIDC] (# 7361)
  > 8ebe869 Deprecate EventType v1b1 API (# 7303)
  > a9320dc Add deprecation warnings for v1b2 (# 7454)

Signed-off-by: Knative Automation <automation@knative.team>
2023-11-20 01:29:11 +00:00
github-actions[bot] 39155b73b6
chore: update Quarkus platform version to 3.5.2 (#2085)
Co-authored-by: Knative Automation <automation@knative.team>
2023-11-17 11:09:16 +00:00
Knative Automation ad9d9d676a
upgrade to latest dependencies (#2083)
bumping golang.org/x/mod 5b69280...6e58e47:
  > 6e58e47 modfile: improve directory path detection and error text consistency
bumping knative.dev/eventing 7a645f8...3162518:
  > 3162518 [main] Upgrade to latest dependencies (# 7450)
  > d964da3 Don't use async handler (# 7415)
bumping golang.org/x/term ea6303a...70d3a0b:
  > 70d3a0b go.mod: update golang.org/x dependencies
  > 6a610bc all: update go directive to 1.18
bumping golang.org/x/text f488e19...6c97a16:
  > 6c97a16 all: update go directive to 1.18
bumping golang.org/x/oauth2 3c5dbf0...e067960:
  > e067960 go.mod: update golang.org/x dependencies
  > 4c91c17 google: adds header to security considerations section
bumping golang.org/x/net b225e7c...fbaf412:
  > fbaf412 go.mod: update golang.org/x dependencies
  > cc6f4d1 http2: remove ancient build-tagged files for unsupported Go versions
  > a720b30 http2: allocate buffer pools using pointers to arrays
  > a7ef1a2 internal/quic/cmd/interop: don't t.Log after test finishes
  > 26ea817 http2: unconditionally recycle responseWriterState
  > 39c9d01 quic: don't send CONNECTION_CLOSE after stateless reset
  > 45fa414 quic: undo accidental rename of test helpers
  > 434956a quic: include more detail in connection close errors
  > ec29a94 quic: provide source conn ID when creating server conns
  > 5791239 internal/quic/cmd/interop: skip tests when exec is unavailable
  > 4865e2a internal/quic/cmd/interop: add interop test runner
  > 770149e quic: pad ack-eliciting server Initial datagrams
  > 05086a7 quic: fix panic when handling resent CRYPTO data
  > 0526b49 quic: fix data race caused by aliased DCID
  > 6d267b1 quic: properly shut down connections on listener close
  > 642f15e quic: support stateless reset
  > 4c7a5b6 http2: add test for push promise accounting underflow
  > 48a5977 quic: support Retry
  > 9ef1b72 quic: move more testConn behavior into testListener
  > 37479d6 http2: fix underflow in http2 server push
  > d23d9bc all: update go directive to 1.18
  > 92728b3 dns/dnsmessage: document that Skip does not fully validate the header
bumping golang.org/x/sys 2964e1e...cb378ae:
  > cb378ae syscall: call getfsstat via libc on openbsd
  > 661d749 unix: use libc stubs for OpenBSD pledge+unveil
  > 1168e25 unix/linux: update Linux kernel to v6.6
  > 249e16f unix: require minimum OpenBSD 6.4 for pledge, unveil
  > 1e63810 unix: stop counting trailing NUL for abstract addresses starting with NUL
  > 1bfbee0 all: update go directive to 1.18
  > 1d9f0b6 unix: add linux cachestat system call
  > 8ccaaf0 windows: add GetFileTime
  > 6ee6208 windows: add missing TCP and UDP socket options and control message types
bumping google.golang.org/api 0d3b865...83b8a6c:
  > 83b8a6c chore(main): release 0.150.0 (# 2244)
  > 85e85ad feat(transport): Log DirectPath misconfiguration (# 2225)
  > f56fb11 chore(all): update all (# 2251)
  > 7529003 feat(all): auto-regenerate discovery clients (# 2252)
  > c08d405 feat(all): auto-regenerate discovery clients (# 2250)
  > b56da3d feat(all): auto-regenerate discovery clients (# 2249)
  > 8bfbeac feat(all): auto-regenerate discovery clients (# 2246)
  > 5693997 feat(all): auto-regenerate discovery clients (# 2245)
  > 2ce2d2d feat(all): auto-regenerate discovery clients (# 2243)
bumping knative.dev/serving e582664...ae91326:
  > ae91326 upgrade to latest dependencies (# 14620)
bumping google.golang.org/genproto/googleapis/rpc 49dd2c1...d783a09:
  > d783a09 chore(all): update all (# 1068)
bumping knative.dev/networking e0bee34...8f3c521:
  > 8f3c521 upgrade to latest dependencies (# 890)
bumping knative.dev/pkg 6564cf1...97c7258:
  > 97c7258 Bump golang.org/x/tools from 0.14.0 to 0.15.0 (# 2897)
  > 99fa268 Bump golang.org/x/oauth2 from 0.13.0 to 0.14.0 (# 2895)
  > 81a5838 Bump cloud.google.com/go/storage from 1.34.1 to 1.35.1 (# 2898)
  > b3e7ef5 Bump google.golang.org/api from 0.149.0 to 0.150.0 (# 2896)
  > 4e16990 Bump golang.org/x/net from 0.17.0 to 0.18.0 (# 2894)
bumping golang.org/x/tools 3f4194e...729e159:
  > 729e159 go.mod: update golang.org/x dependencies
  > 38ed81a gopls/internal/regtest/marker: porting extract tests
  > bbf8380 gopls/internal/regtest/marker: use golden diffs for suggested fixes
  > 51df92b go/ssa: two minor cleanups
  > e7fb31a internal/cmd/deadcode: rename -format to -f
  > c538b4e internal/cmd/deadcode: add -whylive=function flag
  > b753e58 internal/lsp/helper: fix misspelled "Code generated" comment
  > 2638d66 internal/cmd/deadcode: omit package/func keywords in default output
  > 118c362 gopls/internal/lsp/source: fix signatureHelp with pointer receivers
  > 4124316 gopls/internal/lsp/cache: remove baseCtx from the View
  > 8b89cfa gopls/internal/lsp/cache: remove forceReloadMetadata from clone
  > d2c415d gopls/internal/lsp/cache: pass workspace information into createView
  > 2ddaad7 gopls/internal/lsp/cache: isolate getWorkspaceInformation from Session
  > 4df4d8d internal/cmd/deadcode: support -json, -format=template
  > 2881318 gopls/internal/lsp/source: enable nilness Analyzer in gopls
  > 25924d0 go/analysis/passes/nilness: fix bug in method value
  > 53cd36b gopls: remove dead code
  > 7e0917a go/ssa: update builder doc comment
  > 942d9ac go/ssa: don't treat _ specially in Prog.{Func,Const,Var}Value
  > 227e728 go/ssa: delete pre-go1.18 obsolete code
  > 9f1cca3 go/ssa: remove Function.Syntax optimization
  > 0ee4d87 go/ssa: create methods on demand
  > 04cf269 gopls/internal/lsp/cache: allow duplicate analyzer names
  > 08edf75 gopls/internal/regtest/marker: port half of the suggestedfix markers
  > e6864f1 go/ssa: hang instances off generic Function, not Program
  > 753c5d6 gopls/internal/lsp/cache: move 'contains' from snapshot to view
  > 24c5a47 gopls/internal/lsp/cache: make options immutable on the View
  > e125dc6 gopls/internal/regtest/marker: port remaining rank and snippet tests
  > 26349af gopls/internal/regtest/marker: port remaining completion tests
  > 5e2efda gopls/internal/regtest/marker: port rank and func_rank tests
  > 970eac5 gopls/internal/regtest/marker: port builtin/keyword completion tests
  > c90d0df go/ssa: make isParameterized thread-safe
  > 02f3758 gopls/internal/regtest/marker: port five arbitrary completion tests
  > ee25040 gopls/internal/regtest/marker: port all prepare markers
  > 9e94edb go/ssa: clarify Program.RuntimeTypes
  > 75ff53b go/ssa: build methods of RuntimeTypes lazily
  > 2bc9e16 go/ssa: TestStdlib: report count of syntactic functions too
  > f4cf222 go/ssa: new for var semantics
  > 11828ff gopls/internal/lsp: add OnSave diagnostics
  > 7ca319e go/ssa: split 'create' and 'build' for every Function
  > 3aa6cfd internal/gopathwalk: check ignored directories lexically
  > 1762c80 internal/gopathwalk: use filepath.WalkDir instead of internal/fastwalk
  > 9cf559c go/analysis/passes/errorsas: remove old comment
  > ec032e3 go/packages: two clean-ups
  > 9482e85 gopls/internal/lsp/cmd: add GOPACKAGESDRIVER to stat
  > ccc652a go/ssa: eliminate Program.{bounds,thunks} memoization
  > fcb8d5b go/ssa: some preparatory cleanups
  > 099b552 gopls/internal/regtest/marker: port the links marker
  > 50cdf2a gopls/internal/regtest/marker: port case sensitive completion tests
  > df7023e gopls/internal/regtest/marker: port all deep and fuzzy completion tests
  > b90ce15 gopls/internal/regtest/marker: port statements completion tests
  > d187d99 gopls/internal/regtest/marker: port remaining @signature markers
  > 080c202 gopls/internal/lsp: fix code action panic on params of external funcs
  > ff1953b go/packages: don't fail if GOPACKAGESDRIVER leaves Compiler/GOARCH=""
  > 4dca902 go/internal/packagesdriver: be defensive wrt error results
  > 672de52 go/ssa: simplify Alloc helpers
  > 931c74e internal/lsp/analysis: warn about incorrect type in embed directive
  > 1cf8b0d go/ssa: new range var semantics
  > 7c4d876 gopls/internal/lsp/source: remove unused parameters (cleanup)
  > b82788e gopls/internal/lsp: add semantic highlighting for go: directives
  > 6da1917 go/packages: remove pre-go1.16 overlay support
  > 5ab57de go/packages: ensure that types.Sizes is correct
  > 02048e6 go/packages: document that types.Sizes may be nil
  > 5185da1 internal/refactor/inline: avoid redundant import names added by inlining
  > 6360c0b gopls/internal/lsp/source: find linkname directives without parsing
  > 71f6a46 cmd/bundle: drop old +build lines
  > cdf1b5e cmd/present: drop NaCl reference from docs
  > 99bbd3c go/callgraph/vta: use core type for struct fields
  > 8ed1113 go/ssa: add support for range-over-int
  > 7df9d5f gopls/internal/lsp: fix signature crash on error.Error
  > 43c41b5 internal/refactor/inline: reify implicit return conversions
  > 53e637b internal/refactor/inline: improve check for last uses of free vars
  > 61bb3e9 internal/refactor/inline: less hacky solution for eliding braces
  > 8a71c39 gopls/internal/lsp/source: abort change signature on overlapping calls
  > f744e4b go/ssa: propagate goversions in ssa
  > 6fcd778 gopls/internal/lsp: add code actions to remove unused parameters
  > 918e96a internal/refactor/inline: use binding decl with literalization
  > 12b5dad gopls: deprecate "tempModfile" and "expandWorkspaceToModule" settings
  > f85b3f7 internal/refactor/inline: don't treat blanks as decls in declares()
  > 3484534 internal/refactor/inline: docs for 0.14 release notes
  > b9b97d9 go/types/objectpath: remove method sorting
  > 9b63f3d gopls: upgrade x/telemetry dependency
  > f38ff07 internal/refactor/inline: T{} is duplicable for struct/array
  > ecbfa88 go/analysis/passes/timeformat: simplify isTimeDotFormat
  > 187911b internal/refactor/inline: more precise SelectorExpr effects
  > dbf6f42 go/analysis/passes/httpmux: add command
  > 7e7568c go/analysis/passes/httpmux: check for enhanced ServeMux patterns
  > b268156 gopls: allow all drive letters in cache/filemap_test.go
  > be4e4d6 go/analysis/passes/internal/analysisutil: account for nil Func.Pkg
  > 0e4fc90 internal/refactor/inline: add missing spread context (return)
  > 8954aa7 go/types/internal/play: fix slice OOB when *ast.File is selected
  > fda3fe3 gopls/internal/lsp: use the correct options for semantic tokens legend
  > f6d8589 cmd/compilebench: pass linker flags to prebuild
  > 5874869 go/analysis/passes/internal/analysisutil: add IsFunctionNamed
  > 0b06fd8 cmd/gonew: skip Test if exec is unsupported
  > f5fd4c9 go/analysis/passes/bools: use astutil.Unparen
  > 59ac17f go/analysis/passes/internal/analysisutil: remove Unparen
  > a3b5082 go/analysis/passes/appends: improve check for append builtin
  > 395d393 go/analysis/passes/internal/analysisutil: add IsNamedType
  > 22abcd6 oogo/analysis/passes/bools: remove duplicate functions
bumping golang.org/x/crypto e3cc52e...eb61739:
  > eb61739 ssh: allow to configure public key auth algorithms on the server side
  > 42c83ff ssh: try harder to detect incorrect passwords for legacy PEM encryption
  > e668aa9 go.mod: update golang.org/x dependencies
  > df0bc9e chacha20poly1305: guard PSHUFB usage with GOAMD64_v2
  > 74c2ba9 crypto/hkdf: remove useless call to Reset
  > cf8dcb0 ssh: add test case against ssh CLI
  > 4f30245 x509roots: catch the zero-roots case when generating the bundle
  > 1d57292 x509roots: check HTTP response status code and media type
  > 8779cbd all: update go directive to 1.18
  > 2aeefc3 ssh: add support for SSH_AGENT_CONSTRAIN_EXTENSION with id 255

Signed-off-by: Knative Automation <automation@knative.team>
2023-11-15 14:28:47 +00:00
Knative Automation 7199c0edcd
upgrade to latest dependencies (#2079)
bumping knative.dev/serving 946643c...e582664:
  > e582664 Update net-kourier nightly (# 14619)
  > 936ecbd fix: typo in comments (# 14617)
  > d3127e9 Surface cpu and mem requests forbidden errors (and other ones too) in KSVC creation (# 14453)
bumping knative.dev/eventing 9431ce9...7a645f8:
  > 7a645f8 Add the test setup in the install script (# 7418)
  > 8d8e0fe Increase Ready timeout for TestChannelConformance to 4 minutes (# 7433)
  > a118938 Use input channels audience as audience of Parallel (# 7431)

Signed-off-by: Knative Automation <automation@knative.team>
2023-11-14 15:00:51 +00:00
Knative Automation 5335347a48
upgrade to latest dependencies (#2073)
bumping knative.dev/networking 18529fd...e0bee34:
  > e0bee34 upgrade to latest dependencies (# 889)
bumping knative.dev/serving e963ec7...946643c:
  > 946643c Update net-gateway-api nightly (# 14616)
  > 0ac6e3c Update net-istio nightly (# 14614)
  > 6978eea Update net-kourier nightly (# 14613)
  > ecfd6fd Update net-certmanager nightly (# 14611)
  > 381a3a9 Update net-contour nightly (# 14612)
  > 17fa595 upgrade to latest dependencies (# 14608)
  > 1c72423 Update net-gateway-api nightly (# 14602)
  > 9defe38 Update net-kourier nightly (# 14605)
  > 0ac084c Update net-contour nightly (# 14604)
  > cec7125 Update net-certmanager nightly (# 14603)
  > 65ce2ae upgrade to latest dependencies (# 14601)
  > 16884ca Update net-kourier nightly (# 14590)
bumping knative.dev/hack 0d99b7e...5deadde:
  > 5deadde 🐛 Set latest release only when publishing to Github (# 346)
  > 8834794 Call set_latest_to_highest_semver after publishing a new release (# 343)
bumping knative.dev/eventing 62e797b...9431ce9:
  > 9431ce9 Add e2e test if channel implementation exposes OIDC audience (# 7381)
  > 0fa1bbc [main] Upgrade to latest dependencies (# 7432)
  > e3b7970 [main] Upgrade to latest dependencies (# 7430)
  > cc3d30e [main] Upgrade to latest dependencies (# 7429)
bumping knative.dev/pkg 5c9b7a8...6564cf1:
  > 6564cf1 upgrade to latest dependencies (# 2893)
  > 35011d4 upgrade to latest dependencies (# 2892)

Signed-off-by: Knative Automation <automation@knative.team>
2023-11-13 16:56:55 +00:00
github-actions[bot] d526272b8d
chore: update Quarkus platform version to 3.5.1 (#2076)
Co-authored-by: Knative Automation <automation@knative.team>
2023-11-13 16:15:17 +00:00
Davide Pruscini 7af58b5eb4
Fixed PersistentVolumeClaim spelling error (#2069)
* fix typo in function's volume attribute (#1993)

Correct the misspelled attribute 'PersistentVolumeClaim' in the function's volume name.

* reload accidentally deleted file

* fixup: added migration func

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

* fixup: migration func

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2023-11-07 21:28:46 +00:00
Knative Automation c949e00207
upgrade to latest dependencies (#2072)
bumping knative.dev/serving 789c322...e963ec7:
  > e963ec7 Update net-certmanager nightly (# 14599)
  > f3e1a2d Drop CI reverse compatibility for auto-tls rename (# 14595)
  > df38a6b upgrade to latest dependencies with websocket v1.5.0 (# 14598)
  > a72f181 Update net-istio nightly (# 14596)
bumping knative.dev/eventing d978f3c...62e797b:
  > 62e797b [main] Upgrade to latest dependencies (# 7428)
bumping knative.dev/pkg acf0a2d...5c9b7a8:
  > 5c9b7a8 upgrade to latest dependencies (# 2887)
bumping knative.dev/networking 3bd0f7d...18529fd:
  > 18529fd upgrade to latest dependencies (# 888)

Signed-off-by: Knative Automation <automation@knative.team>
2023-11-07 17:52:51 +00:00
Matej Vasek 4a2150595c
fix: release uses correct version tags (#2071)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-11-07 17:12:07 +00:00
Knative Automation feaa62df91
upgrade to latest dependencies (#2068)
bumping knative.dev/networking 2a7676e...3bd0f7d:
  > 3bd0f7d upgrade to latest dependencies (# 887)
  > aea9eae upgrade to latest dependencies (# 886)
  > 7d7bb65 upgrade to latest dependencies (# 885)
bumping knative.dev/serving f59f053...789c322:
  > 789c322 Update net-contour nightly (# 14591)
  > 40008af Update net-certmanager nightly (# 14586)
  > ab6ccfe Update net-gateway-api nightly (# 14583)
  > ec8cf65 remove duplicate 'additionalPrinterColumns' (# 14592)
  > 141747a upgrade to latest dependencies (# 14574)
  > e473c4a Update net-contour nightly (# 14585)
  > 95ea3e5 Update net-istio nightly (# 14584)
bumping knative.dev/pkg a6c730f...acf0a2d:
  > acf0a2d Bump google.golang.org/api from 0.148.0 to 0.149.0 (# 2891)
  > 5e1261a Bump cloud.google.com/go/storage from 1.33.0 to 1.34.1 (# 2890)
  > 3b3f4e4 Bump github.com/gorilla/websocket from 1.5.0 to 1.5.1 (# 2889)
  > 8bf0f54 Bump golang.org/x/sync from 0.4.0 to 0.5.0 (# 2888)
  > fac3a4f fix closure variable in filtered factory (# 2884)
bumping google.golang.org/genproto/googleapis/api d307bd8...49dd2c1:
  > 49dd2c1 chore(all): update all (# 1067)
  > e917dd1 chore(deps): bump golang.org/x/net in /googleapis/api/servicecontrol (# 1063)
  > 8102cb6 chore(deps): bump golang.org/x/net in /googleapis/api/servicemanagement (# 1060)
  > baa7128 chore(deps): bump golang.org/x/net in /googleapis/api/apikeys (# 1062)
  > 67c69aa chore(deps): bump golang.org/x/net in /googleapis/bytestream (# 1061)
  > e298162 chore(deps): bump golang.org/x/net in /googleapis/api/serviceusage (# 1064)
  > 378ed82 chore(deps): bump golang.org/x/net in /googleapis/api (# 1065)
  > a6244dc chore(deps): bump golang.org/x/net from 0.14.0 to 0.17.0 (# 1066)
  > 8bfb1ae chore(all): update all (# 1059)
  > ceb4ed7 chore(all): auto-regenerate .pb.go files (# 1058)
bumping knative.dev/eventing c8f4624...d978f3c:
  > d978f3c [main] Upgrade to latest dependencies (# 7421)
  > e85a09d fix: Inconsistent OIDC auth feature flag name (# 7422)
  > 650d965 Adding the rekt test for pingsource with broker as sink (# 7416)
bumping golang.org/x/sync 22ba207...10739b0:
  > 10739b0 all: update go directive to 1.18
bumping google.golang.org/genproto d307bd8...49dd2c1:
  > 49dd2c1 chore(all): update all (# 1067)
  > e917dd1 chore(deps): bump golang.org/x/net in /googleapis/api/servicecontrol (# 1063)
  > 8102cb6 chore(deps): bump golang.org/x/net in /googleapis/api/servicemanagement (# 1060)
  > baa7128 chore(deps): bump golang.org/x/net in /googleapis/api/apikeys (# 1062)
  > 67c69aa chore(deps): bump golang.org/x/net in /googleapis/bytestream (# 1061)
  > e298162 chore(deps): bump golang.org/x/net in /googleapis/api/serviceusage (# 1064)
  > 378ed82 chore(deps): bump golang.org/x/net in /googleapis/api (# 1065)
  > a6244dc chore(deps): bump golang.org/x/net from 0.14.0 to 0.17.0 (# 1066)
  > 8bfb1ae chore(all): update all (# 1059)
  > ceb4ed7 chore(all): auto-regenerate .pb.go files (# 1058)
bumping knative.dev/hack d4af42e...0d99b7e:
  > 0d99b7e add function to set latest semver to latest (# 339)
bumping google.golang.org/api 5e4c19e...0d3b865:
  > 0d3b865 chore(main): release 0.149.0 (# 2230)
  > c84e6ff feat(all): auto-regenerate discovery clients (# 2242)
  > e5a53db chore(all): update all (# 2233)
  > 576f5e1 feat(all): auto-regenerate discovery clients (# 2241)
  > 3151bd7 feat(all): auto-regenerate discovery clients (# 2240)
  > cf09469 feat(all): auto-regenerate discovery clients (# 2239)
  > 8d66391 feat(all): auto-regenerate discovery clients (# 2238)
  > 3cc10bf feat(all): auto-regenerate discovery clients (# 2237)
  > da38ebd feat(all): auto-regenerate discovery clients (# 2236)
  > cc28ceb feat(all): auto-regenerate discovery clients (# 2235)
  > 8bb5867 feat(all): auto-regenerate discovery clients (# 2234)
  > a1fb230 feat(all): auto-regenerate discovery clients (# 2232)
  > 9835f38 feat(all): auto-regenerate discovery clients (# 2231)
  > 199783c feat(all): auto-regenerate discovery clients (# 2229)
bumping google.golang.org/genproto/googleapis/rpc e917dd1...49dd2c1:
  > 49dd2c1 chore(all): update all (# 1067)

Signed-off-by: Knative Automation <automation@knative.team>
2023-11-06 20:34:24 +00:00
Matthias Wessendorf 5bb373ab2c
Adding support for `func subscribe` for creating mutiple triggers, based on event filters (#2001)
* Adding support for `func subscribe` for creating mutiple triggers, based on event filters

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* Update cmd/subscribe.go

Co-authored-by: Luke Kingland <luke@lukekingland.com>

* removing unused import

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* running make

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Some import ogranization

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Change argument syntax

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* changes

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Adding some emoji text

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* 💄 move subscriptions underneath the deploy element

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* adding silly emoji to build

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Adding some simple/copied/modified test

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Running 'make schema-generate'

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Update function

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Little unit test

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Adding a bit more help text

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* misspell instruction

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

---------

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
Co-authored-by: Luke Kingland <luke@lukekingland.com>
2023-11-06 13:56:38 +00:00
Matthias Wessendorf d258a19cda
Adding podman as command, instead of docker (like openshift/release repo does it) (#2066)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2023-11-02 17:17:19 +00:00
Knative Automation e7e9b182b9
upgrade to latest dependencies (#2065)
bumping github.com/google/uuid b3cae7c...8de8764:
  > 8de8764 chore(master): release 1.4.0 (# 134)
  > 7c22e97 Clarify the documentation of Parse to state its job is to parse, not validate, strings. (# 135)
  > cd5fbbd feat: UUIDs slice type with Strings() convenience method (# 133)
  > 47f5b39 docs: fix a typo in CONTRIBUTING.md (# 130)
  > 542ddab chore(tests): add Fuzz tests (# 128)
  > 06716f6 chore(tests): Add json.Unmarshal test with empty value cases (# 116)
bumping sigs.k8s.io/yaml 9535b3b...c3772b5:
  > c3772b5 Merge pull request # 97 from liggitt/owners
  > eead467 Merge pull request # 76 from natasha41575/go-yaml-fork
  > 604031b Update owners
  > 3566774 Merge pull request # 96 from liggitt/msg
  > f2c0229 add test demonstrating consistency between yaml.v2 and yaml.v3
  > 65d71bb Merge pull request # 87 from justinsb/spew_no_more
  > 3f79f32 Revert error message changes
  > 20d25fa update LICENSE, owners, and readmes
  > d865f09 Merge pull request # 83 from kubernetes-sigs/bump-version-of-golang-to-1.19-and-drop-older-versions
  > 13f0a74 Replace go-spew with go-cmp
  > a7b5665 exclude forked libs from golint
  > 5303805 Merge pull request # 75 from brianpursley/benchmarks
  > b02c352 reformat to golang 1.19 standards
  > b6d8b45 fix leading newline issue
  > b5bdf49 Merge pull request # 66 from ncdc/remove-ncdc-from-owners
  > 0beda2b Add benchmarks
  > 2f8489c Bump version of golang to 1.19 and prune older versions
  > 330e1e5 make sequence style configurable
  > 78c1299 Merge pull request # 69 from ncdc/fix-lint-error
  > 94f1bbd Remove myself (ncdc) from OWNERS
  > 2d151d8 Add benchmarks
  > 70ebea7 change import paths to forked yaml libs
  > 39f74b9 Merge pull request # 65 from amurant/non_functional
  > 5e30182 Fix lint error
  > b96582b fork go-yaml v2 and v3
  > 4f103b1 greatly improve testing framework & added a lot of new tests
  > 3c98e65 expand variable names in yaml.go, add better comments, improve errors, add copyright
  > 4924d91 expand variable names in fields.go
  > 59dc8b4 add 1.16 and 1.17 to github workflows
  > 740b971 remove vendor folder
bumping knative.dev/pkg b7a62c0...a6c730f:
  > a6c730f upgrade to latest dependencies (# 2882)
  > b09d4f2 Bump sigs.k8s.io/yaml from 1.3.0 to 1.4.0 (# 2879)
  > 9f71af7 Bump github.com/google/uuid from 1.3.1 to 1.4.0 (# 2878)
bumping knative.dev/serving fd8f461...f59f053:
  > f59f053 Update net-kourier nightly (# 14582)
  > 3e82b2b remove dead code and other fixes (# 14578)

Signed-off-by: Knative Automation <automation@knative.team>
2023-11-02 16:06:40 +00:00
Matthias Wessendorf ad38c17888
Differenciate between podman and docker for local registry connection (#2063)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2023-11-01 17:08:51 +00:00
Knative Automation 63490e591e
upgrade to latest dependencies (#2064)
bumping knative.dev/eventing 5ed1b7a...c8f4624:
  > c8f4624 Refactored new filter tests to all use the same helper functions (# 7397)

Signed-off-by: Knative Automation <automation@knative.team>
2023-11-01 16:26:19 +00:00
Matej Vasek ff7dca41f4
fix: NPE (#2062)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-31 17:05:10 +00:00
Knative Automation 983e1d8da9
upgrade to latest dependencies (#2061)
bumping google.golang.org/genproto/googleapis/rpc 8bfb1ae...e917dd1:
  > e917dd1 chore(deps): bump golang.org/x/net in /googleapis/api/servicecontrol (# 1063)
  > 8102cb6 chore(deps): bump golang.org/x/net in /googleapis/api/servicemanagement (# 1060)
  > baa7128 chore(deps): bump golang.org/x/net in /googleapis/api/apikeys (# 1062)
  > 67c69aa chore(deps): bump golang.org/x/net in /googleapis/bytestream (# 1061)
  > e298162 chore(deps): bump golang.org/x/net in /googleapis/api/serviceusage (# 1064)
  > 378ed82 chore(deps): bump golang.org/x/net in /googleapis/api (# 1065)
  > a6244dc chore(deps): bump golang.org/x/net from 0.14.0 to 0.17.0 (# 1066)
bumping google.golang.org/api 60e8678...5e4c19e:
  > 5e4c19e chore(main): release 0.148.0 (# 2217)
  > 438c075 chore(deps): ignore go-github (# 2223)
  > 29c72b5 feat(all): auto-regenerate discovery clients (# 2227)
  > 33383c7 feat(all): auto-regenerate discovery clients (# 2226)
  > 25093c2 feat(all): auto-regenerate discovery clients (# 2224)
  > 5077579 chore(all): update all (# 2220)
  > a6ee0f9 feat(all): auto-regenerate discovery clients (# 2222)
  > 6f71a69 feat(all): auto-regenerate discovery clients (# 2219)
  > 1ef9dd2 feat(all): auto-regenerate discovery clients (# 2218)
  > ffeb508 feat(all): auto-regenerate discovery clients (# 2216)
bumping knative.dev/hack 2c938d4...d4af42e:
  > d4af42e Make generate-groups.sh and generate-knative.sh executable conditionally (# 338)
bumping github.com/prometheus/common 94bf982...c59927e:
  > c59927e Merge pull request # 524 from prometheus/dependabot/go_modules/golang.org/x/net-0.17.0
  > 16f9480 Merge pull request # 525 from prometheus/dependabot/go_modules/sigv4/golang.org/x/net-0.17.0
  > 1f9b004 Bump golang.org/x/net from 0.15.0 to 0.17.0
  > 7043ea0 Merge pull request # 520 from prometheus/repo_sync
  > ff99062 Bump golang.org/x/net from 0.15.0 to 0.17.0 in /sigv4
  > f4e05c0 Merge pull request # 519 from prometheus/dependabot/go_modules/sigv4/github.com/aws/aws-sdk-go-1.45.19
  > b6914dd Update common Prometheus files
  > ac62eb7 Merge pull request # 518 from prometheus/repo_sync
  > eb60b9b Bump github.com/aws/aws-sdk-go from 1.45.18 to 1.45.19 in /sigv4
  > 2dfcc43 Merge pull request # 509 from Neo2308/feature/master/move-to-protobuf-extensions-v2
  > 777f9cc Update common Prometheus files
  > 538e36f Merge pull request # 493 from prometheus/dependabot/go_modules/sigv4/github.com/stretchr/testify-1.8.4
  > 6fa8c32 Update golang_protobuf_extensions to v2
  > 806bab7 Merge pull request # 516 from prometheus/dependabot/go_modules/sigv4/github.com/prometheus/client_golang-1.17.0
  > 3d03105 Bump github.com/stretchr/testify from 1.8.2 to 1.8.4 in /sigv4
  > c3da61d Merge pull request # 515 from prometheus/dependabot/go_modules/sigv4/github.com/aws/aws-sdk-go-1.45.18
  > 78c4467 Bump github.com/prometheus/client_golang from 1.15.1 to 1.17.0 in /sigv4
  > 29293ef Merge pull request # 514 from prometheus/dependabot/go_modules/golang.org/x/oauth2-0.12.0
  > 68bf7ee Bump github.com/aws/aws-sdk-go from 1.44.266 to 1.45.18 in /sigv4
  > bd35fdb Merge pull request # 513 from prometheus/superq/client_go
  > 2e29438 Bump golang.org/x/oauth2 from 0.8.0 to 0.12.0
  > 4e8cb35 Merge pull request # 495 from prometheus/repo_sync
  > 9510d8d Update client_golang
  > 86487d4 Add read-only token permissions
  > dc8a02e Update common Prometheus files
  > fa9dcdd Merge pull request # 507 from prometheus/dependabot/go_modules/golang.org/x/net-0.12.0
  > 4047c78 Merge pull request # 511 from wasim-nihal/username-file-12576
  > 162098f Bump golang.org/x/net from 0.10.0 to 0.12.0
  > ed1ca57 Merge branch 'username-file-12576' of https://github.com/wasim-nihal/common into username-file-12576
  > e79ab68 Merge branch 'username-file-12576' of https://github.com/wasim-nihal/common into username-file-12576
  > 707c0a9 Merge branch 'username-file-12576' of https://github.com/wasim-nihal/common into username-file-12576
  > 06c301c Adding support for file based configuration of basic auth in http client config.
  > 0af702d Update config/http_config.go
  > 0b1d03c Update config/http_config.go
  > dbdf15f Adding support for file based configuration of basic auth in http client config.
bumping knative.dev/serving 2659cc3...fd8f461:
  > fd8f461 clean up feature keys (# 14570)
  > 7c92928 Replace the rest deprecated func with wait.PollUntilContextTimeout (# 14565)
  > 40ebfb6 Update net-gateway-api nightly (# 14559)
  > 051de64 Update net-kourier nightly (# 14562)
  > 2f91f92 Update net-contour nightly (# 14560)
  > 0f5fd3c Update net-certmanager nightly (# 14561)
  > 226c862 Replace the deprecated func with wait.PollUntilContextTimeout (# 14556)
  > bda2232 Update net-istio nightly (# 14558)
bumping knative.dev/eventing 360ec60...5ed1b7a:
  > 5ed1b7a [main] Upgrade to latest dependencies (# 7419)
  > 0684dbe Support for seconds field in PingSource schedule (# 7394)
bumping knative.dev/pkg 29775d7...b7a62c0:
  > b7a62c0 Bump google.golang.org/grpc from 1.58.3 to 1.59.0 (# 2873)
  > b8c14ce [CVE-2023-44487] Disable http2 for webhooks (# 2871)
  > 8b8bb65 Bump github.com/prometheus/common from 0.44.0 to 0.45.0 (# 2874)
  > ee56089 Bump google.golang.org/api from 0.147.0 to 0.148.0 (# 2872)
bumping google.golang.org/grpc bf05b95...7765221:
  > 7765221 Change version to 1.59.0 (# 6695)
  > e88f12e server: prohibit more than MaxConcurrentStreams handlers from running at once (# 6703) (# 6704)
  > be7919c transport: Pass Header metadata to tap handle. (# 6652)
  > e3f1514 Reapply "status: fix/improve status handling (# 6662)" (# 6673) (# 6688)
  > 696faa9 client: add a test for NewSubConn / StateListener / cc.Close racing (# 6678)
  > 318c717 readme: fix badges (# 6687)
  > 39972fd github: add code coverage with codecov.io (# 6676)
  > 93dbc05 xds: move virtual host matcher test to the xdsresource package (# 6680)
  > 2c00469 github: update actions/setup-go and actions/checkout (# 6675)
  > 1f73ed5 Replace the gRFC pull request with the permanent link. (# 6674)
  > 9e1fc3e Revert "status: fix/improve status handling (# 6662)" (# 6673)
  > 0772ed7 status: fix/improve status handling (# 6662)
  > 1466283 internal/idle: add a test that invokes ClientConn methods concurrently (# 6659)
  > fd9ef72 interop: implement rpc-behavior for UnaryCall() (# 6575)
  > c6264a9 examples: add an example of flow control behavior (# 6648)
  > ee4b62c encoding: fix mention of DecompressedSize in docstring (# 6665)
  > 09792b5 test: move codec tests to a separate file (# 6663)
  > 57cb4d8 internal/backoff: add a helper to run a function with backoff (# 6661)
  > 5e4402f attributes: avoid the use of %#v formatting verb (# 6664)
  > 147bd85 balancer: add a warning for balancer names that contain upper case letters (# 6647)
  > 4ced601 googlec2p: remove support for the experimental scheme (# 6645)
  > a758b62 xds/googledirectpath: fix google-c2p resolver test case involving bootstrap env config (# 6657)
  > e61a14d fix testing parameter on xds_client_custom_lb_test (# 6646)
  > 58e2f2b attributes: print typed nil values instead of panic (# 6574)
  > fe0dc22 interop/grpc_testing: regenerate pb.gos (# 6653)
  > 130bc42 Improve testutils.MarshalAny (# 6617)
  > 3156151 grpclb: teach the manual resolver to handle restarts (# 6635)
  > 1457a96 balancer/weightedroundrobin: fix ticker leak on update (# 6643)
  > 92f5ba9 xdsclient: completely remove the old WatchCluster API (# 6621)
  > 94d8074 grpclb: some minor cleanups (# 6634)
  > 1880bd6 resolver/manual: support restarts, required for channel idleness (# 6638)
  > 9deee9b idle: use LB policy close event as a proxy for channel idleness (# 6628)
  > 2d1bb21 grpc: ensure transports are closed when the channel enters IDLE (# 6620)
  > 552525e interop/xds_federation: remove binary file (# 6622)
  > 82a568d cdsbalancer: switch cluster watch to generic xDS client API (# 6600)
  > 0317200 health/grpc_health_v1: update pb.go (# 6616)
  > 57dcb71 interop/xds: improve error message (# 6614)
  > 254bccb idle: decrement active call count for streaming RPCs only when the call completes (# 6610)
  > b0a946c xds: fix hash policy header to skip bin headers and use extra metadata (# 6609)
  > 1e0d82e balancer/leastrequest: Cache atomic load and also add concurrent rpc test (# 6602)
  > 8eb4ac4 grpc: Change server stream context handling (# 6598)
  > e498bbc leastrequest: fix data race in leastrequest picker (# 6587)
  > 778e638 balancergroup: improve observability around balancer cache behavior (# 6597)
  > aa6ce35 vet: ensure all usages of grpc_testing package are renamed when importing (# 6595)
  > d045b41 interop/grpc_testing: regenerate pb.gos (# 6596)
  > 61b7baa grpc_test: rename import for grpc_testing (# 6594)
  > 1805900 deps: update dependencies for all modules (# 6582)
  > 9362f26 grpc: re-enable channel idleness by default (# 6585)
  > 8b1a671 stream: swallow Header errors as we used to; RecvMsg can still return it (# 6586)
  > 23ac72b update pb.gos by running regenerate.sh (# 6584)
  > 2ce7ecd cdsbalancer: test cleanup part 3/N (# 6564)
  > 7afbb9b Change version to 1.59.0-dev (# 6581)

Signed-off-by: Knative Automation <automation@knative.team>
2023-10-31 14:44:51 +00:00
Matthias Wessendorf a4680b28d7
Adding simple Podman insecure registry support (#2060)
Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2023-10-30 20:21:04 +00:00
github-actions[bot] bc1acd1ff3
chore: update Quarkus platform version to 3.5.0 (#2057)
Co-authored-by: Knative Automation <automation@knative.team>
2023-10-27 18:41:53 +00:00
Matej Vasek b1b329e639
test: do test embedded template (#2050)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-26 16:59:09 +00:00
AdamKorcz 1d94c1afb7
Add limit to number of manifests (#2055)
Signed-off-by: AdamKorcz <adam@adalogics.com>
2023-10-26 16:03:38 +00:00
Matej Vasek 7fa331b544
fix: better cleaup for Java template tests (#2051)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-26 12:19:54 +00:00
Knative Automation cd0bc6ae1e
upgrade to latest dependencies (#2053)
bumping knative.dev/client-pkg b5ae1d7...26b8741:
  > 26b8741 upgrade to latest dependencies (# 130)

Signed-off-by: Knative Automation <automation@knative.team>
2023-10-25 14:07:27 +00:00
Knative Automation 487704d41f
upgrade to latest dependencies (#2052)
bumping knative.dev/client-pkg a356cde...b5ae1d7:
  > b5ae1d7 upgrade to latest dependencies (# 128)
bumping knative.dev/eventing 360ec60...360ec60:

Signed-off-by: Knative Automation <automation@knative.team>
2023-10-25 11:27:33 +00:00
Knative Automation 2806882090
upgrade to latest dependencies (#2046)
bumping knative.dev/client-pkg 9cea6f6...a356cde:
  > a356cde Add plugin context sharing types (# 127)
bumping knative.dev/serving 425abcb...2659cc3:
  > 2659cc3 upgrade to latest dependencies (# 14555)
  > 2a46d0d upgrade to latest dependencies (# 14546)
  > 268701d Update net-kourier nightly (# 14549)
  > cfd806f Update net-certmanager nightly (# 14550)
  > 6b844de Update net-contour nightly (# 14545)
  > f69766c Bubble up KCertificate Status Message when its not ready (# 14496)
  > 2c0b8dc Rename auto-tls to external-domain-tls (# 14482)
bumping knative.dev/pkg d6ab729...29775d7:
  > 29775d7 [release-1.12] [CVE-2023-44487] Disable http2 for webhooks (# 2876)
bumping knative.dev/eventing 4d14c21...360ec60:
  > 360ec60 [main] Upgrade to latest dependencies (# 7391)
  > b5fd264 Shell executor logs through testing.T in upgrade tests (# 7367)
  > 5848584 [main] Upgrade to latest dependencies (# 7388)
  > 16a3986 Don't override default values when applying partial features.yaml configmap  (# 7379)
bumping knative.dev/networking c086340...2a7676e:
  > 2a7676e upgrade to latest dependencies (# 883)
  > b6cd712 upgrade to latest dependencies (# 882)
  > 64434a8 upgrade to latest dependencies (# 881)
  > fa72cb5 Update community files (# 880)

Signed-off-by: Knative Automation <automation@knative.team>
2023-10-24 19:58:50 +00:00
Matej Vasek 6a2db8e3c7
fixup: generated file (#2048)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-24 01:46:36 +00:00
Matej Vasek d65b812266
test: tests for SSH connector (#2003)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-23 12:27:45 +00:00
github-actions[bot] a3ac5e7248
chore: update Springboot platform version to 3.1.5 (#2045)
Co-authored-by: Knative Automation <automation@knative.team>
2023-10-21 17:20:04 +00:00
Matej Vasek 6c6730f324
test: optimise disk usage (#2012)
* test: optimise disk usage

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

* fixup: change tag

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

* fixup: use create to build testing buildah image

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

* fixup: install crane

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-20 17:48:59 +00:00
Matej Vasek b24688723e
test: more robust test (#2041)
The test service does serveral retries instead of just one http GET.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-20 17:22:57 +00:00
Knative Automation 425591b9b0
upgrade to latest dependencies (#2044)
bumping knative.dev/serving 9896079...425abcb:
  > 425abcb Update net-gateway-api nightly (# 14531)
  > 52a25fa Add security policy reference in serving (# 14544)
bumping knative.dev/client-pkg b78888b...9cea6f6:
  > 9cea6f6 upgrade to latest dependencies (# 126)

Signed-off-by: Knative Automation <automation@knative.team>
2023-10-20 16:19:26 +00:00
dependabot[bot] 714d5e3fd2
chore(deps): bump flask from 2.2.3 to 2.2.5 in /templates/python/flask (#2010)
* chore(deps): bump flask from 2.2.3 to 2.2.5 in /templates/python/flask

Bumps [flask](https://github.com/pallets/flask) from 2.2.3 to 2.2.5.
- [Release notes](https://github.com/pallets/flask/releases)
- [Changelog](https://github.com/pallets/flask/blob/main/CHANGES.rst)
- [Commits](https://github.com/pallets/flask/compare/2.2.3...2.2.5)

---
updated-dependencies:
- dependency-name: flask
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixup: regenerate zz_filesystem_generated.go

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

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2023-10-20 12:29:33 +00:00
Knative Automation 5977313e67
upgrade to latest dependencies (#2042)
bumping knative.dev/eventing 16d75a9...4d14c21:
  > 4d14c21 Added test for multiple sinks, multiple triggers (# 7350)
  > a261e06 OIDC - Support auto generation of PingSource identity service account and expose in AuthStatus (# 7344)

Signed-off-by: Knative Automation <automation@knative.team>
2023-10-20 11:53:06 +00:00
github-actions[bot] 335de806e7
chore: update Quarkus platform version to 3.4.3 (#2040)
Co-authored-by: Knative Automation <automation@knative.team>
2023-10-20 11:22:21 +00:00
Knative Automation 22c807b7c5
upgrade to latest dependencies (#2021)
bumping knative.dev/hack fc76874...2c938d4:
  > 2c938d4 Update community files (# 337)
bumping google.golang.org/api 788dc60...60e8678:
  > 60e8678 chore(main): release 0.147.0 (# 2210)
  > 8fd2dc4 chore(deps): bump golang.org/x/net from 0.16.0 to 0.17.0 in /internal/kokoro/discogen (# 2213)
  > 6d015e0 chore(all): update module golang.org/x/net to v0.17.0 [SECURITY] (# 2214)
  > e2368f8 feat(all): auto-regenerate discovery clients (# 2215)
  > df0b730 feat(all): auto-regenerate discovery clients (# 2211)
  > b3a71bd chore(all): update all (# 2207)
  > f2c2d1b feat(all): auto-regenerate discovery clients (# 2209)
  > ed48023 chore(main): release 0.146.0 (# 2204)
  > 9a034cd feat(all): auto-regenerate discovery clients (# 2206)
  > 4aa710d feat(all): auto-regenerate discovery clients (# 2205)
  > 1e9a43c feat(all): auto-regenerate discovery clients (# 2203)
bumping knative.dev/client-pkg 9ed2a96...b78888b:
  > b78888b upgrade to latest dependencies (# 115)
  > 1b87ecd Remove deprecated Serving API v1alpha1 (# 125)
  > 12d1700 Update community files (# 124)
bumping google.golang.org/genproto 007df8e...d307bd8:
  > d307bd8 chore(all): auto-regenerate .pb.go files (# 1057)
  > 0333e04 chore(all): update all to e6e6cda (# 1055)
  > 427d036 chore: unfreeze grpc and fix build errors (# 1056)
  > e6e6cda chore(all): update all (# 1044)
  > c177e32 chore(deps): temporarily ignore grpc dep (# 1054)
bumping google.golang.org/grpc c0aa20a...bf05b95:
  > bf05b95 Change version.go to v1.58.3 (# 6707)
  > c40c9ba server: prohibit more than MaxConcurrentStreams handlers from running at once (# 6703) (# 6705)
  > dd9270d update version to 1.58.3-dev (# 6656)
bumping knative.dev/networking 13dbe20...c086340:
  > c086340 upgrade to latest dependencies (# 877)
  > 6c502de upgrade to latest dependencies (# 871)
bumping knative.dev/serving 6703812...9896079:
  > 9896079 Fix sec context and resources for performance jobs (# 14529)
  > 707d286 Test istio with system-internal-tls enabled (# 14494)
  > 1940e5a Update net-contour nightly (# 14533)
  > 264588a Update net-istio nightly (# 14535)
  > 840d7ee Update net-kourier nightly (# 14532)
  > a81290a Update net-certmanager nightly (# 14534)
  > 39ee6f7 Trust DataPlaneUserSAN from Activator to Queue-Proxy (# 14452)
  > 71085f8 Shell executor logs through testing.T in upgrade tests (# 14495)
  > 121e9db upgrade to latest dependencies (# 14526)
  > 4d36a14 Update community files (# 14525)
  > fff40ef Bound buffer for reading stats (# 14523)
  > eda7591 Update net-istio nightly (# 14524)
  > cbeb443 Update net-contour nightly (# 14490)
  > eac93b0 Update net-istio nightly (# 14518)
  > 6a21d8a don't run encryption tests with contour (# 14521)
  > 633e281 upgrade to latest dependencies (# 14515)
  > 42cf24f Update net-gateway-api nightly (# 14520)
  > 805bb38 Update net-certmanager nightly (# 14519)
  > b202e49 Update net-kourier nightly (# 14504)
bumping knative.dev/pkg 9051a45...d6ab729:
  > d6ab729 upgrade to latest dependencies (# 2870)
  > 283df0b Don't migrate storage version if CRD has one storage version (# 2861)
  > d0c133d Revert "Fix potential redefined error with kubeconfig flag (# 2855)" (# 2869)
  > 44a8a5e Use `DialTLSContextFunc` instead of `tls.Config` for `NewProxyAutoTLSTransport` (# 2842)
  > 0d0cd4e Print each line separately in shell executor (# 2867)
  > 058f699 Update community files (# 2868)
  > cf06733 Bump google.golang.org/grpc from 1.58.2 to 1.58.3 (# 2866)
  > af47f2d Bump github.com/google/go-cmp from 0.5.9 to 0.6.0 (# 2865)
  > 16f23bd Bump google.golang.org/api from 0.145.0 to 0.147.0 (# 2864)
  > 3262b2b Bump golang.org/x/tools from 0.13.0 to 0.14.0 (# 2863)
bumping github.com/google/go-cmp a97318b...c3ad843:
  > c3ad843 Add cmpopts.EquateComparable (# 340)
  > e250a55 Use of hotlinking of Go identifiers (# 337)
  > 8a3e8dd set workflow permission to read-only (# 327)
  > 8cea5de Pin GitHub action versions (# 332)
  > 3bb304a Run tests for Go 1.20 version (# 322)
  > 571a56b Remove purego fallbacks (# 325)
bumping google.golang.org/genproto/googleapis/rpc e6e6cda...8bfb1ae:
  > 8bfb1ae chore(all): update all (# 1059)
  > ceb4ed7 chore(all): auto-regenerate .pb.go files (# 1058)
  > d307bd8 chore(all): auto-regenerate .pb.go files (# 1057)
  > 0333e04 chore(all): update all to e6e6cda (# 1055)
  > 427d036 chore: unfreeze grpc and fix build errors (# 1056)
bumping golang.org/x/tools b5e55d1...3f4194e:
  > 3f4194e go.mod: update golang.org/x dependencies
  > 1e4ce7c internal/refactor/inline: yet more tweaks to everything test
  > ee20ddf internal/refactor/inline: permit return conversions in tailcall
  > db1d1e0 gopls/internal/lsp: go to definition from embed directive
  > 2be977e internal/refactor/inline: work around channel type misformatting
  > 0ba9c84 internal/fuzzy: several improvements for symbol matching
  > c2725ad gopls: update x/telemetry dependency
  > e8722c0 go/types/internal/play: show types.Selection information
  > a819c61 internal/refactor/inline: eliminate unnecessary binding decl
  > 102b64b internal/refactor/inline: tweak everything-test docs again
  > 197e2c4 internal/refactor/inline: fix broken tests
  > 586b21a internal/refactor/inline: elide redundant braces
  > ca34416 internal/refactor/inline: fallible constant analysis
  > 6a38a5f internal/refactor/inline: use default working directory
  > c6d331d internal/refactor/inline: don't add same import PkgName twice
  > 1058109 internal/refactor/inline: don't insert unnecessary parens
  > d8e94f2 internal/refactor/inline: fix bug in shadow detection
  > 0adbf9c gopls/internal/lsp: simplify the telemetry prompt
  > 2ed4298 go/analysis/analysistest: format golden files before comparing
  > 451716b internal/refactor/inline: consider "", 0.0, 1.0 duplicable
  > 792f91f internal/refactor/inline: tweak everything test for cgo
  > 9416299 internal/refactor/inline: fix pkgname shadowing bug
  > 4cd12d6 gopls/internal/lsp/fake: don't set a completion budget for tests
  > 57ecf48 gopls/internal/lsp: hover over embed directives
  > 6de3448 gopls/internal/lsp/cache: remove snapshot.typeCheckMu
  > 7f23bc8 gopls/internal/regtest/source/completion: reuse functionCallSnippet in
  > 3d03fbd gopls/internal/lsp: use matcher score in ranking unimported candidates
  > 7577387 gopls/internal/lsp/source: don't complete to golang.org/toolchain
  > 4b34fbf internal/refactor/inline: fix bug discard receiver and spread
  > 6ec9b0f internal/refactor/inline: refine "last ref to caller local"
  > 08bdfec internal/refactor/inline: split up the big table
  > 486787e gopls/internal/lsp/source: Add ui.complete.completeFunctionCalls toggle
  > 9d2d0e8 gopls: set a context deadline after minimal completion results
  > 169105a internal/refactor/inline: insert conversions during substitution
  > b3ada30 internal/refactor/inline: analyze callee effects
  > 1602103 internal/refactor/inline: skip cgo tests on non-cgo builders
  > 1c8e684 internal/refactor/inline: sound treatment of named results
  > d32f97a internal/refactor/inline: eliminate Callee.BodyIsReturnExpr
  > f4abeae go/analysis/passes/directive: use strings.Cut
  > c42ed47 internal/refactor/inline: reject attempts to inline in cgo code
  > 313150a internal/refactor/inline: x++ counts as assignment in escape
  > d6f1bb7 internal/refactor/inline: ignore line directives in testing
  > fb7463a gopls: upgrade x/telemetry to latest
  > 6ccb09c gopls/internal/lsp/source/completion: fixes for completion budget
  > 903e689 gopls/internal/lsp/source/completion: start timing before type checking
  > 455b761 gopls/internal/lsp: use linkifyShowMessage in telemetryOnMessage
  > ebe11df gopls/internal/regtest/bench: add additional completion benchmarks
  > 0ceab5c internal/refactor/inline: split up the main function
  > f975935 gopls/internal/lsp: update telemetry prompt and add a follow-up message
  > 64beb95 gopls/internal/lsp/command: add maybePromptForTelemetry
  > 1c59c38 gopls/internal/lsp/source: add linkifyShowMessage (internal option)
  > d5538db gopls/internal/lsp/cmd: undocument gopls vulncheck
  > e3bbe43 gopls/internal/lsp: update prompting logic for local/off mode
  > 771061d gopls: instrument telemetry for latency of important operations
  > a490c54 all: register the appends analyzer in a few places and update gopls/go.mod
  > f096129 internal/refactor/inline: use escape analysis in purity
  > f9b8da7 go/analysis/passes/appends: rename package to appends
  > d744296 cmd/compilebench: check asm support for -compiling-runtime
  > f8acb7f gopls: update golang.org/x/telemetry dependency
  > 6120b45 go/packages: fix a typo of TypesInfo
  > 0669fa3 cmd/compilebench: fix assembler invocation
  > 9125a0f gopls/internal/lsp: minor cleanup to prompt logic
  > a3c6fd8 gopls/internal/lsp: add an idle prompt asking users to enable telemetry
  > c00d71d go/analysis: add a new analyzer for check missing values after append
  > 9df3852 internal/refactor/inline: two minor cleanups
  > b37e7e3 internal/refactor/inline: test everything
  > 6128895 gopls/internal/vulncheck/scan: buffer govulncheck STDERR output
  > d2b79cd gopls/internal/regtest/marker: rename to clarify marker types
  > 91fde38 gopls/internal/lsp/tests: eliminate several old marker types
  > a9b2439 go/packages: remove use of ioutil in test
  > 6d90c13 internal/refactor/inline: ignore line directives
  > 28990ac internal/refactor/inline: fix bug in /internal/ check for std
  > 365db56 tools: clean up after removing all references to ioutil
  > 5538375 internal/refactor/inline: fix import shadowing bug
  > c1a2c23 internal/refactor/inline: handle implicit field selections
  > 673f263 internal/refactor/inline: update docs
  > c4f811e internal/refactor/inline: reject generic methods for now
  > 2c15796 internal/diff/lcs: increase search depth to 100
  > 38f5195 internal/refactor/inline: treat self-ref as free ref
  > 866a6b0 gopls: update x/telemetry to the latest
  > afa68c9 gopls/internal: move builtin completion test to a regtest
  > dca7c82 gopls/internal/regtest: support full features of old completion markers
  > e2393ab gopls/internal/lsp/source: inliner: don't spam log
  > 8421a35 gopls/lsp/command: add gopls.add_telemetry_counters
  > 940ffda internal/refactor/inline: introduce "binding decls"
  > eaf809a internal/refactor/inline: 2 fixes in AnalyzeCallee recursion
  > 715a452 internal/refactor/inline: doc: optimizing compiler analogy
  > 0bcc621 internal/refactor/inline: simplify ordinary variadics
  > efaab95 internal/refactor/inline: simplify f(slice...) calls
  > d98bc1a gopls: improve usage instructions for neovim
  > 559c430 tools: replace references to obsolete package ioutils
  > 0b3914d go/analysis/passes/defers: rename Analyzer.Name to "defers"
  > ad827af internal/refactor/inline: add table-driven test
  > 8d6ad46 gopls/internal/regtest: port the codelens marker tests
  > 995ecf7 gopls/internal/lsp/source: recover from inliner panics
  > cf5aad9 gopls: update to use the new golang.org/x/vuln API
  > 33355ea internal/refactor/inline: add parameterless tailcall strategy
  > ebc1c29 internal/refactor/inline: parameter elimination
  > e6d89b4 gopls/internal/lsp/regtest: parallelize marker tests
  > 7e848b2 gopls/internal/lsp/regtest: port the highlight marker
  > 9886d98 all: get tests passing with 1.18 and 1.19
  > 0049711 go/types/internal/play: show underlying and core types
  > 627959a cmd/stringer: log more information in tests
  > cd231d8 gopls/internal/lsp: track didChangeConfiguration diagnostics for tests
  > 0a9721c gopls/internal/lsp: move options into the snapshot
  > fb4bd11 gopls/internal/lsp/cache: move Option management to the Server
  > 882bb14 go/analysis/unitchecker: revert subtle change to vendoring
  > fbb8910 go/types/internal/play: show TypeAndValue.mode
  > d06e891 gopls/internal/regtest/marker: support folding ranges
  > b0cdf01 gopls/internal/lsp/tests: eliminate the go1.18 summary file
  > c6e4421 gopls/internal/lsp/tests: simplify options
  > ab96dab gopls/internal/lsp/cache: move working dir to workspaceInformation
  > 1889c0e gopls/internal/lsp/cache: simplify file change propagation
  > 01224cd gopls/internal/lsp/cache: only evaluate fileMap.dirs when necessary
  > 15a23a9 gopls/internal/lsp/cache: consolidate logic for updating maps in clone
  > 56a1866 gopls: update staticcheck (v0.4.5)
  > 36c4f98 gopls/internal/lsp/cache: simplify tracking of snapshot directories
  > fe324ac all: tidy with -compat=1.18
bumping golang.org/x/mod baa5c2d...5b69280:
  > 5b69280 modfile: use new go version string format in error message
  > 273ef6c go.mod: update to go 1.18 and x/tools v0.13.0
bumping google.golang.org/genproto/googleapis/api 007df8e...d307bd8:
  > d307bd8 chore(all): auto-regenerate .pb.go files (# 1057)
  > 0333e04 chore(all): update all to e6e6cda (# 1055)
  > 427d036 chore: unfreeze grpc and fix build errors (# 1056)
  > e6e6cda chore(all): update all (# 1044)
  > c177e32 chore(deps): temporarily ignore grpc dep (# 1054)
bumping knative.dev/eventing f321ba5...16d75a9:
  > 16d75a9 mt-broker-ingress check audience of received token (# 7336)
  > 3ef831c Increase expiration buffer time of OIDCTokenProviders cache to 5 minutes (# 7355)
  > 5168dc3 Update dependencies (# 7378)
  > f9314d8 [main] Upgrade to latest dependencies (# 7372)
  > 4a07fdc Move OIDC e2e tests to test/auth (# 7363)
  > 0933c11 Expose audience of an InMemoryChannel in its status (# 7371)
  > 169542f OIDC - Support auto generation of ApiServerSource identity service account and expose in AuthStatus (# 7330)
  > 62ec33b Support auto generation of Subscriptions identity service account and… (# 7338)
  > 0af3ef6 [main] Upgrade to latest dependencies (# 7370)
  > cf6b140 [main] Update community files (# 7369)
  > de6915a Pass sink namespace to PingSource (# 7368)
  > 6dca8c4 [main] Upgrade to latest dependencies (# 7366)
  > 082d90a Remove unneeded configmapinformer in sinkbinding controller (# 7357)

Signed-off-by: Knative Automation <automation@knative.team>
2023-10-19 15:22:39 +00:00
Matej Vasek 00591fd1c9
test: better clean up after test (#2034)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-19 11:38:06 +00:00
David Simansky 4deb1ff219
chore: Add go setup as composite action (#2031) 2023-10-19 00:39:59 +00:00
Knative Automation 87e9fb3cb9
Update community files (#2029)
Signed-off-by: Knative Automation <automation@knative.team>
2023-10-18 21:07:21 +00:00
Thomas Risberg 84ad7d7f17
chore: update maven profile buildEnv in springboot templates (#2014)
- Update the documentation for springboot arm based builds

- Add the generated filesystem
2023-10-18 19:32:51 +00:00
Jefferson Ramos 3641bfe5d0
test improvements remove deprecates avoid nils, bump go version 1.20.x (#2032)
* test: improvements on e2e extended test: remove deprecates, avoid nils and improve match conditions

* update go version on ci to 1.20.x
2023-10-18 17:28:26 +00:00
Knative Automation 788f18c61f
upgrade to latest dependencies (#1964)
Signed-off-by: Knative Automation <automation@knative.team>
2023-10-12 19:57:12 +00:00
Matej Vasek f83c0ee3f5
fix s2i on cluster RT tests (#2015)
* chore: use smaller s2i nodejs builder

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

* test: skip python s2i on cluster build test on GH

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

* fixup: do check at correct place

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-12 12:24:35 +00:00
Knative Automation 7b09bcd431
Update community files (#2013)
Signed-off-by: Knative Automation <automation@knative.team>
2023-10-11 13:10:48 +00:00
Matej Vasek 429d379280
Continue on error when one of runtimes fails (#2008) 2023-10-09 14:53:15 +00:00
Matej Vasek 9cf1ed7762
fixup: zz_filesystem_generated.go (#2009)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-10-09 13:34:57 +00:00
Knative Automation f832e85646
Update community files (#1995)
Signed-off-by: Knative Automation <automation@knative.team>
2023-10-06 18:35:29 +00:00
github-actions[bot] 358a816354
chore: update Quarkus platform version to 3.4.2 (#2006)
Co-authored-by: Knative Automation <automation@knative.team>
2023-10-06 16:51:04 +00:00
Jefferson Ramos a7c15586ca
test: increase timeout to wait func to get ready on no-container test (#2002) 2023-10-04 15:16:06 +00:00
Matej Vasek 5ffdf756ae
chore: parallelize cluster allocate script (#1992)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-09-27 12:06:29 +00:00
Chris Suszynski b6fb8800d6
Removing the vendor dir (#1966) 2023-09-25 22:51:32 +00:00
github-actions[bot] 975cc91b46
chore: update Quarkus platform version to 3.4.1 (#1989)
Co-authored-by: Knative Automation <automation@knative.team>
2023-09-25 17:50:46 +00:00
Matej Vasek e7c9695a4f
chore: use ./mvnw not mvn in tests (#1988)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-09-21 16:28:13 +00:00
Matej Vasek 8e660e1c21
chore: update mvn wrapper in Quarkus template (#1987)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-09-20 19:01:27 +00:00
Knative Automation b4ab0cf5bf
Update community files (#1975)
Signed-off-by: Knative Automation <automation@knative.team>
2023-09-20 13:03:13 +00:00
Jefferson Ramos cdcbd0af0f
test: adding test for run without container (#1977) 2023-09-20 12:47:13 +00:00
Jefferson Ramos 4968665e01
test: Split of GH oncluster tests by builder. Added FUNC_BUILDER env var for e2e oncluter tests (#1963) 2023-09-19 11:46:18 +00:00
Matej Vasek 452ff50418
chore: use local registry in test (#1976)
* test: use custom buildah image in tests

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

* refactor: rename

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

* test: use internal registry in on cluster tests

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

* chore: more verbose output

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

* fix: use fake ctx until fixing termination properly

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-09-18 19:18:33 +00:00
github-actions[bot] 812855a1e9
chore: update Quarkus platform version to 3.3.3 (#1978)
Co-authored-by: Knative Automation <automation@knative.team>
2023-09-18 14:54:55 +00:00
Matej Vasek df97bd79e7
chore: use current func image in tests (#1974)
Use a different approach to pass current func image to the tests, this
approach does not require modification of task yaml nor access
to outer internet (ttl.sh).

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-09-14 15:42:42 +00:00
Matej Vasek fb39429496
Make func image multiarch (#1972) 2023-09-13 21:19:24 +00:00
Matej Vasek 4cbba4a8de
chore: better JSON Schema (#1968)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-09-13 18:59:21 +00:00
Matej Vasek 68f357561b
Use our own s2i image (#1971)
Our image is much more recent and it is multiarch.
2023-09-13 17:38:03 +00:00
Knative Automation a4e4885d6e
Update community files (#1967)
Signed-off-by: Knative Automation <automation@knative.team>
2023-09-11 13:57:19 +00:00
Matej Vasek 26614eb001
chore: dump cluster logs in tests (#1959)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-09-05 12:29:24 +00:00
Matej Vasek 97291a4422
fix: direct upload ppc64le, x390x (#1958)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-09-05 12:29:17 +00:00
Knative Automation 85ef88d86b
upgrade to latest dependencies (#1950)
bumping github.com/openzipkin/zipkin-go 4541717...e84b2cf:
  > e84b2cf bump dependencies (# 216)
  > 15a86c1 update gha bumping go version matrix, trying to fix codecov (# 215)
  > 87e3b85 chore(deps): bump sarama to v1.40.0 (# 214)
bumping gomodules.xyz/jsonpatch/v2 13a9e4a...17d7994:
  > 17d7994 Shortcut when two json documents are same (# 37)
bumping github.com/google/uuid 44b5fee...b3cae7c:
  > b3cae7c chore(master): release 1.3.1 (# 127)
  > 7b8f57c fix(ci): switch to release-please app (# 126)
  > e69e468 chore(ci): configure release-please, update contrib (# 122)
  > 97c970d chore(ci): add apidiff check for API compatibility (# 123)
  > 53f93a8 docs: change godoc URL in README (# 124)
  > 0b416df docs: update link to RFC 4122 (# 93)
  > 75e1ac5 docs: shell format go tool command (# 111)
  > d719869 docs: fix typo node_js docs (# 117)
  > 574e687 fix: Use .EqualFold() to parse urn prefixed UUIDs (# 118)
  > c91929c Merge pull request # 121 from noahdietz/setup-codeowners-and-actions
  > e3f8b98 chore(ci): add Action-based tests (# 121)
  > db89a3c fix go1.20 resolving to go1.2
  > 78d68fc chore(ci): add Action-based tests
bumping knative.dev/eventing d8a2ad5...10e25b9:
  > 10e25b9 Autoscaler considers reserved and pending replicas (# 7027)
  > dd68bd3 [main] Upgrade to latest dependencies (# 7215)
  > eacaac5 deprecate kntest (# 7211)
  > b5a4460 Added rekt test for broker eventtype autocreate (# 7202)
  > d547e2d [main] Format Go code (# 7206)
  > 25f7e03 Reflect on e2e flags that PingSource is now v1 (# 7208)
  > 0e8b7ca Move eventtype rekttest pingsource to experiment (# 7180)
  > 08cf00f Add rekt test for "Any" filter (# 7130)
  > 11f1ee4 Added rekt test for channel event autocreate (# 7198)
  > 0045fa9 Broker eventtype autocreate fixes (# 7161)
  > 7749771 Added benchmark for any filter (# 7195)
  > 4d8da11 Upgrade to latest dependencies (# 7190)
  > a2e2aa3 Eventing TLS: Test SinkBinding with Broker as sink (# 7172)
bumping knative.dev/serving e9425f8...8dbb2d3:
  > 8dbb2d3 Add certificate watcher to queue-proxy (# 14189)
  > 45b119b upgrade to latest dependencies (# 14316)
  > ca1c242 Update net-contour nightly (# 14315)
  > a2ef52b Update net-certmanager nightly (# 14314)
  > 4dba344 Update net-gateway-api nightly (# 14313)
  > 18cb237 Update net-istio nightly (# 14312)
  > ba5a929 Update net-kourier nightly (# 14311)
  > 323b8c9 upgrade to latest dependencies (# 14308)
  > 358ec13 Split HTTPGetAction.Path into path and query (# 14273)
  > cea3201 Update net-kourier nightly (# 14305)
  > ad5455e fix e2e script & some tests (# 14296)
  > f89b071 Update net-certmanager nightly (# 14307)
  > 81d7085 Update net-gateway-api nightly (# 14306)
  > 899b332 Update net-contour nightly (# 14304)
  > 09a8095 Use dataplane-trust instead of internal-encryption (# 14301)
  > ae86b1d upgrade to latest dependencies (# 14302)
  > 43f7526 Do not skip TestTargetBurstCapacity when `dataplane-trust` is not specified (# 14300)
  > d39a379 Support conformance test with cgroup v2 (# 14297)
  > c63d9be Fix comment about Cgroup limit (# 14298)
  > 9ac8996 Update net-istio nightly (# 14293)
  > 59bfc12 Update net-certmanager nightly (# 14294)
  > 7aef47b Update net-contour nightly (# 14295)
  > 90046c3 Don't reset ENV vars (# 14276)
  > 82747ef Update net-kourier nightly (# 14292)
  > eaff0b3 upgrade to latest dependencies (# 14290)
  > 587de3d Update net-kourier nightly (# 14286)
  > 21264fc Update net-contour nightly (# 14284)
  > a9b48be Deprecate calling kubetest2 via kntest (# 13329)
  > 397cfde Update net-istio nightly (# 14285)
bumping knative.dev/networking 4bfcc9f...dfd6edf:
  > dfd6edf Fix inaccurate instruction for internal-encryption (# 846)
  > 1e4e183 Improve InternalTLSEnabled util function (# 847)
  > 1d7920d upgrade to latest dependencies (# 845)
bumping knative.dev/pkg 81e4ee1...fcccb4e:
  > fcccb4e Bump github.com/openzipkin/zipkin-go from 0.4.1 to 0.4.2 (# 2807)
  > dab3c43 Bump gomodules.xyz/jsonpatch/v2 from 2.3.0 to 2.4.0 (# 2806)
  > 297c36a Bump github.com/google/uuid from 1.3.0 to 1.3.1 (# 2805)

Signed-off-by: Knative Automation <automation@knative.team>
2023-09-01 10:54:35 +00:00
David Simansky bcfb83cba4
chore: Update client-go dependency to aligned version (#1957) 2023-08-31 18:17:34 +00:00
Matej Vasek 7a7e4bf24a
chore: update buildah image ref (#1960)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-31 17:28:35 +00:00
github-actions[bot] 1e271ae15f
chore: update Quarkus platform version to 3.3.1 (#1955)
Co-authored-by: Knative Automation <automation@knative.team>
2023-08-30 12:21:31 +00:00
Matej Vasek 60e0c71843
chore: align dependencies with Knative (#1942)
* chore: clean up go.mod file

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

* fixup: align deps with knative

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

* fixup: use newer apis instead of deprecated ones

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

* chore: remove github.com/hinshun/vt10x replacement

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-29 18:32:31 +00:00
github-actions[bot] 1ff01a30ba
chore: update Springboot platform version to 3.1.3 (#1947)
Co-authored-by: Knative Automation <automation@knative.team>
2023-08-29 16:12:30 +00:00
Matej Vasek 549aee4648
fix: err check at correct place (#1945)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-28 19:57:29 +00:00
Matej Vasek 4af9c39e36
chore: update CA certs (#1944)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-28 16:16:29 +00:00
Matej Vasek 922413464f
chore: faster `make build` (#1937)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-22 06:36:01 +00:00
Matej Vasek d0fe80c408
chore: added standard labels for our builders (#1934)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-22 06:35:54 +00:00
Knative Automation ae4ccc1786
upgrade to latest dependencies (#1938)
bumping go.uber.org/zap a55bdc3...56468e7:
  > 56468e7 Release v1.25.0
  > 249507a zap.Any: Reduce stack size with generics (# 1310)
  > 50b2db4 zap.Any add benchmarks
  > a0674c8 Add direct coverage to zap.Any (# 1309)
  > 1310691 Table test TestFieldConstructors
  > 382e251 Swap expected and got fields (# 1282)
  > 24b7977 Add Name() to Logger (# 1273)
  > 1155ed3 Introduce Str + Strs generic string helpers (# 1281)
  > 4451b47 exp: Update slog, adjust for changes (# 1276)
  > 845ca51 internal: Add and use a generic pool instead of using sync.Pool directly (# 1262)
  > 42b7ef0 slog: Ignore frames with a zero PC (# 1258)
  > 05c4b6c Remove dependency on github.com/pkg/errors (# 1255)
  > d1a1923 Minimize permissions on CI workflows (# 1257)
  > 384e782 Use sync/atomic, drop external atomics (# 1253)
  > 740fda7 TestLevelFlag: Don't print to stderr (# 1254)
  > f2f1f41 [Feature] Add  experiment `zapslog` package to integrate with slog (# 1246)
  > 54862f5 benchmark: add slog (# 1245)
  > 85c4932 Add govulncheck as a CI step (# 1239)
  > f4ba5f5 make: Switch from golint to revive (# 1238)
  > 8310f89 chore: update bench package versions and results (# 1207)
  > 8d89127 Bump actions/checkout from 2 to 3 (# 1237)
  > bc64796 doc: New{Production,Development}Encoder{,Config} (# 1234)
  > 692ec13 ci: Set up dependabot for GH actions and tools (# 1236)
  > 7d6a9af ci: Test with Go 1.19 and 1.20 (# 1235)
  > d4a1083 doc(SugaredLogger): Document print, printf, and println methods (# 1233)
  > b32f3c5 Update Snyk vulnerable modules (# 1227)
  > 53fdb6f Reverse comparison for readability (# 1228)
  > 077b03e Use iota like a original from grpc-go (# 1220)
bumping knative.dev/pkg 4f651e0...81e4ee1:
  > 81e4ee1 Bump go.uber.org/zap from 1.24.0 to 1.25.0 (# 2800)
  > 2aafe0e Bump cloud.google.com/go/storage from 1.31.0 to 1.32.0 (# 2801)
  > 2ad39e9 Bump github.com/hashicorp/golang-lru from 0.5.4 to 1.0.2 (# 2804)
  > d36cc59 Bump google.golang.org/api from 0.136.0 to 0.138.0 (# 2802)
  > 35b0890 Bump go.uber.org/automaxprocs from 1.4.0 to 1.5.3 (# 2803)
  > 93a9858 upgrade to latest dependencies (# 2799)
bumping knative.dev/networking 4901742...4bfcc9f:
  > 4bfcc9f Network Config Changes (# 842)
bumping github.com/hashicorp/golang-lru bdf35e3...a032ef5:
  > a032ef5 Update README for v1.0.2
bumping knative.dev/eventing 9d2bcef...d8a2ad5:
  > d8a2ad5 change the deprecated string (# 7179)
  > 0e88db1 Switch to trigger.WithNewFilters() to set trigger filter (# 7188)
bumping knative.dev/hack 044c02b...9cc05a3:
  > 9cc05a3 Deprecate calling kubetest2 via kntest (# 230)
bumping google.golang.org/api 113082d...85e7e70:
  > 85e7e70 chore(main): release 0.138.0 (# 2116)
  > 9b75278 feat(all): auto-regenerate discovery clients (# 2119)
  > 40ea606 feat(all): auto-regenerate discovery clients (# 2118)
  > 1770219 feat(all): auto-regenerate discovery clients (# 2115)
  > c631c0a chore(main): release 0.137.0 (# 2107)
  > caea956 feat: ok to use S2A with override endpoint (# 2114)
  > 142ffeb feat(all): auto-regenerate discovery clients (# 2113)
  > f7f1c7b feat(all): auto-regenerate discovery clients (# 2112)
  > 0cc62ab feat(all): auto-regenerate discovery clients (# 2111)
  > 4d775db feat(all): auto-regenerate discovery clients (# 2110)
  > 6d29bab chore(all): update module github.com/google/s2a-go to v0.1.5 (# 2109)
  > 80485e0 feat(all): auto-regenerate discovery clients (# 2108)
  > 3f3ed3d feat(all): auto-regenerate discovery clients (# 2106)
bumping go.uber.org/multierr 39ca40c...8767aa9:
  > 8767aa9 Prepare release v1.10 (# 74)
  > 4504ef7 README: Add Features section (# 73)
  > 2fd451d Drop external atomic dependency (# 72)
  > 7876a02 Remove unused glide.yaml (# 71)
  > 55bc553 Support Go 1.20 Unwrap() []error (# 69)
bumping knative.dev/serving 1d6701e...e9425f8:
  > e9425f8 chore: remove v1alpha1 domainmapping (# 14275)
  > b3b793f Update net-gateway-api nightly (# 14280)
  > 89b4341 upgrade to latest dependencies (# 14277)
  > b5585ac Update net-certmanager nightly (# 14279)

Signed-off-by: Knative Automation <automation@knative.team>
2023-08-21 18:44:53 +00:00
Nitish Chauhan e04c1392c1
Improving func environment command (#1935)
* improvising func environment command

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* running goimport

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* resolving describing non-running function

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

---------

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
2023-08-18 21:33:18 +00:00
David Fridrich 5135a9205b
typos (#1936)
Signed-off-by: gauron99 <fridrich.david19@gmail.com>
2023-08-17 19:11:42 +00:00
Knative Automation da658c13db
upgrade to latest dependencies (#1901)
bumping golang.org/x/oauth2 2323c81...2e4a4e2:
  > 2e4a4e2 go.mod: update golang.org/x dependencies
  > ac6658e all: update go version to 1.18
  > ec5679f go.mod: update golang.org/x dependencies
  > 989acb1 all: update dependencies to their latest versions
bumping knative.dev/pkg aef227e...4f651e0:
  > 4f651e0 Bump gomodules.xyz/jsonpatch/v2 from 2.2.0 to 2.3.0 (# 2789)
  > 6519aff Update community files (# 2794)
  > 26b41ba Bump google.golang.org/api from 0.126.0 to 0.136.0 (# 2790)
  > 42a4ec1 Bump contrib.go.opencensus.io/exporter/prometheus from 0.4.0 to 0.4.2 (# 2793)
  > 404648b Bump golang.org/x/oauth2 from 0.8.0 to 0.11.0 (# 2792)
  > a6e28fc Bump golang.org/x/tools from 0.11.0 to 0.12.0 (# 2791)
  > b409e16 Bump github.com/openzipkin/zipkin-go from 0.3.0 to 0.4.1 (# 2785)
  > cceb144 Update community files (# 2788)
  > ea6c1f2 Bump github.com/gobuffalo/flect from 0.2.4 to 1.0.2 (# 2786)
  > 936112b Bump golang.org/x/net from 0.12.0 to 0.14.0 (# 2787)
  > 79fa1f6 Bump cloud.google.com/go/storage from 1.30.1 to 1.31.0 (# 2784)
  > 7333c86 Update community files (# 2781)
  > 6d68d7f upgrade to latest dependencies (# 2780)
  > 8d3f951 Allow overriding webhook secret data keys (# 2662)
  > c11003a Use go sync/atomic instead of go.uber.org/atomic (# 2777)
  > b3a65a0 Bump github.com/gorilla/websocket from 1.4.2 to 1.5.0 (# 2775)
  > e888f79 rename-sandbox (# 2779)
  > 532e082 Update actions (# 2778)
  > 72f2648 Bump go.uber.org/zap from 1.19.1 to 1.24.0 (# 2774)
  > 7b50f3c Bump google.golang.org/protobuf from 1.30.0 to 1.31.0 (# 2771)
  > 1ea9b2d Bump github.com/tsenart/vegeta/v12 from 12.8.4 to 12.11.0 (# 2772)
  > 4866914 Fix github action for dependabot (# 2776)
  > edf95e6 Bump actions/setup-go from 3 to 4 (# 2770)
  > 801a900 Add dependabot and auto update deps (# 2768)
  > aa56e29 Update community files (# 2769)
bumping golang.org/x/crypto e984872...b4ddeed:
  > b4ddeed go.mod: update golang.org/x dependencies
  > edc325d ssh: fix call to Fatalf from a non-test goroutine
  > eab9315 ssh: add diffie-hellman-group16-sha512 kex
  > ddfa821 ssh: ignore invalid MACs and KEXs just like we do for ciphers
  > d08e19b x509roots/fallback: update bundle
  > 12e1fcd internal/wycheproof: skip all tests in short test mode
  > 3f8f064 ssh: prefer sha256 based RSA key algorithms
  > 5df3b59 ssh: disable client agent tests on Windows
  > 2e82bdd fix TestValidTerminalMode: missing output from echo SHELL $SHELL
  > 64e0e99 ssh: fix RSA certificate and public key authentication with older clients
  > 23b1b90 ssh: prefer sha256 based MAC algorithms
bumping knative.dev/hack ddae802...044c02b:
  > 044c02b Update community files (# 309)
  > 3403e35 Update e2e-kind.sh (# 308)
  > ab12e24 Update community files (# 306)
  > a75befb Update community files (# 305)
  > d7fde30 Added knative-extensions (# 293)
  > 338500e Update actions (# 304)
  > 6f48889 Update community files (# 303)
bumping knative.dev/networking 75dcd54...4901742:
  > 4901742 upgrade to latest dependencies (# 844)
  > ed0534b Update community files (# 843)
  > e50e66f upgrade to latest dependencies (# 841)
  > 1632591 correct readme link (# 840)
  > 04f25c2 Update community files (# 838)
  > 29c1660 upgrade to latest dependencies (# 837)
  > f25e82a Update community files (# 836)
  > c39ba8f upgrade to latest dependencies (# 835)
  > e8f7562 upgrade to latest dependencies (# 834)
  > 29da3ac rename-sandbox (# 833)
  > 23adcb7 Update actions (# 832)
  > 964322c Fix comment for old config (# 831)
  > b13f88f Update community files (# 829)
bumping google.golang.org/grpc 5b67e5e...87bf02a:
  > 87bf02a Change version to 1.57.0 (# 6448)
  > 6b64be9 resolver/weighted_round_robin: remove experimental suffix from name
  > 9489082 github: replace deprecated command with environment file (# 6417)
  > d1868a5 clusterresolver: add logs for dns discovery mechanism error cases (# 6444)
  > 8e9c8f8 grpc: do not use balancer attributes during address comparison (# 6439)
  > db32c5b Fix preloader mode in benchmarks (# 6359)
  > f0280f9 xds: require EDS service name in new-style CDS clusters (gRFC A47) (# 6438)
  > bf5b7ae clusterresolver: handle EDS nacks and resource-not-found errors correctly (# 6436)
  > fc0aa46 client: encode the authority by default (# 6428)
  > 11feb0a resolver: delete Target.Scheme and Target.Authority (# 6363)
  > df3e021 status: fix panic when servers return a wrapped error with status OK (# 6374)
  > acbfcbb internal/grpcsync: refactor test (# 6427)
  > 51042db internal/grpcsync: Provide an internal-only pub-sub type API (# 6167)
  > 620a118 xds/internal/balancer/clusterimpl: Switch cluster impl child to graceful switch (# 6420)
  > 6b8f427 orca: remove useless log statement (# 6424)
  > ea492f5 xdsclient: indicate authority serverURI in authority + transport logs (# 6425)
  > 67e881c xds: E2E Test for Audit Logging (# 6377)
  > 07718ef internal/xds/rbac: Add support for string matcher in RBAC header matching (# 6419)
  > 575a936 xds: Fail xDS Server Serve() if called after Stop() or GracefulStop() (# 6410)
  > 7eb5727 xds: switch EDS watch to new generic xdsClient API (# 6414)
  > e859984 server: with TLS, set TCP user timeout on the underlying raw connection (# 5646) (# 6321)
  > 1634254 rpc_util: Reuse memory buffer for receiving message (# 5862)
  > 789cf4e reflection: rename proto imports for disambiguation in import script (# 6411)
  > 0673105 clusterresolver: switch a couple of tests to e2e style (# 6394)
  > 0b3a81e clusterresolver: remove priority LB related tests (# 6395)
  > dd931c8 xds: clusterresolver e2e test cleanup (# 6391)
  > 10f5b50 [PSM interop] Don't fail target if sub-target already failed (# 6390)
  > 963238a clusterresolver: move tests around to different files (# 6392)
  > f24b4c7 clusterresolver: remove redundant tests (# 6388)
  > a9c7942 benchmark: Add support for Poisson load in benchmark client (# 6378)
  > dd350d0 stats/opencensus: Fix flaky metrics test (# 6372)
  > 642dd63 reflection: expose both v1 and v1alpha reflection services (# 6329)
  > 3c6084b xds/outlierdetection: fix config handling (# 6361)
  > 3e8eca8 Revert "client: encode the authority by default (# 6318)" (# 6365)
  > 1c0572a benchmark: fix package used to reference service to use grpc suffix instead of pb (# 6362)
  > 7a7caf3 protoc-gen-go-grpc: Update README.md file (# 6349)
  > 89790ea grpclb: fix typo (# 6356)
  > 907bdaa alts: Read max number of concurrent ALTS handshakes from environment variable. (# 6267)
  > 2ac1aae weightedroundrobin: prefer application_utilization to cpu_utilization (# 6358)
  > 7aeea8f orca: add application utilization and range checking (# 6357)
  > 6578ef7 client: handle empty address lists correctly in addrConn.updateAddrs (# 6354)
  > 761c084 xds/ringhash: cache connectivity state of subchannels inside picker (# 6351)
  > 1b66663 benchmark: Add sleepBetweenRPCs and connections parameters (# 6299)
  > 81c513a opencensus: stop overwriting ctx parameter in tests (# 6350)
  > 68576b3 client: encode the authority by default (# 6318)
  > c9d3ea5 deps: google.golang.org/genproto to latest in all modules (# 6319)
  > 02188e6 Change version to 1.57.0-dev (# 6346)
bumping github.com/prometheus/client_golang 4bbb297...3583c1e:
  > 3583c1e Cut v1.16.0 (# 1292)
  > 2feda42 Fixed README & CHANGELOG; Added fmt makefile command (+bingo) for easier contributions. (# 1289)
  > 5b9cf9c Merge pull request # 1290 from prometheus/fix-nh-docstring-refs
  > 7352ab7 Moving fully to GH actions. (# 1288)
  > 1b19d5f Fix docstring references to renamed native histogram fields / functions.
  > e4ff34d Improve metricUnits runtime (# 1286)
  > 781ea28 added circleci as gh action YAML (# 1281)
  > a09a1d3 Reduce constrainLabels allocations (# 1272)
  > 8840afc Bump github.com/prometheus/procfs from 0.9.0 to 0.10.1 (# 1283)
  > 5e78d5f Merge pull request # 1279 from prometheus/beorn7/histogram
  > b8cb86a add process start time header to client_golang prometheus (# 1278)
  > 77e97da histogram: Fix bug in bucket key calculation
  > 8b1a836 GitHub Workflows security hardening (# 1180)
  > 3094812 histogram: expose bug in bucket key calculation
  > f51d823 Merge pull request # 1267 from prometheus/release-1.15
  > 297fea3 fix undefined execution order in return statements (# 1260)
  > 0f060a0 Add detection for WSL address (# 1257)
  > 8a51463 Cleanup proto use in tests (# 1264)
  > 0ae0013 Bump golang.org/x/sys from 0.6.0 to 0.7.0 (# 1265)
  > 671a2f0 Fixed tutorial. (# 1256)
  > 90eb83b Added interactive tutorial [kubeCon] (# 1255)
  > c36c6ab [collectors]: fix typo in test assertion (# 1153)
  > 0392dff Switch to POST for LabelNames, Series, and QueryExemplars to DoGetFallback (# 1252)
  > e3b6de8 Merge pull request # 1250 from prometheus/release-1.15

Signed-off-by: Knative Automation <automation@knative.team>
2023-08-17 14:47:42 +00:00
Knative Automation e4a3b3a633
Update community files (#1930)
Signed-off-by: Knative Automation <automation@knative.team>
2023-08-17 02:16:42 +00:00
David Fridrich ec6ee77f5a
Remove progress package (spinner) (#1922)
* spinner print statements out

* structures out, del file

* fix pipelines_integration_test, return url now

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* remove unnecessary goroutines

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

* remove goroutine completely

Signed-off-by: gauron99 <fridrich.david19@gmail.com>

---------

Signed-off-by: gauron99 <fridrich.david19@gmail.com>
2023-08-16 15:13:42 +00:00
Luke Kingland 49278270ab
fix: empty version on source build (#1933) 2023-08-15 20:54:40 +00:00
Matej Vasek 1163a5e5ae
fix: docker registry/repository parsing (#1929)
* fix: docker registry/repository parsing

Use go-containerregistry to do parsing.

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

* fix: use kebab-case instead of camelCase

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

* fix: use kebab-case instead of camelCase

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-14 18:17:40 +00:00
github-actions[bot] c8abe3e307
chore: update Quarkus platform version to 3.2.4.Final (#1927)
Co-authored-by: Knative Automation <automation@knative.team>
2023-08-14 14:38:44 +00:00
Matej Vasek 718948a3d8
chore: update release generation (#1924)
* Minimize release binary size.
* Release latest version of buildpack tekton task.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-14 14:21:44 +00:00
Matej Vasek 67517b738e
feat: tekton task urls in the env sub-cmd output (#1925)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-13 15:14:42 +00:00
Matej Vasek b98bb9bdcd
doc: Go and Rust on cluster build is supported (#1923)
* doc: Go and Rust on cluster build is supported

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

* doc: build envvars

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-12 14:10:41 +00:00
David Hadas cea6ca4039
Update CHANGELOG.md - renaming (#1926) 2023-08-11 16:30:40 +00:00
Luke Kingland de344241e5
feat: run host-built containers as non-root (#1921) 2023-08-11 14:00:40 +00:00
Matej Vasek efb04bef0f
Use custom jammy paketo builder (#1911)
* 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>
2023-08-10 03:25:35 +00:00
Jefferson Ramos 399ab7dd17
test: update github ref used on e2e oncluster tests (#1917) 2023-08-09 21:55:35 +00:00
Matej Vasek 89cf6b7a06
chore: refer correct tkn yaml in prow test (#1918)
Without this change prow test will refer tkn yamls from the main branch
not from the PR head branch.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-09 20:56:35 +00:00
Matej Vasek a2b7d2c932
chore: mark test as integration test (#1920)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-09 20:44:34 +00:00
Matej Vasek 20a4eb2ba0
chore: released binaries refer correct task yamls (#1916)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-09 19:43:35 +00:00
Matej Vasek 45d242633a
fix: report correct error when task doesn't exist (#1915)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-09 15:16:35 +00:00
Knative Automation e232dc7d66
Update community files (#1910)
Signed-off-by: Knative Automation <automation@knative.team>
2023-08-09 02:19:35 +00:00
Matej Vasek a74e1d73c4
chore: use tkn tasks from PR branch in CI (#1914)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-09 00:43:34 +00:00
Matej Vasek c9b0176f01
chore: multiple variants of builder (#1912)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-08 13:14:34 +00:00
Luke Kingland 4e0db21b34
rename knative-sandbox (#1905)
* rename knative-sandbox

* fixup bad merge

* fixup: use knative.dev not github.com import path

---------

Co-authored-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <matejvasek@gmail.com>
2023-08-05 02:11:08 +00:00
github-actions[bot] fe08004b3f
chore: update Quarkus platform version to 3.2.3.Final (#1909)
Co-authored-by: Knative Automation <automation@knative.team>
2023-08-05 01:41:07 +00:00
github-actions[bot] 8630175fc4
chore: update Springboot platform version to 3.1.2 (#1907)
Co-authored-by: Knative Automation <automation@knative.team>
2023-08-04 17:35:08 +00:00
Matej Vasek 7ec31cf0a7
chore: update Func Go buildpack reference (#1906)
* chore: update Func Go buildpack reference

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

* fixup: rename sandbox

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-04 15:05:08 +00:00
Matej Vasek c565af9393
fix: typo (#1903)
* fix: typo

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

* Update CHANGELOG.md

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-03 20:44:21 +00:00
Matej Vasek e13d0296f3
chore: update scaffolding sandbox => extensions (#1902)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-03 20:17:21 +00:00
Matej Vasek fc2c04550d
fix: spring boot dependency updater (#1896)
* fix: spring boot dep update

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

* fixup: update also spring-cloud version

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

* fixup: install new deps

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

* fixup: clean up

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-03 18:38:21 +00:00
Knative Automation f183c92b16
Update actions (#1898)
Signed-off-by: Knative Automation <automation@knative.team>
2023-08-02 02:16:50 +00:00
Matej Vasek 6eac0d0605
chore: cron task for paketo's jammy builder (#1895)
* chore: cron task for BP jammy builder build

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

* fixup: linter error

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

* fixup: added nil checks

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-08-01 05:53:46 +00:00
Shashank Sharma 2463202f11
allowing on cluster build for go runtime (#1445)
* allowing on cluster build for go runtime

* warning message added for go and rust builder

* gofmt

* fixups

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2023-07-28 12:02:10 +00:00
Matej Vasek 24fe6d36fa
Fix failing concurrent test on Windows (#1890)
* src: better debugging

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

* fix: wait for both builds

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

* fixup

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

* fixup

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

* fixup

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

* fix: detection of process liveness on Windows

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

* fix: make symlink relative

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

* fixup: cleanup

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-07-28 01:03:08 +00:00
Knative Automation 0d6e210673
[main] Upgrade to latest dependencies (#1891)
* upgrade to latest dependencies

bumping knative.dev/eventing 0054bf3...248a471:
  > 248a471 Eventing TLS: Configure CRDs to have addresses and CA certs (# 7105)
  > d2ce623 [main] Upgrade to latest dependencies (# 7109)
  > 6bfc2d4 [main] Format Go code (# 7108)
  > 855fbed Auto create events in channels (# 7089)
bumping knative.dev/serving f1617ef...f1617ef:
bumping knative.dev/client-pkg e9d838e...bd83cf4:
  > bd83cf4 upgrade to latest dependencies (# 101)

Signed-off-by: Knative Automation <automation@knative.team>

* Rerun codegen script

---------

Signed-off-by: Knative Automation <automation@knative.team>
Co-authored-by: David Simansky <dsimansk@redhat.com>
2023-07-27 13:36:09 +00:00
Knative Automation 84f25a5219
Update community files (#1892)
Signed-off-by: Knative Automation <automation@knative.team>
2023-07-27 02:12:41 +00:00
Matej Vasek a270f9e722
Fix pod security context (#1889)
* Revert "src: Use jobs not plain pods for auxiliary tasks (#1857)"

This reverts commit cb6f33d924.

* refactor: move code from openshift

This is needed to avoid circular package dependencies.

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

* fix: set pod SC only on non-OpenShift

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-07-26 20:03:41 +00:00
Luke Kingland a2834c2283
src: update func go runtime dep (#1879)
* src: update func go runtime dep

* func-go v0.18.2

---------

Co-authored-by: Matej Vasek <mvasek@redhat.com>
2023-07-25 19:44:40 +00:00
Luke Kingland d7d3f8f052
feat: support external deps for host runs (#1882) 2023-07-25 19:31:40 +00:00
Adam Boczek 025c457955
add defaults for the security context to avoid warnings (#1851) (#1886) 2023-07-25 19:12:39 +00:00
Knative Automation b407d960de
[main] Upgrade to latest dependencies (#1779)
* upgrade to latest dependencies

bumping knative.dev/hack 5b7907f...ddae802:
  > ddae802 Update community files (# 302)
  > 8852371 Update community files (# 301)
  > 12cd6a1 Update community files (# 300)
  > cc92cdb Replace test-infra with toolbox (# 297)
  > fc42790 Update community files (# 296)
  > d7586a2 Update e2e kntest link (# 295)
  > a861c8e Update community files (# 294)
bumping knative.dev/pkg 5671699...aef227e:
  > aef227e upgrade to latest dependencies (# 2767)
  > 7051d30 Update community files (# 2764)
  > b7a11d4 Update community files (# 2763)
  > 5ef4812 Update community files (# 2762)
  > 49e2e56 update google cloud deps (# 2758)
  > a5e0b92 upgrade to latest dependencies (# 2757)
  > 6eb4b40 Update community files (# 2760)
  > eb63a40 Support to set qps and burst via env variable (# 2755)
  > 74c4be5 Generate kresource duck type codegen (# 2754)
  > 4dbc312 fix boilerplate (# 2753)
  > 15605c7 Defaulting Controller options for all kind of webhooks (# 2738)
  > 94b81fc Update community files (# 2752)
bumping golang.org/x/net 6c96ca5...c73c09c:
  > c73c09c go.mod: update golang.org/x dependencies
  > 4fc2eb9 http2: revert Transport change from CL 486156
  > 63727cc http2: validate Host header before sending
  > 1bb09e6 quic: pass the connection ID length into 1-RTT packet parsing
  > 952fc9c quic: move ack_delay_exponent handling out of frame parsing
  > 02fe9a5 quic: loss detection
  > c8a2c5a quic: remove stray debugging print
  > 5d50b40 quic: add packetFate enum
  > ee81e8c quic: correct rttvar updates
  > ab184e6 quic: rename side type to connSide
  > 508a573 quic: add congestion controller
  > 4050002 html: handle equals sign before attribute
  > f5464dd idna: update for Unicode 15.0.0
bumping knative.dev/networking 2a2f7d2...75dcd54:
  > 75dcd54 upgrade to latest dependencies (# 827)
  > a3fa3a5 Update community files (# 826)
  > ad60eaa Update community files (# 825)
  > 03a1f22 upgrade to latest dependencies (# 824)
  > 2444385 upgrade to latest dependencies (# 822)
  > b2cce92 Update community files (# 823)
  > 1431d70 Bump google.golang.org/grpc to the latest version (# 821)
  > 91821ae Update community files (# 819)
  > 3a75df5 upgrade to latest dependencies (# 817)
  > b9dd5c2 upgrade to latest dependencies (# 816)
  > 68947c5 upgrade to latest dependencies (# 815)
  > 14a2bd4 Move `pkg/certificates` from `control-protocol` to `networking` (# 802)
  > 2daa483 Update community files (# 813)
  > 0dbe4f9 upgrade to latest dependencies (# 812)
bumping knative.dev/eventing df08b49...0054bf3:
  > 0054bf3 Eventing TLS: Configure certificates to force rotate private keys (# 7104)
  > 6911db0 Tag line proposal (# 7045)
  > a13eebe [main] Upgrade to latest dependencies (# 7100)
  > a755429 Re-enable PingSource TLS E2E test (# 7082)
  > de75496 Function CopySecretWithName for creating secrets with specific name (# 7002)
  > 6833ee6 Convert tls secret names to constants (# 7086)
  > 90721ab [main] Update community files (# 7088)
  > 4541f4f [main] Update community files (# 7087)
  > ed05a35 Revert "Add loopclosure linter" (# 7083)
  > 838274e [main] Upgrade to latest dependencies (# 7078)
  > a4f0c10 [main] Update community files (# 7085)
  > afcf60b Move ingress & filter TLS secret names into constants (# 7081)
  > 1e96c78 feat!: Add tls support for ingress (# 6986)
  > 6a0495c Add loopclosure linter (# 7079)
  > 2fe1db6 Updated mtping TLS cert test to bind to free port (# 7036)
  > 516a915 Upgrade rekt to latest (# 7076)
  > 6a890e0 Fix flaky unit tests (# 7080)
  > eaf28a7 Add tracing for TestBrokerWithManyTriggers (# 7077)
  > f5b1b12 Send namespace header in MT components (# 7048)
  > 4b5fde8 [main] Update community files (# 7043)
  > 8f74094 Add handler to auto create Event Types (# 7034)
  > 901ef61 Remove check for empty Namespace on resolver (# 7040)
  > 95cdbaa We should not limit the EventType creation from the Sources Duck to just brokers (# 7032)
  > 7429761 Adjust the Namespace reference to the one from the parent (# 7035)
  > cb2a891 update the redeployment script (# 7038)
  > ab01938 [main] Upgrade to latest dependencies (# 7025)
  > c9dcaf3 Added basic gc loop to kncloudevents clients map (# 6997)
  > d6cf96d EventType works with channel (# 7023)
  > 365d0b0 Run TLS e2e tests only when Istio is not enabled (# 7029)
  > 825a237 Update IMC CRD addressstatus to include `.name` and `.CACerts` fields (# 7026)
  > 3190df7 Tracking/reconcile KResource references (# 7014)
  > 0f68861 Rename more to Resource, instead of broker (# 7022)
  > bccb7d4 Better reflecting the lifecycle of event type … (# 7019)
  > 49d4acd Skip ping source TLS rekt test, since extremely flaky (# 7016)
  > 8719e18 [main] Upgrade to latest dependencies (# 7012)
  > e5ae717 Use HTTP POST when terminating istio proxy (# 7015)
  > fea730f Only check if the reference does exist (# 7010)
  > 631f4ec Add TLS support for mt-broker-filter (# 6940)
  > 45f0a19 Allow wathola components to run with Istio  (# 7011)
  > 65f4b1c [main] Format Go code (# 7008)
  > 3267b1a test SinkBinding with eventshub TLS receiver as sink (# 6979)
  > aad53f4 Updated eventingtls test certs to support IP addresses (# 7006)
  > 57d78e0 [main] Update community files (# 7004)
  > dfb2243 Support TLS in Trigger and Channel reconciler (# 6988)
bumping google.golang.org/grpc 82c6376...5b67e5e:
  > 5b67e5e Update version.go to v1.56.1 (# 6386)
  > d0f5150 client: handle empty address lists correctly in addrConn.updateAddrs (# 6354) (# 6385)
  > 997c1ea Change version to 1.56.1-dev (# 6345)
  > 2b6ff72 Change version to 1.56.0 (# 6344)
  > 7996425 xds/outlierdetection: fix config handling (# 6361) (# 6367)
  > a5ae5c6 weightedroundrobin: cherry-pick 2 commits from master (# 6360)
  > 8edfa1a authz: End2End test for AuditLogger (# 6304)
  > 2b1d70b xds: enable RLS in xDS by default (# 6343)
  > 47f8ed8 interop: Don't fail target if sub-target already failed (# 6332)
  > 1f23f6c client: fix Connect to handle channel idleness properly (# 6331)
  > 3ea58ce client: disable channel idleness by default (# 6328)
  > 6c2529b xds: support pick_first custom load balancing policy (A62) (# 6314)
  > 9b9b364 internal/envconfig: Set Custom LB Env Var to true by default (# 6317)
  > e325737 alts: Fix flaky ALTS TestFullHandshake test. (# 6300)
  > 4d3f221 xds/internal/xdsclient: Add support for String Matcher Header Matcher in RDS (# 6313)
  > 157db19 stats/opencensus: Fix flaky test span (# 6296)
  > f19266c xds: support built-in Stdout audit logger type (# 6298)
  > 59134c3 client: add support for pickfirst address shuffling from gRFC A62 (# 6311)
  > a6e1acf grpc: support sticky TF in pick_first LB policy (# 6306)
  > 2ae10b2 xdsclient: remove interface check related to ResourceData (# 6308)
  > e9799e7 client: support a 1:1 mapping with acbws and addrConns (# 6302)
  > 2a266e7 authz: use pointer to to structpb.Struct instead of value (# 6307)
  > 511a963 interop: let the interop client send additional metadata, controlled by a flag (# 6295)
  > 9b7a947 grpc: support channel idleness (# 6263)
  > 098b2d0 xds/internal/balancer/outlierdetection: Switch Outlier Detection to use new duration field (# 6286)
  > 417d4b6 examples: add error_handling example; move errors to error_details (# 6293)
  > 390c392 authz: Rbac engine audit logging (# 6225)
  > 52fef6d authz: Stdout logger (# 6230)
  > 92e65c8 test/kokoro: Add custom_lb_test to the xds_k8s_lb job (# 6290)
  > 756119c  xds/outlierdetection: forward metadata from child picker (# 6287)
  > 8eba9c2 github: upgrade to v3 of checkout & setup-go (# 6280)
  > 24fd252 proto: update generated code to match grpc-proto changes (# 6283)
  > 4eb88d7 cleanup: use new Duration type in base ServiceConfig (# 6284)
  > 1230f0e xds/internal/xdsclient: Split registry up and two separate packages (# 6278)
  > 0bdae48 interop: fix interop_test.sh shutdown (# 6279)
  > 5dcfb37 interop: hold lock on server for OOB metrics updates; share 30s timeout (# 6277)
  > 68381e7 xds: WRR in xDS (# 6272)
  > fd376a5 test: fix flaky TimeoutOnDeadServer test; some cleanups (# 6276)
  > 1db474c weightedroundrobin: fix duration format in lb config (# 6271)
  > 523dcdd weightedroundrobin: fix test race accessing timeNow (# 6269)
  > 1536887 interop/xds: Add Custom LB needed for interop test (# 6262)
  > 7d61344 examples: fix authz example to receive streaming error properly (# 6270)
  > afcbdc9 xds/internal/xdsclient/xdslbregistry: Continue in converter if type not found (# 6268)
  > b3fbd87 interop: add ORCA test cases and functionality (# 6266)
  > 5e58734 xds: Add support for Custom LB Policies (# 6224)
  > 5c4bee5 balancer/weightedroundrobin: add load balancing policy (A58) (# 6241)
  > c44f77e grpc: use CallbackSerializer in balancer wrapper (# 6254)
  > f193ec0 orca: fix race when calling listeners coincides with updating the run goroutine (# 6258)
  > 417cf84 test: deflake TestBalancerProducerHonorsContext (# 6257)
  > 1f3fe1c Update ClientStream.SendMsg doc (# 6247)
  > ccad7b7 grpc: use CallbackSerializer in resolver_wrapper (# 6234)
  > 47b3c55 orca: fix race at producer startup (# 6245)
  > 56b33d5 server/transport: send appropriate debug_data in GOAWAY frames (# 6220)
  > add9015 orca: allow a ServerMetricsProvider to be passed to the ORCA service and ServerOption (# 6223)
  > 40d0147 googledirectpatph: enable ignore_resource_deletion in bootstrap (# 6243)
  > ed3ceba balancer: make producer RPCs block until the SubConn is READY (# 6236)
  > b153b00 multiple: standardize import renaming for typed structs (# 6238)
  > 713bd04 orca: minor cleanups (# 6239)
  > 21a339c grpc: handle RemoveSubConn inline in balancerWrapper (# 6228)
  > b153827 xds: make glaze happy for test packages (# 6237)
  > 019acf2 stubserver: add option for allowing more services to be registered (# 6240)
  > cf89a0b authz: Swap to using the correct TypedConfig in audit logger parsing (# 6235)
  > df82147 internal: Document gcp/observability 1.0 dependencies in /internal (# 6229)
  > da1a5eb tests: nix TestClientDoesntDeadlockWhileWritingErroneousLargeMessages (# 6227)
  > e853dbf authz: add conversion of json to RBAC Audit Logging config (# 6192)
  > 497436c xds/internal/balancer/outlierdetection: Change string to String (# 6222)
  > de11139 clusterresolver: improve tests (# 6188)
  > eff0942 xds/internal/xdsclient: Custom LB xDS Client Changes (# 6165)
  > 8628e07 xds/internal/balancer/outlierdetection: Add Channelz Logger to Outlier Detection LB (# 6145)
  > 83c460b authz: Move audit package (# 6218)
  > 8c70261 grpc: ClientConn cleanup in prep for channel idleness (# 6189)
  > 2cd95c7 gcp/observability: remove redundant import (# 6215)
  > 16651f6 go.mod: update all dependencies (# 6214)
  > ca60462 stubserver: Stop server when StartClient failed (# 6190)
  > 7dfd718 internal/buffer: add Close method to the Unbounded buffer type (# 6161)
  > ebeda75 tests: defalke TestTimerAndWatchStateOnSendCallback (# 6206)
  > 0ed709c Change version to 1.56.0-dev (# 6213)
bumping knative.dev/client-pkg 83c91f4...e9d838e:
  > e9d838e Update community files (# 109)
  > f8021da Update community files (# 108)
  > 2311a7e Update community files (# 107)
  > f377f06 Update community files (# 106)
  > b93ceb0 Update community files (# 105)
bumping google.golang.org/protobuf f221882...68463f0:
  > 68463f0 all: release v1.31.0
  > 59a8581 encoding/protodelim: fix handling of io.EOF
  > fc47fdd proto: store the size of tag to avoid multiple calculations
  > cc524c9 internal/order: fix sorting of synthetic oneofs to be deterministic
  > b8fc770 encoding/protodelim: If UnmarshalFrom gets a bufio.Reader, try to reuse its buffer instead of creating a new one
  > cf06b0c compiler/protogen: add Semantic.SET to setter annotations
  > 05cbe34 encoding: add MarshalAppend to protojson and prototext
  > 1bca6d9 types/dynamicpb: add NewTypes
  > 736947c all: update protobuf release version to fix macOS tests
  > 808c664 all: start v1.30.0-devel
bumping knative.dev/serving 349b2d6...f1617ef:
  > f1617ef upgrade to latest dependencies (# 14188)
  > fcf7ba2 Update net-kourier nightly (# 14186)
  > 294cb9c Add log example for kourier and gateway-api (# 14178)
  > c0556c2 EnsureCleanup can skip clean up (# 14171)
  > 8d87d57 Update net-gateway-api nightly (# 14158)
  > de37d1e Update net-istio nightly (# 14173)
  > ac01fdb Update community files (# 14175)
  > b7c6b23 Update net-kourier nightly (# 14174)
  > 1183ad0 Update net-certmanager nightly (# 14172)
  > a7613e4 Update community files (# 14169)
  > c68d8f8 Update net-contour nightly (# 14165)
  > e5ad1c4 Update net-istio nightly (# 14164)
  > 6673893 Update net-certmanager nightly (# 14162)
  > a34bfd1 Update net-kourier nightly (# 14163)
  > 917d236 Remove domainmapping config (# 14161)
  > 4c76e3b Drop workaround pach for Istio (# 14156)
  > d97db13 Update net-kourier nightly (# 14160)
  > 1559c9b Bump net-certmanager manifests and add kapp ordering overlay (# 14148)
  > 52fe24e upgrade to latest dependencies (# 14155)
  > a5c8c2e Update community files (# 14154)
  > 2a17873 Separate Activator SA (# 14133)
  > fc166ac Consolidate webhooks (# 14082)
  > b935bea Set QP resource defaults (# 14039)
  > 529c5e4 Update net-kourier nightly (# 14150)
  > 4ccd1c9 Implement Stringer for nil podTracker (# 14147)
  > bd3e5e3 upgrade to latest dependencies (# 14151)
  > ebbca26 upgrade to latest dependencies (# 14149)
  > bde2f42 Update net-gateway-api nightly (# 14144)
  > bb1262e Update net-kourier nightly (# 14129)
  > 32ec382 Drop unused ytt patch for Ingress ServiceType (# 14143)
  > 4c3b36c Update net-gateway-api nightly (# 14136)
  > 9a75a93 Update net-istio nightly (# 14132)
  > ca618b7 Update net-certmanager nightly (# 14131)
  > ea3e9c3 Update net-contour nightly (# 14130)
  > 2e7d6e4 Update community files (# 14128)
  > 63fa389 Allow to set QP resources per service (# 14038)
  > 9310e4d Update net-kourier nightly (# 14125)
  > 0462ce6 Update net-istio nightly (# 14126)
  > 2813b9a Update net-gateway-api nightly (# 14119)
  > eaf666e Update net-istio nightly (# 14116)
  > 53169cd Update net-istio nightly (# 14112)
  > e865aa7 Update net-contour nightly (# 14109)
  > 921daf8 Update net-certmanager nightly (# 14111)
  > bb581cc Update net-kourier nightly (# 14110)
  > fbfffc0 upgrade to latest dependencies (# 14108)
  > bcf9274 upgrade to latest dependencies (# 14101)
  > f085b30 fix: requests are sent to all pods even if cc=1 and the parity of activatorCount and podTracker is different (# 14022)
  > 9772417 Update net-kourier nightly (# 14107)
  > f6d0c7b Update net-contour nightly (# 14106)
  > 560e0ea Update net-certmanager nightly (# 14105)
  > 51f4f1e Update net-istio nightly (# 14104)
  > 18519b1 Update net-contour nightly (# 14079)
  > 38c155e Add chainguard-dev/actions for creating kind cluster (# 14018)
  > 74c57d8 Update net-istio nightly (# 14098)
  > 5a9c574 Update net-kourier nightly (# 14096)
  > 3a6c2b6 upgrade to latest dependencies (# 14095)
  > 5a90438 Update net-istio nightly (# 14091)
  > dc0692a Update net-istio nightly (# 14088)
  > 0fbd780 Update net-certmanager nightly (# 14087)
  > 6f63c98 Update net-kourier nightly (# 14086)
  > e74f5f4 Update net-gateway-api nightly (# 14085)
  > 1587070 Update net-kourier nightly (# 14081)
  > 2e00e9f Update net-certmanager nightly (# 14080)
  > a3c7864 Update net-istio nightly (# 14078)
  > 384b889 Update net-gateway-api nightly (# 14077)
  > 7d0f963 Change storage version of DomainMapping to v1beta1 (# 14058)
  > e8b6f05 Update net-gateway-api nightly (# 14068)
  > 41e4212 Get certificate reconciler from `networking` instead of `control-protocol` (# 14072)
  > e71b933 Update net-certmanager nightly (# 14070)
  > 8f516b6 Update net-kourier nightly (# 14069)
  > a2bb4aa upgrade to latest dependencies (# 14071)
  > c95f17b Update community files (# 14067)
  > bf48e64 Remove deprecated internalEncryption dependency (# 14064)
  > 6b87d67 Update net-istio nightly (# 14065)
  > fbecf34 refactor throttler_test.go (# 14055)
bumping google.golang.org/genproto/googleapis/rpc e85fd2c...9506855:
  > 9506855 chore(all): auto-regenerate .pb.go files (# 1028)
  > 1f95444 chore(all): auto-regenerate .pb.go files (# 1026)
  > e449d1e chore(all): update apidiff.yaml for submodules (# 1027)
  > 9b080da chore(all): auto-regenerate .pb.go files (# 1025)

Signed-off-by: Knative Automation <automation@knative.team>

* fixup: run ./hack/update-deps.sh

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

---------

Signed-off-by: Knative Automation <automation@knative.team>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2023-07-25 19:00:39 +00:00
Matej Vasek cb6f33d924
src: Use jobs not plain pods for auxiliary tasks (#1857)
* src: Use jobs not plain pods for auxiliary tasks

Job should have security context set properly automatically.

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

* fixup: remove unused code

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-07-24 21:14:38 +00:00
Matej Vasek 8b46151b92
fix: resolve tkn task spec locally (#1885)
* fix: resolve tkn task spec locally

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

* fixup: remove unused import

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

* fixup: run ./hack/update-deps.sh

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-07-24 18:09:39 +00:00
github-actions[bot] a3a45d3514
chore: update Quarkus platform version to 3.2.2.Final (#1883)
Co-authored-by: Knative Automation <automation@knative.team>
2023-07-24 17:21:39 +00:00
Luke Kingland 8703d9cf9e
fix: verbose default not applied (#1884) 2023-07-24 16:25:38 +00:00
github-actions[bot] 0def26fa79
chore: update Quarkus platform version to 3.2.1.Final (#1881)
Co-authored-by: Knative Automation <automation@knative.team>
2023-07-21 14:24:13 +00:00
Luke Kingland 60aafba296
fix: host builder retry error (#1874)
* error message improvement

* src: remove trailing period on error

* fix: clear previous build on rebuild
2023-07-20 16:02:12 +00:00
Matej Vasek 5948cf4a07
Update docker client dependency (#1877)
* chore: update docker client lib

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

* fixup: "host" OCI pusher

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

* fixup: downgrade github.com/containers/image/v5

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

* fixup: platform tests

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-07-20 10:50:12 +00:00
Lance Ball 36489f3a55
chore: bump faas-js-runtime and cloudevents for node & TS (#1873)
* 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>
2023-07-19 04:17:11 +00:00
Matej Vasek 410f0757ae
fix: remove path bacause of bug in paring logic (#1875)
* fix: remove path bacause of bug in paring logic

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

* Update pkg/docker/docker_client.go

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-07-18 19:28:10 +00:00
Matej Vasek a9e52815bc
fix: OCI content creation by "host" builder on Win (#1871)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-07-18 17:29:09 +00:00
Luke Kingland ba798408de
src: update func-runtime-go and dapr (#1836)
* func-rumtime-go v0.2.4

* dapr v1.11.1

* func-runtime-go v0.3.2
2023-07-18 09:57:10 +00:00
Knative Automation ab5bbe1ad4
Update community files (#1862)
Signed-off-by: Knative Automation <automation@knative.team>
2023-07-13 02:23:14 +00:00
Luke Kingland 4719a43530
adds ADDRESS env to deployed (#1837)
Requests that deployed functions listen on all interfaces by default by
providing an ADDRESS environment variable.
2023-07-12 20:15:14 +00:00
Knative Automation 1b4c493966
Update community files (#1860)
Signed-off-by: Knative Automation <automation@knative.team>
2023-07-12 02:29:13 +00:00
Zbynek Roubalik 79c36eefdc
use Tekton Resolvers for a standard on cluster build (#1843)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-07-11 17:41:13 +00:00
Knative Automation 6f627c9340
Update community files (#1855)
Signed-off-by: Knative Automation <automation@knative.team>
2023-07-11 13:50:12 +00:00
Matej Vasek ce4b05b33f
chore: update tekton client library (#1856)
This prevents `send on closed channel` panic.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-07-11 12:20:12 +00:00
Zbynek Roubalik 20d20985cc
doc: list demos in the Readme (#1854)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-07-10 20:13:12 +00:00
github-actions[bot] f671918124
chore: update Quarkus platform version to 3.2.0.Final (#1844)
Co-authored-by: Knative Automation <automation@knative.team>
2023-07-05 19:00:39 +00:00
Luke Kingland b38d19b2af
rebuild templates on make update-runtimes (#1835) 2023-06-30 19:24:28 +00:00
Luke Kingland 883dcbb203
src: make test and check go (#1828)
- Updates make test-go to include scaffolding
- Creates make check-go to run basic source quality checks
2023-06-30 05:37:27 +00:00
Nitish Chauhan c15450177a
adding support for .funcignore file (#1815)
* adding suppor for funcignore file

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* resolving unit test and linting error

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* adding unit tests and symlink

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* making requested changes in tests

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* making requested changes

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* changing the comment

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* resolving unit test error in windows

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

---------

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
2023-06-28 20:36:03 +00:00
Knative Automation d6666d37e5
Update community files (#1834)
Signed-off-by: Knative Automation <automation@knative.team>
2023-06-28 14:31:02 +00:00
Lance Ball 803e7e6d07
chore: add presubmit-unit-tests Makefile target (#1833)
This commit adds a Makefile target that will simulate the Prow presubmit
tests that are run for pull requests on GitHub. It makes use of the same
image used by Prow, and runs the ./test/presubmit-tests.sh script so
that developers can run the same suite of tests that are run in CI/CD.

Signed-off-by: Lance Ball <lball@redhat.com>
2023-06-28 08:32:53 +00:00
Lance Ball b6b15f9d37
chore: quiet template tests for quarkus, springboot & rust (#1832)
Signed-off-by: Lance Ball <lball@redhat.com>
2023-06-27 15:04:52 +00:00
Matej Vasek 504b40b8eb
Cluster integration tests cleanup (#1829)
* test: better cleanup

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

* test: k8s dialer test improvements

* Use deployment, not pod directly.
* Use gcr.io/knative-samples/helloworld-go instead of nginx.

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

* refactor: dialer ctor accepts k8s config as param

This is in general better design since ctor does not relay on global
state in form of environment variable.
This also allows to run tests in parallel against various clusters.

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

* test: do run tests in a new namespace

Not all cluster users can create a new namesapce.
If we want to run test against non-admin users namespace must be ensured
by test invoker.

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

* test: better deletion policy

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

* test: better random resource names

Related resource have common random suffix.

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-27 14:54:52 +00:00
Lance Ball 2bf1065266
chore: use a custom presubmit_tests.sh script (#1808)
The Knative test infrastructure runs presubmit tests which are defined
in vendor/knative.dev/hack/presubmit-tests.sh. This has been running in
test and release infrastructure. It is possible to customize the
behavior of this script by defining a handful of functions. The function
definitions provided here ensure that we are running tasks that are
already being run with the default (e.g. verify-codgen.sh) but make use
of our existing build and test targets.

(There also seems to be a stray version of this that I committed a
couple of years ago. That has been removed as it is in the wrong
location for test-infra and was never used anyway.)

Relates to: https://github.com/knative/func/issues/1333

Signed-off-by: Lance Ball <lball@redhat.com>
2023-06-27 14:09:52 +00:00
Luke Kingland 19509e5053
feat: scaffolded functions certs (#1823) 2023-06-26 18:57:51 +00:00
Matej Vasek cbd6b04986
fix: choosePort for host-runner (#1825)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-26 18:24:51 +00:00
Luke Kingland 8a078cea0c
src: make update-runtimes (#1822)
- Updates func-runtime-go 20 v0.2.3
- Create an 'update-runtimes' make target
- Standardizes plurality of "Cloudevents" throughout
2023-06-22 07:00:35 +00:00
Luke Kingland 264507dc8b
src: speed up tests by building with a test platform (#1820) 2023-06-22 06:58:35 +00:00
github-actions[bot] 7b5bd335d5
chore: update Quarkus platform version to 3.1.2.Final (#1816)
Co-authored-by: Knative Automation <automation@knative.team>
2023-06-21 18:16:34 +00:00
Luke Kingland 512ef230e6
chore: test cluster versions update (#1819)
* test cluster versions update

Updates versions used for the test clutser, and includes a change
to use a specific kind node version rather than the kubernetes version per
Kind's docs.

- knative_serving v1.10.1
- knative_eventing v1.10.1
- contour v1.10.0
- kubectl v1.27.2
- dapr v1.10.0
- helm v3.12.0
- kind v0.19.0
- kind_node v1.27.1

* remove dapr dashboard patch

* dapr init flags resuscitation
2023-06-21 15:30:34 +00:00
Luke Kingland 278ce6b0d8
src: refactor builder concurrency test (#1821) 2023-06-21 11:18:36 +00:00
Nitish Chauhan f93b23290c
adding service account support (#1812)
* adding service account support

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* correcting formatting

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

---------

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2023-06-21 07:44:35 +00:00
Luke Kingland 8dc5a76d24
feat: enable host-built functions' dependencies (#1790) 2023-06-21 05:50:34 +00:00
Luke Kingland 51cb15b78a
feat: enable host builder via cli (#1748) 2023-06-20 17:33:34 +00:00
Luke Kingland 94582efa49
src: interstitial commit version (#1817)
The Knative version is now included in version command verbose output

Building an unreleased version no longer returns v0.0.0, but instead the
value provided by `git describe --tags` which is the most recent tagged
release with a suffix consisting of the number of commits since that
release and the short hash.

Verbose output now always includes the current commit on a dedicated
line.
2023-06-20 17:15:34 +00:00
Sascha Grunert c1a90f65f2
Add support for `serviceAccountName` on deploy (#1811)
This allows setting the service account for the resulting knative
service, which must pre-exist in the namespace to let the deployment
succeed.

Signed-off-by: Sascha Grunert <sgrunert@redhat.com>
2023-06-19 16:46:54 +00:00
Matej Vasek 3d1176680d
fix: bad connection handling for in cluster dialer (#1800)
* fix: bad connection handling for in cluster dialer

Connections were closed from wrong end of io.Pipe
which resulted in confusing error logs.

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

* feat: DialContext() better error handling

Now DialContext() returns some errors immediately
instead of deferring it Read/Write operation on the returned connection.

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

* feat: DialContext() more better error handling

Now ContextDial() tries to parse socat's stderr and translate it to Go's net.OpError
instead of just creating error with whole stderr embedded in it.

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

* Apply suggestions from code review

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Lance Ball <lball@redhat.com>
2023-06-19 06:23:53 +00:00
Luke Kingland cabba3f9d3
feat: start timeout for host runs (#1782)
* feat: start timeout for host runs

* refactor timeout function

* hide flag until a valid path
2023-06-16 19:57:49 +00:00
Andrejus Chaliapinas f6c11c94af
Added Rust templates linting (#1814)
* Adding Lint for Rust templates

* Run CI on my branch

* Remove CI on non-main branch
2023-06-14 17:03:47 +00:00
Thomas Risberg 339608a733
Update springboot template pom.xml dependencies (#1807)
- 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
2023-06-14 17:02:46 +00:00
Nitish Chauhan d3a6d6c60c
adding default builders (#1796)
* adding default builders

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* adding yaml format output option

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* fixing typo

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

* making changes in flag

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>

---------

Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
2023-06-14 17:01:46 +00:00
Matej Vasek 8a8639ae00
src: more verbose output (#1810)
* fixup: more verbose output

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

* fixup: refactor extract version into variable

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-13 17:58:45 +00:00
Matej Vasek 83bc889b6c
src: use ghcr.io for dapr components in GH Action (#1809)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-12 16:21:45 +00:00
Luke Kingland 25ec89d52c
feat: platform build options (#1780)
Plumbs through the platform CLI flag to the individual builders by
creating a client-level BuildOption functional option, and modifying the
builder interface to accept an optional set of requested target
platforms.
2023-06-12 14:04:03 +00:00
Sascha Grunert 529957e837
Cleanup Rust cloudevents example (#1799)
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>
2023-06-10 03:32:59 +00:00
Nitish Chauhan 890d440037
added shorthand -R for --remote flag (#1797)
Signed-off-by: ntishchauhan0022 <nitishchauhan0022@gmail.com>
2023-06-09 18:54:59 +00:00
Luke Kingland 0ef55f8036
src: cleanup the run timeout loop and check (#1804)
* src: cleanup the run timeout loop and check

* Update pkg/functions/runner.go

---------

Co-authored-by: Matej Vasek <matejvasek@gmail.com>
2023-06-09 16:52:00 +00:00
Sascha Grunert 44978970f6
Cleanup Rust http example (#1798)
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>
2023-06-09 13:10:59 +00:00
Aleksander Slominski 8489a0d08b
Check error before defer body close, include timeout in error message (#1803) 2023-06-09 00:52:58 +00:00
Matej Vasek 18fe6430a1
chore: update to Go 1.20 (#1802)
* chore: update to Go 1.20

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

* fixup: update codegen

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

* fixup: update golangci-lint

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-08 21:22:58 +00:00
Matej Vasek 6b97fb5a3c
test: integration test for tekton on cluster build (#1789)
* test: integration tests for Tekton builds

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

* fixup: disable s2i integration test for now

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-07 21:47:57 +00:00
Jefferson Ramos 5034bd31d2
chore: test build tags and removal of iteractive tests on Windows (#1794) 2023-06-07 19:17:57 +00:00
github-actions[bot] 0cce3f01ce
chore: update Quarkus platform version to 3.1.1.Final (#1793)
Co-authored-by: Knative Automation <automation@knative.team>
2023-06-07 17:47:57 +00:00
Matej Vasek 4386689f41
cleanup: run test operations in dedicated ns (#1791)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-07 07:21:57 +00:00
Jefferson Ramos 2af040f5b7
chore: default s2i builder as var for ldflags (#1787) 2023-06-06 21:51:26 +00:00
Luke Kingland e5aff92984
feat: enable scaffolding for host builds (#1750)
* feat: enable scaffolding in builder

* fix a few typos

* error text formatting

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

* error text formatting

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

* remove test job stop defer

---------

Co-authored-by: Lance Ball <lball@redhat.com>
2023-06-06 20:37:26 +00:00
Luke Kingland 9632748f19
src: errors cleanup (#1783) 2023-06-06 20:15:26 +00:00
Michal Vinkler 109e6b6be8
Fix appending SHA256 hash to image reference in ImageWithDigest (#1784) 2023-06-06 19:01:26 +00:00
Matej Vasek 75a8b8991d
chore: clean up PaC GitLab test (#1785)
* chore: clean up PaC GitLab test

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

* fixup: missing EOL

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

* fixup: generate random password for GitLab

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-06 17:55:26 +00:00
knative-automation 1b6414df1e
Update community files (#1781)
Signed-off-by: Knative Automation <automation@knative.team>
2023-06-06 02:22:27 +00:00
Luke Kingland a7f68f9de9
fix: filename typo (#1772) 2023-06-06 00:24:26 +00:00
Matej Vasek 4e743684e1
Pipeline as Code integration for GitLab (#1769)
* feat: PaC for Gitlab

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

* fixup: different approach to hostname resolution

Resolve '[*.]127.0.0.1.sslip.io' to cluster node IP.

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

* fixup: error handling

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

* fixup: added TODO

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

* fixup: small refactor

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-06-05 19:48:26 +00:00
Luke Kingland d3e33738b9
src: add missing 'omitempty' annotations (#1773) 2023-06-05 18:29:26 +00:00
Luke Kingland 895226fccc
src: remove date from version (#1776)
In an effort to move one step closer to reproducible builds, the date of
compliation is removed from the binary.
2023-06-05 09:50:41 +00:00
Luke Kingland 7175a554ff
feat: source-defined buildpacks (#1774)
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.
2023-06-05 09:49:41 +00:00
Luke Kingland c96d29faa3
src: invoke response cleanup (#1777) 2023-06-05 09:48:41 +00:00
Luke Kingland bb599f00f9
fix: PVCSize resets to default (#1771)
Refactors PVCSize to treat the Function member as a custom setting,
and the in-code constant as the default.

- Fixes a bug where the PVCSize would reset to the default on deploy
- Allows the default to be changed by future func version, only pinning
  the value if explicitly requested by the user.
2023-06-05 09:43:41 +00:00
knative-automation 184db6b939
upgrade to latest dependencies (#1747)
bumping knative.dev/hack 7d81248...5b7907f:%0A  > 5b7907f Update actions (# 289)%0A  > c133d5d Install Istio for tests (# 291)%0A  > 5812c57 Update community files (# 292)%0Abumping knative.dev/eventing 4b9fdef...df08b49:%0A  > df08b49 Eventing TLS: verify APIServerSource and PingSource sinkURI is https (# 6987)%0A  > d21c1aa [main] Upgrade to latest dependencies (# 6989)%0A  > 70113e8 Deprecate broker field and use KReference for the broker instead (# 6870)%0A  > 4e4647f test update to newest version (# 6990)%0A  > 870ac6b Update MessageDispatcher and FanoutMessageHandler to support sending events to TLS endpoints (# 6983)%0A  > 6dd5d58 Test PingSource with eventshub TLS receiver as sink (# 6965)%0A  > 55f4f28 [main] Upgrade to latest dependencies (# 6982)%0A  > 2a5a9a5 Add more items in the development getting started documentation (# 6978)%0A  > 59118a0 imc-dispatcher starts a TLS server, accepts host based routing on http receiver and path based routing on https receiver (# 6954)%0A  > ee49ada Rework kncloudevents library to support multiple clients (# 6975)%0A  > ee88094 Make ServerManager independent from kncloudevents package (# 6980)%0A  > 6a11c5f [main] Upgrade to latest dependencies (# 6969)%0A  > 8a9a532 Updated DEVELOPMENT.md to provide better instructions on setting up kubernetes (# 6977)%0A  > 390a0c8 Eventing TLS: Test ContainerSource with eventshub TLS receiver as sink (# 6957)%0A  > 5e245ac Fix flaky PingSource TLS unit test (# 6970)%0A  > f9f27c9 Use random names in Channel tests (# 6967)%0A  > d4609a5 Do not parse flags in InitializeEventingFlags (# 6966)%0A  > ef68a0a [main] Update community files (# 6968)%0A  > 4adc287 Add transport-encryption prerequisite for Addressable tests (# 6964)%0A  > deb0ef4 Add field for subscribers & replys CA certs to `SubscriberSpec` and `SubscriptionStatusPhysicalSubscription` (# 6959)%0A  > b81082c Eventing TLS: Test ApiServerSource with eventshub TLS receiver as sink (# 6956)%0A  > cdff269 Adding source duck type to v1b2 (# 6962)%0A  > b47b4ec [main] Upgrade to latest dependencies (# 6958)%0A  > 3315c20 Provide Channels CACerts in Brokers status annotation (# 6952)%0Abumping knative.dev/client-pkg e5c405e...83c91f4:%0A  > 83c91f4 Update community files (# 103)%0Abumping knative.dev/pkg dfb4bf0...5671699:%0A  > 5671699 drop the dynamic type (# 2750)%0A  > 9bda38b Fix some webhook testing tech debt (# 2751)%0A  > ec20442 Update community files (# 2747)%0A  > 05bfcf6 bump k8s dependencies and update min version to v1.25 (# 2745)%0A  > 52ff2ac drop dynamic client wrappers (# 2744)%0A  > a170a07 Eventing TLS: validate that Destination.CACerts is a PEM encoded cert (# 2743)%0Abumping knative.dev/serving 99800ed...349b2d6:%0A  > 349b2d6 Change minimum TLS version to 1.3 for internal encryption (between activator and queue-proxy) (# 13887)%0A  > d07bf78 Update net-contour nightly (# 14049)%0A  > aa023e8 Update net-istio nightly (# 14048)%0A  > 8fc4bb9 Update net-gateway-api nightly (# 14047)%0A  > 135be30 Update net-certmanager nightly (# 14046)%0A  > 8da71b5 Update net-kourier nightly (# 14042)%0A  > 13a4e46 poll until timeout - don't error out if the deployment can't be found (# 14027)%0A  > 31c2b7e upgrade to latest dependencies (# 14043)%0A  > 6a6e417 Update net-istio nightly (# 14041)%0A  > 807fc2c Update net-certmanager nightly (# 14040)%0A  > 3c23945 drop safe to evict annotations (# 14035)%0A  > fca5c14 Update net-gateway-api nightly (# 14033)%0A  > c12c917 Update net-contour nightly (# 14034)%0A  > 2da856d Update net-kourier nightly (# 14032)%0A  > d7c8779 Update net-certmanager nightly (# 14031)%0A  > aaf01dc Update net-istio nightly (# 14030)%0A  > bdaa436 RandomChoice 2 policy wasn't random when the number of targets is 2 (with equal weight) (# 14028)%0A  > c91f8c4 Fix metrics reporting period (# 14019)%0A  > 9f60969 Update net-kourier nightly (# 14004)%0A  > 6020cec Update net-istio nightly (# 14025)%0A  > 88cae7f Update net-gateway-api nightly (# 14016)%0A  > a143bf8 Update net-contour nightly (# 14015)%0A  > c2be582 Update net-certmanager nightly (# 14014)%0A  > 3450f0a upgrade to latest dependencies (# 14013)%0A  > 35cfd8f [Automated] Update net-gateway-api nightly (# 14003)%0A  > 08a9708 Update net-istio nightly (# 14009)%0A  > 5074b4c Update net-contour nightly (# 14010)%0A  > e8cb343 upgrade to latest dependencies (# 13999)%0A  > 1261074 Update net-certmanager nightly (# 14002)%0A  > f987ca6 Bump kind to 0.19 (# 14008)%0A  > fbb7fa1 Update community files (# 13998)%0A  > bff1d80 Remove 1.24 kind version (# 14007)%0A  > a657321 Update net-kourier nightly (# 13993)%0A  > d75b0f0 Update net-contour nightly (# 13990)%0A  > 6d26f54 upgrade to latest dependencies (# 13991)%0A  > df5001f Update net-certmanager nightly (# 13992)%0A  > 2594084 upgrade to latest dependencies (# 13989)%0A  > 7c303fa Update cluster-version to 1.25 (# 13988)%0A  > 9e751a2 Update net-certmanager nightly (# 13974)%0A  > 7b35cfb upgrade to latest dependencies (# 13987)%0Abumping knative.dev/networking 33636d9...2a2f7d2:%0A  > 2a2f7d2 upgrade to latest dependencies (# 810)%0A  > fcbedad Update community files (# 809)%0A  > a44b093 upgrade to latest dependencies (# 808)%0A  > 7c2f7ac upgrade to latest dependencies (# 807)%0Abumping k8s.io/apiextensions-apiserver e8bd314...52c998e:%0A  > 52c998e Update dependencies to v0.26.5 tag%0A  > 186ff9b Merge pull request # 117274 from jkh52/release-1.26-knp-0.0.37%0A  > b7b18f5 Merge pull request # 117691 from dims/re-do-of-117242-on-release-1.26%0A  > ee5015a Bump konnectivity-client to 0.0.37%0A  > 9ce75f3 Bump runc go module v1.1.4 -> v1.1.6%0A  > e9d194a Merge pull request # 115599 from jkh52/release-1.26-knp-0.0.36%0A  > d7df0be Merge pull request # 115787 from liggitt/net-0.7.0-1.26%0A  > 9152c67 Bump konnectivity-client to v0.0.36%0A  > 89cec57 Update golang.org/x/net to v0.7.0%0A  > f72cc5c Merge pull request # 115642 from nckturner/pin-golang.org/x/net-to-v0.4.0-in-1.26%0A  > 28eb995 Pin golang.org/x/net to v0.4.0 in 1.26

Signed-off-by: Knative Automation <automation@knative.team>
2023-06-05 09:40:41 +00:00
Luke Kingland 8ea1846c34
feat: add missing command aliases (#1775) 2023-06-05 09:39:42 +00:00
Lance Ball fea4a72734
feat: adds a `func environment` command (#1761)
* feat: adds a `func environment` command

Adds `func environment` to print the current function execution
environment as JSON.

See: https://github.com/knative/func/discussions/1676

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

* fixup

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

* fixup: add environment variables

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

* fixup: add cluster host

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

* fixup: review feedback

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

---------

Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-31 12:36:35 +00:00
Luke Kingland 4dad8aaf7a
reduce default build platforms (#1765) 2023-05-30 17:04:35 +00:00
github-actions[bot] 70fd17642e
chore: update Springboot platform version to 3.1.0 (#1763)
Co-authored-by: Knative Automation <automation@knative.team>
2023-05-27 00:42:26 +00:00
ningyan325 f528a70881
Automated platform update for springboot templates (#1762)
* 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
2023-05-26 21:51:26 +00:00
Lance Ball dd7c8bdc4e
deps: update tekton to latest versions (#1753)
* deps: update tekton to latest versions

Fixes: https://github.com/knative/func/issues/1716

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

* fixup: rebase

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

* fixup: replace kube-openapi with older version and add shell scripts

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

* fixup: handle deprecations

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

* fixup: revert make check timeout value

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

---------

Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-26 20:04:26 +00:00
Matej Vasek f8e976cb05
Pass image with digest to the deploy task (#1756)
* fix: deploy task explicitly sets --image flag

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

* fix: PaC with `pack` sets image param for deploy task

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

* fixup: unify output of s2i and pack build task

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

* fixup: unify passing of produced image by build tasks

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>
2023-05-25 15:18:27 +00:00
github-actions[bot] 2656a7e910
chore: update Quarkus platform version to 3.0.4.Final (#1758)
Co-authored-by: Knative Automation <automation@knative.team>
2023-05-25 13:41:25 +00:00
Luke Kingland b82a5a4eac
feat: host-based scaffolded function runner (#1733)
* feat: host runner

* improve error message wording
2023-05-24 21:26:25 +00:00
Jefferson Ramos f155c9c7ae
chore: preparing pipelines as code template for midstream customization (#1735) 2023-05-24 20:31:23 +00:00
Matej Vasek bc39a1aec2
Use Contour Ingress instead of Kourier (#1752)
* Use Contour Ingress instead of Kourier

Contour can be used to expose resources other that ksvc
(e.g. PaC controller).

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

* fixup: use defined version of contour

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

* fixup: shellcheck

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

* Use LoadBalancer instead of NodePort in test

This makes services available on port 80 on both localhos and in docker
network, before these ports differed.

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-05-24 20:26:23 +00:00
knative-automation a72431bd65
Update community files (#1754)
Signed-off-by: Knative Automation <automation@knative.team>
2023-05-24 02:24:09 +00:00
Luke Kingland bf01e6426a
feat: oci directory pusher (#1702)
* feat: write instanced and static scaffolding

* feat: add oci pusher
2023-05-18 23:19:13 +00:00
Zbynek Roubalik a0b9a86034
fix: don't require credentials when not configuring webhook (#1743)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-05-18 21:35:13 +00:00
Luke Kingland 530ea4fe53
feat: write instanced and static scaffolding (#1732) 2023-05-18 20:03:14 +00:00
knative-automation be998d502c
upgrade to latest dependencies (#1746)
bumping knative.dev/pkg db8a353...dfb4bf0:%0A  > dfb4bf0 Drop dynamic wrapper injection code generation (# 2742)%0Abumping knative.dev/eventing 1efab19...4b9fdef:%0A  > 4b9fdef [main] Upgrade to latest dependencies (# 6955)%0A  > da31970 Improve cert-manager resources for Eventing TLS certs provisioning (# 6953)%0A  > fc5befb Provide subscribers CACerts in triggers status (# 6951)

Signed-off-by: Knative Automation <automation@knative.team>
2023-05-18 14:47:13 +00:00
Lance Ball f070ea8c00
chore: improve error messages for most commands (#1745)
This commit adds a new error type `UninitializedError` to minimize
redundancy across commands, and applies it in all of the commands which
need an initialized function to operate.

Fixes: https://github.com/knative/func/issues/1744

Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-17 15:52:12 +00:00
Zbynek Roubalik 702da8a665
chore: improve error msg when PAC is not installed (#1742)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-05-17 15:06:12 +00:00
Luke Kingland 9a790f005f
feat: host oci builder (#1730)
* feat: oci builder for host builds

* do not expose host builder until fully baked
2023-05-17 10:53:11 +00:00
knative-automation 64337b4df5
upgrade to latest dependencies (#1740)
bumping knative.dev/eventing a9908ef...1efab19:%0A  > 1efab19 Using v1b2 in the reconciler (# 6949)%0A  > c44671c Updating rekt test resources for EventType v1b2 (# 6946)%0A  > e31eb1f Adding testingv1b2 for eventtype (# 6944)%0Abumping knative.dev/serving 14ad4d1...99800ed:%0A  > 99800ed Set default domain to cluster's domain (# 13964)%0A  > c90fabf Metric annotations work with global class config (# 13978)%0A  > da31cd1 Update net-kourier nightly (# 13975)%0A  > f457924 Update net-contour nightly (# 13976)

Signed-off-by: Knative Automation <automation@knative.team>
2023-05-17 08:28:11 +00:00
Luke Kingland 94c81d4046
fix: .gitignore stamp interference (#1728)
- The .gitignore file was always relative to process' current working
  directory.  Now correctly uses the function root
- The .gitignore file was always being updated, causing its modification
  timestamp to be updated multiple times throughout the executaion of
  any client commands.
- Adds the ability to override this behavior by commenting out the line
  in the .gitignore.
- Adds the ability to request that stamping create an ongoing journal
  via a build log file with timestamp prefix (for debugging)
2023-05-16 19:41:11 +00:00
Matej Vasek 62105aa857
chore: improve error message when no func on path (#1739)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-05-15 18:44:09 +00:00
knative-automation 2269aa0f91
upgrade to latest dependencies (#1738)
bumping knative.dev/serving fc63583...14ad4d1:%0A  > 14ad4d1 upgrade to latest dependencies (# 13973)%0A  > 00ddfd9 Update net-kourier nightly (# 13972)%0Abumping knative.dev/networking 77975a1...33636d9:%0A  > 33636d9 Backward compatibility for InternalEncryption (# 806)

Signed-off-by: Knative Automation <automation@knative.team>
2023-05-13 05:18:42 +00:00
Luke Kingland e9385f3bf2
docs: regen domain docs (#1731) 2023-05-11 13:13:03 +00:00
knative-automation 4fa785afb6
upgrade to latest dependencies (#1729)
bumping knative.dev/eventing 24fbfe5...a9908ef:%0A  > a9908ef Support TLS in PingSource (# 6929)%0A  > df559c0 Fix typo in flags.IsDisbledTransportEncryption name (# 6941)%0A  > 7073cc9 [main] Upgrade to latest dependencies (# 6939)%0A  > c6bc9bb Eventing TLS: Support K_CA_CERTS env variable injection for SinkBinding subjects (# 6931)%0Abumping knative.dev/serving 219285e...fc63583:%0A  > fc63583 Update net-kourier nightly (# 13966)

Signed-off-by: Knative Automation <automation@knative.team>
2023-05-11 12:58:02 +00:00
Matej Vasek ca0c251bb9
fix: use full builder for Rust (#1737)
Some Rust libraries using system libraries need pkg-config installed and
it is not present in the base builder, only in the full one.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-05-10 20:55:01 +00:00
Matej Vasek b04fe51796
chore: remove Procfile from Rust templates (#1736)
It appears that the file is no longer needed.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-05-10 18:07:01 +00:00
github-actions[bot] f99e074690
chore: update Quarkus platform version to 3.0.3.Final (#1734)
Co-authored-by: Knative Automation <automation@knative.team>
2023-05-10 17:31:01 +00:00
Luke Kingland f58770d997
feat: function signature detection (#1699)
* feat: function signatures and detector

Adds an enumeration of base accepted method signatures, and implements a
detector for go functions.

* fix lint errors

* Capitalize error text

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

* Capitalize error text

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

* Capitalize error text

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

* Capitalize error text

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

* Add error text punctuation

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

---------

Co-authored-by: Lance Ball <lball@redhat.com>
2023-05-10 16:02:02 +00:00
knative-automation 2dda005e4d
upgrade to latest dependencies (#1717)
bumping knative.dev/networking 68725bd...77975a1:%0A  > 77975a1 Add the new certificate names for dataplane and controlplane (# 804)%0A  > c3cca43 upgrade to latest dependencies (# 803)%0A  > 3f4627e Add internal trust flag to config (# 778)%0A  > 02055c8 Update community files (# 801)%0Abumping knative.dev/pkg 9049667...db8a353:%0A  > db8a353 Add SinkCACerts to SourceStatus (# 2733)%0Abumping knative.dev/serving 5e056a0...219285e:%0A  > 219285e Update net-kourier nightly (# 13959)%0A  > 2fa05bd Min TLS for tag to digest defaults to 1.2 again and is configurable (# 13962)%0A  > 43df348 Update net-contour nightly (# 13958)%0A  > 50a9f22 Update net-certmanager nightly (# 13961)%0A  > 4e379cb Update net-gateway-api nightly (# 13957)%0A  > 3d53294 Update net-istio nightly (# 13960)%0A  > ea2a6c8 💄 Install ko using setup-ko, from ko-build (# 13951)%0A  > e5070cd upgrade to latest dependencies (# 13950)%0A  > 9778f2d Update net-istio nightly (# 13949)%0A  > f27ba4e Update net-certmanager nightly (# 13944)%0A  > 2840301 Update net-kourier nightly (# 13945)%0A  > 117a642 Update net-gateway-api nightly (# 13943)%0A  > 84a2230 Update net-contour nightly (# 13942)%0A  > 7aa5edb upgrade to latest dependencies (# 13941)%0A  > 01707d8 upgrade to latest dependencies (# 13940)%0A  > b7d5e8d Update net-istio nightly (# 13939)%0Abumping knative.dev/eventing cd50d27...24fbfe5:%0A  > 24fbfe5 Eventing TLS: support exposing https address in Broker controller (# 6930)%0A  > d18cb42 Add information about retryable error in servermanager (# 6921)%0A  > f92a05b Added Support for K_CA_CERTS in the heartbeats (# 6920)%0A  > b8b43d0 Remove CA certs empty and non nil check, use URL scheme only (# 6928)%0A  > 3c8cc05 Return error directly if one receiver of servermanager fails (# 6919)%0A  > 92ab7f8 [main] Upgrade to latest dependencies (# 6927)%0A  > 5c6fe57 two more for reducing to debug, instead of info (# 6922)%0A  > 6cf9397 less verbose logs on scheduler component  (# 6912)%0A  > 69918f2 Adds ServerManager. Supports http/https message receivers (# 6908)%0A  > d58e259 Install ko using setup-ko in kind e2e tests (# 6910)%0A  > 9cdea5d Eventing TLS: Added Support for setting K_CA_CERTS in the ApiServerSource controller for the adapter (# 6897)%0A  > add8436 Eventing TLS: support exposing https address in InMemoryChannel controller (# 6881)%0A  > 59cfb6d [main] Upgrade to latest dependencies (# 6906)%0A  > 03f2a3d Remove unused test helper (# 6907)%0A  > 7a90c46 Remove eventing-natss from downstream tests (# 6905)%0A  > ba2550b [main] Upgrade to latest dependencies (# 6904)%0A  > 999eead More EventType v1beta2 work (# 6903)%0A  > 66e8257 Remove sanitize HTTP body for `knativeerrordata` extension (# 6902)

Signed-off-by: Knative Automation <automation@knative.team>
2023-05-09 04:34:26 +00:00
Luke Kingland 89b599df24
feat: job scaffolding (#1697)
* feat: job scaffolding

- Local jobs use a directory rather than filename
  This sets up for upcoming scaffolding to use as a space for job
  scaffolding code.
- Places all jobs within a 'runs' directory in ./func rather than
  'instances' to further differentiate between an instance and a local
  run task invoked via .Run
- Updates Jobs' stop handler to have an error return.
- Adds tests which ensure creating and stopping a job are reflected in
  the client's .Instances().Local() accessor.
- Adds verbose logging support to the Job implementation.
- Adds a cleanup task which will remove orphaned jobs by, in addition to
  previous logic, checking that there is no longer a process listening
  on the port indicated by the job.

* fix spelling errors

* fix lint errors

* log job stop errors

* use temp dir for tests

* add back docker build tags and wait
2023-05-04 20:53:57 +00:00
Matej Vasek c715dabcd0
chore: Quarkus autoupdate action runs somke test (#1723)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-05-04 20:23:56 +00:00
Matej Vasek dc3a85112c
chore: update maven wrapper in Quarkus template (#1721)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-05-04 19:50:57 +00:00
Luke Kingland 3c371f79f2
feat: func domain route (#1690)
* feat: func domain route

Adds the --domain flag which, when provided sets the value of the
func.domain label on the deployed knative service.  The cluster can then
use this to choose which route to create for multi-route clusters.
Optional.

* fix whitespace
2023-05-04 19:48:57 +00:00
github-actions[bot] e014de5820
chore: update Quarkus platform version to 3.0.2.Final (#1720)
Co-authored-by: Knative Automation <automation@knative.team>
2023-05-04 19:13:57 +00:00
Luke Kingland 1285176f60
feat: write a build stamp log to .func (#1695)
* feat: build stamp and log

- Adds an explicit "Stamp" step to client builds
- Building always "Stamps" the function, allowing builds to cache
- Commands which alter function in inconsequential ways update the stamp
  as-needed.
- Tests updated to use the API rather than hard-coding func.yaml

* fix misspellings

* temporarily disable Quarkus tests

* stamping also creates necessary run directory

* reenable Quarkus tests

* comments
2023-05-03 21:43:56 +00:00
Zuhair AlSader 6558f9652d
add pvc and emptyDir to function_volumes (#1666)
* add pvc and emptyDir to function_volumes

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* add pvc and emptydir to deployer

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* add config functions

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* update tests

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* use random string for emptydir

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* include func yaml schema

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* fix make schema-generate

it needs to be regenrated every time.

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* make function volumes dependency-free

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* add prompt for extension flags

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

* add dependency in func_yaml-schema

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>

---------

Signed-off-by: Zuhair AlSader <zuhair@koor.tech>
2023-05-03 13:57:56 +00:00
knative-automation 1ba7015c84
upgrade to latest dependencies (#1709)
bumping knative.dev/serving 2c1bb07...5e056a0:%0A  > 5e056a0 Update net-certmanager nightly (# 13926)%0A  > 35efd12 Update net-contour nightly (# 13929)%0A  > f476717 Update net-istio nightly (# 13935)%0A  > bd8e37c Update net-gateway-api nightly (# 13925)%0A  > 37a7010 Update net-kourier nightly (# 13934)%0A  > f47802d Update community files (# 13933)%0A  > 990d701 Update net-kourier nightly (# 13928)%0A  > ff9f03d Update net-istio nightly (# 13927)%0A  > 690c525 upgrade to latest dependencies (# 13924)%0A  > 1dd07a7 Update community files (# 13923)%0A  > 66141b8 Update net-istio nightly (# 13920)%0Abumping knative.dev/pkg dfad48e...9049667:%0A  > 9049667 Update community files (# 2735)%0A  > aacec7f Update community files (# 2734)%0A  > 300df43 Eventing TLS: Added AddressableFromDestination method on the resolver (# 2717)%0Abumping knative.dev/networking e5d04e8...68725bd:%0A  > 68725bd upgrade to latest dependencies (# 798)%0A  > 1594abb Update community files (# 797)%0Abumping knative.dev/client-pkg 4f052f9...e5c405e:%0A  > e5c405e Update community files (# 102)%0A  > eee9b55 Update community files (# 100)%0Abumping knative.dev/eventing 034bec9...cd50d27:%0A  > cd50d27 [main] Format Go code (# 6898)%0A  > 0f0a82c [main] Update community files (# 6901)%0A  > 7f4deb5 EventType v1b2 API addition (# 6893)%0A  > 1f917d0 Refactor PingSource adapter client creation (# 6880)%0A  > e2f1c77 [main] Update community files (# 6896)%0A  > 6a5c7ee Eventing TLS: migrate all resolver.URIResolver usages over to AddressableFromDestinationV1 (# 6883)%0A  > 0a12a6c Adds path based routing to message_receiver pkg (# 6873)%0Abumping knative.dev/hack f591fea...7d81248:%0A  > 7d81248 Update community files (# 286)%0A  > 6e4569c Update community files (# 285)

Signed-off-by: Knative Automation <automation@knative.team>
2023-05-02 15:56:55 +00:00
Lance Ball 607853b6db
chore: update docs from changes to deploy/run (#1715)
The docs were overlooked in the changes to deploy and run in
https://github.com/knative/func/pull/1693. This commit just updates the
docs so they are consistent with the binary.

Signed-off-by: Lance Ball <lball@redhat.com>
2023-05-02 13:08:55 +00:00
Luke Kingland 92d20b07d5
feat: func run support all build options (#1693)
* feat: func run build options and host runs

- Refactors the run command to include all options from build, in the same
  manner as deploy.
- Adds the --container flag (currently defaults to true) which will, when
  disabled, invoke the localhost-based runner which, in this commit, is not
  yet active.
- Updates help text to match the other command format, and lays the verbal
  groundwork for the difference between containerized (currently default)
  and non-containerized runs.

* fix e2e

* Update cmd/deploy.go

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

* Update pkg/functions/client.go

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

* Update cmd/run.go

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

---------

Co-authored-by: Lance Ball <lball@redhat.com>
2023-05-02 12:11:55 +00:00
knative-automation d5b4a8d8e9
Update community files (#1708)
Signed-off-by: Knative Automation <automation@knative.team>
2023-05-01 02:13:53 +00:00
Matej Vasek f2eb853073
fix: PaC not working with dot git suffixed url (#1713)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-04-28 19:13:51 +00:00
Matej Vasek 818c5ae20a
fix: Quarkus template Integration Tests (#1714)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-04-28 17:14:51 +00:00
Luke Kingland bcadf234d6
src: Envs type (#1701)
* feat: Envs type

Creates a type for []Env with a String and Slice method for presenting
a set of environment variables in common formats.

* fix: Envs tests
2023-04-28 16:45:51 +00:00
Will Li cd0dbfd300
feat: specify create time for image built with buildpacks (#1685)
* specify the image created time

* add build-timestamp config

* fix trailing white space
2023-04-28 07:14:51 +00:00
github-actions[bot] 46076a581d
chore: update Quarkus platform version to 3.0.1.Final (#1706)
Co-authored-by: Knative Automation <automation@knative.team>
2023-04-27 12:53:32 +00:00
knative-automation 61179d881e
upgrade to latest dependencies (#1705)
bumping knative.dev/serving 84fa64c...2c1bb07:%0A  > 2c1bb07 Update net-kourier nightly (# 13919)%0A  > 0637cdf Update net-contour nightly (# 13918)%0A  > 08bedbe Update net-gateway-api nightly (# 13917)%0A  > e39c429 Update net-istio nightly (# 13916)%0A  > 10ed0f8 Update net-certmanager nightly (# 13915)%0Abumping knative.dev/client-pkg e75f12e...4f052f9:%0A  > 4f052f9 upgrade to latest dependencies (# 99)

Signed-off-by: Knative Automation <automation@knative.team>
2023-04-26 09:55:45 +00:00
knative-automation 5c38465232
upgrade to latest dependencies (#1704)
bumping knative.dev/eventing 034bec9...034bec9:

Signed-off-by: Knative Automation <automation@knative.team>
2023-04-26 09:02:45 +00:00
knative-automation 88b36341ff
upgrade to latest dependencies (#1686)
bumping knative.dev/client-pkg e1f3e9a...e75f12e:%0A  > e75f12e upgrade to latest dependencies (# 98)%0A  > 3bb19d6 upgrade to latest dependencies (# 93)%0Abumping knative.dev/serving 4db179f...84fa64c:%0A  > 84fa64c Update data-plane Secrets  (# 13859)%0A  > 22783d6 Deployment probe fixes (# 13885)%0A  > 113616b add support for downwardAPI in projected volumes (# 13896)%0A  > 55f8dd7 upgrade to latest dependencies (# 13912)%0A  > b2a416f Update net-gateway-api nightly (# 13907)%0A  > 91ac3b3 Update net-certmanager nightly (# 13904)%0A  > 787ac48 Update net-istio nightly (# 13902)%0A  > d315f71 Update net-contour nightly (# 13903)%0A  > b38ef3a Update net-istio nightly (# 13899)%0A  > b9b9d13 Update net-contour nightly (# 13900)%0A  > 9530fe9 Update net-certmanager nightly (# 13897)%0A  > 12bd205 Update net-kourier nightly (# 13898)%0Abumping knative.dev/networking 750a9e4...e5d04e8:%0A  > e5d04e8 upgrade to latest dependencies (# 796)%0A  > 62fd5d0 Update actions (# 793)%0A  > b77b4a6 Bump Go version in github action (# 795)%0Abumping knative.dev/eventing cc3d254...034bec9:%0A  > 034bec9 [main] Upgrade to latest dependencies (# 6888)%0A  > 4c2a3aa Bump Go to 1.20 in GH workflows (# 6882)%0A  > 825a2b5 Create Cert-Manager resources (# 6849)%0A  > 193f2df Eventing TLS: support `K_CA_CERTS` in adapter/v2 (# 6848)

Signed-off-by: Knative Automation <automation@knative.team>
2023-04-25 14:04:45 +00:00
Luke Kingland 5dc18a1cd6
extract splitTemplateName from Templates.Get (#1700) 2023-04-25 14:01:45 +00:00
Luke Kingland 55a6e2846f
move template struct to templates.go (#1698) 2023-04-25 14:00:45 +00:00
Luke Kingland fd3aca35a3
fix: building resets image digest (#1691)
Fixes a bug where the image digest was being cleared on a subsequent
deploy, resulting in incorrect metadata and a build stamp which was
always out-of-date (effectively disabling cached builds).
2023-04-25 13:59:46 +00:00
Luke Kingland 135dba049d
rename Instance to InstanceRefs (#1694)
In order to not conflict with (and be confused with) the actual Instance
struct name which is introduced in the scaffolding func runtimes
middleware, the Instance struct herein is renamed InstanceRefs to more
accurately reflect its usage as a manager of references to instances.
2023-04-25 13:58:45 +00:00
Luke Kingland e6fa8dddfe
fix: removes preparsing flag error messages (#1692)
Errors pre-parsing flags to extract --path were incorrectly logging
expected parsing errors when other flags are provided.  Squelched.
2023-04-25 13:57:45 +00:00
Luke Kingland 3ac1ef9229
docs: standardize env flag help suffix (#1689)
* remove 'Env:' prefix from command help text environment variables

* regen docs
2023-04-25 13:56:45 +00:00
Luke Kingland 5cf4828dcc
no longer .gitignore templates go.sum files (#1688) 2023-04-25 12:01:46 +00:00
Lance Ball 177c15bfb3
feat: custom health checks for node and typescript (#1682)
* 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>
2023-04-25 06:31:44 +00:00
Lance Ball d0ebdb78f3
docs: add preliminary document for function lifecycles (#1654)
Signed-off-by: Lance Ball <lball@redhat.com>
2023-04-25 06:07:44 +00:00
Matej Vasek 506cb71e76
test: extend filesystem tests (#1684)
* refactor: extract functions

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

* test: extend filesystem tests

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-04-24 14:02:43 +00:00
knative-automation a842cc63e8
upgrade to latest dependencies (#1681)
bumping knative.dev/pkg ef19121...dfad48e:%0A  > dfad48e upgrade to latest dependencies (# 2728)%0A  > 53f04b3 Make minimum TLS version configurable for webhooks (# 2721)%0A  > ce10b06 Update actions (# 2726)%0A  > d3d7625 Update community files (# 2724)%0A  > 166893c upgrade to latest dependencies (# 2719)%0Abumping knative.dev/networking 0b998c1...750a9e4:%0A  > 750a9e4 Update community files (# 792)%0A  > 62b7e26 Update actions (# 789)%0A  > 366f276 upgrade to latest dependencies (# 788)%0A  > fb58275 Update community files (# 790)%0Abumping knative.dev/client-pkg bf6f6a8...e1f3e9a:%0A  > e1f3e9a Update actions (# 97)%0A  > 7260990 Update community files (# 96)%0Abumping knative.dev/serving ac7c74b...4db179f:%0A  > 4db179f upgrade to latest dependencies (# 13895)%0A  > 0c8f091 Update net-gateway-api nightly (# 13894)%0A  > f83732d Update net-kourier nightly (# 13893)%0A  > 87af840 upgrade to latest dependencies (# 13891)%0A  > 171cecd change mininum TLS version for tag to digest resolution (# 13886)%0A  > ef58d9b Update net-contour nightly (# 13881)%0A  > 842c516 Update net-istio nightly (# 13883)%0A  > cb946ff Update net-certmanager nightly (# 13882)%0A  > d0eea80 Update net-gateway-api nightly (# 13880)%0A  > c377269 Update actions (# 13879)%0A  > 018c7f8 Update net-kourier nightly (# 13871)%0A  > 235e7f1 Update net-contour nightly (# 13870)%0A  > 29089ce Update net-gateway-api nightly (# 13873)%0A  > f87c4d7 Update net-istio nightly (# 13872)%0A  > a96e2c5 upgrade to latest dependencies (# 13875)%0A  > e363b61 Update net-certmanager nightly (# 13874)%0A  > 9af99e5 Load certificate when they are updated when internal-encryption is enabled (# 13854)%0A  > 3efe96d Update community files (# 13868)%0A  > 944e8e0 Update net-kourier nightly (# 13864)%0A  > 4d85bc0 Update net-contour nightly (# 13865)%0A  > 96b84bd Update net-certmanager nightly (# 13866)%0A  > f5d3865 Update community files (# 13863)%0Abumping knative.dev/hack 9153cc6...f591fea:%0A  > f591fea individual globbing is required (# 284)%0A  > 4b3f230 Update community files (# 283)%0Abumping knative.dev/eventing 3224e50...cc3d254:%0A  > cc3d254 [main] Upgrade to latest dependencies (# 6863)%0A  > 81f8e67 Fix ChannelChain test lifecyle (# 6862)%0A  > d7fe38f [main] Upgrade to latest dependencies (# 6860)%0A  > a5b4810 [main] Update actions (# 6858)%0A  > 43a2554 [main] Upgrade to latest dependencies (# 6855)%0A  > cf7ee9c [main] Update actions (# 6853)%0A  > d2eaff5 [main] Update community files (# 6856)%0A  > c59bd1f Eventing TLS: Install Cert Manager as part of the test setup phase (# 6850)%0A  > d35f808 [main] Upgrade to latest dependencies (# 6852)

Signed-off-by: Knative Automation <automation@knative.team>
2023-04-18 20:14:56 +00:00
knative-automation 71ef28cfaa
Update actions (#1678)
Signed-off-by: Knative Automation <automation@knative.team>
2023-04-17 02:08:54 +00:00
Matej Vasek fd82412701
fix: increase connection timeouts (#1679)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-04-17 01:05:53 +00:00
knative-automation 677c3dee62
Update community files (#1677)
Signed-off-by: Knative Automation <automation@knative.team>
2023-04-12 02:16:49 +00:00
knative-automation dbcf68fccd
upgrade to latest dependencies (#1672)
bumping knative.dev/pkg ee73c93...ef19121:%0A  > ef19121 Update community files (# 2722)%0A  > 15cf17d Update actions (# 2720)%0Abumping knative.dev/networking 8174d2b...0b998c1:%0A  > 0b998c1 upgrade to latest dependencies (# 786)%0Abumping knative.dev/client-pkg 30a17e5...bf6f6a8:%0A  > bf6f6a8 Update community files (# 95)%0A  > e5bd961 Update actions (# 94)%0Abumping knative.dev/eventing d991040...3224e50:%0A  > 3224e50 [main] Update community files (# 6854)%0Abumping knative.dev/hack 1421f12...9153cc6:%0A  > 9153cc6 Update community files (# 282)%0A  > 359d585 Revert "Extract tools to knative.dev/toolbox (# 280)" (# 281)%0Abumping knative.dev/serving 23f7e2b...ac7c74b:%0A  > ac7c74b Update actions (# 13862)%0A  > c367fec upgrade to latest dependencies (# 13860)%0A  > 8f273e4 Adds dev container and updates docs with Codespaces information (# 13838)%0A  > db52024 Update net-contour nightly (# 13853)%0A  > 1f3a35f Update net-istio nightly (# 13852)

Signed-off-by: Knative Automation <automation@knative.team>
2023-04-11 09:52:48 +00:00
knative-automation c80ea74e36
Update community files (#1674)
Signed-off-by: Knative Automation <automation@knative.team>
2023-04-11 02:18:49 +00:00
Lumír 'Frenzy' Balhar 36d7b23b66
Add Python templates for gunicorn and uwsgi + Flask (#1655)
* 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>
2023-04-10 19:03:48 +00:00
knative-automation 064ff9b608
Update actions (#1673)
Signed-off-by: Knative Automation <automation@knative.team>
2023-04-10 18:06:48 +00:00
Gunjan Vyas 8f2f290aab
Replace knative.dev/client references to knative.dev/client-pkg (#1671) 2023-04-10 15:59:39 +00:00
Matej Vasek 18d8398ac2
fix: template flag completion (#1670)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-04-07 18:25:20 +00:00
knative-automation 29cfd3e6ba
upgrade to latest dependencies (#1667)
bumping knative.dev/serving ef53449...23f7e2b:%0A  > 23f7e2b Update net-kourier nightly (# 13849)%0A  > 32aacd6 Update net-certmanager nightly (# 13850)%0A  > 5eed3c1 Update net-istio nightly (# 13851)%0A  > 8a027b6 Update net-gateway-api nightly (# 13848)%0A  > 0814d02 upgrade to latest dependencies (# 13846)%0A  > dab78d1 upgrade to latest dependencies (# 13844)%0A  > 9976a2c Update net-kourier nightly (# 13841)%0A  > 0134c27 Update net-contour nightly (# 13840)%0A  > e824c3f Update net-certmanager nightly (# 13842)%0Abumping knative.dev/pkg 696cac8...ee73c93:%0A  > ee73c93 upgrade to latest dependencies (# 2710)%0A  > 4835a4c Eventing TLS: update destination and Kref types (# 2716)%0A  > b7f2774 Made changes to addressable and address status. (# 2713)%0Abumping knative.dev/eventing 7ba0648...d991040:%0A  > d991040 Add transport-encryption feature flag (# 6845)%0A  > 642699b Sync retry option with spec (# 6834)%0A  > 500ae1d [main] Upgrade to latest dependencies (# 6846)%0A  > 4a78a6c Support running SinkBinding tests with inclusion selection behavior  (# 6841)%0A  > df3bd9e [main] Upgrade to latest dependencies (# 6839)%0Abumping knative.dev/networking 2ca8dbc...8174d2b:%0A  > 8174d2b upgrade to latest dependencies (# 785)%0A  > e18ca86 upgrade to latest dependencies (# 784)

Signed-off-by: Knative Automation <automation@knative.team>
2023-04-06 09:58:20 +00:00
Matej Vasek d7660abb3f
doc: refer specific verision of Tekton not latest (#1669)
* doc: refer specific verision of Tekton not latest

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

* fixup

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

* fixup: shell-check

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-04-05 16:51:38 +00:00
Adam Boczek 2502819b61
feat: add pvc-size flag to deploy command (#851) (#1598)
* feat: add pvc-size flag to deploy command (#851)

* feat: move pvc-size from deploy to build func configuration section (#851)

* feat: add setting default value for pvc-size in func.yaml (#851)

* feat: change pvc-size to camel case (#851)

* feat: add omitempty to pvcSize (#851)

* feat: regenerate func yaml schema (#851)

* feat: update docs for deploy command (#851)

* feat: update usage help for the pvc-size flag (#851)
2023-04-05 11:54:39 +00:00
knative-automation ca244204dd
upgrade to latest dependencies (#1657)
bumping knative.dev/serving 74fcd62...ef53449:%0A  > ef53449 Update net-kourier nightly (# 13835)%0A  > e4f3288 Update net-contour nightly (# 13834)%0A  > 307a7e4 remove freezer code from queue proxy (# 13830)%0A  > 92dba5b Update net-gateway-api nightly (# 13833)%0A  > 5791aea Update net-certmanager nightly (# 13832)%0A  > be65250 upgrade to latest dependencies (# 13831)%0A  > bb18a82 upgrade to latest dependencies (# 13825)%0A  > 66c28b6 Update net-contour nightly (# 13822)%0A  > dce7a40 Update net-certmanager nightly (# 13821)%0A  > 8d8c39e Update net-istio nightly (# 13803)%0A  > 137c10f Update net-contour nightly (# 13818)%0A  > fc86653 Fix queue proxy handler setup (# 13815)%0A  > a5612ff Update net-kourier nightly (# 13817)%0A  > bfca504 Update net-certmanager nightly (# 13814)%0A  > dbb13ae upgrade to latest dependencies (# 13813)%0A  > f9b752c Update net-gateway-api nightly (# 13811)%0A  > e5556b4 Update net-contour nightly (# 13804)%0A  > 8d60f19 Update net-certmanager nightly (# 13807)%0A  > 023d909 Update actions (# 13799)%0A  > 7788c57 Update actions (# 13794)%0A  > 971dd38 Update community files (# 13795)%0A  > f031fd4 Update net-certmanager nightly (# 13793)%0A  > 1cfd960 Update net-gateway-api nightly (# 13788)%0A  > dc65c40 Update net-contour nightly (# 13791)%0A  > 5d43b7b Update net-istio nightly (# 13789)%0A  > 65c6d92 Update net-kourier nightly (# 13787)%0A  > 02685bc upgrade to latest dependencies (# 13785)%0A  > d569144 Update net-istio nightly (# 13711)%0A  > 71088a8 Update community files (# 13776)%0A  > 711371c Update net-contour nightly (# 13779)%0A  > 8859807 Update net-kourier nightly (# 13778)%0A  > 9d28f57 Update net-certmanager nightly (# 13777)%0A  > c0dea98 Update net-gateway-api nightly (# 13773)%0A  > 90c61a4 Update net-certmanager nightly (# 13774)%0A  > 677682f Update net-contour nightly (# 13772)%0Abumping knative.dev/pkg b77a78c...696cac8:%0A  > 696cac8 Expose queue proxy request metrics reporting period (# 2362)%0A  > bd3cf51 Printf log message with the right type when showing port (# 2709)%0A  > 4c84b1b Update actions (# 2707)%0A  > 3290ddf Update community files (# 2706)%0A  > 53fc6ab Update actions (# 2705)%0A  > b769fef drop eventing natss from downstream tests (# 2703)%0A  > 511b394 potential fix for flakey tlsBackoff (# 2702)%0A  > 0902ea8 Parameterize WEBHOOK_NAME env key in error message (# 2701)%0A  > c5dd1d1 Update community files (# 2700)%0Abumping knative.dev/networking c692e9e...2ca8dbc:%0A  > 2ca8dbc upgrade to latest dependencies (# 783)%0A  > a2549e2 Update actions (# 782)%0A  > 8139f0f Update actions (# 780)%0A  > 5544973 Update community files (# 781)%0A  > 74471b9 Update community files (# 779)%0Abumping knative.dev/eventing 38a00d8...7ba0648:%0A  > 7ba0648 [main] Upgrade to latest dependencies (# 6832)%0A  > 97a7b77 [main] Upgrade to latest dependencies (# 6830)%0A  > e691b39 removed release label (# 6807)%0A  > 69a3841 Removes the deprecated packages (# 6816)%0A  > a959915 parallel rekt test cleanup (# 6828)%0A  > 88c5dbb [main] Update actions (# 6827)%0A  > d15774f Add sequence reconciler test (# 6817)%0A  > f361a57 [main] Update community files (# 6822)%0A  > 605306c [main] Update actions (# 6819)%0A  > 3c8c86c Add documentation for MTChannelBasedBroker (# 6791)%0A  > ea0b254 fix api docs generation with go1.20 (# 6810)%0A  > 4d5278d Removes replace and ran `go vendor` (# 6795)%0A  > 62eb85e Make autoscaler leader aware (# 6814)%0A  > 5988c42 [main] Upgrade to latest dependencies (# 6812)%0A  > f6ca59b Use released hearthbeats image for testing (# 6808)%0A  > eabc874 updated broken link (# 6786)%0A  > 6a732ff Add basic retry support for hearthbeats utility (# 6809)%0A  > 05f6d84 Heartbeats: quit istio proxy when running in a job (# 6804)%0A  > 472d325 Add rekt based broker conformance test to ensure `broker.spec.config` is immutable (# 6799)%0A  > 5a0064b [main] Update community files (# 6805)%0A  > 1258a4e Fix pod annotations in containersource template (# 6802)%0Abumping knative.dev/client 3bdc232...3a8d646:%0A  > 3a8d646 fix: Fix image tag for nightly builds (# 1796)%0A  > c21e660 fix: Fix tagging of kn container image for latest releases (# 1792)%0A  > a97df12 Update actions (# 1790)%0A  > 7586217 Update actions (# 1786)%0A  > 2dcb8c0 Update community files (# 1789)%0A  > 3e19a35 Helloworld image running with non root user (# 1787)%0A  > 1668720 Update community files (# 1784)%0Abumping knative.dev/hack 3de51af...1421f12:%0A  > 1421f12 Extract tools to knative.dev/toolbox (# 280)%0A  > 3b8ef01 Update community files (# 279)%0A  > 1eebfb3 Update community files (# 278)

Signed-off-by: Knative Automation <automation@knative.team>
2023-04-03 09:24:04 +00:00
Matej Vasek ae1b0c5eef
fix: actix listent on 0.0.0.0 (#1664)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-04-01 14:57:01 +00:00
Andrejus Chaliapinas c6c0f7eb66
Update Rust templates dependencies and UTs for Actix 4.x (#1661) 2023-03-31 15:57:01 +00:00
Jefferson Ramos b85a26eb46
test: cleanup on e2e github test (#1662) 2023-03-31 13:44:01 +00:00
Manoel Marques 1ce5d2b7c3
Replace path with function struct in client api (#1640) 2023-03-31 00:45:00 +00:00
Jefferson Ramos 2a273c98ee
test: adding e2e github oncluster test scenario (#1649) 2023-03-30 22:25:00 +00:00
andrejusc 79430e9542
Update springboot templates to Spring Boot 3.0.5 (#1658)
* Update springboot templates to Spring Boot 3.0.5

* Regenerated embedded file

* Regenerated embedded file one more time
2023-03-30 21:53:00 +00:00
Lance Ball 1095ede8be
chore: adjust shell script quotes (#1656)
Signed-off-by: Lance Ball <lball@redhat.com>
2023-03-30 11:45:01 +00:00
Lance Ball 6012a4afe1
chore: fixup release.sh script (#1652)
* chore: fixup release.sh script

After the repository reorg, the hack/release.sh script is no longer
pointing at the correct task yamls.

Fixes: https://github.com/knative/func/issues/1651

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

* fixup: reviewdog

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

---------

Signed-off-by: Lance Ball <lball@redhat.com>
2023-03-28 20:30:59 +00:00
Matej Vasek f877aebdd5
chore: update lifecycle image to v0.16.1 (#1653)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-28 17:35:59 +00:00
Manoel Marques c8f22e735b
Minimal initial func.yaml (#1630) 2023-03-27 06:55:57 +00:00
Matej Vasek e458ae0a07
chore update pack dependency (#1650)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-27 06:52:57 +00:00
github-actions[bot] 6a4518454b
chore: update Quarkus platform version to 2.16.5.Final (#1646)
Co-authored-by: Knative Automation <automation@knative.team>
2023-03-23 18:56:53 +00:00
Matej Vasek 73f8773b7d
style: fix lint error (#1648)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-23 18:43:54 +00:00
Matej Vasek 0645af7a41
fix: pre-compile mock binaries instead of 'go run' (#1645)
The 'go run' does internally compile and it prolongs perceived run-time.
This may lead to timeout in some tests.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-22 18:21:55 +00:00
Zbynek Roubalik 8d4db7546d
feat: PAC - add possibility to specify a Git provider (#1638)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-22 13:30:53 +00:00
Zbynek Roubalik c793fd4c88
feat: PAC - dynamically generate Pipeline target branch (#1636)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-22 13:15:53 +00:00
Zbynek Roubalik 85d3d0206e
feat: PAC - try to read git info from local .git config (#1635)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-22 13:10:54 +00:00
Matej Vasek 8eeff81580
fix: s2i build on Windows (#1641)
Make all files executable on Windows s2i build.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-21 21:27:52 +00:00
Matej Vasek 7c724bc2f6
Descriptions in JSON Schema (#1633)
* chore: update schema generation library

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

* feat: description in JSON schema from doc comments

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-20 12:46:54 +00:00
knative-automation 99de349e59
Update actions (#1634)
Signed-off-by: Knative Automation <automation@knative.team>
2023-03-20 02:13:53 +00:00
knative-automation 5e8773843c
Update community files (#1632)
Signed-off-by: Knative Automation <automation@knative.team>
2023-03-17 13:57:42 +00:00
knative-automation 5330e0c170
Update actions (#1631)
Signed-off-by: Knative Automation <automation@knative.team>
2023-03-17 13:52:25 +00:00
Zbynek Roubalik 3dc61c8979
feat: implement `func config git remove` (#1626)
* feat: implement `func config git remove`

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* add test

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

---------

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-17 12:09:36 +00:00
Jefferson Ramos 9d00af158b
e2e tests restructuring / refactoring (#1615) 2023-03-16 20:52:59 +00:00
Matej Vasek db1b624988
fix: TCP+TLS docker daemon connection (#1629)
* fix: TCP+TLS docker daemon connection

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

* fixup: skip tls verify if DOCKER_TLS_VERIFY is falsy

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-16 16:01:59 +00:00
Zbynek Roubalik 37fa5c8c1a
feat: properly implement `--config*` flags for `func config git` (#1621)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-14 13:26:00 +00:00
Manoel Marques 55f3d241dd
Include --builder option on func run command (#1614) 2023-03-14 08:23:57 +00:00
Matej Vasek 76a7c632ce
fix: failing CI (#1618)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-13 21:47:56 +00:00
Zbynek Roubalik ed1d963c85
feat: PaC support flags (#1604)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-13 20:44:56 +00:00
Matej Vasek 28eb331df4
chore: more tests on push to main (#1616)
* Run unit tests on various platforms.
* Run end to end tests.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-13 20:43:56 +00:00
Dhruv Garg b03ada6c0d
docs: update broken links in docs to command.txt and command.md (#1613) 2023-03-10 17:50:24 +00:00
Zbynek Roubalik b793f8739a
feat: PAC - add support for S2I (#1610)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-10 12:14:23 +00:00
Matej Vasek 7b85fa5f84
fix: node s2i build when node_modules present (#1612)
* fix: node s2i build when node_modules present

This is workaround for two bug in another components:
* The s2i CLI/library is not honoring the `--exclude` flag when used with
  the `--as-dockerfile` flag.
* The node s2i image is not working if project contains `node_modules`
  directory with NodeJS modules.

If only one of the bugs above were fixed this commit wouldn't be
necessary.

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

* fix: project root escape link detection

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

* fix: ignore node_modules for s2i on cluster build

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>
2023-03-10 12:09:24 +00:00
knative-automation afad45ee8c
Update community files (#1611)
Signed-off-by: Knative Automation <automation@knative.team>
2023-03-09 13:48:22 +00:00
Matej Vasek 9aac5eba68
fix: build stamp computation (#1608)
About the same time that buildStamp was computed .gitignore was modified.
This caused non-deterministic results, because sometimes the
modification was taken into account and sometimed it was not.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-08 23:06:20 +00:00
Matej Vasek 9a9da1ff3f
chore: coverage for e2e tests (#1603)
* chore: coverage for e2e tests

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

* fixup: disable thread sanitiser

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-08 17:53:20 +00:00
Manoel Marques fa3286ccac
Change 'create' help text to indicate mandatory language option (#1607) 2023-03-08 17:41:21 +00:00
Zbynek Roubalik c552aa2e4e
chore: better output for PaC (#1606)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-08 17:34:22 +00:00
knative-automation da83a2bf73
upgrade to latest dependencies (#1591)
bumping knative.dev/serving 59d4c52...74fcd62:
  > 74fcd62 Update net-kourier nightly (# 13775)
  > 6436af6 upgrade to latest dependencies (# 13769)
  > 4d51212 Use `pkgtest.CheckEndpointState` in TestActivationScale instead of raw client (# 13770)
  > 587f587 add missing probes (# 13563)
  > 5e3b4af Adds e2e test for activation-scale (# 13197)
  > b285cb4 Update net-certmanager nightly (# 13762)
  > aab7abe Update net-contour nightly (# 13761)
  > 0cf0da8 Update net-gateway-api nightly (# 13756)
  > efc0bb0 Update net-kourier nightly (# 13760)
  > 6bc4bb2 upgrade to latest dependencies (# 13759)
bumping knative.dev/eventing c5847a9...38a00d8:
  > 38a00d8 Migrate to rekt cronjob package (# 6800)
  > 0e2c389 [main] Upgrade to latest dependencies (# 6798)
  > df2287d [main] Upgrade to latest dependencies (# 6794)
  > 1ff36e1 Support testing ContainerSource with istio (# 6790)
  > a8128e6 [main] Upgrade to latest dependencies (# 6774)
  > 397387e SC settings for ApiServerSource's Receive Adapter's container/deployment  (# 6788)
  > b474770 No reason for API ServerSource adapter to not inject istio sidecar (# 6789)
  > 7d7df2d Removes the deprecated DeadLetterChannel in ChannelableStatus (# 6722)
bumping knative.dev/pkg 645afb2...b77a78c:
  > b77a78c upgrade to latest dependencies (# 2698)
  > 310274d bump golang version in downstream tests (# 2697)
  > fd00e03 Add certs secret name read from env (# 2685)
bumping knative.dev/client e82e749...3bdc232:
  > 3bdc232 upgrade to latest dependencies (# 1773)
bumping knative.dev/networking 5a5f810...c692e9e:
  > c692e9e upgrade to latest dependencies (# 776)
  > 475e232 upgrade to latest dependencies (# 775)

Signed-off-by: Knative Automation <automation@knative.team>
2023-03-08 16:51:20 +00:00
Manoel Marques f2238be7ed
Correctly format Node.js code (#1602) 2023-03-08 12:17:20 +00:00
Marcos Nils cc34d0bc83
docs: add note about not supported on cluster build runtimes. (#1597)
* Add note about not supported on cluster build runtimes.

* fix typo

* remove quarkus from list
2023-03-07 19:58:19 +00:00
Zbynek Roubalik e3b318adff
feat: Pipelines as Code - initial support (pack) (#1594)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-07 15:41:20 +00:00
Zbynek Roubalik 616feb15b1
chore: move prompts to a separate package (#1592)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-03-06 15:08:33 +00:00
Matej Vasek 1cff3a4d35
chore: clean up e2e project update logic (#1593)
* chore: clean up e2e project update logic

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

* fixup: linter unused param

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-03-02 19:14:31 +00:00
knative-automation 850adf30ab
upgrade to latest dependencies (#1582)
bumping knative.dev/client 8a2ed4c...e82e749:
  > e82e749 Bump golang.org/x/net from 0.0.0-20220919232410-f2f64ebce3c1 to 0.7.0 (# 1783)
  > a91b916 Bump golang.org/x/text from 0.3.7 to 0.3.8 (# 1780)
bumping knative.dev/pkg f306c13...645afb2:
  > 645afb2 bump golang.org/x/net to v0.7.0 (# 2695)
  > 0591b75 bump net and text packages (# 2692)
  > 2fdd6bf Allow reconcilers to listen to leader promotion events  (# 2688)
  > f65eba5 Make ZipkinTracingEnabled flag thread safe (# 2690)
bumping golang.org/x/sys fc697a3...90c8f94:
  > 90c8f94 unix: avoid converting non-pointers to unsafe.Pointer in PtraceIO
  > 4e121b1 unix: add missing address operator in initxattrdest
  > 68f9dcb windows/debug/svc: buffer channel passed to signal.Notify
  > 0e1262c unix: add ptrace(PT_DENY_ATTACH) wrapper for darwin
  > 6938dae unix: add missing constants used with struct Timex on Linux
  > 01b330b unix: improve flaky solaris test logging
  > e7d7f63 all: fix some comments
  > 7a75290 unix/linux: update to glibc 2.36
  > 4112509 windows/mkwinsyscall: write source to temp file if formatting fails
  > 71da690 windows/mkwinsyscall: support "." and "-" in DLL name
  > b829a39 unix/linux: update to gcc 13.0.0, qemu 7.1.0 for loong64
  > c3037ed unix: add support for clock_adjtime on Linux
  > 13fe000 cpu: add IsBigEndian
  > 17fce3a unix: avoid false positive in vet shift check
  > a6f4650 windows: use UTF16FromString and UTF16ToString from syscall
  > 6e4d1c5 unix/linux: update to Linux kernel 6.1 and Go 1.20-rc2
  > b8be2fd cpu: add //go:build line to cpu_gccgo_x86.c
  > 1e9f341 unix: add //go:build line to gccgo_c.c
  > b60007c unix: add Uvmexp and SysctlUvmexp for NetBSD
  > b751db5 unix: gofmt hurd files after CL 459895
  > b360406 unix: support TIOCGETA on GNU/Hurd
  > 3086868 unix: regen on OpenBSD 7.2
  > 2b11e6b unix: remove Mclpool from openbsd types
  > 7c6badc unix: convert openbsd/mips64 to direct libc calls
  > 3b1fc93 unix: avoid allocations for common uses of Readv, Writev, etc.
  > 2204b66 cpu: parse /proc/cpuinfo on linux/arm64 on old kernels when needed
  > 72f772c unix: offs2lohi should shift by bits, not bytes
  > cffae8e unix: add ClockGettime on *bsd and solaris
  > 96e75de unix: improve Sendmsg and Recvmsg documentation
  > 127c0dd unix/linux: use Go 1.20rc1 to generate files
  > 3ca3b18 windows: add GetLargePageMinimum
  > d684c6f execabs: isGo119ErrDot: use errors.Is instead of string-matching
bumping knative.dev/serving 7aeb55d...59d4c52:
  > 59d4c52 Update net-kourier nightly (# 13755)
  > 5a7a72e Update net-contour nightly (# 13758)
  > cc58860 Update net-certmanager nightly (# 13757)
  > 879c723 upgrade to latest dependencies (# 13742)
  > 23212b3 Update net-kourier nightly (# 13733)
  > 12b0690 Update net-contour nightly (# 13734)
  > 628b3e6 Update net-gateway-api nightly (# 13732)
  > cd3fe03 Update net-certmanager nightly (# 13735)
  > 28b8fba upgrade to latest dependencies (# 13730)
  > 708374e TestAutoscaleSustaining scales to 8 instead of 10 (# 13679)
  > 168ea39 Update net-contour nightly (# 13729)
  > f2ee629 Update net-certmanager nightly (# 13728)
  > bd75129 upgrade to latest dependencies (# 13726)
  > f4792e4 check for renewing status (# 13666)
  > 51ed9ad Update net-contour nightly (# 13724)
  > 1b99dce Update net-gateway-api nightly (# 13719)
  > fe52019 Update net-certmanager nightly (# 13718)
  > 506f8c6 Update net-contour nightly (# 13717)
  > 1f5f822 Update net-kourier nightly (# 13698)
bumping knative.dev/hack f2f3107...3de51af:
  > 3de51af Set GitHub Release Title to the version (# 277)
bumping knative.dev/networking 1bd50a5...5a5f810:
  > 5a5f810 upgrade to latest dependencies (# 767)
  > 2c2695b upgrade to latest dependencies (# 766)
bumping golang.org/x/text 1bdb400...71a9c9a:
  > 71a9c9a all: fix some comments
  > ec5565b README.md: update documentation of module versioning
  > c8236a6 unicode/bidi: remove unused global
  > ada7473 all: remove redundant type conversion
bumping knative.dev/eventing 5f24569...c5847a9:
  > c5847a9 Port broker many triggers testcase to rekt (# 6761)
  > 52574ce Fixes issue where a CE response is truncated (# 6758)
  > 44b0b8a Remove deprecated usage of ZipkinTracingEnabled (# 6780)
  > 07e6d0c [main] Upgrade to latest dependencies (# 6770)
  > 70d2cb9 Pass EnvConfig to Broker conformance tests (# 6769)
  > f6afad3 Exclusive access to tracing flag for upgrade prober (# 6767)
  > 843b6f2 Allow event display to log requests (# 6764)
  > 23dc742 [main] Upgrade to latest dependencies (# 6765)
  > 82d85f9 [main] Upgrade to latest dependencies (# 6762)
bumping golang.org/x/net a2d827a...8e2b117:
  > 8e2b117 http2/hpack: avoid quadratic complexity in hpack decoding
  > 547e7ed http2: avoid referencing ResponseWrite.Write parameter after returning
  > 39940ad html: parse comments per HTML spec
  > 87ce33e go.mod: update golang.org/x dependencies
  > 415cb6d all: fix some comments
  > 7e3c19c all: correct typos in comments
  > 296f09a http2: case insensitive handling for 100-continue
  > f8411da nettest: fix tests on dragonfly and js/wasm
  > 8e0e7d8 go.mod: update golang.org/x dependencies
  > 7805fdc http2: rewrite inbound flow control tracking
  > 2aa8215 nettest: use RoutedInterface for probing network stack capability
  > ad92d3d websocket: don't recommend Gorilla
  > e1ec361 http2: fix race in TestCanonicalHeaderCacheGrowth
  > 1e63c2f http2: limit canonical header cache by bytes, not entries
  > 3247b5b go.mod: update golang.org/x dependencies
  > ecf7fda http2: deflake TestTransportMaxFrameReadSize
  > 0833b63 publicsuffix: embed table data
  > ecf091a publicsuffix: update table to latest list from publicsuffix.org
  > 2f8c3d1 http2: add Transport.MaxReadFrameSize configuration setting
  > 0e478a2 http2: add SETTINGS_HEADER_TABLE_SIZE support
bumping golang.org/x/term f72a2d8...d974fe8:
  > d974fe8 go.mod: update golang.org/x dependencies
  > 1efcd90 go.mod: update golang.org/x dependencies
  > 97ca0e3 go.mod: update golang.org/x dependencies

Signed-off-by: Knative Automation <automation@knative.team>
2023-03-01 10:17:54 +00:00
Luke Kingland aa582dad21
cli help text updates and flags cleanup (#1564)
* cli help text and flags cleanup

- verbose flag uses global setting throughout
- confirm flag added using shared visitor throughout
- path flag added using shared visitor throughout
- removes --version flag on root as redundant with subcommand
- splits main help's 'Main Commands' into 'Primary Commands' and 'Development
  Commands' groups
- Moves RunE definition into flag struct literals

* remove commented code
2023-03-01 09:35:54 +00:00
Matej Vasek 9c5b5a805b
chore: verify-codegen.sh (#1590)
* fix: verify-codegen.sh

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

* fixup

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-02-27 19:23:54 +00:00
Matej Vasek 0a9ed1bc46
refactor: clean up filesystem test (#1584)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-02-27 02:21:32 +00:00
Lance Ball 0b1d537309
chore: update references to zz_filesystem_generated.go (#1580)
* 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>
2023-02-23 19:12:29 +00:00
Luke Kingland 3624ccb58d
command aliases (#1578)
Ensures commands which have subcommands to operate on individual members
(list, add, remove etc) have singular and plural as aliases.

Ensures consistent usage of linux-command-style aliases for list,remove
and rename operations: "ls", "rm", "mv"
2023-02-23 14:07:29 +00:00
Luke Kingland 91c95a711e
fix: repo add skips root (#1577) 2023-02-21 20:40:27 +00:00
Zbynek Roubalik 726b566f83
fix: deploy annotations & labels correctly (#1574)
* fix: deploy annotations & labels correctly

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* increase timeout

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

---------

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-02-21 15:24:26 +00:00
Luke Kingland 03c5df4337
fix: missing map initializations (#1575)
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.
2023-02-21 10:11:26 +00:00
Luke Kingland 9961c43b35
rm testData (#1576) 2023-02-21 09:15:26 +00:00
Lance Ball c20c887cd2
chore: update faas-js-runtime to 0.10.0 (#1570)
* chore: update faas-js-runtime to 0.10.0

Fixes: https://github.com/nodeshift/faas-js-runtime/issues/120

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

* fixup: try ignoring package-lock.json files in linter

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

* fixup: actually add package-lock.json

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

* fixup: better globbing

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

* fixup: best globbing

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

---------

Signed-off-by: Lance Ball <lball@redhat.com>
2023-02-20 20:32:25 +00:00
David Hadas e6e27d6e66
fix initialization of service.Spec.Template.ObjectMeta.Annotations (#1569)
Signed-off-by: David Hadas <david.hadas@gmail.com>
2023-02-20 18:31:25 +00:00
knative-automation df819d13d8
upgrade to latest dependencies (#1565)
bumping knative.dev/client badd909...8a2ed4c:
  > 8a2ed4c Fixing errors related to Go 1.20 (# 1779)
  > 954720d Update community files (# 1778)
bumping knative.dev/eventing f022034...5f24569:
  > 5f24569 [main] Upgrade to latest dependencies (# 6744)
  > dac6b8b [main] Update community files (# 6756)
  > 2b517b6 Deprecate `test/rekt/resources/svc` (# 6742)
  > bbbd425 Deprecate `test/rekt/resources/deployment` (# 6748)
bumping knative.dev/pkg 2f55fe0...f306c13:
  > f306c13 upgrade to latest dependencies (# 2684)
bumping knative.dev/networking 195809a...1bd50a5:
  > 1bd50a5 Update community files (# 764)
  > 6a15e7d upgrade to latest dependencies (# 765)
  > 9373ba6 upgrade to latest dependencies (# 762)
bumping knative.dev/serving 08812b3...7aeb55d:
  > 7aeb55d Update net-gateway-api nightly (# 13716)
  > aa4149f Update net-certmanager nightly (# 13715)
  > 04da752 upgrade to latest dependencies (# 13713)
  > dfd39ca Update support rotation (# 13714)
  > 8c282ba Update net-certmanager nightly (# 13697)
  > 7ed2869 Update support rotation contacts (# 13703)
  > 0ec0ecf Update net-gateway-api nightly (# 13699)
  > 060a49a Update net-contour nightly (# 13705)
  > 53e91c9 Fix G112: Potential Slowloris Attacks lint errs (# 13702)
  > a99a936 upgrade to latest dependencies (# 13709)
bumping knative.dev/hack d71d569...f2f3107:
  > f2f3107 Update community files (# 273)
  > f41894d Find checksums file works with ARTIFACTS_TO_PUBLISH variable (# 275)

Signed-off-by: Knative Automation <automation@knative.team>
2023-02-20 18:02:26 +00:00
Matej Vasek 138d1e46c5
fix: ban podman 4.3 for pack build (#1563)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-02-20 17:16:25 +00:00
Matej Vasek 6d4565158b
feat: enabled s2i for python (#1562)
* 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>
2023-02-20 16:45:26 +00:00
Luke Kingland 902eaecd57
global config member accessors (#1559) 2023-02-16 20:07:52 +00:00
knative-automation b02956b7e5
Update community files (#1556)
Signed-off-by: Knative Automation <automation@knative.team>
2023-02-16 13:45:51 +00:00
Lance Ball 4e8ef492ab
chore: add tekton artifacts to release (#1557)
Signed-off-by: Lance Ball <lball@redhat.com>
2023-02-16 11:34:51 +00:00
Zbynek Roubalik b26a1c29b3
chore: `testData` -> `testdata` (#1560)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-02-16 11:05:51 +00:00
Luke Kingland 2a9a744501
chore: build and deploy test suite cleanup (#1437)
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.
2023-02-16 08:42:51 +00:00
knative-automation ec6c698244
upgrade to latest dependencies (#1534)
bumping knative.dev/eventing 4d6e1fc...f022034:
  > f022034 Update dependencies (# 6753)
  > fdffabe Deprecate `test/rekt/resources/pod` package (# 6747)
  > dfd095f Remove event flaker since eventshub offers an equivalent feature (# 6750)
  > 0ab29eb  Remove unused event-library (# 6751)
  > 82324b9 [main] Update community files (# 6743)
  > 452cd49 Adds apiVersion as an extension to api source events (# 6696)
  > b96d2fb Migrate from `knative.dev/reconciler-test/resources/svc` to `knative.dev/reconciler-test/pkg/resources/service` (# 6741)
  > f9ceb4f [main] Upgrade to latest dependencies (# 6715)
  > 37fa6e0 Extract scheduler config in a dedicate struct instead of many parameters (# 6736)
  > 4911986 Add function to check if a broker resource is `NotReady` (# 6737)
  > 2f98e55 Improve scheduler logging for state and pending vpods (# 6729)
  > 1092472 Scheduler doesn't reschedule vpods that are scheduled on unscehdulable pods (# 6726)
  > 40517be Added Broker class in `kubectl get -o wide` (# 6723)
  > e609459 [main] Update community files (# 6727)
  > 47a793b Revert "Change subscription patch logic to ensure resource version (# 6670) (# 6724)
  > 8b7551c Removing one more deprecated, unused func (# 6718)
  > 228eda3 Removing deprecated and unused func (# 6716)
  > ffc8fe0 Default a subscriptions subscriber and reply in webhook (# 6701)
  > 8d62a06  Adds link to the Knative CNCF Slack Channel  (# 6711)
  > 91a1991 Install source at requirement phase in conformance tests (# 6712)
  > 983189d Set scheduler logging to debug (# 6705)
  > c3364e4 Remove UNUSED and deprecated test helpers (# 6710)
  > 9b8c4d6 Port BrokerWorkFlowWithTranformation test to rekt and code cleanup (# 6709)
  > 45e7a24 Do not overwrite existing imagePullSecrets in CopySecret (# 6707)
  > efba019 [main] Format Go code (# 6702)
bumping k8s.io/kube-openapi 67bda5d...172d655:
  > 172d655 Merge pull request # 319 from alexzielenski/json_next
  > 829ce0c fix json unmarshal bug when extension used with Responses (# 320)
  > 8d49439 add JSONRoundTripTestCase and add a Test*RoundTrip for every spec.* type which needs it
  > b7a9e6f Merge pull request # 318 from dims/add-go.mod-for-integration-tests
  > 3b3bb66 add jsonv2 roundtrip fuzz tests and benchmarks
  > a70c9af Merge pull request # 307 from apelisse/test-required-job
  > b856c89 Add a go.mod for integration test
  > 395774f add jsonv2 implementation
  > c6e407d Add required job that depends on matrix jobs
  > c601e50 add go-json-experiment/json to pkg/internal/third_party
  > 5ca72f5 gofmt changes
bumping knative.dev/hack c7cfcb0...d71d569:
  > d71d569 🐛 Location-agnostic sign release (# 268)
  > b674d64 Update community files (# 270)
  > 549c360 Cleanup: remove ioutil for new go version (# 265)
  > 5814be5 Update community files (# 267)
bumping knative.dev/networking db2bcbe...195809a:
  > 195809a Update community files (# 761)
  > c3510af upgrade to latest dependencies (# 760)
  > 2473e65 Update community files (# 759)
  > f6585dc update OWNERS file (# 758)
  > 89f3990 Assert all the expected DNSNames are part of the HTTP01 challenge (# 756)
  > 4ccbe60 adjust domain validation in kcert (# 754)
bumping knative.dev/serving 484e848...08812b3:
  > 08812b3 Update net-istio nightly (# 13706)
  > 368994b Update community files (# 13707)
  > d68797e Bumping 'github.com/google/go-containerregistry' dependency (# 13701)
  > 9b9a951 upgrade to latest dependencies (# 13689)
  > e2add5d fix curl invocation (# 13683)
  > 6334ffe Update net-contour nightly (# 13676)
  > d7959af Update net-certmanager nightly (# 13686)
  > 4db2ada Update net-istio nightly (# 13687)
  > 7f2264d Update community files (# 13685)
  > baa6292 Update net-gateway-api nightly (# 13672)
  > 83d2dd7 Update net-kourier nightly (# 13673)
  > 2fc2a12 fix route reconciler test flakes (# 13684)
  > 729eb6d Update net-istio nightly (# 13674)
  > 30a2b0c Add k8s 1.26 for kind (# 13682)
  > 3764762 use GITHUB_TOKEN when querying net-istio releases (# 13681)
  > 485f2a9 upgrade to latest dependencies (# 13680)
  > 0639c5f Update community files (# 13678)
  > b4d7a28 clean up OWNER files (# 13668)
  > 68e128b Update net-contour nightly (# 13667)
  > f6ab591 Adds slack links to CNCF Knative slack channel (# 13655)
  > 53b3c92 Add serving-internal docs about Knative encryption support (# 13662)
  > 3b8d6cb Update net-contour nightly (# 13656)
  > b9b4c57 Update net-gateway-api nightly (# 13654)
  > 63832e2 Update net-contour nightly (# 13650)
  > 908edaf Update net-istio nightly (# 13649)
  > 06add5f Update net-kourier nightly (# 13648)
bumping knative.dev/pkg 247510c...2f55fe0:
  > 2f55fe0 Fix potential slowloris attack (# 2682)
  > 8d1efe1 Update community files (# 2683)
  > 4a80605 Add health checks (# 2671)
  > 33e6b88 fix: `reconcilerImpl.updateStatus` calculates state difference in debug mode only (# 2678)
  > c889c5b upgrade to latest dependencies (# 2679)
  > fb44e94 Update community files (# 2676)
  > decc1cc Update community files (# 2674)
  > 8532ae0 update OWNERS files to use teams with active members (# 2672)
  > 408ad07 Make SetDefaults of Destination duck type nil safer (# 2670)
bumping github.com/google/go-containerregistry 76ae819...1e09daa:
  > 1e09daa clarify crane download readme (# 1533)
  > 8e08d51 Revert "Hack around DockerHub plugin scope handling" (# 1531)
  > 5ad0a76 crane: support --full-ref for crane ls (# 1525)
  > b063f6a Hack around DockerHub plugin scope handling (# 1527)
  > e797859 crane: add digest --full (# 1524)
  > 3986cf4 test: use `T.TempDir` to create temporary test directory (# 1522)
  > 9db616f FIX mutate.Time not respecting history (# 1520)
  > 8048663 Race http fallback ping (# 1521)
  > e64ff3a Bump actions/stale from 6 to 7 (# 1519)
  > 9bd8237 Bump goreleaser/goreleaser-action from 3.2.0 to 4.1.0 (# 1511)
  > ffc14a0 Treat empty registry config as anonymous (# 1512)
  > 23d895d Fix missing doc comment (# 1509)
  > 6ba20c8 Fix various lints (# 1507)
  > 4270e04 Update Arch Linux install instructions (# 1508)
  > 37bf5df Revert "docs: pull latest instead of debug (# 1497)" (# 1504)
  > 47f0933 Use the default retry predicate in transport (# 1502)
  > c7270c2 Make unit tests substantially faster (# 1498)
  > a35805d Make credential warning slightly more accurate (# 1499)
  > 37b993a docs: pull latest instead of debug (# 1497)
  > cd77615 Add support for zstd compression (# 1487)
  > c412593 Fix calculating tarball size when duplicated layers exist (# 1495)
  > bdc946f add source archive checksum into the checksums.txt (# 1492)
  > 781782a Bump golangci/golangci-lint-action from 3.3.0 to 3.3.1 (# 1491)
  > 9e939fb Features: Allow eliding `serviceaccount` lookups. (# 1490)
  > 3e4f490 Bump slsa-framework/slsa-github-generator to 1.2.2 (# 1489)

Signed-off-by: Knative Automation <automation@knative.team>
2023-02-16 08:24:51 +00:00
Lance Ball ab194d421d
feat(templates): remove liveness and readiness from defaults (#1555)
* 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>
2023-02-16 08:23:51 +00:00
Lance Ball 44bb13f803
feat: adds refspec support for `func repo add` (#1558)
* 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>
2023-02-16 04:05:51 +00:00
Zbynek Roubalik 5a4803bf95
chore: refactor repository layout (#1554)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-02-15 08:46:52 +00:00
Jefferson Ramos e6618c0c2b
test: e2e on cluster test in verbose mode (#1537) 2023-02-14 17:14:51 +00:00
Matej Vasek 6bedc4aeed
Use current (as in PR) func image in integration tests (#1548)
* 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>
2023-02-14 16:29:50 +00:00
Jefferson Ramos 30b72dab53
fix: oncluster builds registry mismatch error (#1542) 2023-02-14 15:36:51 +00:00
knative-automation 826c312777
Update community files (#1540)
Signed-off-by: Knative Automation <automation@knative.team>
2023-02-10 17:59:49 +00:00
Jefferson Ramos 8e62148538
fix: func deploy with explicity `--build=false` bypass isBuilt check (#1539) 2023-02-09 16:24:48 +00:00
github-actions[bot] 34fed117bc
chore: update Quarkus platform version to 2.16.2.Final (#1538)
Co-authored-by: Knative Automation <automation@knative.team>
2023-02-08 20:29:46 +00:00
knative-automation bb7a9f209d
Update community files (#1533)
Signed-off-by: Knative Automation <automation@knative.team>
2023-02-08 01:35:46 +00:00
github-actions[bot] 6a5655ef91
chore: update Quarkus platform version to 2.16.1.Final (#1531)
Co-authored-by: Knative Automation <automation@knative.team>
2023-02-07 21:31:47 +00:00
my-git9 705cbcd8ac
Cleanup: remove ioutil for new go version (#1532) 2023-02-06 09:43:35 +00:00
Luke Kingland 958429c2f3
feat: deploy command global config with function context (#1434)
* 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
2023-02-06 08:43:35 +00:00
Luke Kingland 10c9948a12
feat: preliminary dapr runtime support (#1518)
* 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
2023-02-02 16:01:31 +00:00
Luke Kingland 6a539e40df
return route from client methods (#1530)
Client methods which result in an updated remote function instance look
up and return the new (or possible changed) primary function route.
2023-02-02 09:06:31 +00:00
Luke Kingland f9d17b0c9a
add apply and update client methods (#1529)
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.
2023-02-01 08:37:29 +00:00
Lance Ball 3edf2dd355
chore(ci): update java version (#1527)
Signed-off-by: Lance Ball <lball@redhat.com>
2023-01-27 18:41:40 +00:00
github-actions[bot] 53339454f3
chore: update Quarkus platform version to 2.16.0.Final (#1521)
Co-authored-by: Knative Automation <automation@knative.team>
2023-01-27 17:47:40 +00:00
knative-automation 396669d270
upgrade to latest dependencies (#1523)
bumping knative.dev/eventing bd67450...4d6e1fc:
  > 4d6e1fc Change subscription patch logic to ensure resource version (# 6670)
  > 74e165a APIServerSource with selector to target namespaces (# 6665)
  > 1f9f4d3 Log stream from system namespace in upgrade tests (# 6699)
  > 466d123 Fix reconciler-tests Prow job (# 6694)
bumping knative.dev/client 2a124bd...df40f5a:
  > df40f5a upgrade to latest dependencies (# 1770)
bumping knative.dev/serving 2215dfe...484e848:
  > 484e848 upgrade to latest dependencies (# 13646)
  > 1e27b7a Update net-contour nightly (# 13643)
  > 43af7f1 Update net-istio nightly (# 13644)
  > eb96c59 Update net-kourier nightly (# 13641)
  > 412cf1c Update net-certmanager nightly (# 13640)

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-27 15:13:41 +00:00
Luke Kingland 0f5b93fa96
e2e tests log stdout and stderr (#1524)
* 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
2023-01-27 10:11:41 +00:00
Thomas Risberg d090d5dd5e
Update springboot templates to Spring Boot 3.0.2 (#1509)
- 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>
2023-01-24 15:16:38 +00:00
knative-automation c3c5d32d7c
upgrade to latest dependencies (#1520)
bumping knative.dev/eventing 7e899fd...bd67450:
  > bd67450 Populate a Subscriptions subscriber and reply namespace only if not set already (# 6671)
bumping knative.dev/networking e9d3a55...db2bcbe:
  > db2bcbe Assert all the expected DNSNames are part of the HTTP01 challenge (# 757)
bumping knative.dev/client 982711e...2a124bd:
  > 2a124bd upgrade to latest dependencies (# 1769)
bumping knative.dev/serving 8b28d41...2215dfe:
  > 2215dfe Update net-gateway-api nightly (# 13642)
  > 0360850 Add secure-pod-defaults flag to default Pods to 'restricted' profile by default (# 13398)
  > 897b61a Change HTTP01 test DNS entry to *.{custom-domain} (# 13636)
  > 9004443 Allow challenges for hosts that don't match the route's host (# 13637)
  > 188dc1a Update net-certmanager nightly (# 13631)
  > 09bc85c Update net-kourier nightly (# 13634)
  > 87f5b62 Update net-contour nightly (# 13635)
  > 760b2f7 Update net-istio nightly (# 13632)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-24 14:12:39 +00:00
Luke Kingland be2e9ee970
rebuild docs (#1517) 2023-01-24 12:59:38 +00:00
Luke Kingland 218cc15d03
fix: --path flag parsing (#1519) 2023-01-24 12:58:38 +00:00
knative-automation 154dd138e2
upgrade to latest dependencies (#1516)
bumping knative.dev/serving 5b59ae0...8b28d41:
  > 8b28d41 Update net-gateway-api nightly (# 13633)
  > 550a6f5 Clean up `go_run` functions (# 13628)
  > d2d5723 Don't explicitly require a service account key for autotls dns tests (# 13627)
  > 6906c92 Refactor autoscaler TestContext (# 13618)
  > 8722a63 Update net-contour nightly (# 13624)
  > e05aa3a Add validation to warn about insecure SecurityContext defaults (# 13399)
  > 4a339c6 Update net-kourier nightly (# 13626)
  > b10db15 Update net-gateway-api nightly (# 13623)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-24 00:24:38 +00:00
Zbynek Roubalik 3d52283a35
fix: on cluster build - fix url in the output msg (#1514)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-01-20 19:12:02 +00:00
Matej Vasek 2c3cca0deb
fix: envvar parsing for pack tekton task (#1512)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-01-20 17:30:03 +00:00
knative-automation f77971b7bb
upgrade to latest dependencies (#1507)
bumping knative.dev/client bd8493f...982711e:
  > 982711e [main] Upgrade to latest dependencies (# 1763)
  > b72e964 Update actions (# 1768)
bumping knative.dev/networking fe0ac7d...e9d3a55:
  > e9d3a55 adjust domain validation in kcert (# 755)
  > dd05ffd upgrade to latest dependencies (# 753)
  > 3ad2fdc Update actions (# 752)
bumping knative.dev/serving 162b8fb...5b59ae0:
  > 5b59ae0 Update net-certmanager nightly (# 13625)
  > 04df00a DomainMapping: Set Certificate.Spec.Domain (# 13620)
  > 94d23ac Set 'Domain' in kcert (# 13569)
  > a4fcb9d Update net-certmanager nightly (# 13619)
  > 6b7e09a upgrade to latest dependencies (# 13616)
  > 2338826 Don't default Revision values when BYO name is unchanged. (# 13565)
  > f2147ef Stream logs from system and test namespace in upgrade tests (# 13587)
  > b989439 Ensure the autoscaler only has a single elector (# 13585)
  > 873eb5c Advance pvc e2e test to beta (# 13535)
  > 5cb43ab Update net-gateway-api nightly (# 13615)
  > 8064f6b Update net-gateway-api nightly (# 13614)
  > 52e79f7 show an error when curling the istio release (# 13612)
  > a5d0384 Update net-contour nightly (# 13613)
  > 2c117e8 Update net-gateway-api nightly (# 13607)
  > 06f59e3 Update net-kourier nightly (# 13608)
  > aa744ae Update net-certmanager nightly (# 13606)
  > cd2ad0c Update actions (# 13604)
bumping knative.dev/eventing 694f824...7e899fd:
  > 7e899fd Reduce log noise in upgrade tests (# 6693)
  > 9417125 [main] Update actions (# 6680)
  > 82d36e0 [main] Upgrade to latest dependencies (# 6681)
bumping knative.dev/pkg 876c59d...247510c:
  > 247510c upgrade to latest dependencies (# 2668)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-20 16:38:03 +00:00
Luke Kingland ed7592cd6b
chore: re-bump springboot template versions (#1511) 2023-01-20 09:57:02 +00:00
Luke Kingland 554e74a309
chore: remove underscore prefix from test packages (#1503)
* remove underscore prefix from test packages

* springboot patch attempt
2023-01-20 09:01:02 +00:00
Lance Ball 2b1ab1be43
fix: improve error message for missing registry name (#1510)
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>
2023-01-20 08:54:03 +00:00
Matej Vasek 132d0492ad
chore: update pack (#1506)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-01-19 07:08:00 +00:00
Thomas Risberg 63aab77884
Update Spring Boot to 2.7.7 (#1502)
* 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>
2023-01-18 19:30:03 +00:00
Luke Kingland 1dec136e74
fix: create command help text (#1500) 2023-01-17 20:12:56 +00:00
Lance Ball d3d3233825
docs: update language pack docs for builderImages (#1497)
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>
2023-01-16 21:01:04 +00:00
Adam Boczek 2f021f118b
chore: refactor commands help to use templates (#1485)
* chore: extend help template engine and docs generator to get root use

* chore: refactor deploy cmd

* chore: refactor build cmd

* chore: refactor all relevant commands and remove defaultTemplatedHelp func

* chore: update docs

* chore: remove unused functions

* chore: add template func for rendering sub-templates

* chore: fix for typos
2023-01-16 20:40:53 +00:00
knative-automation ccfa475bf8
upgrade to latest dependencies (#1496)
bumping knative.dev/client 2593aa6...bd8493f:
  > bd8493f Update community files (# 1767)
bumping knative.dev/pkg ecf3863...876c59d:
  > 876c59d Update actions (# 2667)
  > 8abadb0 Update community files (# 2666)
bumping knative.dev/networking f1db313...fe0ac7d:
  > fe0ac7d Update community files (# 751)
  > 68f0fa7 add new field 'Domain' to kcert spec (# 747)
  > a51817e upgrade to latest dependencies (# 750)
  > bc7a7e5 Update community files (# 749)
  > eee5118 upgrade to latest dependencies (# 748)
bumping knative.dev/eventing 049f004...694f824:
  > 694f824 [main] Update community files (# 6678)
bumping knative.dev/serving 11d88db...162b8fb:
  > 162b8fb consistent label selector for Service - include app label (# 13265)
  > 76005a0 upgrade to latest dependencies (# 13594)
  > ff959e4 Update net-kourier nightly (# 13599)
  > fc1cf65 Update net-contour nightly (# 13597)
  > 3db1864 Update net-istio nightly (# 13596)
  > bab961f Update net-certmanager nightly (# 13595)
  > e6db06e Update net-gateway-api nightly (# 13598)
  > 10a8e38 Update community files (# 13593)
  > b421efb Update net-kourier nightly (# 13590)
  > 288e59a Update net-contour nightly (# 13578)
  > 6d70f59 Update net-gateway-api nightly (# 13577)
  > b9d0952 Update net-certmanager nightly (# 13588)
  > 7b5c641 upgrade to latest dependencies (# 13573)
  > 4ad830a add fetch depth so we can fetch the tags (# 13586)
  > fb0c4bd Add setup script for internal-encryption e2e test (# 13559)
bumping knative.dev/hack af8745e...c7cfcb0:
  > c7cfcb0 Update community files (# 263)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-16 10:59:54 +00:00
Lance Ball 7b1e0c0f99
deps(node,typescript): update dependencies (#1468)
Updates dependencies in Node.js and TypeScript functions to eliminate
some security warnings and bump to faas-js-runtime 0.9.7, which allows
for ESM modules now.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2023-01-16 02:33:53 +00:00
knative-automation 4f43e8c212
Update actions (#1495)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-16 02:11:54 +00:00
knative-automation 972b311195
Update community files (#1494)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-13 02:09:54 +00:00
knative-automation 8532af40e1
upgrade to latest dependencies (#1487)
bumping knative.dev/serving aaa992e...11d88db:
  > 11d88db Update community files (# 13584)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-11 20:22:52 +00:00
github-actions[bot] 9edb8739cb
chore: update Quarkus platform version to 2.15.3.Final (#1491)
Co-authored-by: Knative Automation <automation@knative.team>
2023-01-11 14:05:49 +00:00
knative-automation 6e2147af54
Update community files (#1486)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-11 13:44:48 +00:00
Matej Vasek 66080fdd04
chore: update BP lifecycle image to 0.15.3 (#1490)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-01-11 09:36:49 +00:00
Zbynek Roubalik c1b47418b5
fix: `deploy` with options specified (#1482)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-01-06 18:21:20 +00:00
github-actions[bot] 07fa54444c
chore: update Quarkus platform version to 2.15.2.Final (#1483)
Co-authored-by: Knative Automation <automation@knative.team>
2023-01-05 12:49:19 +00:00
github-actions[bot] 78ce7ffc86
chore: update Quarkus platform version to 2.15.1.Final (#1478)
Co-authored-by: Knative Automation <automation@knative.team>
2023-01-04 13:09:18 +00:00
knative-automation 47df9df487
upgrade to latest dependencies (#1471)
bumping knative.dev/networking c037e29...f1db313:
  > f1db313 upgrade to latest dependencies (# 746)
  > 383bb2f Update community files (# 745)
  > 891aac2 upgrade to latest dependencies (# 740)
  > 5be75f2 upgrade to latest dependencies (# 739)
bumping knative.dev/eventing c4da68a...271c9bb:
  > 271c9bb [main] Upgrade to latest dependencies (# 6658)
  > 1c40365 Allowing an override of the namespace for the brokers config type (# 6659)
  > 57da6ae Set transition time initially on sequence statuses (# 6647)
  > 1048c6c Use `AddressStatus` instead of `Addressable` directly in broker status (# 6622)
  > 55537d4 Update debugging documentation and add details for VSCode (# 6613)
  > 613ddf8 Fixing broken links on development doc (# 6646)
  > 5d3371c Port Parallel e2e test to rekt (# 6640)
  > 661fd01 Adding WithAnnotations for the broker resource on rekt-testing (# 6645)
  > 1eb173b Removing deprecated and broken code for WithAnnotation (# 6637)
  > 0edabc7 [main] Update community files (# 6638)
  > e63b13c Configurable trace export limit for upgrade tests (# 6635)
  > 49e76ae Register schemas in webhooks too (# 6633)
bumping knative.dev/serving 327bf91...aaa992e:
  > aaa992e upgrade to latest dependencies (# 13564)
  > 3b8f17c Update net-kourier nightly (# 13561)
  > 35abde0 Update net-istio nightly (# 13556)
  > 88ccb50 Update net-certmanager nightly (# 13557)
  > 3812acf Update net-contour nightly (# 13555)
  > cd50d85 Update net-gateway-api nightly (# 13554)
  > 01676d5 Update net-kourier nightly (# 13547)
  > f1b45e6 Update net-istio nightly (# 13549)
  > f0379ef Update net-certmanager nightly (# 13548)
  > 114bebe Update net-contour nightly (# 13550)
  > 38fa7c0 Update community files (# 13545)
  > 017bb66 Update net-istio nightly (# 13538)
  > a4f6edc Update net-contour nightly (# 13534)
  > 442877d Update net-certmanager nightly (# 13533)
  > b4198e7 Update net-kourier nightly (# 13532)
  > ceb505d Update net-gateway-api nightly (# 13530)
  > 99c3d5a Update net-gateway-api nightly (# 13527)
  > 95a6492 upgrade to latest dependencies (# 13526)
  > 7f217bb Use ubuntu 20.04 for kind e2e tests (# 13528)
bumping knative.dev/client bad1ba3...d72eb54:
  > d72eb54 Update community files (# 1764)
bumping knative.dev/pkg 05b694e...4fd6eb8:
  > 4fd6eb8 make ChildName produce valid names (# 2660)
  > 911b435 Update community files (# 2661)
  > f4eb778 upgrade to latest dependencies (# 2658)
  > 9e943fa Removal of Tekton downstream tests (# 2654)
bumping knative.dev/hack 7233e77...b9801b4:
  > b9801b4 Update community files (# 260)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2023-01-04 12:15:18 +00:00
Adam Boczek fd982c1e40
feat: change default pvc size to 256Mi and extract create pvc function (#851) (#1475) 2022-12-19 20:07:55 +00:00
Jefferson Ramos 3ebed33fda
test: cleanup e2e on cluster tests and make default test registry dynamic (#1474) 2022-12-16 21:11:51 +00:00
github-actions[bot] c799e47318
chore: update Quarkus platform version to 2.15.0.Final (#1473)
Co-authored-by: Knative Automation <automation@knative.team>
2022-12-15 16:22:51 +00:00
Adam Boczek 000a70abc7
fix: add default PodSecurityContext to the uploader (#1432) (#1433)
* fix: add default PodSecurityContext to the uploader und dialer (#1432)

* update go.mod after ./hack/update-codegen.sh run (#1432)
2022-12-14 14:33:50 +00:00
Matej Vasek f275a142f6
fix: set seccomp for k8s 1.24+ (#1349)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-12-14 00:52:48 +00:00
github-actions[bot] 2e03ee015e
chore: update Quarkus platform version to 2.14.3.Final (#1456)
Co-authored-by: Knative Automation <automation@knative.team>
2022-12-09 15:11:17 +00:00
knative-automation 09d0072755
Update community files (#1462)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-12-09 02:13:18 +00:00
Matej Vasek dd67eafcb3
fix: podman installation in GH action (#1461)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-12-08 15:19:15 +00:00
Lance Ball 8d23553a7d
cleanup(ux): removes redundant output (#1453)
During on-cluster builds, we see the "Creating Pipeline resources" message printed twice.

```
func deploy --remote --verbose
Creating Pipeline resources
Creating Pipeline resources
Running Pipeline with the Function
Running Pipeline: Building function image on the cluster
Running Pipeline: Deploying function to the cluster
```
This change removes the second "Creating Pipelines resources" output.

There was also a stray call to `progressListener.Stopping()`. This change addresses that, and also removes a "Running pipeline with the Function" output line, which is immediately overwritten by Task descriptions as they are running.

/kind cleanup

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-12-07 22:42:14 +00:00
Zbynek Roubalik e3b7ff4404
docs: update on cluster build guide to explicitly mention `--remote` flag (#1455)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-12-07 16:34:14 +00:00
knative-automation 7dbe3cdcb2
upgrade to latest dependencies (#1426)
bumping knative.dev/client daa3c65...bad1ba3:
  > bad1ba3 upgrade to latest dependencies (# 1761)
  > 9de7464 Update community files (# 1762)
bumping knative.dev/eventing 82bf83c...c4da68a:
  > c4da68a [main] Upgrade to latest dependencies (# 6632)
  > 1cb509b Fix PingSource adapter metrics (# 6615)
  > fb519df [main] Upgrade to latest dependencies (# 6623)
  > 41653ce Bump kind and k8s (# 6620)
  > 2e02230 Use pointer.XYZ() function instead of deprecated pointer.XYZPtr() (# 6617)
  > 0401105 Remove k8s 1.23 kind (# 6616)
  > e214072 [main] Upgrade to latest dependencies (# 6611)
  > 00a31f2 [main] Update community files (# 6614)
  > ed5e0a7 Knative enhance failed events extensions in mt channel broker (# 6569)
  > e8fec2a Remove strict subscriber feature flag (# 6608)
  > c6bfda3 Decrease exportTraceLimit to 100 (# 6612)
  > 03eafac [main] Upgrade to latest dependencies (# 6609)
bumping knative.dev/networking 0d4e937...c037e29:
  > c037e29 upgrade to latest dependencies (# 737)
  > 9b791e2 Update community files (# 736)
  > 22df410 upgrade to latest dependencies (# 735)
  > 6d96d69 upgrade to latest dependencies (# 734)
bumping knative.dev/serving 874cceb...327bf91:
  > 327bf91 Update net-istio nightly (# 13524)
  > 1beadbd Update net-gateway-api nightly (# 13523)
  > 0ea12f4 Update net-contour nightly (# 13520)
  > bcef4be Update net-contour nightly (# 13514)
  > b7492cc Update net-certmanager nightly (# 13509)
  > 5b217ef Update net-istio nightly (# 13510)
  > 2ba4499 Don't set seccomp profile in the queue proxy (# 13507)
  > e17e4d1 Update net-contour nightly (# 13502)
  > 05a28e0 Ensure probes from the autoscaler are not passed to the user-container (# 13501)
  > cd1cd1a upgrade to latest dependencies (# 13496)
  > 3a9cefb Update net-istio nightly (# 13497)
  > 638e114 Update net-istio nightly (# 13491)
  > 149d152 Update net-istio nightly (# 13490)
  > 2522268 Update net-gateway-api nightly (# 13489)
  > 7157519 Update community files (# 13477)
  > 87aad28 Update net-contour nightly (# 13482)
  > 8f5491a Update net-gateway-api nightly (# 13481)
  > 358853a Update net-certmanager nightly (# 13480)
  > 26bb82f Update net-kourier nightly (# 13479)
  > 1f3302d Update net-kourier nightly (# 13475)
  > bb6457f upgrade to latest dependencies (# 13474)
  > 651f27e next K8s min version is 1.24 (# 13473)
  > aee40fd upgrade to latest dependencies (# 13467)
  > 2b20603 add missing 'component' label to webhook template (# 13469)
bumping k8s.io/apimachinery 478dd6e...4fbe8e4:
  > 4fbe8e4 Merge pull request # 112218 from haoruan/automated-cherry-pick-of-# 111936-upstream-release-1.25
  > cf171ba Merge pull request # 112808 from cheftako/automated-cherry-pick-of-# 112689-upstream-release-1.25
  > b4db414 Marshal MicroTime to json and proto at the same precision
  > cb0507f Updated vendor to the new preferred versions.
bumping k8s.io/klog/v2 0990e81...9ae4992:
  > 9ae4992 Merge pull request # 355 from pohly/call-overhead-benchmarks
  > cb9292a Merge pull request # 349 from pohly/init-flags-concurrency
  > f08fd26 klog: benchmark the overhead when logging is off
  > 02fe323 Merge pull request # 345 from dims/bump-version-of-golang-to-1.19-and-drop-older-versions
  > 28f7906 make InitFlags read-only
  > d64acbd Merge pull request # 344 from harshanarayana/bug/GIT-343/logr-handle-marshalling-non-string-values
  > 8c0f205 reformat to golang 1.19 standards
  > a952486 add test for the command line usage
  > dcddc5f kvlistformat: fix the issue with display marshalled value for non string type
  > 6f5eeb9 Bump version of golang to 1.19 and prune older versions
bumping k8s.io/api 4b838ea...88912e3:
  > 88912e3 Update dependencies to v0.25.4 tag
  > e7b469b Merge pull request # 112808 from cheftako/automated-cherry-pick-of-# 112689-upstream-release-1.25
  > 1102e6f Updated vendor to the new preferred versions.
bumping k8s.io/utils ee6ede2...8e77b1f:
  > 8e77b1f Merge pull request # 265 from danwinship/fix-dumb-api-mistake
  > 1a15be2 Merge pull request # 270 from dashpole/trace_panic
  > ba5a213 Fix an API accident with net.IPFamily
  > 61b03e2 Merge pull request # 268 from petr-muller/deprecation-convention
  > 71bfc7b make traces safe for concurrent use
  > cfd413d Merge pull request # 263 from saltbo/fix-invalid-gha-goverion
  > d90ac11 pointer: make deprecation comments follow convention
  > 460b63a demonstrate trace panic
  > 4270251 Merge pull request # 259 from LJTian/master
  > 4a5ee0b fix: update the go-versions format for the gha
  > 665eaae Merge pull request # 261 from liggitt/clean-deps
  > 1be0ed5 Update Go standard libs address to reduce jump time
  > 7796b5f Merge pull request # 260 from dims/bump-dependencies-and-go-language-version
  > 25648b1 Drop testify dependency
  > e9cbc92 Merge pull request # 242 from MushuEE/patch-3
  > c9660c8 Bump dependencies and go language version
  > 49b64f9 Drop afero dependency
  > ad59060 Merge pull request # 253 from kschoche/add_uint_to_pointer_pkg
  > d7bf925 Ineffective break statements triggering SA4011
  > 2e139fc Merge pull request # 254 from dims/bump-version-of-golang-to-1.19
  > d45ae35 add uint64 and uint to pointer pkg
  > e3a7968 Bump version of golang to 1.19
bumping knative.dev/hack 8f3c705...7233e77:
  > 7233e77 No more sugar controller in upstream eventing (# 259)
  > c12c1bf Revert of # 257 (# 258)
  > 6397aac 🐛 Don't use NodeLocalDNS addon (# 257)
  > 2e610ce Update community files (# 256)
  > de2ff40 Allow tests to skip dumping resources on failure (# 255)
  > 646aac0 e2e script tweaks (# 252)
  > d470f52 Format go code (# 253)
  > b035462 Calculate Image references properly (# 251)
  > 1ba176e Trap calls are now executed in LIFO order (# 249)
bumping k8s.io/apiextensions-apiserver ebdae04...2c55649:
  > 2c55649 Update dependencies to v0.25.4 tag
  > 67ebb5f Merge pull request # 112808 from cheftako/automated-cherry-pick-of-# 112689-upstream-release-1.25
  > 05d7571 Updated vendor to the new preferred versions.
  > 2d6e469 Bump konnectivity-client to v0.0.33
bumping knative.dev/pkg 0243d64...05b694e:
  > 05b694e upgrade to latest dependencies (# 2653)
  > 242a3d7 Fix nil pointer deref in drain when it's reset (# 2645)
  > f5c1a03 Update community files (# 2641)
  > bd66b9b upgrade to latest dependencies (# 2640)
  > dca788a Min K8s version is now 1.24 (# 2639)
  > 6255ebd upgrade to latest dependencies (# 2638)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-12-05 18:47:12 +00:00
Matej Vasek 4fbabb0967
fix: on cluster build (#1449)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-29 20:27:16 +00:00
github-actions[bot] 1a210c8802
chore: update Quarkus platform version to 2.14.2.Final (#1447)
Co-authored-by: Knative Automation <automation@knative.team>
2022-11-28 17:37:13 +00:00
wizpresso-steve-cy-fan 4a4392d266
Add Google Cloud Function Buildpacks to trusted builder prefixes (#1438)
* Update builder.go

* Update buildpacks/builder.go

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

* Update builder.go

* Update buildpacks/builder.go

Add trailing comma

Co-authored-by: Lance Ball <lball@redhat.com>
2022-11-22 15:14:42 +00:00
Luke Kingland eae7d56895
feat: command function context (#1416)
* feat: global config function context

The function with context is considered when determining flag defaults
such that:
- No special logic is required to determine "if changed"
- help text correctly reflects the actual values which will be used
- Global config can be a direct parent of command-specific config via
  embed
Also included:
- CLI tests clear environment of FUNC_* variables
- Command's bindEnv helper also sets up environment variable auto-binding
  and prefix.
- Verbosisty flag default now globally configurable

* Update cmd/build.go

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

* Update cmd/build.go

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

* Update cmd/build.go

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

* move clearEnvs test function to test file

* docs regen

Co-authored-by: Lance Ball <lball@redhat.com>
2022-11-21 18:50:42 +00:00
Lance Ball e4b96cdc9a
cleanup(buildpacks): tweak TrustedBuilder() (#1444)
* cleanup(builders): tweak TrustedBuilder()

We have been relying on a closure to validate the builder prefix provided to `pack`. This change ensures that we use the builder image which `pack` is using - whether it's what we provided in options or not.

/kind cleanup

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

* fixup

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

* techdebt(builders-tests): simplify TrustedBuilders() unit test

There's no need to mock anything if we don't create the `TrustedBuilders()` function in `Build()`.

/kind techdebt

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-11-21 14:28:43 +00:00
Lance Ball e3ce1cf9d6
fix(GHSA-5336-2g3f-9g3m): Fixes GSA GHSA-5336-2g3f-9g3m (#1442)
Ensures that all trusted builder image prefixes end in a slash so that registry identifiers can't be spoofed with name extensions.

/kind fix

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-11-18 20:48:40 +00:00
Lance Ball 6482ba0076
techdebt(buildpacks): test builder image prefix (#1440)
* techdebt(buildpacks): test builder image prefix

Adds a test for the known builder image prefixes, ensuring they are considered trusted. Removes the check for old versions of podman in order to facilitate this test without turning it into an integration test. Podman 3.4 was released in the summer of '21, more than a year ago, and all published versions of RHEL ship with podman 4.2.

/kind techdebt

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

* fixup: remove unused code

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

* fixup: run ./hack/update-codegen.sh

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

* fixup: run ./hack/update-codegen.sh

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-11-18 15:19:40 +00:00
github-actions[bot] cef8691981
chore: update Quarkus platform version to 2.14.1.Final (#1435)
Co-authored-by: Knative Automation <automation@knative.team>
2022-11-17 20:43:39 +00:00
knative-automation b952b0fb38
Update community files (#1436)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-17 15:18:40 +00:00
Luke Kingland 5ca77d3874
src: update build command help text (#1425)
* src: build command help text

* Regen docs
2022-11-16 14:18:38 +00:00
Jefferson Ramos 1ca6625577
chore: improve func version verbose mode to display image referenced by func (#1431) 2022-11-16 14:12:40 +00:00
Lance Ball 0073106832
documentation: remove old docs and restructure (#1430)
Removes old, outdated documentation and links to existing docs on https://knative.dev. Restructures some of the documentation directory, moving everything that is not generated out of the `reference` directory.

/kind documentation

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-11-16 05:52:36 +00:00
Andrew Su 148f30ae81
Add VMware builder as trusted (#1429) 2022-11-15 18:41:37 +00:00
Luke Kingland 30da70e05c
fix: ignore global config on docs gen (#1424) 2022-11-14 21:22:36 +00:00
knative-automation 802ab350e2
upgrade to latest dependencies (#1405)
bumping knative.dev/serving c737bb1...874cceb:
  > 874cceb Update net-gateway-api nightly (# 13466)
  > aebc16c Update net-istio nightly (# 13460)
  > 0df133d Update net-certmanager nightly (# 13461)
  > 8848735 Update net-kourier nightly (# 13463)
  > 44295ff Update net-contour nightly (# 13462)
  > bd88e05 Use new keys for internal encryption secret data (# 13388)
  > 0511892 Update net-certmanager nightly (# 13457)
  > afc6942 Update net-kourier nightly (# 13456)
  > 2a22058 Update net-contour nightly (# 13454)
  > 8c79b7f Update net-gateway-api nightly (# 13455)
  > c3e0f12 Add support for QPOptions TLS + Audience bound Tokens  (# 13384)
  > fd1b9ed Set filtered factory label in controller main + Upgrade to latest dependencies (# 13442)
  > 601c762 Update net-certmanager nightly (# 13452)
  > f9fd5c8 Update net-contour nightly (# 13446)
  > 9106a61 Update net-certmanager nightly (# 13445)
  > 1b38451 Update net-gateway-api nightly (# 13444)
  > 09f44f5 Update community files (# 13434)
  > 6f42856 Update net-gateway-api nightly (# 13432)
  > d72ba07 bump kind to 1.17 in e2e (# 13437)
  > a47c428 ran codegen with go1.19 & fix linter warnings (# 13438)
  > bc368c3 Update net-contour nightly (# 13431)
  > 025c712 upgrade to latest dependencies (# 13429)
  > 3d9c724 upgrade to latest dependencies (# 13427)
  > 2ca1aea Update net-istio nightly (# 13428)
  > 41f35ca Update community files (# 13426)
bumping knative.dev/client 4a545d0...daa3c65:
  > daa3c65 upgrade to latest dependencies (# 1758)
  > 2b347b1 Update community files (# 1760)
  > 2b75ddf Update community files (# 1759)
bumping knative.dev/networking cb26aa7...0d4e937:
  > 0d4e937 upgrade to latest dependencies (# 731)
  > ed86031 Update community files (# 730)
  > dd3d3d7 Updates style/lint checks for go1.19 (# 733)
  > 7d97614 upgrade to latest dependencies (# 729)
  > e051f4e upgrade to latest dependencies (# 728)
  > 23d44c9 Update community files (# 727)
bumping knative.dev/pkg 6eb8f18...0243d64:
  > 0243d64 Function AllowRestrictedPodSecurityStandard for modifying test pods (# 2625)
  > 389f811 upgrade to latest dependencies (# 2629)
  > 918fd93 Update community files (# 2633)
  > 44d1d7d Go1.19 changes (# 2631)
  > 6718478 Update community files (# 2628)
  > dc1fae1 changeset: allow override the revision through ldflags (# 2601)
  > 92ed919 Fix: Mute the linter on error return values. (# 2627)
  > 8fa1a3f CmpOpts overrides should be passed through (# 2621)
  > 64fc3e5 ListPointer flag should also apply to filtered informers (# 2620)
  > 2f19491 Feature: Implement Apply codegen. (# 2624)
bumping knative.dev/hack 566898d...8f3c705:
  > 8f3c705 Update community files (# 247)
  > 62b15bd drop support for the istio add on flag (# 243)
  > f5be74f Update community files (# 245)
  > 80fd6da KO_DATA_PATH doesn't need to be set anymore (# 244)
  > 4b6bd86 Format go code (# 239)
bumping knative.dev/eventing 6ea012a...82bf83c:
  > 82bf83c Fix development docs on installing IMC (# 6605)
  > 1c76762 [Scheduler] Handle permanent pending pods (# 6599)
  > a390f74 [main] Upgrade to latest dependencies (# 6590)
  > 1d02f98 Add Ansu as scheduler approver (# 6600)
  > a653058 Set SecurityContext for test Pods (# 6584)
  > 4809791 Updates for Go 1.19 (# 6594)
  > 6de07e8 Update community files (# 6593)
  > a57c12f Update community files (# 6589)
  > cd98a61 upgrade to latest dependencies (# 6586)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-14 21:03:37 +00:00
Gunjan Vyas 3f49718bc6
feat: Persist remote value in func.yaml (#1402)
* feat: persist remote value in func.yaml

* Added unit test for remote flag persistence

* Formatting fix

* addressed comments
2022-11-14 21:01:37 +00:00
Luke Kingland f6a3e55927
feat: effective path (#1353)
* effective path

* function context for build builder

* code review suggestions

- fix misspelled 'precedence' throughout
- remove superfluous command execution from test
- remove debug statements
- add FUNC_PATH precedence check with short-flag in effectivePath test

* rebase and update to NewTestClient
2022-11-11 11:21:17 +00:00
David Fridrich 13fde9025d
feat: Change Invocation.format to Invoke (#1415)
* test1

* d

* templates/* manifest remove http

* docs fix

* migration test a template tests

* docs func_run

* docs last

* misspell

* suggested changes

* def http

* zz

* zz

* change invocation struct name

* zz file
2022-11-11 11:20:19 +00:00
Luke Kingland 52cf033348
src: cleanup build prompts (#1413) 2022-11-10 20:05:16 +00:00
Lance Ball 06693859be
enhancement(templates): use latest faas-js-runtime + cloudevents (#1422)
* enhancement(templates): use latest faas-js-runtime + cloudevents

Better typing of handle functions and return values for typescript based functions.

/kind enhancement

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

* fixup: improvements

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

* fixup: missing FUNC_LOG_LEVEL

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-11-10 12:59:15 +00:00
Luke Kingland 5b032bed66
fix: interrupt suppression (#1418)
* remove interrupt error suppression

* Update cmd/func/main.go

Co-authored-by: Matej Vasek <matejvasek@gmail.com>

Co-authored-by: Matej Vasek <matejvasek@gmail.com>
2022-11-10 09:48:15 +00:00
github-actions[bot] a4a09fd129
chore: update Quarkus platform version to 2.14.0.Final (#1421)
Co-authored-by: Knative Automation <automation@knative.team>
2022-11-09 16:13:15 +00:00
github-actions[bot] f8b3197605
chore: update Quarkus platform version to 2.13.4.Final (#1417)
Co-authored-by: Knative Automation <automation@knative.team>
2022-11-08 20:27:20 +00:00
Luke Kingland 218fa9d8c3
rename config local variable cfg (#1412) 2022-11-08 14:35:21 +00:00
Luke Kingland 59f4e6a493
fix: mock and noop inconsistency (#1409)
* fix: mock remover missing default impl

* fix: client noop describer should not error

* src: replace generic client factory with test client

* simplify docs generator client
2022-11-07 12:45:22 +00:00
Matej Vasek 5746968b6d
feat: caching for on cluster s2i build (#1406)
* feat: s2i cache /tmp/artifacts

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

* feat: s2i build caches buildah container storage

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

* Revert "feat: s2i build caches buildah container storage"

This reverts commit ec52609814.

Reverting since it lead up to eating all storage.

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-07 12:15:22 +00:00
Luke Kingland 11616840b9
path default cwd (#1411)
The system fully supports an empty (zero value) path as indicating
operations should take place on the current working directory by default.
2022-11-07 12:07:21 +00:00
Luke Kingland cfa469d2d3
fix: error instantiating empty function (#1410)
* function validation

Move validation from function load to function write
Validate checks syntactically valid, not completeness (i.e. envs format
rather than populated name.)

* wokeification
2022-11-04 15:54:04 +00:00
knative-automation 5d67de768b
Format go code (#1407)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-04 11:11:04 +00:00
knative-automation 738b3d323f
Update community files (#1404)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-11-04 01:38:06 +00:00
Matej Vasek ea79cf007f
chore: update lifecycle image to v0.15.0 (#1403)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-02 17:03:07 +00:00
Matej Vasek 7e596d75cb
refactor: clean up (#1400)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-01 22:09:05 +00:00
Matej Vasek 7d00e81131
fix: symlink upload for in cluster build (#1401)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-01 22:08:05 +00:00
Matej Vasek 9de432ec2a
feat: allow symlinks in templates (#1399)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-01 19:41:05 +00:00
Matej Vasek b58cf6a9c6
test: fix k8s test in cluster (#1396)
Resetting KUBECONFIG envvar is not sufficient if test runs in cluster.
We also must unset KUBERNETES_SERVICE_HOST envvar,
so in-cluster-config wont kick in.

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-01 18:03:05 +00:00
Lance Ball 939dd10eb2
chore(OWNERS): update to new org (#1397)
* chore(OWNERS): update to new org

When we moved to knative org, the groups changed. This addresses that.

/kind chore

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>
2022-11-01 18:01:06 +00:00
Matej Vasek 4bd70cd253
test: clear cmd args (#1395)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-11-01 17:46:05 +00:00
Lance Ball 64e7452c9a
chore(deps): update node and typescript deps (#1394)
Eliminates some security issues found by dependabot and bumps to latest faas-js-runtime. Also cleans up the typescript code to be slightly less ugly.

/kind chore

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-31 21:59:12 +00:00
Luke Kingland f9dc8b659f
chore: list command namespace (#1370)
* chore: list command namespace

- Adds namespace test to list command
- Moves namespace flag into list command for
  - Better help text
  - Easier testing
- Sets static default namespace for flag to "default"

* regen docs

* list test default from kubeconfig
2022-10-31 19:59:13 +00:00
Matej Vasek 7e75157373
chore: update lifecycle (#1393)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-31 19:58:12 +00:00
Luke Kingland 2edb25998a
chore: deploy cmd namespace (#1390)
* chore: deploy namespace simplification

Separates namespace redeploy warnings from namespace value derivation
logic.  Simplifies derivation by integration more closely with flag init
flow.

* cleanup
2022-10-31 19:48:15 +00:00
Luke Kingland b8de6532fc
chore: delete command namespace (#1372)
* chore: delete command namespace

- Fixes bug where deleting by name fails if current path has no
  initialized function.
- Adds namespace test to delete command
- Moves namespace flag into delete command for
  - Better help text
  - Easier testing
- Sets static default namespace for flag to "default"

* fix comments/docs

* delete tests with nonexistent kubeconfig

* fix help text
2022-10-31 19:34:14 +00:00
Luke Kingland e9fb274969
feat: describe command namespace (#1381)
* fix: describe function

- Fixes error describing by name
- Adds ability to specify namespace
- Fixes inconsistency between Describe and Info

* fix misspelling

* clear test cmd args

* remove old doc file

* docs cleanup

* test describe with no kubeconfig
2022-10-31 19:03:12 +00:00
Luke Kingland 796e02984d
feat: registry globally configurable (#1392)
Deferred evaluation of cluster type is preserved by making registry a
helper in cmd and a calculated field of the global config struct.
2022-10-31 18:59:12 +00:00
Luke Kingland 0fa9359750
feat: namespace globally configurable (#1352)
* namespace global config

* integrate namespace config into commands

* comment updates

* combine config write tests

* updates per code review

* regen docs
2022-10-31 18:07:12 +00:00
Luke Kingland b1873083cb
feat: builder globally configurable (#1391) 2022-10-31 17:17:12 +00:00
knative-automation 5c64dcb1ef
upgrade to latest dependencies (#1386)
bumping knative.dev/pkg 6ce976c...6eb8f18:
  > 6eb8f18 Update community files (# 2626)
  > 5cbee02 Filter reactor FieldErrors on validation to only error-level alerts. (# 2611)
  > 198b463 Cleanup: Turn multiple warnings into multiple warnings. (# 2619)
  > 728dfd8 Add FieldError#WrappedErrors to allow dependent code to have access (readonly) (# 2618)
bumping knative.dev/serving b44de34...c737bb1:
  > c737bb1 Update net-certmanager nightly (# 13425)
  > 21fc2b2 upgrade to latest dependencies (# 13424)
  > 81ebd47 upgrade to latest dependencies (# 13423)
bumping knative.dev/hack 9d2ae47...566898d:
  > 566898d Update community files (# 242)
bumping knative.dev/networking 0f6a54a...cb26aa7:
  > cb26aa7 upgrade to latest dependencies (# 726)
bumping knative.dev/eventing cdb52cc...6ea012a:
  > 6ea012a Update community files (# 6588)
  > ecf7a29 upgrade to latest dependencies (# 6585)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-31 15:27:12 +00:00
knative-automation c9fabb424a
Update community files (#1342)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-31 15:08:12 +00:00
Luke Kingland c9b8d8e87c
fix: mock deployer method signature (#1389)
Updates the mock deployer to have the correct method signature
(match interface it is mocking). Usage is illustrated using a
refactored implementation of mock.NewDeployerWithResult.
2022-10-31 14:04:13 +00:00
Luke Kingland 55383b7e24
fix: KUBECONFIG unit test interference (#1387)
* fix: clear KUBECONFIG when testing

* fix nil pointer when no config exists

* update comments

* comments and cleanup
2022-10-31 10:04:13 +00:00
Luke Kingland d0448adb82
chore: ensure all tests clear cmd args (#1388) 2022-10-28 13:30:07 +00:00
Matej Vasek 79fa1f3883
fix: do not upload .git/ for on cluster build (#1383)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-28 12:59:07 +00:00
knative-automation 49b5c08783
upgrade to latest dependencies (#1382)
bumping knative.dev/pkg 714b763...6ce976c:
  > 6ce976c Default observability config if nil (# 2614)
  > ff95684 make METRICS_DOMAIN optional when backend is not OpenCensus (# 2617)
  > b2a3a39 upgrade to latest dependencies (# 2616)
  > 9823d96 Update community files (# 2615)
  > 5dd89c6 Support istio *List types where Items is an array of pointer types (# 2613)
  > b812aff Support fetching observability from ctx. (# 2610)
bumping knative.dev/serving e82287d...b44de34:
  > b44de34 Update net-gateway-api nightly (# 13422)
  > 3b35f78 Update net-contour nightly (# 13421)
  > 299aa96 upgrade to latest dependencies (# 13420)
  > 9e7150f upgrade to latest dependencies (# 13417)
  > 5411bd0 upgrade to latest dependencies (# 13415)
  > 4c99f48 Update community files (# 13413)
  > a6a18b8 updates HPA webhook api version (# 13411)
  > 0b88704 Update net-gateway-api nightly (# 13406)
bumping knative.dev/hack 3fdc50b...9d2ae47:
  > 9d2ae47 Update community files (# 241)
  > cf1a127 🎁 Use Knative ls-tags tool (# 238)
bumping knative.dev/networking 58f3e62...0f6a54a:
  > 0f6a54a upgrade to latest dependencies (# 725)
  > 2cbe3ef upgrade to latest dependencies (# 724)
  > 83b94f2 Update community files (# 723)
  > db966e7 fix http01 conformance tests (# 721)
  > fb5566f fix downstream tests (# 722)
bumping knative.dev/eventing 0fe923c...cdb52cc:
  > cdb52cc upgrade to latest dependencies (# 6582)
  > 39c914b upgrade to latest dependencies (# 6580)
  > 47c2635 Update community files (# 6579)
  > 98dfb5b Doing base64 encode in channel's responseBody (# 6542)
bumping knative.dev/client 0b99fc5...4a545d0:
  > 4a545d0 Update community files (# 1757)
  > 66307f2 Resolve Serving version to released tag (# 1755)
  > 699a888 Fix namespaced unit test (# 1753)

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-27 18:54:07 +00:00
Jefferson Ramos 98001dc351
fix: make socat image public and remove socat image env (#1384) 2022-10-26 15:37:58 +00:00
Matej Vasek ecc0916ef4
feat: defer OpenShift detection (#1375)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-24 03:40:16 +00:00
Lance Ball cfbb2125a3
chore: update README.md with proper links (#1380)
Adds links to the knative.dev website in place of local docs.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-24 03:38:16 +00:00
Matej Vasek 3194367e88
test: improve knative tests (#1378)
* test: knative integration test invokes function

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

* test: change Fatal->Error

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-22 04:34:15 +00:00
Jefferson Ramos a1b9bcff08
upgrade ci resources version (kubectl, knative, kind, tekton) (#1377) 2022-10-21 22:17:13 +00:00
Luke Kingland ffa0a4baa7
fix: config dir default empty (#1376) 2022-10-21 17:21:13 +00:00
Jefferson Ramos 36657691d4
update tekton wait condition for ci tests (#1374) 2022-10-21 15:12:14 +00:00
Matej Vasek cc063f79fc
feat: improve docker build and push output (#1364)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-21 14:10:17 +00:00
Luke Kingland fe81e235d3
fix: function errors prematurely (#1373)
The NewFunction constructor should only error on invalid paths; not
when the given path has not yet been initialized.
2022-10-21 12:56:14 +00:00
Luke Kingland 034e2de849
chore: global config file paths (#1344)
* feat: config members and paths

- Adds Builder, Namespace, Registry and Verbose as globally
  configurable.
- Fixes problems where file paths were being created or required when
  not necessary.
- Relocates environment variable usage to main's use of config
- Adds FUNC_CONFIG_PATH
- Only creates paths on disk when necessary
- Makes non-existent config paths nonfatal

* postpone adding some members
2022-10-21 10:38:13 +00:00
Lance Ball 16a20844f6
chore: add nodejs as a builder key (#1365)
The https://github.com/knative-sandbox/func-tastic repo uses "nodejs"
instead of "node" as the language runtime. This change makes it possible
for templates in the func-tastic language pack to work out of the box.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-20 17:16:12 +00:00
Jefferson Ramos f5470c009c
test: adding oncluster builds e2e tests for s2i supported runtimes (#1235)
* test: adding oncluster builds e2e tests for s2i supported runtimes

* fix: s2i tekton task with empty build envs
2022-10-20 08:29:12 +00:00
github-actions[bot] 236d66becd
chore: update Quarkus platform version to 2.13.3.Final (#1362)
Co-authored-by: Knative Automation <automation@knative.team>
2022-10-19 20:49:11 +00:00
Matej Vasek cdfeec5f18
test: fix condition and error message (#1361)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-19 12:57:11 +00:00
Luke Kingland a31d2e5e50
fix: docs generator needs not ldflags (#1354) 2022-10-19 07:20:11 +00:00
knative-automation 8fd0919be3
upgrade to latest dependencies (#1359)
bumping knative.dev/serving e82287d...e82287d:

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-19 03:00:11 +00:00
knative-automation b5ee750fdb
[main] Upgrade to latest dependencies (#1355)
* upgrade to latest dependencies

bumping knative.dev/eventing c5ef068...0fe923c:
  > 0fe923c Use knative/action/go/downstream-test (# 6573)
  > 53a186d Update pelletier/go-toml/v2 to v2.0.5 (# 6574)
bumping knative.dev/serving e95e99d...d108ba9:
  > d108ba9 Allow setting seccompProfile to enable using restricted security profile (# 13401)
  > 388128b Run queue proxy with restricted profile (# 13376)
  > 6e597fa Enable emptyDir volumes for Knative Services (# 13405)
  > 6264c1b Fix path validation when running tests on Windows (# 13400)
bumping knative.dev/client be74c58...16f26ba:
  > 16f26ba upgrade to latest dependencies (# 1750)
  > 0323f52 upgrade to latest dependencies (# 1749)
bumping github.com/tektoncd/cli ffd3f27...5147967:
  > 5147967 New version v0.23.1
  > 8fe7ac6 fix error while deleting pr without status
  > 013a5df This will fix the version command failing for chain and operator
  > b5a12e1 Updates the configMap name for Operator version
  > 85aa47f Adds namespace where operator is installed
  > ec7cf5e New version v0.23.0
bumping github.com/tektoncd/triggers 4365edb...8b4da3f:
  > 8b4da3f Bump Go version to 1.17.8
  > efadb65 Fix CEL example: Wrong Param Name
  > 645dbbb Build tekton triggers with golang 1.17
  > a89a8fd Add v0.19.0 docs link

Signed-off-by: Knative Automation <automation@knative.team>

* Fix Tekton version

Signed-off-by: Knative Automation <automation@knative.team>
Co-authored-by: David Simansky <dsimansk@redhat.com>
2022-10-18 21:40:10 +00:00
Matej Vasek d7d356b4dc
test: extended integration test for deployment (#1357)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-18 20:27:11 +00:00
Luke Kingland 4a051d15fe
chore: update deploy help text (#1351) 2022-10-18 03:09:10 +00:00
knative-automation ac081cc764
[main] Upgrade to latest dependencies (#1341)
* upgrade to latest dependencies

bumping sigs.k8s.io/json 9f7c6b3...f223a00:
  > f223a00 Merge pull request # 16 from kevindelgado/strict-error-path-separation
  > ff3dbbe Merge pull request # 14 from liggitt/go118
  > b536e95 store err type and path separately in strict errors
  > 227cbc7 Merge pull request # 15 from liggitt/ci-refresh-go
  > 4017094 sync go1.18 changes from encoding/json
  > 93e9748 Check latest go version in CI
bumping k8s.io/apimachinery 977e6d7...478dd6e:
  > 478dd6e Merge pull request # 112527 from liggitt/automated-cherry-pick-of-# 112526-upstream-release-1.25
  > 14bc1be Limit redirect proxy handling to redirected responses
  > 8252641 Merge pull request # 112330 from enj/automated-cherry-pick-of-# 112193-upstream-release-1.25
  > 10b456c Merge pull request # 112161 from pohly/automated-cherry-pick-of-# 112129-origin-release-1.25
  > 4759a80 Add an option for aggregator
  > 3296217 dependencies: update to ginkgo v2.1.6 and gomega v1.20.1
  > 117bd9b Merge pull request # 111113 from mimowo/retriable-pod-failures-job-controller
  > 74deb3d Merge pull request # 111696 from liggitt/go119mod
  > dbffa07 Support handling of pod failures with respect to the specified rules
  > fef5499 Update go.mod to go1.19
  > 41606c6 Merge pull request # 111677 from dims/stop-panic-in-govet-levee
  > 6627090 run lint-dependencies and follow directions
  > addc01f Stop panic in govet-levee CI job
  > f15b816 Merge pull request # 110495 from alexzielenski/atomic-objectreference
  > e68cae5 update kube-openapi
  > b541046 Merge pull request # 111557 from alexzielenski/update-smd-422
  > ace683f update smd to 4.2.3
  > 899984f Merge pull request # 111587 from ialidzhikov/k8s-utils@ee6ede2d64
  > c77a8ed Update `k8s.io/utils` to `ee6ede2d64ed`
  > 954536d Merge pull request # 111450 from HecarimV/fix-22072710
  > d58901c Merge pull request # 111454 from HecarimV/fix-log-capitalized
  > a9b0d05 cleanup: omit redundant arguments in make call
  > 8b07078 Merge pull request # 111496 from HecarimV/unnecessary-fmt
  > 1be2ea2 cleanup: fix some error log capitalization
  > 3bab4b1 Remove unnecessary use of fmt.Sprintf
  > 47ba8cb Merge pull request # 111442 from ialidzhikov/k8s-utils@56c0de1e6f
  > 0a1c3aa Update `k8s.io/utils` to `9bab9ef40391`
  > 7fb0342 Merge pull request # 111254 from dims/update-to-golang-1.19-rc2
  > 9652184 Merge pull request # 106388 from alexzielenski/ssa-ignore-nonsemantic-changes
  > fdf7942 Generate and format files
  > 915d89a Merge pull request # 111173 from BinacsLee/binacs/regenerate-sets
  > 65bf58a optimize nil and empty also for slices
  > 0661104 Merge pull request # 110178 from kevindelgado/validation-beta-1-25
  > fb683c6 Re-Generate k8s.io/apimachinery/pkg/util/sets
  > 6586a12 optimize nil and empty case for parity with other branch
  > 5d375c1 update kjson
  > 019f1e1 revert timestamp updates to object if non-managed fields do not change
  > cff14a5 Merge pull request # 111081 from HecarimV/fix-22071210
  > afc5e00 Merge pull request # 111008 from cici37/bumpCEL
  > 6f7b214 Fix: some typo in apimachinery/pkg
  > 51e28bc Merge pull request # 111097 from saltbo/fix-thethe-typo
  > cd7836f Bump cel-go to v0.12.0
  > 5074e27 fix: update the typo code comment
  > 0897ed8 Merge pull request # 108532 from cbandy/status-cause
  > 9cb1f71 Merge pull request # 110916 from zhoumingcheng/master-code-v1
  > 9291eff api/errors: Improve performance of Is* functions
  > 4afd3f4 Merge pull request # 109111 from chendave/ginkgo_upstream
  > 8c521e1 Fix a typo
  > 1eec2ee Use errors.As to detect wrapping in StatusCause
  > c87322d update ginkgo from v1 to v2 and gomega to 1.19.0
  > 2496976 Merge pull request # 111001 from pohly/klog-update
  > d40a017 build: update to klog v2.70.1
  > a869692 Merge pull request # 110831 from chendave/openapi
  > e4283bb Bump `kube-openapi` to the latest
  > 66bbc50 Merge pull request # 110788 from 21kyu/change_reflect_ptr
  > 55378ba Change reflect.Ptr to reflect.Pointer
  > e74e8a9 Merge pull request # 110724 from pohly/klog-update
  > 21dbaf7 build: update to klog v2.70.0
  > eda93e0 Merge pull request # 110448 from twilight0620/test0608
  > c5be385 Merge pull request # 110378 from lucacome/bump-grpc
  > 6243438 add some uts of group_version.go
  > bae69c6 Bump grpc to v1.47.0
  > b90ea24 Merge pull request # 110520 from dims/update-gopkg.in/yaml.v3-to-v3.0.1
  > 1831736 Update gopkg.in/yaml.v3 to v3.0.1
  > d407afb Merge pull request # 110351 from dims/switch-to-v3-of-github.com/emicklei/go-restful
  > 5e1e879 Switch to v3 of github.com/emicklei/go-restful
  > be3a79b Merge pull request # 109892 from jlsong01/add_annotation_comments
  > 5abf6e2 Merge pull request # 110207 from wojtek-t/clean_shutdown_managers
  > 21bf400 clarify a comment on annotation key validation
  > be75d4d Make contextForChannel public
  > e3c6631 Merge pull request # 110079 from ash2k/dial-with-context
  > e929c35 Always dial using a context
  > e572490 Merge pull request # 109752 from MadhavJivrajani/remove-apimachinery-clocks
  > e11374f Merge pull request # 110040 from astoycos/fix-panic
  > 5526e82 apimachinery/clock: Delete the clock package
  > ca5c89b Merge pull request # 110029 from ash2k/ash2k/no-double-tls-validation
  > 7c09d67 Fix additional panic
  > 4f2ae94 tls.Dial() validates hostname, no need to do that manually
  > ec91382 Write Unit test to imitate Panic
  > 28c7554 Merge pull request # 109651 from ash2k/ash2k/spdy-cleanup
  > f3b1305 Merge pull request # 108080 from astoycos/issue-132
  > 284911f Pass context for TLS dial
  > 1c398d5 Merge pull request # 107213 from mk46/portname_validation
  > 912a38b Fix Panic Condition
  > f1ceaed Don't clone headers twice
  > 4778951 Merge pull request # 109891 from pohly/log-dependency-update
  > b243f86 Fixed portName validation error message.
  > b85d889 Merge pull request # 109602 from lavalamp/remove-clustername
  > 1c1f82a dependencies: logr and zapr v1.2.3
  > 0ac710b generated files
  > 430b920 Remove ClusterName
  > 5f6d692 Merge pull request # 109804 from cici37/celUpdate
  > a5de00b Merge pull request # 109750 from aojea/spdy_tls
  > b6901b9 Update go-control-plane, cncf/xds/go, cncf/udpa/go and remove unused versions
  > b042ede Merge pull request # 109440 from liggitt/gomod-1.18
  > e57894b spdyroundtripper: d tlson't verify hostname twice
  > 535f064 Update GRPC
  > 92ee148 Regenerate vendor
  > 1564fe5 spdyroundrippter: close the connection if tls handshake fails
  > 5ac2923 Update genproto and antlr.
  > f71cc27 Merge pull request # 109259 from roycaihw/tweak-quantity-docs
  > 54c2bc0 Bump cel-go to v0.11.2
  > 080c0c7 Merge pull request # 109212 from alexzielenski/copylock-fix
  > af9793b Generated files
  > cf0bfa9 Tweak Quantity docstring for ease of reference generation
bumping knative.dev/pkg 8cacac2...714b763:
  > 714b763 upgrade to latest dependencies (# 2609)
  > 21d3b47 upgrade to latest dependencies (# 2608)
  > 8178c38 update k8s to 1.25.2 (# 2599)
  > fb2e4fb Preserve webhook namespaceSelector.matchLabels (# 2605)
  > 5c5da28 Update actions (# 2607)
  > 1fb3e67 Update community files (# 2606)
  > bc93b0a bump min kubernetes to v1.23 (# 2595)

Signed-off-by: Knative Automation <automation@knative.team>

* Fix k8s deps

* Regen licenes

* Fix go.mod

Signed-off-by: Knative Automation <automation@knative.team>
Co-authored-by: David Simansky <dsimansk@redhat.com>
2022-10-17 20:47:09 +00:00
Matej Vasek d536b799f2
On cluster build without VCS (#1298)
* refactor: attach() and podReady() more general

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

* feat: added function for upload to a volume

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

* refactor: extract defaultSecurityContext

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

* fix: added runtime type check

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

* feat: allow on-cluster-build without VCS

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

* fix: reword error message

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

* fix: runtime type check

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

* test: e2e test for direct upload on-cluster-build

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Lance Ball <lball@redhat.com>
2022-10-17 19:52:11 +00:00
github-actions[bot] 9071312b5b
chore: update Quarkus platform version to 2.13.2.Final (#1348)
Co-authored-by: Knative Automation <automation@knative.team>
2022-10-17 16:17:10 +00:00
Matej Vasek 8db13d690c
fix: Quarkus version update action (#1347)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-17 14:05:59 +00:00
Jefferson Ramos c740b11095
fix: use proper tmp dir for oncluster e2e tests (#1346) 2022-10-17 11:51:57 +00:00
Matej Vasek ee49339bc4
fix: use proper temp dir for funs in e2e tests (#1345)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-17 10:51:57 +00:00
knative-automation c685a82e7f
Update actions (#1343)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-17 02:10:56 +00:00
Lance Ball 47d5082dcf
chore: update image tag in tekton pipeline (#1340)
We are now producing `func` images in the knative org.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-14 19:27:54 +00:00
Matej Vasek 8ac4941b67
test: initial integration test for knative related functionality (#1338)
* test: init integration test for knative pkg

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

* fixup: added test for scaling and direct envvar

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-14 18:01:54 +00:00
Zbynek Roubalik 3c195d29cd
chore: add link to the roadmap in the Readme (#1337)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-10-14 11:35:54 +00:00
Matej Vasek dce1e75328
feat: cancel pipeline run on CTRL^C (#1329)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-14 08:22:53 +00:00
Luke Kingland 3a99f1f963
update CLI deps (cobra, viper, etc) (#1326) 2022-10-14 08:21:53 +00:00
Matej Vasek 46b09e28fa
cleanup: removed unused functions (#1336)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-14 00:14:53 +00:00
Lance Ball 792e754aa4
chore: bump node and golang actions to latest (#1328)
See: https://github.com/knative/func/actions/runs/3242685285

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-14 00:04:53 +00:00
Matej Vasek 1aca4a9553
test: added test for get pod's logs (#1330)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-13 23:55:53 +00:00
Matej Vasek 631f5aae1e
test: appease coverage gods (#1334)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-13 23:49:53 +00:00
Lance Ball d60688d2d2
chore: fix codecov.yaml (#1335)
* chore: fix codecov.yaml

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

* fixup: remove explicit generated file

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-13 22:37:53 +00:00
Matej Vasek e584b7611f
chore: update codecov config (#1332)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-13 21:38:53 +00:00
Matej Vasek 7a88eb48bc
test: test for docker runner (#1331)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-13 20:54:53 +00:00
Lance Ball 5adec03c7b
chore: update all references to kn-plugin-func (#1311)
* chore: update all references to kn-plugin-func

I did not change references in CHANGELOG.md but otherwise, I believe
this should cover all configuration settings, image names, package
names, etc.

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

* fixup: fix instances_test.go

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

* fixup: still some stray kn-plugin-func

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-13 16:31:53 +00:00
Lance Ball 4961298264
chore: more changes to CI workflow (#1327)
Set up the cluster and such for integration tests. Move template tests
to the Unit Test section. Hopefully this works now.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-13 13:18:53 +00:00
Lance Ball a74e825a2e
chore: fix ci.yaml (#1324)
The `needs` contexts were pointing to old job steps.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-12 20:44:52 +00:00
Lance Ball 9536e336af
chore: update CI to run unit+integration on main (#1319)
* chore: update CI to run unit+integration on main

This commit modifies the Ci jobs that run when commits land on `main`,
splitting the one job into three: check, test-unit and test-integration.
Code coverage stats are included for both test runs.

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

* fixup: remove stray java stuff

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-12 19:50:52 +00:00
Adam Boczek 1b94698f56
fix: the --registry flag is ignored when image: <imagename> exists in func.yaml (#1310)
* fix: add handling in case of differences between registry value and image tag (#1297)

* fix: add additional test cases (#1297)
2022-10-12 14:42:52 +00:00
Lance Ball cc0fb82e89
chore: add unit test cases for instances (#1314)
* chore: add unit test cases for instances

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

* fixup: account for windows

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

* fixup: account for windows for real

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-12 14:16:51 +00:00
Lance Ball 318d3e1621
chore: change Makefile for multiple tags at HEAD (#1252)
With the move to the full Knative release train, we now get two tags on
HEAD for the release commit. In the current case, it was `v0.34.0` for
the "internal" version, and `knative-1.7.0`. The Makefile attempts to
determine the version for static linking by looking at the tag at HEAD.
With the git command returning two tags, `make` broke. This change takes
the first of the two tags (will always be `knative-x.x.x`) which I think
is less confusing for CLI users than `v0.34.0`.

I've also updated docs with a couple of changes that weren't reflected
there but landed in 1.7.

Finally, I've removed versions.txt as that is no longer used, and
docs/RELEASING.md as our processes have changed.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-12 11:45:53 +00:00
knative-automation 6b8cccbbf9
upgrade to latest dependencies (#1269)
bumping github.com/prometheus/common 2af6d03...49b3603:
  > 49b3603 Improve OAuth2 user agent handling (# 391)
  > c5e1b60 config: ignore deprecated warning in tests (# 389)
  > b86ea81 OAuth2: Respect disable keepalives option; Implement close idle connections (# 390)
  > cdc09f0 Merge pull request # 387 from roidelapluie/useragent
  > d75e027 Merge pull request # 388 from simonpasquier/fix-tls-tests-for-go-1.18
  > db0284d Fix comment
  > 26d4974 Add more mimetypes (# 385)
  > aeda642 Update to Go 1.18
  > 2d0de85 Use full roundtripper
  > 627089d Set minimum version for go to 1.16 (# 372)
  > 5ab1c85 config: fix testdata for Go 1.18
  > 316097c Use WithUserAgent
  > 3763a1d TLS config: Enable selection of min TLS version (# 375)
  > 99a1aca add User-Agent header to oauth2 requests
  > 0c7319a Remove comment about PROMETHEUS_COMMON_DISABLE_HTTP2 env var because it is no longer true
  > 840c039 Use path.Clean to clean sigv4 path.
  > ffd0efb Deduplicate slashes for sigv4 signature
  > 902cb39 Merge pull request # 365 from prometheus/superq/bump_sigv4
  > 2c24277 Merge pull request # 362 from prometheus/repo_sync
  > 910a9df Update sigv4 modules
  > f6b0912 Merge pull request # 353 from prometheus/superq/bump_go
  > e457c0a Update common Prometheus files
  > 0e1254b Merge pull request # 359 from prometheus/repo_sync
  > 3c43b4d Update build/test
  > 252ff6f Make HTTP2 user visible
  > 809633a Update common Prometheus files
  > 00591a3 circleci: Test with go 1.17 (# 347)
  > 0762b59 Add proxy_url support for oauth2
  > f57586d circleci: add test-assets and style jobs
  > 1871a70 assets: add file system layer for zipped embed assets
  > ce7006e Update common Prometheus files (# 344)
  > 88ce30c Update common Prometheus files (# 340)
  > 88f1636 Remove github.com/pkg/errors dependency (# 338)
bumping contrib.go.opencensus.io/exporter/prometheus f3a7283...e6b6b80:
  > e6b6b80 Merge pull request # 30 from bogdandrutu/updatedeps
  > aaaf212 Merge pull request # 28 from wincus/update-prometheus
  > 75046ad Upgrade all deps to lastest
  > bf25aba update prometheus golang client
bumping golang.org/x/net 0bcc04d...f2f64eb:
  > f2f64eb http2: Send WindowUpdates when remaining bytes are below a threshold
  > ca03788 dns/dnsmessage: remove unnecessary []byte conversions
  > 0081b4b http2/h2c: propagate HTTP/1 server configuration to HTTP/2
  > f8f703f http2: accept HEAD requests with a body
  > bea034e all: remove redundant type conversion
  > 1e95f45 http/httpproxy: remove comment on https proxy precedance
  > f3363e0 http2: handle server errors after sending GOAWAY
  > 83b083e internal/socket: add missing import to zos-s390x file
  > b0a4917 dns/dnsmessage: use exported MustNewName in example
  > 3211cb9 nettest: fix Unix socket test on macOS
  > 4c34ddd http2: delete multipart form tempfiles after ServeHTTP returns
  > 1d4ff48 http2: add DialTLSContext to Transport
  > 13a9a73 http2: fix conn flow control when stream closes on bad content-length
  > 07c6da5 dns/dnsmessage: add AD and CD bits support
  > f428fae all: add FreeBSD riscv64 support
  > a33c5aa route: import syscall rather than golang.org/x/sys/unix
  > 7431dee lif: import syscall rather than golang.org/x/sys/unix

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-10-12 05:44:51 +00:00
Gabriel Freites 9c3118a54e
Func unit testing first approach (#1312)
* fixed typos on test readme.md

* added my first unit tests to func repo builder errors
2022-10-12 04:41:51 +00:00
Matej Vasek bf52811f18
chore: use t.Cleanup() more (#1315)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-11 15:48:50 +00:00
Lance Ball 3f5933ec73
chore: update release script to use knative org (#1306)
Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-10 13:21:37 +00:00
Lance Ball 1a54a8d78a
chore: add coverage for integration tests (#1307)
Added coverage output for integration test, and added codecov uploads
for both integration and unit tests.

This commit changes the output file to coverage.txt as well, in order to
be consistent with knative test infrastructure.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-10-10 13:18:35 +00:00
Gunjan Vyas 06ade524de
feat: interactive prompt for on-cluster deploy (#1300)
* feat: interactive prompt for on-cluster deploy

* changed the prompt type to survey.Confirm
2022-10-06 18:31:32 +00:00
github-actions[bot] 7bd95e5d54
chore: update Quarkus platform version to 2.13.1.Final (#1302)
Co-authored-by: Knative Automation <automation@knative.team>
2022-10-06 18:26:32 +00:00
Lance Ball 1c6d3bab49
chore: update docs README.md (#1301)
* chore: update docs README.md

Removed a lingering reference to Boson and accepted Grammarly
reccomendations.

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>
2022-10-06 18:03:31 +00:00
Ali Ok 1a6c42f01b
Fix a typo in Quarkus template README.md (#1296)
* Update README.md

* fixup: updated zz_filesystem_generated.go

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2022-10-05 12:45:29 +00:00
Luke Kingland 69659e3036
fix: missing close of manifests (#1299) 2022-10-05 09:30:31 +00:00
github-actions[bot] ecd75430a1
chore: update Quarkus platform version to 2.13.0.Final (#1290)
Co-authored-by: Knative Automation <automation@knative.team>
2022-10-04 14:01:29 +00:00
Luke Kingland c9861ec24e
chore: cmd test cleanup (#1289)
All tests which are directory-sensitive now also:
- reset viper
- use t.Cleanup
- use t.TempDir
- use a clean XDG_CONFIG_HOME
- specify explict name when creating
- moves helpers to root_test
2022-10-03 22:03:28 +00:00
Matej Vasek dc14ec7753
feat: ksvc log on (first) deploy (#1286)
Print ksvc pods log on (first) deploy for better debugging.

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-10-03 22:02:28 +00:00
Matej Vasek abc4de5b8f
feat: always pull base image for s2i builds (#1292)
Make sure that we use latest image with security fixes.

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-29 11:41:18 +00:00
knative-automation b09a84877b
Update community files (#1291)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-09-29 02:48:16 +00:00
knative-automation e041bc84eb
Update community files (#1288)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-09-28 03:09:16 +00:00
Zbynek Roubalik 047a6d875d
chore: ability to install only Tekton Tasks (#1284)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-27 15:36:15 +00:00
David Simansky e0bbcc2d08
chore: Refactor use of deprecated io/ioutil package (#1285) 2022-09-27 13:28:15 +00:00
salaboy c86cc0f5f7
[chore] increase labels, envs and volumes test coverage (#1276)
* test to see coverage increase

* adding env string and edge case coverage

* adding volumes string and edge case coverage
2022-09-27 09:05:14 +00:00
Luke Kingland 322acc7caa
fix: default readiness endpoint (#1282) 2022-09-26 16:35:13 +00:00
Luke Kingland 4c8f730099
feat: readonly global config (#1260)
* improved deploy test output

* remove unused config struct

* feat: read-only global config

Co-authored-by: Lance Ball <lball@redhat.com>
2022-09-23 17:49:13 +00:00
David Simansky 4be773d9f6
chore: Update versions of major libraries used (#1277)
* Update buildpacks/pack deps

* Update tektoncd/cli deps

* Regen Linux only licenses

* Downgrade hinshin/vt10x to required version

* Fix deprecated warning in ssh config
2022-09-23 17:46:13 +00:00
Luke Kingland 63af791e9f
fix: always use function's namespace when invoking remote (#1258)
* fix: always use function's namespace when invoking remote

* test

* Apply suggestions from code review

Co-authored-by: Matej Vasek <matejvasek@gmail.com>
2022-09-23 12:42:13 +00:00
salaboy fe0368a793
[feat] refactoring func.yaml struct to match cmd lifecycle (#1254)
* rebased and updated func struct

* fixing migration to 1.0.0 struct

* fixing on cluster tests

* updaating migration version to 0.34.0

* adding tests for marshalling and migration errors

* adding EOF new line

* updating migrations

* fixing wrong name

* fixing marshalling test

* adding EOF line

* fixing assertion
2022-09-22 20:22:12 +00:00
Matej Vasek d038f6c73e
fix: stdin interactivity check (#1271)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-22 13:13:12 +00:00
Matej Vasek 56b56a5559
Testing cleanup (#1272)
* chore: replace WithEnvVar -> t.Setenv()

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

* chore: replace defer with t.Cleanup()

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

* chore: remove unused function

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

* fix: os.Hostname -> os.UserHomeDir

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-22 13:12:12 +00:00
Matej Vasek 2988f0c06b
fix: nil deref when custom builder image (#1273)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-22 13:00:12 +00:00
Lance Ball 44ff20d782
chore: remove timestamp from generated docs (#1265)
This is causing trouble with new PRs that potentially change CLI flags
or other user-facing UX. Another option besides completely removing the
version information is to modify Version.StringVerbose() so that it uses
the value of the most recent semver tag (or Knative tag).

```
❯ git describe --match "v*"
v0.34.0-6-g6d26e64c

❯ git describe --match "knative*"
knative-v1.7.0-6-g6d26e64c
```

This is nice, but could be misleading if the UX has changed since that
release.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-09-21 13:55:10 +00:00
David Simansky 4979e03357
Update Go version to 1.18 (#1262) 2022-09-21 13:09:11 +00:00
salaboy ce6d0a7b47
[chore] updating codecov configs (#1270)
Updating Codecov configs following kn/client, ignoring `tests` and `hack` dir
2022-09-21 13:06:10 +00:00
salaboy 93cb8b82ac
Adding Codecov badge to readme (#1264) 2022-09-21 07:43:10 +00:00
Matej Vasek 15368599cd
chore: linkage assignable socatImage (#1266)
var can be set at build (link) time as opposed to const

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-21 04:34:09 +00:00
Matej Vasek dfff8aa00a
fix: registry prompt result being ignored (#1268)
* fix: registry prompt result being ignored

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

* fixup

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

* fixup

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-21 04:28:09 +00:00
github-actions[bot] 74b57c2a65
chore: update Quarkus platform version to 2.12.3.Final (#1267)
Co-authored-by: Knative Automation <automation@knative.team>
2022-09-20 21:01:09 +00:00
Matej Vasek 6d26e64c2e
fix: validation of function name (#1263)
function name must be DNS 1123 Label

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-20 15:36:11 +00:00
Zbynek Roubalik 50243c740a
feat: `invoke` - allow insecure connections over SSL (#1255)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-20 12:25:10 +00:00
Zbynek Roubalik 3d6ef471b7
chore: sync docs with source code (#1261)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-20 11:54:09 +00:00
knative-automation abc3097d75
[main] Upgrade to latest dependencies (#1248)
* upgrade to latest dependencies

bumping k8s.io/kube-openapi 4241196...3ee0da9:
  > 3ee0da9 Merge pull request # 299 from Jefftree/def-optimize
  > 3a31a64 Merge pull request # 292 from Jefftree/v2v3conv
  > ba6f675 Optimize Definition generation
  > e69a86c Merge pull request # 298 from Jefftree/allOf
  > 2cbad14 Add OpenAPIConv
  > 9f9c01d Merge pull request # 297 from cici37/errFix
  > 207f0c7 Wrap Refs with AllOf
  > 29d7264 Merge pull request # 295 from Jefftree/fix-api-json
  > d2a55e8 Align maxProperties/minProperties err value with others
  > 52feaf8 Merge pull request # 290 from jiahuif/feature/prune-v2-when-serving-v3
  > 352e363 Fix json encoding for OpenAPI v3 Discovery
  > 662cbb0 Return valid for kubernetes to handle err properly
  > 13192b9 Merge pull request # 289 from jiahuif/feature/openapi-oneof-type
  > 2580423 remove embedded v2 from expected schema
  > 8a7ee80 Merge pull request # 293 from alexzielenski/cache-busting
  > 79a5a7d generated: update integration test.
  > d436835 add test for pruning v2 schema.
  > 6a7b704 Merge pull request # 291 from Jefftree/builder3-test
  > de6f8b0 split openapi mock class into Fake and FakeV3
  > da7e27a add integration test for v3 OneOf
  > eca4f62 do not include v2 schema when serving v3.
  > 89ac9db Merge pull request # 284 from Jefftree/cache-busting
  > 7afa56c Add test for builder3
  > 3ca26f0 address comments
  > 697543f add support for custom v3 oneOf types.
  > ddc6692 Merge pull request # 288 from Jefftree/gnostic-fix
  > b0d7548 Cache busting
  > 130db2b add wrapper around gnostic v3 document
  > a9dfcaa Merge pull request # 286 from Jefftree/leading-newline
  > 91ab739 Update gnostic to drop jsonschema dependency
  > 3f90b8c Merge pull request # 282 from alexzielenski/header_vendorext_marshal
  > c7e0de3 Merge pull request # 285 from Jefftree/proto-upgrade
  > 7626df5 Trim leading newlines in Descriptions
  > 1cd4920 add vendor extensions to marshal openapi v2 header
  > 86aaf54 Upgrade protobuf and change references of googleapis/gnostic -> google/gnostic

Signed-off-by: Knative Automation <automation@knative.team>

* Fix client-go version

* Add missing license file

* Add another missing license file

Signed-off-by: Knative Automation <automation@knative.team>
Co-authored-by: David Simansky <dsimansk@redhat.com>
2022-09-20 11:17:09 +00:00
Luke Kingland 4b2bdc9b8a
fix: incorrect deploy namespace warnings (#1257) 2022-09-20 02:34:09 +00:00
Adam Boczek e1e33370d3
fix: add extra request to template cmd to avoid subsequent if repo does not exist (#1206) (#1249) 2022-09-19 12:43:08 +00:00
knative-automation 155b6f158f
upgrade to latest dependencies (#1245)
bumping k8s.io/klog/v2 43cc75f...0990e81:
  > 0990e81 Merge pull request # 342 from pohly/harshanarayana-reviewer
  > 33351c0 Merge pull request # 341 from pohly/contextual-logging-state-fix
  > 442891b OWNERS: add harshanarayana
  > ea66a13 Merge pull request # 337 from pohly/testing-logger-stop
  > c2d5a45 contextual logging: enable by default again
  > 7a070b4 Merge pull request # 333 from harshanarayana/tests/GIT-275-add-additional-test-for-kv
  > 9405f8e ktesting: stop using testing.T when test completes
  > 265aa25 Merge pull request # 327 from pohly/buffer-logger
  > 280fc18 GIT-275: add tests for int and struct keys
  > 78f38f6 ktesting: fix type assertion
  > ca252b1 Merge pull request # 328 from pohly/fatal-backtrace-revert
  > 325472d ktesting: capture log data in memory
  > 66544b3 ktesting: use black box testing
  > 49e17d5 Merge pull request # 332 from harshanarayana/bug/GIT-331/fix-variable-shadown
  > c5c3132 klog.Fatal: document behavior and alternatives
  > 6b3fb0b Merge pull request # 329 from pohly/apidiff-fix
  > 9c48b7d Merge pull request # 330 from pohly/logtools-removal
  > e4329d2 GIT-331: fix shadowing key from the kv pair
  > c977919 klog.Fatal: revert dumping of all stack backtraces to stderr
  > ea35802 Merge pull request # 320 from pohly/state-restore
  > 49d73a5 GitHub: use apidiff with more recent Go
  > e9884d2 remove hack/tools
  > a585df9 Merge pull request # 326 from pohly/remove-trim-duplicates
  > 3c90bf9 refactor global state
  > 788efcd Merge pull request # 325 from pohly/logr-marshaler
  > cebb190 internal: remove unused TrimDuplicates
  > 296f5e6 save and restore state
  > 42bf7a2 Merge pull request # 322 from pohly/kobjs-performance
  > 369b848 support logr.Marshaler
  > cc2ce06 Merge pull request # 315 from pohly/logcheck-regexp
  > 87ca629 Merge pull request # 324 from pohly/trim-duplicates
  > 8a3e48e replace KObjs with KObjSlice
  > c697110 Merge pull request # 314 from pohly/stop-flush-daemon-clarification
  > 5079582 logcheck: fix detection of invalid * regexp in filter
  > 7a827a0 Merge pull request # 319 from pohly/klog-help-texts
  > 4c3943c use faster MergeKVs
  > ff92e06 test: add benchmark for KObjs
  > d07cbbf Merge pull request # 313 from pohly/logcheck-contextual-logging
  > 47f254f StopFlushDaemon: document flushing on shutdown
  > 2910cb1 README.md: clarify -logtostderr
  > 6f47a32 klogr: simplify test failure message
  > 4a4a786 Merge pull request # 297 from pohly/logcheck-contextual-logging
  > 7179178 hack/tools: drop dependency on golangci-lint
  > e2432e8 serialize: add MergeKVs as faster TrimDuplicates alternative
  > b46e95d Merge pull request # 311 from pohly/contextual-logging-stable
  > 1876dee logcheck: harmonize report messages
  > e6d69a5 serialize: benchmark and test TrimDuplicates
  > 7b1c318 Merge pull request # 310 from pohly/fork-clock
  > 36e44e7 promote non-test APIs to stable
  > 216a02e logcheck: add check for With* and NewContext
  > e3af9af dependencies: avoid k8s.io/utils, fork clock code instead
  > 317fe52 logcheck: optionally warn about using direct klog logging
  > 41995aa logcheck: detect if V().Enabled()
  > 5b4c326 logcheck: warn about functions with both Logger and Context
  > 567c037 logcheck: support logr.Logger
  > c4c35ff logcheck: support import renaming and improve klog.V(2) handling
  > df531eb logcheck: support running as golangci-lint plugin
  > 3f08024 logcheck: also check for format specifier in calls like klog.Info
  > 0c36cf7 logcheck: move into package
  > 93980ca logcheck: add test cases for parameter check
bumping knative.dev/pkg e325df6...4a03844:
  > 4a03844 fix double close of channel (# 2575)
  > f78a006 upgrade to latest dependencies (# 2573)
  > d02dcd0 allow drainer to be reset (# 2572)
  > 894c2f2 SetupStaticPublishing and SetupDynamicPublishing returns Tracer with Shutdown function (# 2566)
  > 4f6a775 Remove pkg/pool (# 2568)
  > 9a1245b Update actions (# 2571)
  > 0049fdd Update community files (# 2570)
  > 52261a1 Update community files (# 2569)
  > 7b8b060 Add tracing.SetupDynamicPublishingWithInitialValue (# 2558)
  > a01dfed bump to k8s 0.23.9 (# 2565)
  > 449f7e6 Update community files (# 2564)
  > ed7ab1d upgrade to latest dependencies (# 2559)
  > 6c9c1c6 remove defunct markdown linting variable (# 2552)
  > 3764d73 fix linting (# 2555)
  > a286510 upgrade to latest dependencies (# 2554)
  > 1a5e168 Update community files (# 2553)
  > c488837 Add reconcile for ValidatingWebhookConfiguration and MutatingWebhookConfiguration. (# 2550)
  > 1ad02a5 Drop error from changeset.Get signature (# 2549)
  > 473ba31 Bump min go version to  1.18 && read build info from embedded binary (# 2548)
  > f1f36a2 Fix subresource update logic. (# 2546)
  > 418e138 Update community files (# 2545)
  > e60d250 upgrade to latest dependencies (# 2543)
  > 97eb150 Update community files (# 2541)
  > 5569169 update boilerplate date (# 2539)
  > 85965e1 upgrade to latest dependencies (# 2540)
  > f4ae0af Update community files (# 2538)
  > f5db225 Drop `UserInfo` from logger tagging in webhook. (# 2535)
  > 1777513 Update actions (# 2536)
  > 9c5a731 bump k8s deps to v0.23.8 (# 2534)
  > 1f01575 Add fix for CVE-2022-28948 (# 2532)
  > 7d607d6 Update community files (# 2531)
  > 865e331 Update community files (# 2530)
  > ec27457 Update community files (# 2529)
  > 759dd87 Update community files (# 2528)
  > aad4309 sets mutating webhook ReinvocationPolicy to ifNeeded (# 2472)
  > 9ffe192 Update community files (# 2527)
  > bac16f2 Update community files (# 2525)
  > 18f6995 Log metrics/logging init messages at debug level (# 2522)
  > 19adf79 upgrade to latest dependencies (# 2524)
  > b0ff5ad Update actions (# 2523)
  > f907b31 Update community files (# 2520)
  > 2d8305b Update community files (# 2517)
  > a8b7d99 Update community files (# 2515)
  > 0719b40 upgrade to latest dependencies (# 2512)
  > 2451664 Switch to iota/fmt.Stringer-based diagnostic levels. (# 2511)
  > ea3c8cb Fix timeout test on darwin and log dial destination on timeout. (# 2510)
  > af54d73 Support fetching configs from `ctx`. (# 2505)
  > 5f5455f Use the updated action that infers the module name (# 2509)
  > 4fced01 Use knative/action/go/downstream-test (# 2507)
  > 16b36b7 Add support for admission webhook warnings. (# 2498)
  > 6ec9c1a Fix linting (# 2506)
  > 5c8cc3c Ignore migration of CRDs that aren't installed (# 2493)
  > 2d552be Add genreconcile for core/v1 Node (# 2503)
  > fd05bf1 upgrade to latest dependencies (# 2500)
  > 1f681e1 Update community files (# 2501)
  > 45c37c2 🐛 `TestDialWithBackoff` work without special environment (# 2402)
  > 12be060 Update actions (# 2492)
bumping k8s.io/apiextensions-apiserver 75190f0...cf300a6:
  > cf300a6 Update dependencies to v0.23.9 tag
  > 99b3fbf Merge pull request # 108791 from aojea/cherry-pick-108772
  > 276c5e1 client-go: update generated
  > 7e8010d Merge pull request # 108438 from andrewsykim/bump-konnectivity-v0.0.29-1-23
  > d71faf1 bump sigs.k8s.io/apiserver-network-proxy/konnectivity-client@v0.0.30
bumping knative.dev/client c53658b...6d86bf7:
  > 6d86bf7 upgrade to latest dependencies (# 1727)
  > be439e1 upgrade to latest dependencies (# 1725)
  > 6c81567 added gvr sink test cases and support to specify resource name in both singular/plural versions (# 1724)
  > 76b3724 Update community files (# 1726)
  > a4a1163 upgrade to latest dependencies (# 1719)
  > 8142687 Update actions (# 1721)
  > 7d05561 Update community files (# 1720)
  > fa2ea50 Update community files (# 1718)
  > bf20fe2 Add support for providing sink spec in GVR format (# 1717)
  > ebc6729 upgrade to latest dependencies (# 1716)
  > e918cd2 Bump Go version to 1.18 (# 1715)
  > 664b899 upgrade to latest dependencies (# 1714)
  > 559a4bd upgrade to latest dependencies (# 1711)
  > 05ccf8e Fix volume creation for PVC (# 1709)
  > 526d680 Update community files (# 1710)
  > ed5fed5 upgrade to latest dependencies (# 1708)
  > 2f1eefe Add check for PVC status in E2E tests (# 1707)
  > 452863f remove defunct markdown linting variable (# 1705)
  > cbf710a Update community files (# 1706)
  > 5251985 Update community files (# 1703)
  > bfdc0a2 upgrade to latest dependencies (# 1702)
  > 61579a2 Added --broker-config flag to broker create command (# 1700)
  > 9abb876 Add --probe-liveness and --probe-readiness flags (# 1697)
  > f2dd5fc upgrade to latest dependencies (# 1701)
  > 8931db0 Add release note section to PR template (# 1692)
  > e650378 upgrade to latest dependencies (# 1699)
  > cfed6d7 upgrade to latest dependencies (# 1694)
  > c23a1f7 Added PVC support to volume mounts (# 1693)
  > e2e0632 Update community files (# 1698)
  > 06a463f Update community files (# 1696)
  > 458a6b7 Update actions (# 1695)
  > b696546 Added support for mounting EmptyDir volume type (# 1679)
  > 1b03977 upgrade to latest dependencies (# 1690)
  > 56e1462 upgrade to latest dependencies (# 1688)
  > ada0005 Update community files (# 1689)
  > 95f6a55 Update community files (# 1687)
  > 9b04077 Update community files (# 1686)
  > 6210f96 Update community files (# 1685)
  > 7ac23db Update community files (# 1683)
  > 363ec94 Update community files (# 1682)
  > 0646532 upgrade to latest dependencies (# 1681)
  > 4cccb5f Update changelog for 1.5 release (# 1680)
  > dec1fa5 upgrade to latest dependencies (# 1678)
  > 2a56f07 Added delivery options to broker create (# 1670)
  > 4df6010 [main] Upgrade to latest dependencies (# 1675)
  > 2f4e192 Update actions (# 1677)
  > 8cfec3d Update community files (# 1676)
  > 00b7886 Update community files (# 1674)
  > dcd6bb6 upgrade to latest dependencies (# 1671)
  > 48ff336 Cleanup sugar controller setup (# 1669)
  > e3dbe58 Fix Tekton e2e script (# 1673)
  > 94a5352 Update community files (# 1672)
  > e734ca6 upgrade to latest dependencies (# 1668)
  > 06b4b9e Bump Tekton pipeline version to latest by default (# 1667)
  > bcd18d3 Fix OCI image build (# 1666)
  > fef2f69 upgrade to latest dependencies (# 1663)
  > 76a0b1e Fix display version in OCI image (# 1662)
  > 93e27f7 Mark --inject-broker flag as deprecated (# 1661)
  > 2eaeab4 Update community files (# 1664)
  > 736c7c2 test: use `T.TempDir` to create temporary test directory (# 1660)
bumping gopkg.in/yaml.v3 496545a...f6f7691:
  > f6f7691 The Billion Dollar Mistake
  > 00bbc09 github: drop broken semgrep workflow
  > 8f96da9 Explicitly check the parser for errors on peek
  > 539c8e7 Fix decoding of merge tags.
bumping knative.dev/serving 69a88e9...9402a71:
  > 9402a71 revision request start timeout should default to revision timeout second (# 13256)
  > d79b8bb upgrade to latest dependencies (# 13246)
  > 8a2fb54 Update net-istio nightly (# 13242)
  > 768e8ba Update net-certmanager nightly (# 13241)
  > 3178bc9 Update net-contour nightly (# 13244)
  > 374b282 Update community files (# 13240)
  > 7315b02 Update net-kourier nightly (# 13236)
  > 2a72beb upgrade to latest dependencies (# 13238)
  > 765a052 Update net-certmanager nightly (# 13234)
  > ea5c535 stop the queue-proxy drain if we don't receive a TERM signal (# 13229)
  > 8d0281e Update net-istio nightly (# 13222)
  > d60e5e7 upgrade to latest dependencies (# 13227)
  > d89869e Properly shutdown tracer when the work is done (# 13226)
  > b3a7557 Update net-contour nightly (# 13225)
  > 358d04e Update net-certmanager nightly (# 13224)
  > b48e0e5 Update net-kourier nightly (# 13223)
  > dbd3fc3 Update net-certmanager nightly (# 13218)
  > 15ee48d Update net-contour nightly (# 13220)
  > 0474e35 Update net-istio nightly (# 13219)
  > 951c48c Update net-kourier nightly (# 13221)
  > 77d24d1 Update net-gateway-api nightly (# 13217)
  > ee06bc5 fix linting (# 13216)
  > 58148c5 upgrade to latest dependencies (# 13215)
  > d4601f3 Update actions (# 13214)
  > dd2abc9 Refactor VolumeMountPath to Directory (# 13202)
  > 468bb83 Update community files (# 13213)
  > fb89ff1 Update net-gateway-api nightly (# 13212)
  > 86a3daf Update net-istio nightly (# 13207)
  > 7cfc194 Update net-kourier nightly (# 13206)
  > 8acf355 Update net-contour nightly (# 13205)
  > b9ca11e Update community files (# 13203)
  > 2e77abf Fix timeout handlers to max duration instead of time to first byte (# 12970)
  > 5bba016 A refactor of the queue volume constants (# 13146)
  > 24e1ec2 Update net-gateway-api nightly (# 13198)
  > fd833bc Update net-kourier nightly (# 13196)
  > 698ac9e Update net-contour nightly (# 13194)
  > 9399fb2 Update net-gateway-api nightly (# 13195)
  > 16730b2 Fixes resource quota test flake (# 13181)
  > f77b15e Update net-gateway-api nightly (# 13190)
  > 19f508c Update net-kourier nightly (# 13187)
  > 838bbb0 Update net-istio nightly (# 13189)
  > abb923e Update net-contour nightly (# 13188)
  > 78ddf60 upgrade to latest dependencies (# 13186)
  > 725c38c Update net-kourier nightly (# 13184)
  > e9a0ce9 Update net-gateway-api nightly (# 13183)
  > e600ae7 Make Kingress reconciled with DomainMapping when adding a new label (# 13178)
  > bfa381a Update net-gateway-api nightly (# 13180)
  > 9574ddb Update net-contour nightly (# 13179)
  > 875937b upgrade to latest dependencies (# 13177)
  > 782df98 Qp options config additions only (# 13162)
  > 034035b add paul to party, update sched through 2022 (# 13174)
  > a2cf188 Add e2e test for DomainMapping working with websocket. (# 13077)
  > 02d89d8 Update net-contour nightly (# 13171)
  > 77340bb Update net-kourier nightly (# 13170)
  > f846b2c bumping go.mod to v1.18 (# 13169)
  > 8fc6d87 Update net-istio nightly (# 13167)
  > 0b694b0 Update net-certmanager nightly (# 13165)
  > b3fb541 Update net-gateway-api nightly (# 13164)
  > 1f849ab Update net-kourier nightly (# 13166)
  > d0887e7 Update community files (# 13163)
  > bb043fa updating name of activation-scale (# 13161)
  > addd55a Add active-min-scale annotation (# 13136)
  > c82be27 Update net-istio nightly (# 13156)
  > f428628 Update net-gateway-api nightly (# 13155)
  > 63523f9 Enable refactoring queue-proxy binary with out-of-tree extensions (# 13133)
  > 8f351ad Update net-gateway-api nightly (# 13152)
  > 1656d0d Update net-certmanager nightly (# 13151)
  > 08c4062 Update net-kourier nightly (# 13150)
  > 2a22c44 upgrade to latest dependencies (# 13147)
  > 808923d upgrade to latest dependencies (# 13144)
  > ca011f8 Update net-certmanager nightly (# 13142)
  > 50a87e9 Stop using knative.dev/pkg/pool, use errgroup instead (# 13143)
  > 5467217 remove defunct markdown lint and linking variables (# 13137)
  > ed1397d Update `changeset.Get` according to pkg update (# 13141)
  > d1f8e8d bump go version in kind-e2e tests to v1.18 (# 13140)
  > dc552e5 Update community files (# 13138)
  > 38973e5 Update net-gateway-api nightly (# 13134)
  > 044d947 Update net-kourier nightly (# 13132)
  > 017b9d0 Don't included git info in our containers (# 13130)
  > 167199a QP shim main (# 13128)
  > d366049 Update community files (# 13129)
  > 97517d3 Add test flag --ingress-class (# 13117)
  > ed2ddf2 Update net-gateway-api nightly (# 13124)
  > 3ce8ebb Update net-gateway-api nightly (# 13119)
  > 57c2a04 Update net-contour nightly (# 13120)
  > 3666ce7 upgrade to latest dependencies (# 13116)
  > 67347fe Update net-contour nightly (# 13115)
  > 9c88305 Update net-certmanager nightly (# 13113)
  > 4009fb7 Update net-kourier nightly (# 13114)
  > e2862ae allow unknown fields in our webhooks since our CRD schemas are now specified (# 13111)
  > 3360e41 Remove Prometheus stat reporter from queue-proxy (# 12961)
  > 4fa002a Update net-gateway-api nightly (# 13106)
  > e701a33 Update Knative Serving schema (# 13095)
  > 432b38d Update net-certmanager nightly (# 13105)
  > 4b09847 Update net-contour nightly (# 13107)
  > 1d44884 Update net-kourier nightly (# 13104)
  > 1ba9714 Update net-istio nightly (# 13103)
  > deed9f4 Add filtering secret informer label for internal-encryption (# 13082)
  > 9f4f28d Update net-istio nightly (# 13100)
  > f9951ec Add overview for scaling doc (# 13088)
  > 499c0af Update net-gateway-api nightly (# 13093)
  > c190a06 Update net-kourier nightly (# 13092)
  > 70c3309 Drop EnableAlphaFeatures from TestHttpRedirect (# 13084)
  > bf49148 upgrade to latest dependencies (# 13089)
  > 6ceb219 upgrade to latest dependencies (# 13087)
  > 2e823f7 Update net-istio nightly (# 13086)
  > 2ea6b3e Update net-gateway-api nightly (# 13085)
  > 838305e upgrade to latest dependencies (# 13081)
  > a3348ed Update net-gateway-api nightly (# 13080)
  > ef11229 Update net-contour nightly (# 13079)
  > 8d6189c Update net-certmanager nightly (# 13078)
  > 4695705 Update net-kourier nightly (# 13030)
  > dd5cf21 upgrade to latest dependencies (# 13037)
  > df215c7 Update community files (# 13076)
  > 58cce54 Support config to deploy internal certificates automatically (# 13005)
  > 25de812 Fix webhook config drift issue (# 13061)
  > ee386a1 Update community files (# 13068)
  > d9cb5f0 Update net-istio nightly (# 13067)
  > 189003d Update net-contour nightly (# 13066)
  > d0367df Update net-gateway-api nightly (# 13064)
  > 278cedc Update net-certmanager nightly (# 13065)
  > 1da6f33 Update actions (# 13063)
  > cd85b44 Update net-gateway-api nightly (# 13062)
  > 752c336 Allow calls to test.Setup to disable logstream (# 13046)
  > 8f62874 Update net-certmanager nightly (# 13040)
  > 2b7f301 Update net-istio nightly (# 13031)
  > 6eccc36 Update net-gateway-api nightly (# 13029)
  > 38c5dbc Update net-contour nightly (# 13032)
  > f25a0df Temporarily disable flaky kind test (# 13055)
  > 3573163 only watch endpoints for our private services (# 13048)
  > 35a94ff Update link, thanks to Zhu Lei (# 13052)
  > 5f8892f skip http2 test early (# 13047)
  > e67dbb9 Improve SKS handling for unavailable Activator. (# 13027)
  > 6fca86c fix scale-from-zero mako test (# 13035)
  > 7c2b46d Relax the "timeout" requirement for `TestProbeRuntimeAfterStartup` (# 13026)
  > d54ad4c Remove the scale-to-zero checking in conformance. (# 13025)
  > 2f7b6db Bump kind to v0.14 for e2e tests (# 13022)
  > eeaff1c upgrade to latest dependencies (# 13016)
  > 50a42a9 Update net-certmanager nightly (# 13018)
  > 15111a1 Update net-istio nightly (# 13017)
  > 093ba0b Update net-gateway-api nightly (# 13021)
  > bc6d456 Update net-kourier nightly (# 13020)
  > 1997324 Update net-contour nightly (# 13019)
  > bf3b740 Update community files (# 13015)
  > 1ec8ad3 Update net-gateway-api nightly (# 13013)
  > 81fc500 Update community files (# 13014)
  > 78272a6 Update community files (# 13012)
  > 2b88568 regen protobuf after bumping the versions in the prow-image (# 13011)
  > 47cf88d Update net-contour nightly (# 13006)
  > 01f81e9 Update net-gateway-api nightly (# 13008)
  > 1be5251 Update net-certmanager nightly (# 13007)
  > 0d0cb33 Update net-istio nightly (# 13010)
  > 8de1a68 Update net-kourier nightly (# 13009)
  > 3c1b20e Update community files (# 13004)
  > 0c0acc9 add openssf knative badge (# 13001)
  > bb5bdbb Update net-contour nightly (# 12992)
  > a8dc74c Update net-gateway-api nightly (# 12991)
  > 67ee782 Update net-certmanager nightly (# 12990)
  > 9c56abc Update net-kourier nightly (# 12994)
  > 6bb3576 Update net-istio nightly (# 12993)
  > 6e4a27d Update community files (# 12988)
  > 44178dc Update net-kourier nightly (# 12984)
  > 7e45e5a Update net-gateway-api nightly (# 12983)
  > 527c69a Update net-istio nightly (# 12985)
  > 6a1160a Update net-contour nightly (# 12982)
  > 7134e31 Update net-certmanager nightly (# 12979)
  > 77c2527 Update community files (# 12981)
  > 36ee6f2 Update net-contour nightly (# 12964)
  > d7027b5 skips default probe if container freezer in use (# 12967)
  > 797bee5 Update net-kourier nightly (# 12976)
  > ca6a190 Support parsing host header with port (# 12974)
  > 620139a Update net-gateway-api nightly (# 12968)
  > 293a95a Update net-istio nightly (# 12975)
  > 33dbc31 Log confirmation of queue-proxy startup (# 12965)
  > d14ebd8 Update net-kourier nightly (# 12962)
  > 158177d Update net-certmanager nightly (# 12957)
  > 22f2af6 Update net-istio nightly (# 12956)
  > 3446ca3 upgrade to latest dependencies (# 12955)
  > b44da83 Update actions (# 12963)
  > 45f7c05 Fix deprecation notices (# 12958)
  > 4446497 fix owner files after merging scaling + serving working groups (# 12960)
  > 92b11a8 drop swap file (# 12959)
  > 591e12d upgrade to latest dependencies (# 12954)
  > a522443 Update net-istio nightly (# 12951)
  > 9ea835d Update net-gateway-api nightly (# 12950)
  > bc7fcd3 Update net-certmanager nightly (# 12949)
  > b2fff20 Update net-contour nightly (# 12948)
  > 9db81c3 Update net-kourier nightly (# 12952)
  > 4e54509 Update community files (# 12946)
  > 646e5cc Update net-istio nightly (# 12945)
  > f56e235 Update net-certmanager nightly (# 12944)
  > 08f0d31 Update net-contour nightly (# 12929)
  > ba84f6e upgrade to latest dependencies (# 12943)
  > 08e09bc kind-e2e dump namespaces and crds (# 12942)
  > 5776635 Update net-istio nightly (# 12931)
  > d7e2e3a Update net-certmanager nightly (# 12928)
  > 0bdaf56 Update net-kourier nightly (# 12930)
  > 3b832ad Update net-gateway-api nightly (# 12926)
  > 1a99825 Use mako stub for collecting performance tests results (# 12889)
  > fd6b191 fix a flake where the informer didn't have KPA (# 12934)
  > 9b7788c Update community files (# 12933)
  > f778a37 Update net-certmanager nightly (# 12925)
  > f726b1d Bump cert-manager to 1.8.0 (# 12923)
  > 01f15e1 Update net-gateway-api nightly (# 12920)
  > dcb16f2 Update net-kourier nightly (# 12919)
  > d9f4954 Update net-istio nightly (# 12918)
  > 69bf45c Update net-certmanager nightly (# 12901)
  > 754ea6c Update net-kourier nightly (# 12916)
  > 4273c6e Update net-contour nightly (# 12915)
  > 119517a Update net-gateway-api nightly (# 12902)
  > 18da4c0 upgrade to latest dependencies (# 12907)
  > 8129005 Update community files (# 12913)
  > 9dc1baa run go.mod tidy (# 12911)
  > 061be9e Fixing the panicRPSM parameter in autoscaler (# 12910)
  > 7aa5d8a Update net-kourier nightly (# 12903)
  > f6cb424 Add support for `dnsConfig` and `dnsPolicy` in pod spec (# 12897)
  > 89be0fd modify checksum so its not a float64 (# 12900)
  > 078e0b9 upgrade to latest dependencies (# 12899)
  > 0d76bb7 Update net-certmanager nightly (# 12879)
  > 95cfa70 ServerlessService's initial operation mode is now Proxy (# 12842)
  > 5128270 upgrade to latest dependencies (# 12890)
  > 7184235 Update net-kourier nightly (# 12885)
  > c2394b6 Update net-gateway-api nightly (# 12884)
  > 2dd73f5 Update net-contour nightly (# 12883)
  > 47238dc upgrade to latest dependencies (# 12882)
  > 6b3905b Update community files (# 12881)
  > e99c34f upgrade to latest dependencies (# 12878)
  > f7deea4 Use imjasonh/setup-ko (# 12868)
  > 527730f Update net-kourier nightly (# 12869)
bumping go.uber.org/multierr a5cd550...10aaa3c:
  > 10aaa3c Prepare release v1.8.0 (# 56)
  > cea7d2e Combine: Optimize for all nil (# 55)
  > d49c2ba doc: AppendInvoke: Fix typo (# 54)
  > ee7346a Merge pull request # 52 from uber-go/fossa
  > 7c6ff6f Integrate FOSSA (# 51)
  > d9efa4b fossa: Run separately, only on push
bumping knative.dev/eventing e345f5f...6ffef0f:
  > 6ffef0f Make some broker conformance tests decoratable with broker options (# 6517)
  > 6822f0d [release-1.7] InMemoryChannel receiver validates received events (# 6512)
  > a9151b5 upgrade to latest dependencies (# 6495)
  > 291e961 upgrade to latest dependencies (# 6493)
  > cc06bab Update community files (# 6492)
  > 0060ddd upgrade to latest dependencies (# 6491)
  > 5ee6158 Make sure tracer is shut down across components (# 6474)
  > 091ee6e Remove deprecated functions from test/upgrade package (# 6489)
  > 6eb4c78 upgrade to latest dependencies (# 6487)
  > cb3901f Increase max namespace count for e2e test runner (# 6486)
  > 1d00055 upgrade to latest dependencies (# 6485)
  > ab981d6 Upgrade deps (# 6484)
  > 7414f6b Update actions (# 6483)
  > df904f8 Update community files (# 6482)
  > 08ede0b Knative port sink binding v1 job test to rekt (# 6481)
  > 4e56370 Update community files (# 6480)
  > aceb557 Knative port sink binding v1 deployment test to rekt (# 6479)
  > 37cb0e9 Knative port source at event types test to rekt (# 6476)
  > c884e27 Remove the filter restriction of only containing exactly one attribute (# 6477)
  > f7e8eef use go1.18 (# 6470)
  > d99685b Promote strict subscriber to beta (# 6473)
  > 5a8f707 Promote delivery timeout to beta (# 6472)
  > 840fce7 chore: update sugar controller ConfigMap example (# 6460)
  > 7e30288 Ignore trailing slashes for Broker addresses (# 6471)
  > 32dea96 update trace of apiserversource (# 6458)
  > 480c8cb Adds receiver options for configuring read and write timeouts message receiver (# 6306)
  > 37dc195 Port Pingsource test to rekt (# 6463)
  > 15dd7ca 🧹 Remove dead variables & config for presubmit markdown checking (# 6452)
  > e5405de Update community files (# 6462)
  > c8435ed 🧹 Accommodate to knative-sandbox/reconciler-test# 294 (# 6451)
  > 5a21cd4 Update community files (# 6453)
  > 365a012 Update community files (# 6449)
  > 0eb566a upgrade to latest dependencies (# 6448)
  > 2d2e049 Increase initialDelaySeconds to 120 for webhooks (# 6447)
  > b84ec54 Refactor tracing helper to be reusable (# 6446)
  > 465db7c Bump prom client version for CVE-2022-21698 (# 6443)
  > cb776ce Add validation methods for ingress feature in broker's conformance test (# 6434)
  > aea0887 Deschedule placements on FinalizeKind (# 6440)
  > d3813f7 Golang version update (# 6433)
  > a63ea4e upgrade to latest dependencies (# 6436)
  > f69e181 Update community files (# 6435)
  > 159f4ec upgrade to latest dependencies (# 6432)
  > 33d1be7 Bump PodDisruptionBudget to policy/v1 (# 6424)
  > ee47ed1 Update community files (# 6431)
  > 9c41f75 upgrade to latest dependencies (# 6428)
  > eaec729 Update actions (# 6427)
  > 7763e03 upgrade to latest dependencies (# 6423)
  > 0866e62 Report last error for unavailability periods (# 6381)
  > c1b0ea6 Bump cloudevents/sdk-go to v2.10.1 (# 6422)
  > c71c362 upgrade to latest dependencies (# 6419)
  > f488f46 Update community files (# 6418)
  > 57f2395 Update community files (# 6416)
  > 59d13fa Update community files (# 6414)
  > 6072846 Update community files (# 6413)
  > 6fc4a54 add openssf badge (# 6412)
  > 13ed6ed Update community files (# 6411)
  > 816db8d Parallel to use `subscription.subscriber` instead of `reply` if there's no filter (# 6405)
  > 21ab643 Update community files (# 6406)
  > 56edb3b upgrade to latest dependencies (# 6398)
  > 1096fc2 Update actions (# 6397)
  > c3e1396 Propagate log level to env var in source ConfigWatcher (# 6391)
  > 9449169 Update community files (# 6390)
  > d7a8a95 upgrade to latest dependencies (# 6389)
  > 75253dc Only proxy some headers from the reply in MTBroker filter (# 6357)
  > bba50a4 Upgrade test exports logs before shutting down sender (# 6384)
  > 0a738fd Remove calling 'ExecuteLocalYAML', b/c it is deprecated (# 6380)
  > e7c9ffc Adding retry for 408 (Request Timeout) http status code ♻️ (# 6370)
  > b966175 remove the namespae for the imc (# 6382)
  > 005d6b6 adding util for adding custom annotation values to different broker implementation usage (# 6378)
  > 02a6fa0 Update community files (# 6379)
  > ee7c071 Update the link of the sample code.(# 6374) (# 6375)
  > 9af9870 upgrade to latest dependencies (# 6371)
  > 59e25b8 Export trace for events which exceeded unavailable period limit (# 6372)
  > 22e2a2c upgrade to latest dependencies (# 6365)
  > e033a2a Update community files (# 6369)
  > ec36c86 upgrade to latest dependencies (# 6360)
  > 01f5612 fix pingsource-mt-adapter crash when initial replica is more than 0 (# 6359)
  > 11dd387 Update support rotation (# 6351)
  > 98de1d7 upgrade to latest dependencies (# 6350)
  > 2219e14 Fix performance tests setup (# 6340)
  > 3abb436 properly initialize branchStatuses (# 6354)
  > 2d47847 Update community files (# 6355)
  > 3e24a78 NPE fix (# 6343)
  > 1104746 [scheduler] Use node taints for keeping track of available nodes and zones (# 6291)
bumping knative.dev/hack 9e09abc...8d1e4cc:
  > 8d1e4cc fix go run invocation of github hub cli (# 213)
  > d35c718 [release-1.7] go run... (# 211)
  > e9a8475 Update community files (# 208)
  > 4621ee6 Update community files (# 207)
  > 9dabf7c Update community files (# 206)
  > 782bbaa drop warning (# 204)
  > 92c7e36 Fix the buoy invocation (# 203)
  > 123a278 🧹 Migrate to using the `go run` instead of `go install` (# 172)
  > a645040 Update community files (# 201)
  > 81e30c2 remove references to git markdown checking (# 199)
  > e3be8da Update community files (# 197)
  > 65c463a Update community files (# 195)
  > e7d6365 Add [skip-dot-release] feature (# 189)
  > 33ce6af Update community files (# 190)
  > dc6c287 Update community files (# 185)
  > fd240e2 Update community files (# 184)
  > 40350b6 Update community files (# 183)
  > 674c2b3 Update community files (# 182)
  > 0c389ad Update community files (# 181)
  > bafe4b1 Update community files (# 180)
  > 12d3e2a switch to UTC (# 176)
  > b4d4d73 Update community files (# 178)
  > f4972b4 Update community files (# 177)
  > a8076b0 Model []byte as strings (# 175)
  > ccf82ad Update community files (# 174)
  > 46c77f1 Skip passing enable-ha flag to test script (# 173)
  > 5f47386 Update community files (# 171)
  > 2a09b5c only use `install` for run_go_tool (# 169)
bumping go.uber.org/zap ad0b02d...6f34060:
  > 6f34060 Release v1.21.0 (# 1059)
  > a7613b2 JSON Encoder: Don't panic if EncodeLevel unset (# 1058)
  > a1155d9 Optimize AddCaller+AddStacktrace by sharing stacks (# 1052)
  > 3f20106 lint: Remove redundant embedded field accesses (# 1051)
  > c087e07 zap: Add ParseAtomicLevel func (# 1048)
  > e751939 zapcore: Add ParseLevel (# 1047)
bumping golang.org/x/sync 036812b...886fb93:
  > 886fb93 A+C: delete AUTHORS and CONTRIBUTORS
  > 0de741c x/sync/errgroup: make note of the default errgroup goroutine limit (unlimited)
  > 0976fa6 x/sync/errgroup: add TryGo and SetLimit to control concurrency

Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-09-14 16:46:05 +00:00
David Simansky 794865fcc5
Update Go in actions to 1.18 (#1247)
* Update Go in actions to 1.18

* Update golangci binary
2022-09-14 16:01:05 +00:00
knative-automation c2c45d1194
Update actions (#1244)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-09-14 15:30:05 +00:00
Jefferson Ramos 2cfb59db1f
fix: updated func-deploy tekton task to alingh with to new deploy command build flag options (#1246) 2022-09-14 14:56:06 +00:00
Luke Kingland 15713b2a75
feat!: deploy autobuild and flag persistence (#1079)
* feat: deploy autobuild and flag persistence

* cleanup

* help text, comments and test cleanup

* removing usurped commands.txt

* add platform to deploy synopsis help
2022-09-14 11:45:10 +00:00
Matej Vasek 966a150c58
fix: podman auto-svc has own control group (#1239)
This keeps the podman process alive while `func` receives
SIGKILL or SIGTERM.
We must keep podman alive for cleanup (e.g. container removal).

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-14 07:21:49 +00:00
Lance Ball cba8ee52c4
chore: update imjasonh/setup-ko to v0.6 (#1238)
`ko` recently moved to its own github org which broke versions of `ko`
prior to 0.6. This should resolve issues we have been seeing with the
failure to publish the func image over the last week.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-09-14 02:29:48 +00:00
github-actions[bot] e21ce5b44f
chore: update Quarkus platform version to 2.12.2.Final (#1236)
Co-authored-by: Knative Automation <automation@knative.team>
2022-09-13 23:51:47 +00:00
Matej Vasek 15e2363ffa
fixup: fix base for another PR (#1237)
PR author is not available for rebase.

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-13 21:46:47 +00:00
Adam Boczek 4d622bc007
feat: group main help message to put important commands to the top (#1152)
* feat: add initial version of command groups and template engine (#215)

* feat: add relevant dependencies and vendor files (#215)

* feat: extend TestUsageFlags for hidden flags and flags with no shorthand (#215)

* feat: refactor root.go to use command groups (#215)

* feat: move the long help of root cmd to the usage templates section (#215)

* feat: updates after rebase (#215)

* feat: update after review (#215)

* feat: rename 'options' into 'flags' to align with the old help (#215)

* feat: remove support for help options, add template for global flags help section (#215)

* feat: update handling of root command help to support proper use of templates and docs generation (#215)

* feat: generate new docs (#215)
2022-09-13 14:13:48 +00:00
Zbynek Roubalik 1ed5b2d5fd
chore: install Tekton Task from local source code & install S2I task (#1234)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-13 01:07:47 +00:00
Zbynek Roubalik d9ffaa944e
fix: s2i on cluster build of Quarkus functions (#1233)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-12 20:54:47 +00:00
Matej Vasek 427d453f81
chore: dialer improvements (#1232)
* Relaxed test condition.
* Independence of `socat` image entrypoint.
* The `socat` image is configurable via environment variable.

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-12 19:26:46 +00:00
Matej Vasek 1f5a95a4a7
Improvements for podman on Windows and macOS (#1230)
* fix: pack docker socket mounting with npipe

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

* feat: trust ssh connection by podman machine

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

* fix: socket mount on macOS with podman machine

The `podman machine start` outputs recipe for DOCKER_HOST setting,
following the recipe it was causing troubles,
since path in host OS and in the podman VM is different.

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

* chore: use go-winio library for handling npipes

Replacing unmaintained an buggy library.

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

* test: added test for podman machine auto connect

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-12 17:26:46 +00:00
Matej Vasek b9e3d243bc
fix: pack build outpout on Windows (#1231)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-12 04:51:32 +00:00
Matej Vasek a6c885ef04
feat: UX improvements for docker/podman usage (#1224)
* Better error message I docker/podman not present.
* Auto detect podman machine's socket on mac/win.

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-09 13:34:29 +00:00
Gab Satchi 7e96146840
Adds labels and annotations from func.yaml to pipeline resources (#1205)
* adds labels from func.yaml to pipeline resources

* Unify function labels across resources (kService and tekton pipelines)

* Adds function annotations to pipeline resources

* Remove refactored function
2022-09-09 12:48:25 +00:00
Matej Vasek 17625b7c0d
docs: update podman doc (#1228)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-09 09:43:24 +00:00
Matej Vasek e2d0f8afdb
fix: s2i build on Windows (#1227)
tar must use forward slashes as separator

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-09 09:42:25 +00:00
Andrew Meyer 87d162b5e5
fix: correct error handling in filesystem tests (#1226) 2022-09-08 22:21:20 +00:00
github-actions[bot] 58a6d07fe6
chore: update Quarkus platform version to 2.12.1.Final (#1221)
Co-authored-by: Knative Automation <automation@knative.team>
2022-09-08 18:47:20 +00:00
Luke Kingland 4e5e9927b2
fix: only use flag value as default or if altered (#1223) 2022-09-07 20:47:18 +00:00
Zbynek Roubalik 2ee2c61b8b
fix: on cluster build - workaround for Tekton issue with empty array (#1214)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-07 20:29:18 +00:00
Matej Vasek a0b772c2cb
docs: update podman docs (#1220)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-07 15:20:18 +00:00
Chengzhi Yang fc54831ff0
fixed a misspell in docs (#1217)
# Changes
- bugs: variable `body` was misspelled
2022-09-07 08:39:18 +00:00
knative-automation 4301ca2d42
Update community files (#1215)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-09-07 02:14:17 +00:00
Luke Kingland 645990203d
invoke: pack and go are known compatible (#1219) 2022-09-06 22:42:18 +00:00
Matej Vasek fee8dfcb0c
fix: in cluster dialer security context is non-privileged (#1181)
* fix: in cluster dialer sec.ctx. is non-privileged

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

* fixup: drop all capabilities

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

* fixup: seccomp

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

* fixup: unset seccomp profile type

the seccomp profile type must be empty for osh 4.10

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

* fixup: suppress warnings

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-09-06 15:37:43 +00:00
Zbynek Roubalik 317553206a
fix: on cluster build - populate image name if not set (#1213)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-09-06 14:36:45 +00:00
Jefferson Ramos 4041d609dd
test: oncluster build initial e2e set of tests (#1193) 2022-09-05 13:08:22 +00:00
Luke Kingland ae75e5e803
fix: image name derivation and flag precidence (#1185)
* fix: image name derivation and flag precidence

* cleanup

* fix image prompt, reorganize and cleanup

* client deploy image test

* be explicit about registry treatment in tests

* ineffassign

* fix: k8s env not required

* misspell

* minor cleanup

* recombine build and deploy configs

* test namesace choosing logic
2022-09-04 19:37:21 +00:00
knative-automation b117af7c92
Update community files (#1211)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-09-01 02:50:17 +00:00
github-actions[bot] f4a410ab0f
chore: update Quarkus platform version to 2.12.0.Final (#1208)
Co-authored-by: Knative Automation <automation@knative.team>
2022-08-31 16:06:18 +00:00
Lance Ball b8c445579b
fix: check for `--image` flag in build command (#1204)
* fix: check for `--image` flag in build command

If the user provides an `--image` flag on the command line, it should be
used. This commit modifies the image resolving code to check whether or
not the image name was provided on the command line.

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/1125

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

* fixup: review feedback

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-08-31 16:04:17 +00:00
Adam Boczek d8bcf96378
chore: update .gitignore (#215) (#1209) 2022-08-31 13:27:17 +00:00
Ying Chun Guo d0a181bd24
use correct sample repository name in command usage (#1207) 2022-08-31 11:19:16 +00:00
Lance Ball 34499bceee
doc: update generated docs for 'deploy' (#1203)
Signed-off-by: Lance Ball <lball@redhat.com>

Signed-off-by: Lance Ball <lball@redhat.com>
2022-08-30 20:24:16 +00:00
Matej Vasek 6a0b4a2211
fix: flags more consistent between build/deploy (#1202)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-08-30 19:16:18 +00:00
Gunjan Vyas 02c0ae775d
chore: update rust dependencies (#1201) 2022-08-30 17:05:16 +00:00
Matej Vasek 56b1db3500
Improve `func config envs` (#1188)
* Added ability to add env non-interactively
* Added ability to list envs as JSON

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-08-30 15:41:17 +00:00
Jefferson Ramos 70c6130f55
fix: on cluster builds when buildEnvs contains only one build environment (#1200) 2022-08-30 15:31:17 +00:00
Matej Vasek cd64b70b47
fix: trailing white spaces in genrated docs (#1198)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-08-30 13:38:18 +00:00
Lance Ball 1f4db6eab4
chore(release): 0.26.0 (#1195) 2022-08-29 19:36:15 +00:00
Ying Chun Guo ac4497da28
fix a broken link in docs (#1196) 2022-08-29 19:14:15 +00:00
David Simansky c7b1bce369
chore(deps): update Knative dependencies to v1.4 @dsimansk (#1194)
* Update to Golang 1.17

* Update Knative dependencies to v1.4

* Update vendor dir

* Update go version in GH actions

* Fix go.mod

* fixup: update deps

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

* fixup: update deps

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

* fixup: update deps

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2022-08-25 16:32:19 +00:00
Matej Vasek dca11dad5b
fix: performance of template loading (#1189)
If repo is non-bare git repo treat is as plain FS template,
i.e. do not load it from ".git" date.

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

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-08-25 13:20:19 +00:00
Lance Ball 81289dc757
doc: use cobra markdown generator for command docs (#1169)
This commit removes the docs/reference/commands.txt file and instead
uses the Cobra built-in documentation generator to create markdown
documents for every command.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-08-25 13:16:19 +00:00
Zbynek Roubalik 1112aaa2fe
feat: S2I strategy for on cluster build (#1191)
* feat: S2I strategy for on cluster build

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* use upstream `s2i` task only

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* use custom func-s2i task

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-08-25 13:03:19 +00:00
Luke Kingland e6ec11b0e5
builder short name constants etc throughout (#1180)
* chore: shared builder constants etc

* pretty-print the shared unknown builder error

* update builder impls to use shared defs and validators

* error and docs text formatting

* include static default short names

* comment updates and typos

* docs paths

* use the constants for the in-package builder defaults

* use builders.All but with caviat
2022-08-24 19:34:18 +00:00
github-actions[bot] b3ced5ebd5
chore: update Quarkus platform version to 2.11.3.Final (#1187)
Co-authored-by: Knative Automation <automation@knative.team>
2022-08-24 14:21:32 +02:00
Luke Kingland fecbc4ef8b
chore: use dot as path default rather than absolute path (#1184)
* use '.' in flags to indicate default function path

* regen commands.txt with '.' as default path

* centralize dot expansion

* minor cleanup

* update all references to path flag

* exits should be panics
2022-08-24 11:02:18 +00:00
Gunjan Vyas e465348210
chore: update springboot dependencies (#1183) 2022-08-23 12:05:17 +00:00
knative-automation 031710ae5e
Update community files (#1179)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-08-23 02:43:16 +00:00
Lance Ball a52b7d5ecd
chore: adjust codecov configuration (#1177)
* chore: adjust codecov configuration

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>
2022-08-20 02:29:52 +00:00
Lance Ball 3ac5d468bf
chore: add some milliseconds in client tests (#1178)
The client test which checks for rebuilds based on timestamps is
consistently failing in CI. This change may alleviate that problem.

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-08-19 14:49:52 +00:00
Zbynek Roubalik bfdbdbebe8
On cluster build: support Build Envs (#1174)
* On cluster build: support Build Envs

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* add test

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-08-19 13:32:52 +00:00
Matej Vasek 62b7232636
chore: Use NodeJS for script instead of Shell (#1170)
Signed-off-by: Matej Vasek <mvasek@redhat.com>

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-08-18 12:19:49 +00:00
Jefferson Ramos 3af2ea3490
test: quarkus test template change to remove package type property (#1171) 2022-08-17 18:08:48 +00:00
knative-automation c01341e490
Update community files (#1165)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-08-16 02:02:48 +00:00
Lance Ball 80657c90e3
fix: ensure registry in func.yaml is respected (#1168)
* fix: ensure registry in func.yaml is respected

If the user has a value specified in func.yaml for the image registry,
that value should be used by the build command, if not otherwise
specified as a flag or via the environment.

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/1159

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

* fixup: lint

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

Signed-off-by: Lance Ball <lball@redhat.com>
2022-08-16 00:05:49 +00:00
knative-automation 133e4dc3a9
Update community files (#1163)
Signed-off-by: Knative Automation <automation@knative.team>

Signed-off-by: Knative Automation <automation@knative.team>
2022-08-12 02:37:00 +00:00
Ying Chun Guo 0441770267
fix link to reference/command.txt (#1161) 2022-08-11 15:23:59 +00:00
Ying Chun Guo 12073a4c8f
remove duplicate cmd.AddCommand(NewLanguagesCmd) at root.go (#1162) 2022-08-11 14:52:03 +00:00
Dirk Haubenreisser 48c348806f
Added binary builds for platforms ppc64le and s390x (#1160) 2022-08-11 14:28:58 +00:00
Luke Kingland 2f8d82bec2
feat: templates list command (#1134)
* feat: templates list command

* linter placation
2022-08-10 19:37:58 +00:00
github-actions[bot] 849c2cd7a1
chore: update Quarkus platform to 2.11.2.Final (#1157)
Co-authored-by: Knative Automation <automation@knative.team>
2022-08-08 14:17:24 +00:00
knative-automation 24ade41929
Update community files (#1156)
Signed-off-by: Knative Automation <automation@knative.team>
2022-08-05 14:25:23 +00:00
knative-automation df99a5350a
Update community files (#1155)
Signed-off-by: Knative Automation <automation@knative.team>
2022-08-05 02:38:23 +00:00
Matej Vasek b42eff36c5
fixup: change period 15min -> 4hrs (#1150)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-08-04 14:43:21 +00:00
Jefferson Ramos f72b23fe76
doc: fix doc reference on nodejs template (#1154) 2022-08-04 14:35:21 +00:00
knative-automation fd49a2d241
Update actions (#1153)
Signed-off-by: Knative Automation <automation@knative.team>
2022-08-03 13:49:18 +00:00
Lance Ball 3b8c24092b
fix: use space prefix for deploy output text (#1144)
* chore: use space prefix for deploy output text

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/1138

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

* fixup: adjust e2e deploy test expectations

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

* fixup: another e2e test tweak

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

* fixup: another e2e test tweak

Signed-off-by: Lance Ball <lball@redhat.com>
2022-08-02 13:11:16 +00:00
Matej Vasek fd8f1803fc
fixup: master->main (#1148)
* fixup: master->main

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

* fixup: cURL fail on HTTP error code

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-29 20:26:38 +00:00
Matej Vasek f4f04c756f
Quarkus platform auto-updater (#1147)
* Quarkus platform auto-updater

Added periodict task that check Quarkus platform version and creates PR with update if needed.

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

* Apply suggestions from code review

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

Co-authored-by: Lance Ball <lball@redhat.com>
2022-07-29 19:35:39 +00:00
knative-automation 34c916d43a
Update community files (#1142)
Signed-off-by: Knative Automation <automation@knative.team>
2022-07-28 02:29:36 +00:00
Zbynek Roubalik 65c30abb39
feat: deploy Tekton task supports optional `image` parameter (#1140)
* feat: deploy Tekton task supports optional `image` parameter

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* address feedback

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-07-27 14:52:36 +00:00
David Fridrich e659256005
chore: use lower case *functions* in all CLI outputs (#1135)
* first run, F -> f

* fix

* fix

* misspells

* client*.go files

* add client*.go: misspells

* cmd dir test files

* docker dir

* function* files

* i*.go and job.go

* job.go,mock dir,repos*,s2i dir,schema dir,templates*

* test dir

* testing dir

* root dir *.go second round
2022-07-27 13:34:36 +00:00
Lance Ball df022f5c93
docs: replace commands.md with generated text file (#1089)
* docs: replace commands.md with generated text file

This commit removes commands.md document which tends to get out of date
pretty easily and replaces it with a generated commands.txt file. The
help text generation is fairly naive, but should be sufficient for the
time being.

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

* fixup: tweak title formatting

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

* fixup: run build-docs.sh again after recent change

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

* fixup: add docs generation to make build target

Also removes the random UUID as the default for `invoke` since it's a
little misleading. That value will not be the one that's used, since
it's random. And because it's random, it changes the docs every time.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-07-25 16:10:24 +00:00
Zbynek Roubalik 71b0dddc55
chore: add validation for `builder` (#1136)
* chore: add validation for `builder`

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* address feedback

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-07-25 16:09:24 +00:00
Lance Ball cf5be9a616
fix: stop build progress loop when build completes (#1133)
This change prevents the incremental build messages that loop while
building from continuing during subsequent deploy phases by providing a
cancelable context to the `printBuildActivity()` function parameters.

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/974

Signed-off-by: Lance Ball <lball@redhat.com>
2022-07-21 21:52:20 +00:00
Jefferson Ramos ff20f53671
test: remove verbose from test invoke create/deploy commands (#1137) 2022-07-21 16:18:24 +00:00
Matej Vasek a906b8866c
chore: update Quarkus templates to 2.10.3.Final (#1132)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-20 17:24:01 +00:00
David Fridrich 8cb70808f5
feat: always store namespace in func.yaml and warn if current ns & func.yaml ns is different (#1118)
* check namespace; add to func.yaml on first deploy; added tests and mock kubeconfig for testing

* change func args because only f.Namespace is used instead of the whole struct

* func comment

* misspell

* fix tests

* warning in stderr

* use context.Background

* add fake kubeconfig for new test
2022-07-20 16:35:01 +00:00
Lance Ball 59df756e49
fix: add languages command to cmd root (#1127)
Also add a little more information to the short description.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-07-20 15:59:01 +00:00
Matej Vasek 36216e7fed
fix: image push authorization check (#1130)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-19 21:11:00 +00:00
Gunjan Vyas b1fd9f71b1
feat: persist builder value in func.yaml (#1099)
* Persist builder value in func.yaml

* Added tests

* removed print statement for platform error

* created common function for builder persistence test
2022-07-19 11:42:00 +00:00
Matej Vasek 819b433edb
feat: build for Linux ARM64 (#1123)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-18 19:56:59 +00:00
Zbynek Roubalik a7671e45a7
feat: add runtime icons on OpenShift (#1116)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-07-18 16:18:59 +00:00
dependabot[bot] 7a760fbf57
chore(deps): bump github.com/containerd/containerd from 1.6.0 to 1.6.6 (#1112)
* chore(deps): bump github.com/containerd/containerd from 1.6.0 to 1.6.6

Bumps [github.com/containerd/containerd](https://github.com/containerd/containerd) from 1.6.0 to 1.6.6.
- [Release notes](https://github.com/containerd/containerd/releases)
- [Changelog](https://github.com/containerd/containerd/blob/main/RELEASES.md)
- [Commits](https://github.com/containerd/containerd/compare/v1.6.0...v1.6.6)

---
updated-dependencies:
- dependency-name: github.com/containerd/containerd
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>

* fixup: run ./hack/update-codegen.sh

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

* run ./hack/update-deps.sh

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

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lance Ball <lball@redhat.com>
Co-authored-by: Matej Vasek <mvasek@redhat.com>
2022-07-18 16:09:59 +00:00
Lance Ball cccb2833d1
chore(deps): update node/typescript deps in e2e tests (#1119)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-07-18 12:37:59 +00:00
Luke Kingland d1f935fde9
feat: languages list command (#1114)
* feat: languages list command

* corrections
2022-07-18 11:20:59 +00:00
Gunjan Vyas 0d0953aa1c
print registry and user name during image push (#1121) 2022-07-18 11:11:59 +00:00
Matej Vasek 8eaa17b4bf
Run embedded FS test separately (#1117)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-14 19:05:16 +00:00
Lance Ball 29f3aadb47
chore: update node and typescript dependencies (#1110)
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>
2022-07-14 08:02:14 +00:00
Zbynek Roubalik b4b4cc34c3
feat: add OpenShift related Annotations & Labels (#1106)
* feat: add OpenShift related Annotations & Labels

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* fix test

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-07-13 18:19:14 +00:00
Zbynek Roubalik f4537dd3d5
fix: use 0 group id for func-buildpacks Task (#1105)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-07-12 20:38:12 +00:00
David Fridrich c57af36f74
feat: func deploy accepts image digest in --image (#1098)
* --image can be given with digest, created parser and edited some help text to reflect this

* fixed small stuff

* tests for deploy with --image

* move parser to file, static test should be kept active

* updated some error mesgs; now prints a warning if flags not set explicitly, if set to a wrong value, return an error; updated tests to fit new error messages

* --image flag message edit

* removed warning; instead print info about disabled push a build unconditionally
2022-07-12 19:24:13 +00:00
Matej Vasek 3b198cb781
fix: image push authorization check (#1109)
Check that we can actually push image.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-12 18:44:13 +00:00
David Simansky a1c7446c73
Update Knative dependencies to v1.3 (0.30) (#1107) 2022-07-12 16:51:13 +00:00
Matej Vasek a197f8b330
fix: correct error in OpenShift reg.cred.provider (#1104)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-11 15:04:12 +00:00
Matej Vasek e1d5229900
fix: use creds from creds store first (#1103)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-11 14:54:12 +00:00
jwcesign dad6047e5b
Update to the latest knative version (#1101)
Signed-off-by: jiang wei <jwcesign@gmail.com>
2022-07-11 08:20:12 +00:00
knative-automation 76c42d9097
Update community files (#1102)
Signed-off-by: Knative Automation <automation@knative.team>
2022-07-11 02:34:11 +00:00
Matej Vasek f0a33bd6bf
Fix: try empyt crets as last resort (#1100)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-08 16:30:08 +00:00
Gunjan Vyas afd224fe5c
feat: deploy success message also displays the namespace (#1090)
* func deploy should display namespace

* Modified e2e to consider namespace

* Added Namespace field in DeploymentResult struct

* Modified unit test for client deploy

* e2e fix
2022-07-06 16:34:08 +00:00
Lance Ball 416ada6715
feat!: change 'version' to 'specVersion' (#1086)
* feat!: change 'version' to 'specVersion'

Changes `func create` to write the last migration value to func.yaml
when a new function is created, and modifies the name in the func.yaml
file to be 'specVersion' instead of 'version' to help reduce confusion.

Adds a migration, and a LastMigration() utility function.

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/861

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

* fixup: remove DefaultVersion

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

* fixup: review feedback

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

* fixup: review feedback

Signed-off-by: Lance Ball <lball@redhat.com>
2022-07-01 09:22:45 +00:00
Matej Vasek 80505979f9
Improve usability of `func` CLI for IDE plugins (#1091)
* Better input handling for non-tty

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

* Make cred-helper 'not implemented' non fatal error

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-07-01 05:07:42 +00:00
knative-automation 5c211a6778
Update community files (#1093)
Signed-off-by: Knative Automation <automation@knative.team>
2022-07-01 02:38:42 +00:00
Matej Vasek d4f96bb694
Preserve func.yaml for Quarkus BP build (#1092)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-30 18:29:31 +00:00
Zbynek Roubalik 04b32d15c6
feat: check valid runtimes for on cluster build (#1088)
* feat: check valid runtimes for on cluster build

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* remove unnecessary import alias

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* add unit test

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-06-30 13:24:31 +00:00
Jefferson Ramos 81091863e7
test: explicit define builder for e2e tests tied to golang as test remote repo, config and envs (#1081) 2022-06-29 13:35:30 +00:00
Daniel 5f8c01829e
feat: introduce echo return for Python http template (#1078)
* Introduce echo return for Python http template

* Updated tests and regenerated zz* file

* Updated output to dict-only

* Changed output type from Python dict literal to proper JSON
2022-06-28 16:21:30 +00:00
knative-automation bb831c7c12
Update actions (#1082)
Signed-off-by: Knative Automation <automation@knative.team>
2022-06-28 02:16:29 +00:00
Matej Vasek d5748f0e4e
Improve error message for s2i unsupported runtimes (#1080)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-27 20:41:28 +00:00
Matej Vasek f066218042
Add --platform flag for build/deploy sub-cmd (#1076)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-22 16:40:23 +00:00
Matej Vasek c550ac1e53
Do not codecov ./templates (#1074)
Templates are not tested in a way that supports codecov.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-21 12:20:21 +00:00
Josh Gavant 3b9d6c2ee0
doc: add closing mark (#1073)
Without this the following section is unintentionally included in the code quote.
2022-06-20 07:07:16 +00:00
Matheus Cruz f828b0998c
feat: add echo for springboot http template (#1072)
* feat: add echo func

* chore: package

* docs: update docs

* refactor: add space between headers

* refactor: regenerate zz file

* refactor: clean with pre-commit

* refactor: add func_yaml-schema.json file

* refactor: rename test and fix white-spaces

* refactor: remove .idea files

* test: change http test

* test: change expected result
2022-06-17 17:05:18 +00:00
Lance Ball 80093d66a4
fix: do not prompt user if --build diabled (#1071)
Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/693

Signed-off-by: Lance Ball <lball@redhat.com>
2022-06-16 22:39:17 +00:00
Matej Vasek 91e80c0a3c
fix: minor improvements for s2i build (#1068)
* fix: close opened file

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

* fix: symlink handling for build context upload

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-16 20:08:18 +00:00
Jefferson Ramos d1dc7e6ad1
fix: workaround for missing func.yaml on tekton step result (#1070) 2022-06-16 18:09:17 +00:00
Lance Ball af916e7dd7
doc: fix some func.yaml fields (#1069)
* doc: fix some func.yaml fields

Addresses recent changes in func.yaml processing. Not all fields
for the file are documented. I'm not sure if they all should be.

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

* fixup whitespace

Signed-off-by: Lance Ball <lball@redhat.com>
2022-06-16 17:16:17 +00:00
Matej Vasek 51b99c0e67
fix: premature Close() of docker client (#1066)
* Fix docker client lifecycle

Avoid premature Close() of docker client.

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

* Guard for usage of docker client after close

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-16 17:14:17 +00:00
Luke Kingland 7a60394be6
feat: add all build flags to deploy (#1065)
* spelling

* feat: full build options on deploy

* increase e2e lifecycle test timeout to 45m

* remove redundant flag shorthand b

* map flags for parsing
2022-06-16 16:02:17 +00:00
David Fridrich e1866f1c86
chore: fix link to on_cluster_build.md (#1067)
* fix link to on_cluster_build.yaml

* fix link to on_cluster_build.md
2022-06-16 14:19:18 +00:00
Matej Vasek 2721ae6bca
Use "as-dockerfile" mode for s2i builds (#1063)
The "daemon mode" doesn't work well with `podman`.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-15 20:57:16 +00:00
Luke Kingland 3000a8857a
feat: on run, build only when filesystem changed (#1031)
* feat: detect built image staleness and utilize on run command

* write directly to sha256 rather than buffer

* client test cleanup

* remove superfluous test println

* ensure runtime dir

* close file opened when testing

* fix typos

* typos and missing test case
2022-06-15 09:56:17 +00:00
salaboy a454ea9ae9
chore: adds tests for springboot templates (#1059)
* adding tests for springboot templates

* adding test-springboot to test-template goals

* removing space

* removing vendor license
2022-06-14 17:24:16 +00:00
Matej Vasek 5f6d11c491
Fix premature Close() of docker client (#1056)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-13 22:46:15 +00:00
knative-automation df7b5733f1
Update community files (#1052)
Signed-off-by: Knative Automation <automation@knative.team>
2022-06-10 02:34:25 +00:00
knative-automation dd212c2639
Update community files (#1051)
Signed-off-by: Knative Automation <automation@knative.team>
2022-06-09 14:16:24 +00:00
Luke Kingland a6ce010b96
remove third-party echo test from CI (#1048) 2022-06-09 12:11:39 +00:00
Luke Kingland b40911b67c
fix: map invoke format flag (#1041) 2022-06-09 09:12:40 +00:00
Zbynek Roubalik 6030676ec6
chore: print correct logs for failed PipelineRun (#1046)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-06-09 09:11:38 +00:00
Matej Vasek 0aa8fe81bd
Better error message for podman auto service (#1030)
* Better error message for podman auto svc

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

* change per review request

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

Co-authored-by: Lance Ball <lball@redhat.com>
2022-06-09 07:03:38 +00:00
Matej Vasek 01aba8ad1c
Use JSON as default msg for the invoke sub-cmd (#1042)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-09 06:59:38 +00:00
Matej Vasek c592cd2a41
Increase service wait timeout (#1043)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-08 20:19:38 +00:00
Matej Vasek afe8a959ca
Plain JSON body in func invoke with HTTP (#1039)
Do not use form encoding.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-06-08 11:30:37 +00:00
knative-automation 9f7be6ec43
Update community files (#1040)
Signed-off-by: Knative Automation <automation@knative.team>
2022-06-08 02:24:37 +00:00
Luke Kingland 5e26510f9d
feat: builder images map migration (#1033)
* feat: function builder images migration

* fix typos and comments
2022-06-07 11:15:36 +00:00
Luke Kingland fba0dc6af6
fix: increase timeout when testing int cluster availability (#1032) 2022-06-06 09:31:54 +00:00
Luke Kingland 17dc507c25
feat: pack builder images individually configurable (#1028) 2022-06-03 20:31:52 +00:00
knative-automation ab12aa7029
Update community files (#1035)
Signed-off-by: Knative Automation <automation@knative.team>
2022-06-03 02:23:51 +00:00
Lance Ball ed454fa05c
chore(release): 0.24.0 (#1034) 2022-06-01 17:24:24 +00:00
knative-automation 909584ed0f
Update actions (#1026)
Signed-off-by: Knative Automation <automation@knative.team>
2022-06-01 02:30:23 +00:00
knative-automation dff46ed7c2
Update community files (#1017)
Signed-off-by: Knative Automation <automation@knative.team>
2022-06-01 02:21:24 +00:00
Luke Kingland 096085d751
feat: configurable s2i builder images (#1024)
adds support for the builderImages func.yaml attribute
2022-06-01 06:12:02 +09:00
Matej Vasek 041bb9fd66
Make JS/TS Function templates async by default (#1020)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-05-27 16:03:09 +02:00
Matej Vasek 8f405b691a
Improve help for the `build` sub-command (#1023)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-05-26 17:21:00 +02:00
Luke Kingland 1d367c6be5
fix: ignore node_modules for s2i builds (#1019)
- 🎁 Exclude certain directories form S2I build tar know to be either unnecessary or error-prone
- 🐛  Error running Node Functions which unnecessarily had node_modules sent to the build daemon

Exclude various files and cache directories from S2I builds.  This list may need to be expanded in the future.
2022-05-26 23:58:42 +09:00
Luke Kingland dc8abf179c
feat: expose default builder image logic for in-cluster builds (#1021)
Tekton pipeline runs now use the same logic for determining default builder image as a local buildpack build.

In order to implement varying build strategies (s2i vs buildpacks), we were unable to rely on hard-coded builder images. These defaults were moved in-code, with builders defined in func.yaml being an optional manual overrdide. This PR updates the Tekton deployment process to rely on this defaulting logic, rather than require the func.yaml override (which would preclude a Function from being able to be built using other strategies).
2022-05-26 23:56:59 +09:00
Matej Vasek ccfa02afdf
Use struct embedding instead of generated code (#1016)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-05-12 01:39:37 +00:00
Matej Vasek e830e09c5f
Fix S2I build with podman. (#1014)
Workaround a bug in podman:
https://github.com/containers/podman/issues/13770

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-05-12 01:12:34 +00:00
Luke Kingland 867d4c26d6
feat: improved invoke verbosity (#1007)
* feat: improved invoke verbosity

* e2e test updates

* regen filesystem

* e2e tests: add to query what is expected as an echo
2022-05-11 19:16:35 +00:00
knative-automation 1fd60ee8c0
Update community files (#1013)
Signed-off-by: Knative Automation <automation@knative.team>
2022-05-11 02:26:34 +00:00
Matej Vasek 8949484ffb
Update S2I envvars to work with fast-jar (#1012)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-05-10 18:21:33 +00:00
Matej Vasek 5ac6c25a4a
User fast-jar packaging for Quarkus (#1009)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-05-09 15:37:33 +00:00
Matej Vasek 8661253be6
Remove unnecesary files from Java template (#1008)
* 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>
2022-05-06 15:06:29 +00:00
Lance Ball 31c1d66eb3
chore: use paketo builders for all runtimes (#1001)
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>
2022-05-06 01:23:28 +00:00
Matej Vasek ac8f1d2d66
Allow empty credentials registry (#1004)
* Allow empty credentials registry

Useful when using local unsecured registry.

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

* Added tests for empty credentials registries

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-05-05 18:42:28 +00:00
knative-automation 75fe105969
Update community files (#1006)
Signed-off-by: Knative Automation <automation@knative.team>
2022-05-05 02:27:27 +00:00
David Simansky d2914d5c25
Update Knative dependencies to v1.2 (0.29) (#1002) 2022-05-02 19:01:57 +00:00
Thomas Risberg a694cf54b3
Update spring boot cloud and native versions (#999) 2022-04-30 17:00:55 +00:00
Lance Ball 83c081d34a
chore(deps): bump faas-js-runtime version (#1000)
* 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>
2022-04-29 13:08:54 +00:00
Matej Vasek e9932cdf43
fix: read pwd from non-tty input (#996)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-04-28 12:09:53 +00:00
knative-automation b79683cc0c
Update community files (#994)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-27 02:25:52 +00:00
Luke Kingland 397ce65598
feat: s2i builder quarkus support (#993)
* feat: s2i builder quarkus support

* use manifest for quarkus s2i build envs
2022-04-27 00:40:56 +00:00
Luke Kingland 8185c0acce
src: update runner with shared env interpolation (#992) 2022-04-25 22:48:54 +00:00
Luke Kingland 14248311b1
feat: s2i builder env var interpolation (#991)
* feat: s2i builder env var interpolation

* nil env values disinclude from interpolate map
2022-04-25 19:18:54 +00:00
Zbynek Roubalik ce26a23352
fix: ignore `is forbidden` errors when deleting function and resources (#988)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-04-22 20:34:31 +00:00
Matej Vasek bbfb3e9f98
Use socat image from quay.io (#987)
Rationale: avoid docker.io pull limit.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-04-21 15:42:30 +00:00
Matej Vasek bed3dfc9f6
Paketo BuildPack for Quarkus (#985)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-04-20 19:26:29 +00:00
Lance Ball bc6383e55c
fix: update various doc links (#980)
* fix: update various doc links

There were a few links in the documentation that did not get updated in
the most recent docs restructuring. This addresses those issues that I
could find.

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

* fixup: whitespace

Signed-off-by: Lance Ball <lball@redhat.com>
2022-04-20 12:10:29 +00:00
Jefferson Ramos 9396f7bd07
test: update python e2e tests (new revision test) (#983) 2022-04-20 12:03:29 +00:00
Bryan Tong 23a040d063
Change Knaive (lol) to Knative (#981)
Signed-off-by: Bryan Tong <tongb@vmware.com>
2022-04-20 06:53:29 +00:00
Lance Ball 5af934be8d
feat: enable Paketo builders for Python functions (#979)
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>
2022-04-20 00:09:28 +00:00
knative-automation 67b43ee5d1
Update actions (#967)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-19 15:49:30 +00:00
Jefferson Ramos 01f113969a
CI enhancements (e2e tests) and Go template fix (#970)
* 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
2022-04-19 14:18:28 +00:00
Matej Vasek e502d554c8
Refactor: clean Repository and Runtimes structs (#973)
* Refactor: clean Repository and Runtimes structs

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

* Refactor: rename struct member

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-04-18 23:14:28 +00:00
Matej Vasek 34cb893545
Refactor: templates (#961)
* Refactor: use fs.WalkDir to copy from FS

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

* Refactor: rename and added doc comment

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

* Refactor: clean up templates

Make `fn.Template` interface not struct.

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

* Clean up: mask manifest.yaml from template FS

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

* Refactor: receiver is not pointer

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

* Refactor: use const instead of string literal

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

* fixup: TemplatesPath defaulting at correct place

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

* fixup: mask manifest.yaml in template code

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

* fixup: remove unnecessary else

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

* fixup: put docstring on interface

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

* fixup: test calls better API

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

* fixup: check return value

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-04-14 11:29:10 +00:00
Lance Ball 4ffb1f9cba
chore: update allocate script with latest knative (#965)
Use the latest Knative release in the hack/allocate.sh script.
In addition, there is a small change to how the munged yaml files
are piped through `yq`, adding a final pass through `yq` itself
essentially sanitizing the data.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-04-14 10:53:10 +00:00
David Simansky baac9e9cf2
Add unicode control chars exclude (#972)
* Add unicode control chars exclude

* Update .unicode-control-characters.config.py

Co-authored-by: Chris Suszynski <krzysztof.suszynski@gmail.com>

* Update .unicode-control-characters.config.py

Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>

Co-authored-by: Chris Suszynski <krzysztof.suszynski@gmail.com>
Co-authored-by: Pierangelo Di Pilato <pierangelodipilato@gmail.com>
2022-04-14 10:50:11 +00:00
Luke Kingland 3be1a77388
feat: s2i builder typescript support (#957) 2022-04-14 10:48:10 +00:00
Jefferson Ramos f92db575e9
Update Springboot and quarkus e2e tests (#959) 2022-04-12 13:30:09 +00:00
Lance Ball 23d1188319
chore: add version.txt to .gitattributes for style (#966)
* chore: add version.txt to .gitattributes for style

The Knative style check uses linguist to determine if a given file is a
generated file. If so, it excludes that file from the check. This change
should prevent Knative's style check from complaining about no newline on
version.txt

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

* fixup: also add zz_filessytem_generated.go

Signed-off-by: Lance Ball <lball@redhat.com>
2022-04-11 21:52:07 +00:00
knative-automation 7121e1f2d9
Update community files (#962)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-11 14:42:08 +00:00
Lance Ball 76c647a1c7
docs: add a language pack "contract" document (#918)
* docs: restructure & add a language pack "contract"

The docs/guides/langugage-packs.md document does a good job of describing
what's required of a language pack in terms of directory structure and the
options for the `manifest.yaml` file. But it does a pretty crappy job of
describing the whole thing in context. I've tried to do that here.

Also some fixes to links and reorganization of the docs to make things a
little easier to find.

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

* fixup: inline language pack referenc into contract

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

* fixup: minor wording tweak

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

* fixup: whitespace

Signed-off-by: Lance Ball <lball@redhat.com>
2022-04-11 13:30:07 +00:00
knative-automation bc3a418e07
Update community files (#956)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-11 02:27:19 +00:00
Lance Ball 13d4222461
feat: make templates consistent across runtimes (#948)
* fix: make templates consistent across runtimes

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/572

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

* fixup: review feedback

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

* fixup: fix embedded fs

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

* fixup: fix whitespace

Signed-off-by: Lance Ball <lball@redhat.com>
2022-04-08 11:28:46 +00:00
knative-automation 4e1d9b61e4
Update community files (#953)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-07 17:35:45 +00:00
Lance Ball 4e369a013a
chore: add release process and func_darwin_arm64 to the release artifacts (#945)
* fix: add func_darwin_arm64 to the release artifacts

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

* chore: add ARM64 release target/propose process

I noticed in the most recent release, that a MacOS M1 binary was not
produced. This commit adds that target to `hack/release.sh`. Additionally
the CHANGELOG.md files and version.txt files have been updated to accurately
reflect the current status. Finally, I've proposed a release process in
the new file `docs/RELEASING.md`.

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

* fixup: remove trailing whitespace

Signed-off-by: Lance Ball <lball@redhat.com>
2022-04-07 15:22:46 +00:00
knative-automation 48d081be65
Update community files (#950)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-07 07:01:45 +00:00
knative-automation f0f5a080e5
Update actions (#946)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-07 07:00:45 +00:00
Matej Vasek 94dd53d009
Template generation improvements (#949)
* 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>
2022-04-06 21:59:44 +00:00
Matej Vasek 1ee9fa163b
Update spring-boot in templates (#947)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-04-06 18:11:45 +00:00
Luke Kingland c3c1456ede
feat: invoke verbose metadata (#944)
* invoke verbose prints metadata

* review updattes
2022-04-06 14:19:47 +00:00
Zbynek Roubalik 36cfef726f
Print logs if Pipeline Run fails (#943)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-04-05 16:07:44 +00:00
Luke Kingland a91bcc5fcf
feat: s2i builder with preliminary node support (#923)
* fix: stuck build ticker

* feat: s2i builder prototype

* default builders

* use s2i fork with updated docker

* in-code builder defaults

* s2i builder verbosity constructor arg

* typed errors

* typed error tests

* remove unneeded env code

* s2i build e2e test

* e2e tests

* update licenses

* cleanup

* codegen debug

* update licenses

* Revert "Update actions (#921)"

This reverts commit 8312b5c560.

* update licenses

* e2e test updates

* use GetDefaultDockerConfig for s2i config

* docker.NewClient docs
2022-04-05 13:08:44 +00:00
Zbynek Roubalik e9251f518c
feat: on cluster build doens't require privileged cluster permissions (#934)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-04-05 12:52:43 +00:00
knative-automation 6e5a2ae193
Update actions (#940)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-05 07:54:43 +00:00
knative-automation a807b042a4
Update community files (#924)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-05 07:53:44 +00:00
Matej Vasek d7314f3c4a
Use "openshift" uname for OpenShift image registry (#938)
The user name from the config is invalid sometimes.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-04-04 20:37:43 +00:00
Lance Ball 4a4cebb1ea
fix: apply updated spring-boot-function dependency (#936)
This commit updates the spring-boot-function dependency explicitly as there
is not yet a CVE fix for spring-cloud 2021.0.1.

```
❯ ./mvnw clean install dependency:tree | grep spring-cloud-function
[INFO] |  +- org.springframework.cloud:spring-cloud-function-web:jar:3.2.2:compile
[INFO] +- org.springframework.cloud:spring-cloud-function-context:jar:3.2.3:compile (optional)
[INFO] |  +- org.springframework.cloud:spring-cloud-function-core:jar:3.2.2:compile (optional)
```

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/929
Fixes: https://spring.io/blog/2022/03/29/cve-report-published-for-spring-cloud-function

Signed-off-by: Lance Ball <lball@redhat.com>
2022-04-04 16:52:43 +00:00
Lance Ball 00d5a82722
chore: add Apple M1 build in cross-platform target (#932)
* chore: add Apple M1 build in cross-platform target

Might fix: https://github.com/knative-sandbox/kn-plugin-func/issues/377

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

* fixup: review feedback/better names

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

* fixup: adjust release workflow

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

* fixup: remove duplicate

Signed-off-by: Lance Ball <lball@redhat.com>
2022-04-01 14:47:45 +00:00
knative-automation 1d29100027
Update actions (#933)
Signed-off-by: Knative Automation <automation@knative.team>
2022-04-01 14:45:45 +00:00
David Simansky 739cded50f
Update to latest Tekton release (#935)
* Update to latest Tekton release

* Update vendor dir

* Fix misspelled comment
2022-04-01 14:44:45 +00:00
David Simansky df67900d8b
Update buildpacks/pack to v0.24.0 (#926)
* Update buildpacks/pack to v0.24.0

* Update vendor dir
2022-04-01 11:24:46 +00:00
Luke Kingland 06fe5c048f
Revert "Update actions (#921)" (#927)
This reverts commit 8312b5c560.
2022-03-31 14:27:44 +00:00
David Simansky bf68b221a6
Update Knative dependencies to v1.1 (#925)
* Update Knative dependencies to v1.1 (0.28)

* Update vendor dir

* Update lincenses

* Fix docker push test

* Refactor docker client interface
2022-03-31 13:45:45 +00:00
knative-automation 8312b5c560
Update actions (#921)
Signed-off-by: Knative Automation <automation@knative.team>
2022-03-30 19:31:49 +00:00
Luke Kingland 9a0335de7d
src: exported client constructor with options (#883)
* update root and version structure and help text

* fix: limit openshift int test with tag

* refactor: commands to use simplifed, unified constructor

* fix ineffectual assignment lint error

* cleanup

* add repository to run command

* callout for forthcoming s2i builder impl

* lint errors

* re-add the deferred client factory

* remove setNamespaceFlag now that it is persistent

* avoid side-effect of global-mutating deploy tests

* reduce line-by-line difference for PR ease

* simplificaiton of tests and comment lines for further PR ease purposes

* reduce inconsequential differences for ease of PR

* tests to RootCommandConfig

* review comment updates

* fix lint errors

* replace stdlib Setenv in tests

Using t.Setenv will require an update to go1.17, which is out of scope
for this PR.

* pass ClientFactory throughout

* explicitly empty test command args

See https://github.com/spf13/cobra/pull/155

Errors can still be encountered when, for example, using precomiled
tests.  Explicitly setting constructed command args to the empty slice
ensures we avoid hitting any futher edge cases.
2022-03-30 00:58:46 +00:00
Thomas Risberg 9a6aaa5474
Support using 'func invoke' for springboot templates (#920)
* 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
2022-03-23 09:31:18 -07:00
Matej Vasek c766e75a77
Improve template ZIP generation (#917)
* 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>
2022-03-23 07:47:26 -07:00
knative-automation ccadf1bb0a
Update community files (#919)
Signed-off-by: Knative Automation <automation@knative.team>
2022-03-23 06:01:17 -07:00
Matej Vasek 669329f02f
Improve error handling (#916)
* replaced plain `==` by `error.Is()`
* wrapping some more errors using `fmt.Errorf()`

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-22 17:18:17 -07:00
Thomas Risberg 03e53287d1
Update springboot http template (#914)
- http should match cloudevents template
- update Spring Boot version
- update README for cloudevents template
2022-03-22 08:31:12 -07:00
Matej Vasek 3a7f388035
Improve error messages (#913)
* Improve error messages

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

* incorporate review suggestion

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

Co-authored-by: Lance Ball <lball@redhat.com>
2022-03-21 08:24:47 -07:00
Roland Huß 56d93cfd9c
Adding code of conduct to reference knative/community's CoC (#911) 2022-03-21 07:22:46 -07:00
knative-automation 51a4011ad8
Update community files (#910)
Signed-off-by: Knative Automation <automation@knative.team>
2022-03-18 10:54:19 -07:00
Matej Vasek cad0a04276
Enabled previously disabled git tests for Window (#909)
* Recreate git repo from scratch

Recreated the repo by `git init --bare` and commited template there all
over again.

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

* Enable previously disabled tests for Windows

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

* Use git HTTP protocol not file protocol in tests

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

* fixup: cleanup

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-17 03:20:48 -07:00
Lance Ball 7b001a198a
doc: add documentation for using podman remotely (#907)
* doc: add documentation for using podman remotely

This commit adds more documentation for using podman, specifically in this
case, connecting to and using a remote podman service from a Mac computer.

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

* fixup

Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-16 14:46:47 -07:00
Luke Kingland 9dec4c20ee
differentiate repository and repositories (#900) 2022-03-16 14:01:59 -07:00
Luke Kingland 564a34b3f5
fix: full clone of template repos on add (#904)
* full clone remote repos on write

* use filepath to parse path
2022-03-16 11:40:00 -07:00
Zbynek Roubalik c60079d792
🐛 allow adding environment variables without a cluster connection (#893)
* allow adding environment variables without a cluster connection

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* add tests

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>

* use k8s clientcmd

Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-03-16 07:20:00 -07:00
Lance Ball 166313b541
improve template comments for Node.js and TypeScript (#902)
* improve template comments for Node.js and TypeScript

See: https://github.com/knative-sandbox/kn-plugin-func/issues/572

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

* fixup: add zz_ file

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

* fixup: whitespace

Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-15 15:36:59 -07:00
Zbynek Roubalik 5de9e193b8
parameter `-P` is not needed in grep in pre-commit hook (#895)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2022-03-14 06:33:18 -07:00
knative-automation 265786dfc2
Update community files (#892)
Signed-off-by: Knative Automation <automation@knative.team>
2022-03-14 02:24:17 -07:00
salaboy 57909f71fe
Updating to latest spring cloud release and refactoring code (#838)
* 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
2022-03-11 07:22:32 -08:00
knative-automation e5039891eb
Update community files (#890)
Signed-off-by: Knative Automation <automation@knative.team>
2022-03-10 22:13:32 -08:00
Matej Vasek fa17dc9e4b
Update wrt switch from pkger to custom ZIP pkging (#889)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-09 17:39:46 -08:00
Matej Vasek ff06ed426a
Update developer documentation. (#888)
* Update developer documentation.

Update documentation for template generation.

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

* Apply suggestions from code review

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

Co-authored-by: Lance Ball <lball@redhat.com>
2022-03-09 12:25:50 -08:00
Matej Vasek fe6d9f7d70
Improve cleanup recipes in Makefile (#887)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-09 12:17:49 -08:00
Matej Vasek f29805ad27
Fix formatting for template zip generator (#886)
* Fix formatting for template zip generator

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

* fixup: style

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-09 07:32:50 -08:00
Luke Kingland 25524a1f84
fix: bind verbose flag to root (#884) 2022-03-08 11:02:06 -08:00
Matej Vasek 917a8efdb2
Hint to user when ssh server key is not known (#885)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-08 10:08:05 -08:00
Matej Vasek 2d23c9cd1f
Fixup writer Write() return value (#882)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-07 06:22:35 -08:00
Matej Vasek cc049952bb
Generate templates zip unconditionally (#879)
* 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>
2022-03-06 14:28:35 -08:00
Lance Ball 6d7ab83aed
Make `func invoke` print any response it receives. (#881)
* Make `func invoke` print any response it receives.

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

* fixup: improve test

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

* fixup: check Write() return value

Signed-off-by: Lance Ball <lball@redhat.com>
2022-03-06 14:25:35 -08:00
Luke Kingland 5a122c31e6
src: promote verbosity to constructor arg (#869)
* update root and version structure and help text

* fix: limit openshift int test with tag

* src: verbosity to constructor param

* fix misspelling

* fix merge error
2022-03-04 11:19:36 -08:00
Matej Vasek 1e4d52be33
Relax permission check only to owner exec perm (#878)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-03 05:54:06 -08:00
knative-automation d672afc19f
Update community files (#877)
Signed-off-by: Knative Automation <automation@knative.team>
2022-03-02 14:45:07 -08:00
Luke Kingland 043a00d12b
src: update root and version structure and help text (#865)
* update root and version structure and help text

* test root command help output

* fix trailing whitespace
2022-03-02 11:58:44 -08:00
Matej Vasek c4a7e095de
Use custom zip embedding not pkger (#835)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-02 06:41:43 -08:00
Luke Kingland 2bd5254f19
feat: command help text template preprocessing (#875) 2022-03-02 03:56:43 -08:00
Luke Kingland 3f30c91116
fix: use full root name for cmd help prefixes (#873) 2022-03-02 02:18:42 -08:00
knative-automation 02fa79e8e9
Update actions (#871)
Signed-off-by: Knative Automation <automation@knative.team>
2022-03-01 18:01:42 -08:00
Matej Vasek 8dd90bff19
Fix OpenShift credential loader (#876)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-03-01 17:59:42 -08:00
Senthilnathan M efb7996da7
printing helpful shorthand command (#816)
* printing helpful shorthand command

* Addressed review comments

* Resolved rebase conflicts

* Using cmd.Root().Name() for getting the executable name
2022-03-01 11:56:42 -08:00
salaboy b97fe9c4ec
Adding sample function in go template (#840)
* adding sample function in go template

* adding simple echo, using the correct signature

* fixing readme
2022-03-01 07:38:42 -08:00
Matej Vasek bea34d21a0
Mark OpenShift test as an integration test (#870)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-28 08:58:09 -08:00
Fabian Lopez 60dbeacc46
added git related flags for remote builds (#844)
* added git related flags for remote builds

* fix dependency issues

* remove context cancel

* add # split for git url

* account for the use of git args with local build type

* fix error message for build type
2022-02-28 03:56:07 -08:00
Matej Vasek 663fd29b76
Windows unit test fixes (#860)
* force run of `make test`

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

* fix git file:// URIs

When using file:// forward slashes should be used.

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

* fix parsing of FS path from URI path

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

* disable some test on Windows

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

* fixup: style

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

* disable some test on Windows

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

* fix some tests for Windows

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

* disable some test on Windows

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-27 17:53:07 -08:00
Jefferson Ramos 8702515d91
test: url for invoke test (#863) 2022-02-24 02:32:38 -08:00
Helio Frota efc3b208cb
fix: minor typos in docs (#862) 2022-02-23 07:25:39 -08:00
Matej Vasek 4fec4afca1
Custom improvements for OpenShift (#825)
* Custom improvements for OpenShift

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

* fixup: osh cred loader

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

* fixup: style

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

* fixup: dns-err detec for fallback in cluster dial

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-22 10:17:04 -08:00
knative-automation fba018962e
Update actions (#843)
Signed-off-by: Knative Automation <automation@knative.team>
2022-02-22 09:48:03 -08:00
Lance Ball ad42f3a258
chore: update manifest.yamls (#846)
* 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>
2022-02-22 09:10:04 -08:00
Matej Vasek 5fad42ba55
Update python builder version (#845)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-22 08:17:03 -08:00
Luke Kingland 64091fbc39
build pkged.go directly with make (#841)
Also removes the dependency on a modern bash when building on a stock OS
X box (which ships with a 15-year old version).
2022-02-21 11:06:03 -08:00
Matej Vasek f25724ad71
Fix podman guide (#836)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-17 05:58:12 -08:00
David Simansky a8e9629fd6
Fix checkum for github.com/tektoncd/cli (#837) 2022-02-17 01:44:12 -08:00
David Simansky 72d9b7d58e
Update Knative dependencies to v1.0 (0.27) (#833)
* Update Knative dependencies to v1.0 (0.27)

* Update vendored files
2022-02-16 12:15:40 -08:00
knative-automation 9a520ef392
Update actions (#762)
Signed-off-by: Knative Automation <automation@knative.team>
2022-02-16 07:21:40 -08:00
Lance Ball 93fa9804da
chore: accommodate knative's go linter (#831)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-02-15 12:23:00 -08:00
Matej Vasek 4000fc59d1
Fix --verbose mode for the version sub-command (#829)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-13 22:02:20 -08:00
Matej Vasek 7ee4e0fafa
Update guide for podman (#828)
* Update guide for podman

In newer versions of func there is no need
for starting service and setting DOCKER_HOST envvar.

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

* fix per review request

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

Co-authored-by: Lance Ball <lball@redhat.com>
2022-02-11 12:23:18 -08:00
Lance Ball b8370c139e
chore: bump node builder to latest (#826)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-02-11 05:54:17 -08:00
knative-automation 5b1b69c0cb
Update community files (#813)
Signed-off-by: Knative Automation <automation@knative.team>
2022-02-10 02:35:06 -08:00
Luke Kingland 5b06498200
fix: defaults for prompt from flags then options (#821) 2022-02-09 12:24:42 -08:00
Matej Vasek 568af71712
src: cmd's common fn.Client (#824)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-09 08:19:41 -08:00
Lance Ball fdf4b60051
fix: don't fail info/invoke if eventing missing (#823)
If eventing is not installed, the user should still be able to get info and use
`kn invoke`. Don't fail, if `describe` finds eventing missing.

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/822

Signed-off-by: Lance Ball <lball@redhat.com>
2022-02-09 03:04:43 -08:00
Matej Vasek a2abfca3d3
src: error-less ctors (#818)
* src: no error ctors

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

* src: no error ctors

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-08 12:20:16 -08:00
Senthilnathan M 879031a245
Setting the default for language selector (#815) 2022-02-07 01:10:53 -08:00
Matej Vasek abd4eea0c7
Cleanup commands (#807)
* src: refactor commands

Commands are constructed from root,
not by using init() blocks.

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

* fixup the prefix issue

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

* fixup style

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

* fixup nolint:misspell

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-03 10:26:21 -08:00
knative-automation e1095e0509
Update community files (#812)
Signed-off-by: Knative Automation <automation@knative.team>
2022-02-03 08:09:21 -08:00
Matej Vasek b4e6318ce5
chore: update boson builder image references (#810)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-02 05:06:33 -08:00
Sameer Vohra c6e67ef037
Update installing_cli.md (#806)
Add reference for kn plugins. Specifically plugins need a `kn-` prefix to be detected by know.
2022-02-02 00:25:33 -08:00
Zbynek Roubalik 1f54bdcb1c
src: fix `func.yaml` schema (#805)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-02-01 18:05:32 -08:00
Matej Vasek fff00497f8
feat: completion --build flag of deploy sub-cmd (#802)
* feat: completion --build flag of deploy sub-cmd

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

* src: refactor

Moved functionality.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-02-01 06:58:31 -08:00
knative-automation 6c6ea0dadc
Update community files (#803)
Signed-off-by: Knative Automation <automation@knative.team>
2022-02-01 01:45:31 -08:00
Lance Ball 2009073591
chore: change TAG to ETAG to avoid stepping on toes (#799)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-28 06:23:47 -08:00
Lance Ball 210cd9a199
chore: update Makefile and hack/release.sh to accept TAG (#797)
The upstream release pipeline does not tag the source until the build and
tests have successfully completed. This should allow for our release builds
to pick up the knative infra TAG environment variable when building releases.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-28 05:45:47 -08:00
knative-automation 12a9f20dad
Update community files (#790)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-28 03:30:47 -08:00
Lance Ball ece9ac3645
fix: use paketo base image for springboot (#792)
The build actually seems to require `base` vs `tiny.

Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-27 09:26:47 -08:00
Lance Ball 6097b8d790
fix: use domain qualified registry for springboot (#789)
* 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>
2022-01-26 11:28:45 -08:00
Matej Vasek 6c282e77c2
fix: error type-check condition (#786)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-01-26 09:44:45 -08:00
knative-automation 7fe39cae18
Update community files (#785)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-26 05:27:45 -08:00
salaboy 61bf5b9da2
Adding git add before commit and push (#781) 2022-01-25 08:27:48 -08:00
Roland Huß 627a88ac3e
Update OWNERS (#783)
Switch to the aliases defined in OWNER_ALIASES.
2022-01-25 08:26:49 -08:00
Lance Ball c58fcb7a9f
chore: skip integration tests for now (#780)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-25 07:16:49 -08:00
Zbynek Roubalik d478f555cc
feat: delete pipeline and resources with `func delete` (#763)
* feat: delete pipeline and resources with `func delete`

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* fix test and prompt

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-24 12:39:29 -08:00
Luke Kingland 6649a71f4d
fix: local cluster name collision (#779) 2022-01-24 10:30:30 -08:00
Matej Vasek 650f99f936
test: fix URL (#777)
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>
2022-01-24 03:50:29 -08:00
knative-automation cd11b90a8f
Update community files (#772)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-24 03:39:29 -08:00
Matej Vasek 153e486bc6
fix: auth check (#773)
* fix: auth check

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

* fix: auth check

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-01-21 12:45:04 -08:00
Luke Kingland e918f74b9e
feat!: invoke (#705)
* 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>
2022-01-21 12:04:05 -08:00
Matej Vasek 8ceb325142
Enable custom CA for specified server names (#770)
* 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>
2022-01-21 06:50:04 -08:00
Luke Kingland ce938122d8
src: remove need for hosts entry for local clusters (#742) 2022-01-18 12:58:33 -08:00
Lance Ball 74158dc63d
fixup: document minimum podman version (#766)
Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-18 11:12:33 -08:00
Lance Ball 2d37be5536
chore: bump lifecycle version to 0.13.2 (#764)
* 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>
2022-01-17 14:52:31 -08:00
Fabian Lopez 7de4dc1667
ensure build flag binds for run command (#758)
Signed-off-by: Fabian Lopez <lfabian@vmware.com>
2022-01-17 01:41:29 -08:00
Matej Vasek 1dded12796
Support git scp url format (#761)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2022-01-13 11:24:12 -08:00
Zbynek Roubalik bddac30621
feat: add `function.knative.dev/name: functionName` label to every resouce created for a Function (#757)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-13 10:19:11 -08:00
Zbynek Roubalik 3d7c351544
fix: use correct --build flag value for `func-deploy` Tekton Task (#760)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-13 09:48:12 -08:00
Zbynek Roubalik f06fd97759
src: simplyfing Knative Deployer RoleBinding (#759)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-13 08:21:12 -08:00
knative-automation 21d857877b
Update actions (#749)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-13 04:10:12 -08:00
Matej Vasek 15d617f99d
src: use common functionality for docker cred retrieval (#756)
* 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>
2022-01-13 03:52:12 -08:00
Zbynek Roubalik cb719ff564
feat!: support on cluster build from git repo with Tekton (#743)
* feat: support on cluster build from git repo with Tekton

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* incorporate feedback

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* incorporate feedback 2

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* fixup-licence

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

* fix deploy with --build=disabled

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* incorporate feedback

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* incorporate feedback

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

Co-authored-by: Matej Vasek <mvasek@redhat.com>
2022-01-12 11:58:51 -08:00
Zbynek Roubalik b8d248a00b
feat: add definition for `func-deploy` Tekton Task (#740)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-12 11:57:50 -08:00
Zbynek Roubalik 9117940e14
doc: on cluster build documentation (#744)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-12 11:55:51 -08:00
Lance Ball a5793916a0
chore: release 0.21.0 (#737) 2022-01-12 10:56:51 -08:00
Lance Ball 963659bd0b
chore: add knative infra release scripts (#729)
* chore: add knative infra release scripts

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

* fixup: add newlines at EOF

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

* fixup: whitespace

Signed-off-by: Lance Ball <lball@redhat.com>
2022-01-12 06:49:51 -08:00
knative-automation 47c82c0375
Update community files (#747)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-11 07:40:14 -08:00
Luke Kingland 4504b21369
src: simplify go templates (#741) 2022-01-10 13:59:12 -08:00
Zbynek Roubalik 64ba17b4fb
feat: add possibility to disable pushing of image in `deploy` command (#739)
* feat: add possibility to disable pushing of image in `deploy` command

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* remove commented code

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* incorporate feedback

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-07 06:40:26 -08:00
Zbynek Roubalik 2282cf899d
Revert "feat: add possibility to disable pushing of image in `deploy` command (#736)" (#738)
This reverts commit 4e5a5e8307.
2022-01-06 08:03:02 -08:00
Zbynek Roubalik 4e5a5e8307
feat: add possibility to disable pushing of image in `deploy` command (#736)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-06 07:22:01 -08:00
Zbynek Roubalik 0b130dd769
Add `ko` to produce image with `func` command in CI (#735)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2022-01-06 06:39:02 -08:00
salaboy 7d22e20092
adding ko to produce image with func command (#692) 2022-01-06 06:37:02 -08:00
jrangelramos 3177287571
chore: Adding support to ssh-agent on Windows using named pipes (#733) 2022-01-05 10:38:33 -08:00
knative-automation e0b5adcaf4
Update actions (#730)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-05 09:50:33 -08:00
knative-automation f5147fe1ea
Update community files (#734)
Signed-off-by: Knative Automation <automation@knative.team>
2022-01-05 04:47:32 -08:00
knative-automation 7cf2b470f4
Update community files (#731)
Signed-off-by: Knative Automation <automation@knative.team>
2021-12-22 07:47:18 -08:00
Lance Ball f20a238ecc
chore: release 0.20.0 (#667) 2021-12-20 16:16:16 -08:00
Matej Vasek 8d51393181
feat: allow push to cluster internal registries (#718)
* feat: allow push to cluster internal registries

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

* fix: NewRoundTripper consults http.DefaultTransport

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

* src: move credential code to sub-package

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

* src: refactor

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

* src: share RoundTripper

avoid creating expensive RoundTripper twice

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

* test: added test for pusher

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

* src: disable parallel layer upload

it's more reliable

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

* fixup: lint

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

* fixup: lint

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

* fixup: doc, rm commented code

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-12-20 14:28:17 -08:00
Zbynek Roubalik feaf8f9109
feat!: use `function.knative.dev` for Functions related labels (#717)
* 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>
2021-12-20 08:07:19 -08:00
knative-automation a77bdf0e76
Update community files (#727)
Signed-off-by: Knative Automation <automation@knative.team>
2021-12-17 07:08:18 -08:00
Luke Kingland 96aa41707c
Format pkged.go (#726)
Fixes the missing build stanza from pkged.go by running gofmt
(necessary beuntil such time as pkger does this itself)
2021-12-16 05:38:17 -08:00
Fabian Lopez 866728dbc0
mitigate log4j dependency vulnerability (#723)
* mitigate log4j dependency vulnerability

* bump log4j version to 2.16.0

* update pkged.go

* manually fix pkged.go annotation

* Revert "manually fix pkged.go annotation"

This reverts commit dc67a48185.

* fix pkged.go

* podman test trigger

* e2e test trigger
2021-12-16 03:32:17 -08:00
knative-automation 56b23251f8
Format go code (#724)
Signed-off-by: Knative Automation <automation@knative.team>
2021-12-15 09:07:30 -08:00
Lance Ball d7cfe6ead7
feat: add telemetry to Node.js and TypeScript function templates (#719)
* 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>
2021-12-15 03:00:29 -08:00
knative-automation 82316f5672
Update community files (#714)
Signed-off-by: Knative Automation <automation@knative.team>
2021-12-14 10:34:51 -08:00
Fabian Lopez b190b52754
feat: allow build to be triggered from run when fn.Image is missing (#644)
* 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>
2021-12-13 09:25:22 -08:00
Matej Vasek 6c67be0515
src: revert golobal dialer (#716)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-12-10 08:12:29 -08:00
Matej Vasek a13f897fbb
feat: custom default HTTP transport (#711)
* 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>
2021-12-10 02:31:29 -08:00
Matej Vasek 49883545c8
Fix dialer test (#713)
* 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>
2021-12-09 15:59:28 -08:00
Matej Vasek 27e1b0153a
Refactor credential provider (#707)
* src: cleanup

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

* src: cleanup

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

* src: cleanup

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

* src: cleanup

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

* src: cleanup

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

* src: allow to set custom crednetial loader

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-12-09 14:19:28 -08:00
Matej Vasek 07062c144a
fix: revert hostname alias (#712)
The localhost alias was causing problems with new approach for registry access.
The new access is done directly not via daemon.
This renders any insecure registry exception in daemon config irrelevant.
The library facilitating registry access seems to allow insecure registry on localhost only.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-12-08 18:38:34 -08:00
Luke Kingland f63af0d34e
fix: move integration port to unregistered range (#701)
* fix: move registry port to unregistered range

Moves the integration testing port into the unregistered range (above
49151) to minimized potential conflicts.

* update e2e and podman with named registry
2021-12-07 15:05:38 -08:00
Matej Vasek fcb0c7139f
src: CheckAuth() calls registry directly (#704)
CheckAuth() calls registry directly
not using docker daemon as a middle-man

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-12-07 07:53:58 -08:00
Matej Vasek 98ef5a0035
feat: In cluster dialer to proxy TCP connections to unexposed services (#688)
* src: in cluster dialer

Added code that will proxy TCP connections via in cluster pod.
This is useful for accessing k8s services that are not exposed.

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

* fixup: increase timeouts

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

* fixup: decrease test iterations

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

* Use official image

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-12-06 13:50:56 -08:00
Lance Ball 0d68ff945e
chore: refactor cli flags for path and namespace (#702)
These flags are used by multiple commands, and explicitly setting them for
each command risks errors that may not be easily detected (see the deleted
flag text for `namespace` in deploy.go). The downside to this is that wording
is not sligtly tweaked for the command - see again some of the removed text
for `namespace` that was slightly different for each command, but usefully so.

I'm not 100% convinced this change is needed, since it does reduce the flexibility
of the user facing text. But if it had existed before we wouldn't have had
incorrect text for `deploy`.

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/221

Signed-off-by: Lance Ball <lball@redhat.com>
2021-12-06 11:46:27 -08:00
Luke Kingland 79ad65ddf4
fix: remove template manifest from final Function (#703) 2021-12-06 10:30:27 -08:00
knative-automation 02a9a212da
Update community files (#699)
Signed-off-by: Knative Automation <automation@knative.team>
2021-12-06 06:04:28 -08:00
Luke Kingland 92ac14a6f7
refactor: config path accessors with instantiation cleanup (#686)
* feat: config and repository path creation

Removes need to use a client to trigger creation of paths
Adds back static path accessors
Enables creation of paths when configured repos is outside config
Cleans up instantiation logic, including removal of some setters

* fix spelling mistakes per review
2021-12-06 06:03:28 -08:00
Fabian Lopez 2f241824ff
feat: add flag to push image at the end of a successful build (#681)
* add flag to push image at the end of a successful build

* ensure that push flag is binded to viper

* add unit test to build command

* change build test name

* add registry to build test

* fix e2e test problem

* fix compile error

* add push fail test case

* avoid pusher instanciation in absence of push flag
2021-12-03 07:07:37 -08:00
Matej Vasek addd865452
docs: `podman`: known issue + macOS doc (#698)
* docs: `podman`: known issue + macOS doc

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

* fixup: doc

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

* Update docs/guides/podman.md

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

* fixup: style

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

Co-authored-by: Lance Ball <lball@redhat.com>
2021-12-02 08:14:46 -08:00
knative-automation 3f07ca1310
Update community files (#697)
Signed-off-by: Knative Automation <automation@knative.team>
2021-12-02 05:40:45 -08:00
Lance Ball 10f2cf44c7
fix: make registry validation work again (#690)
* fix: make registry validation work again

In ccf00152be
the behavior of `NewFunction()` changed slightly, such that it no longer actually
works without a provided and valid path. This was not caught in any of the
tests, because it's the CLI code that was making this call, and the end to end
tests that exercise the build command, use the `--repository` flag, causing
the repository validation code path to be slightly different.

This commit just adds the path so that `func build` without a `--repository` flag will work again.

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

* fixup: add validation for registry flag and a test

Signed-off-by: Lance Ball <lball@redhat.com>
2021-12-01 18:11:45 -08:00
Lance Ball 91ad41034b
chore: remove release-please from ci (#689)
Since we are moving towards using the Knative tooling for releases, and
because release-please-action will not work in the repository due to knative
branch protection rules, I'm removing this from CI entirely as we work towards
an alternative solution.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-12-01 02:36:57 -08:00
Lance Ball 4b3a5c32df
chore: revert using a fork of boson-project/test-templates (#687)
Signed-off-by: Lance Ball <lball@redhat.com>
2021-11-29 21:51:08 -08:00
Luke Kingland db9ad07c70
feat: ensure config and repos path exists (#683) 2021-11-29 13:53:08 -08:00
Zbynek Roubalik c7d18c89ed
fix: schema-generate should point to `function.go` (#677)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-11-29 05:36:04 -08:00
Evan Anderson a7f0374c04
Clean up tests: (#679)
- switch reflect.DeepEqual to cmp.Diff for better readability
- some cmp.Diff arguments were reversed(!)
- coverted one test into a table test
- cleaned up some misleading error messages
- preferred testing.Error to testing.Fatal to enable collecting more errors at once
2021-11-28 21:29:03 -08:00
knative-automation 978f3be443
Update actions (#680)
Signed-off-by: Knative Automation <automation@knative.team>
2021-11-28 21:23:03 -08:00
Luke Kingland ccf00152be
feat: function version migrations (#664)
* feat: function version migrations

* unmarshall functin now part of initialization

* regenerate schema

* spelling errors
2021-11-24 04:50:27 -08:00
knative-automation 0eb3fef080
Format go code (#666)
Signed-off-by: Knative Automation <automation@knative.team>
2021-11-23 19:08:26 -08:00
knative-automation 7ec357e1be
Update actions (#588)
Signed-off-by: Knative Automation <automation@knative.team>
2021-11-23 19:07:26 -08:00
Shashank Sharma a0bfc3e3ef
making language runtime a required flag (#647)
* making language as required flag

* create tests fixed

* gofmt

* more tests fixed

* more tests added for invalid runtime and template

* changes removed from client library

Co-authored-by: Luke Kingland <58986931+lkingland@users.noreply.github.com>
2021-11-23 18:43:27 -08:00
Lance Ball e4831da4d4
chore: remove dead code (#561)
* chore: remove dead code

The default builders configured in builder.go were not only wrong, but
also not even used anymore. Removing them...

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

* fixup: fix failing e2e tests

Signed-off-by: Lance Ball <lball@redhat.com>
2021-11-23 11:29:50 -08:00
Sameer Vohra 1d0a001c99
Update getting_started_localhost.md (#672)
nit: simplify wording
2021-11-22 03:59:14 -08:00
Matej Vasek ee96bef9ae
fix: use default socket path for TCP connections (#669)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-11-19 12:16:23 -08:00
Matej Vasek 834e8ae46c
fix: use specific version of paketo builder (#670)
For some reason latest version is not working with node.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-11-18 14:40:22 -08:00
knative-automation 836d47e54c
Update community files (#665)
Signed-off-by: Knative Automation <automation@knative.team>
2021-11-17 09:15:33 -08:00
Luke Kingland c2e1b769cc
src: direct serialization of Function metadata as func.yaml (#641)
* src: directly serialize Function metadata as func.yaml

Functions now save directly to func.yaml using .Write().
Fixes a serialization error where defaults were not respected on load.
Moves runtime and template defaults into function constructor.
Extracts Function validation (was config validation) into separate functions.
Extracts associated test files (validation) into separate unit test files.
Updates schema generator to use Function

* comment spelling and re-enabling tests
2021-11-17 06:18:35 -08:00
Lance Ball 3935747b91
chore: use buildEnvs instead of custom buildpack (#663)
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>
2021-11-16 17:37:33 -08:00
salaboy c70a21e9a4
feat: make SpringBoot template SpringNative by default (#649)
* 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
2021-11-16 10:31:53 -08:00
Lance Ball 292fc1af09
Revert "feat: add POD_NAME as an environment variable (#660)" (#661)
This reverts commit 64473b7197.
2021-11-15 13:03:55 -08:00
Lance Ball 64473b7197
feat: add POD_NAME as an environment variable (#660)
🎁 This change adds POD_NAME as an environment variable for a deployed
function using the Kubernetes downward API. An alternative means of exposing
this information would be through the filesystem. For example, a file at
`/etc/func/pod_name` would contain the pod's name. I chose to use the env
as the place to surface this because it was easier to implement, and likely
easier to consume for a function developer.

The motivation for this change is that the Node.js and TypeScript invocation
runtime will be exposing telemetry/metrics through Prometheus at a `/metrics`
endpoint (see: https://github.com/boson-project/faas-js-runtime/pull/109).
The OpenTelemetry specification has some experimental labels for function
runtime environments which don't specifically mention pod name (the spec
is not unique to Kubernetes), but do imply the need for a unique identifier
such as this.

Ref: https://github.com/open-telemetry/opentelemetry-specification/blob/main/specification/resource/semantic_conventions/faas.md

Signed-off-by: Lance Ball <lball@redhat.com>
2021-11-15 12:08:55 -08:00
salaboy 597195bab8
Initial support for buildEnvs in manifest.yaml (#646)
* initial support for buildEnvs for review

* fix codestyle

* more codestyle

* goimports now working

* adding repo and template level buildEnv checks

* fixing repository test

* updating Envs to []env

* missing Envs

* updating Using

* EOF in yaml file

* go fmt

* go fmt in repository test
2021-11-15 05:35:55 -08:00
Matej Vasek 852626a975
Docker SSH test (#659)
* src: refactor tests

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

* src: add comments

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

* src: fix style

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

* test: add test for ssh docker client

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

* src: refactore rename struct

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

* src: more reliable connection disposal

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

* src: avoid unnecessary wrapping

When using dial-stdio the DialContext is not associated
with an SSH connection so wrapper with clean up is not needed.

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

* src: add doc comment

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-11-14 17:18:54 -08:00
Matej Vasek 3ae08b01af
Refactor tests (#658)
* src: refactor tests

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

* src: add comments

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

* src: fix style

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-11-14 17:15:54 -08:00
Luke Kingland e1fa1ad3c7
chore: test helpers relocation (#653)
* chore: test helpers relocation

The knative automations run test with all tags set simultaneously.  This
causes collisions when using tags to separate sets.  This commit moves
all helper functions in the function_test package into a file with no
build tags such that any combination of tags will work.

* src: move test helpers into their own package

* src: spelling and language tweaks
2021-11-12 05:39:37 -08:00
Luke Kingland 4d29384958
chore: prefer slices over plural types (#655)
* chore: prefer slices over plural types

* chore: update formatting to reflect slice types
2021-11-12 03:36:36 -08:00
Luke Kingland db2c3e246e
ci: remove redundant combined workflow (#650) 2021-11-12 02:45:36 -08:00
Luke Kingland c4168a762d
chore: extract config validate (#656) 2021-11-12 02:09:36 -08:00
Luke Kingland aabc40a1cd
ci: func-local workflow golangci-lint to v1.43.0 (#652) 2021-11-12 01:56:36 -08:00
Matej Vasek bfdfb760cf
feat: automatically start podman service (#648)
* feat: automatically start podman service

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

* src: refactor rename function

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

* src: add commnets to tests

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

* src: refactor rename function

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-11-11 09:38:38 -08:00
Luke Kingland e20ac4c6b7
chore: build tag consistency (#654)
The integration tests and unit tests are currently expected to be
disjunct sets.  While we may change to being additive in the future,
this change makes us consistent by adding the integration exclusion tag
to a few non-integration test files where it was currently missing.
2021-11-11 08:45:38 -08:00
Luke Kingland 1bf17ec976
feat: function creation timestamp (#651) 2021-11-11 08:25:38 -08:00
David Simansky fc1e874a5d
Update Knative dependencies to 0.26 (#642) 2021-11-10 08:47:46 -08:00
Shashank Sharma 1bbef7a0e6
Removing workaround to disable selinux label - updated (#645)
* pack 0.22, related refactoring

* blank line removed

* custom docker client added in pack client

* gofmt, golint, goimports
2021-11-09 07:47:43 -08:00
Shashank Sharma dc0f0c1289
MethodNotAllowed for rust cloudevents template (#639) 2021-11-08 11:32:42 -08:00
Lance Ball c810efc7a4
fix: remove stray manifest.yaml files (#628)
Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/626

Signed-off-by: Lance Ball <lball@redhat.com>
2021-11-05 12:07:12 -07:00
Kenjiro Nakayama 5553998b9c
Do not print header when func list does not find any functions (#632)
`func list` prints the header when it gets `No functions found`.
This patch stops displaying the header.

ASIS
```
$ func list
No functions found
NAME  NAMESPACE  RUNTIME  URL  READY
```

The header `NAME  NAMESPACE  RUNTIME  URL  READY` should not be print.

TOBE (by this patch)
```
$ func list
No functions found
```
2021-11-05 09:00:12 -07:00
knative-automation 2cb5d6f1a9
Update community files (#629)
Signed-off-by: Knative Automation <automation@knative.team>
2021-11-04 11:24:01 -07:00
github-actions[bot] f6a4ef21ac
chore: release 0.19.0 (#624)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-11-03 19:49:14 +01:00
Lance Ball 2d6123118f
chore: bump go version to 1.16 in ci build (#625)
Signed-off-by: Lance Ball <lball@redhat.com>
2021-11-03 11:22:47 -07:00
Zbynek Roubalik 0ed1e81692
fix: ConfigMap/Secret key validation (#623)
* fix: ConfigMap/Secret key validation

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* add more tests

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-11-03 10:20:48 -07:00
Zbynek Roubalik ac9de9dfc6
fix: Environment values -> Environment variables (#622)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-11-03 08:24:49 -07:00
Lance Ball eddd991c1c
Revert "chore: use release-please fork for release branches (#609)" (#621)
This reverts commit b9d6d07b98.
2021-11-03 06:52:47 -07:00
jrangelramos d1b322fe82
test: add e2e test for config volumes (#612) 2021-11-03 05:40:47 -07:00
Matej Vasek e1f164d2ca
feat: ssh connection to remote docker daemon (#594)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-11-02 09:39:41 -07:00
David Simansky d7dbebb747
Update Knative to 0.25 + cherry-pick E2E refactor (#617)
* ci: split pull_requests workflow

* ci: make binary for e2e tests

* Update Knative to 0.25 release

* Update pkged file

* Update pkged file

* ci: Install Bash 4 to MacOS unit tests

* ci: Fixup java version

Co-authored-by: Luke Kingland <lkingland2038@gmail.com>
2021-11-02 09:38:41 -07:00
Lance Ball 953d4ac9a4
chore: bump go to 1.16 in ci workflow (#618)
The CI workflow is failing because we now depend on at least 1.16.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-11-02 07:35:40 -07:00
jrangelramos 1e25167d07
test: setup CodeCov report (codecov.io) upload and bot (#615) 2021-11-01 15:13:40 -07:00
knative-automation c03ba60e17
Update community files (#613)
Signed-off-by: Knative Automation <automation@knative.team>
2021-10-29 06:02:51 -07:00
Lance Ball e319ea3b62
feat: add support for manifest.yaml at repo/language/template levels (#558)
* feat!: add support for manifest.yaml and runtime.yaml

BREAKING CHANGE
This commit adds the concepts of a manifest.yaml file at the top level
of a template repository, and a runtime.yaml file for each language/runtime
within the repository. Prior to this, repository metadata was primarily
restricted to information that could be gleaned from the file system, such
as the directory name used as the Name.

A manifest.yaml file contains a Name, URL, Version, and a list of supported
runtimes; and if all of the runtimes expose the same health endpoints, these
can be set here.

Within a runtime directory, there may exist a runtime.yaml file which allows
language pack providers to set the health endpoints, overriding the values
set in manifest.yaml, as well as Builders and Buildpacks.

This change removes support for a builders.yaml file in a runtime/template
directory, as this was guaranteed to be redundant with the builders.yaml
file in a sibling template directory. The choice was to move these up a
level to runtime/runtime.yaml.

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

* fixup: bump go version for unit tests

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

* fixup: using go 1.16 now requires 'go mod tidy'
See: https://golang.org/doc/go1.16

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

* fixup: restore support for directory traversal

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

* fixup: whitespace linting

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

* fixup: update func_yaml-schema.json

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

* fixup: spelling errors caught by reviewdog

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

* fixup: use os.ReadDir

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

* squash: restore project creation from remote repos

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

* fixup: remove billyFilesystem

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

* doc: expand on language pack documentation

Adds more detail around how language packs can be provided by third
parties, and the expected structure and metadata required.

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/452

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

* doc: update language pack documentation

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

* fixup: cleanup deps

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

* fixup: cleanup deps - again

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

* fixup: reviewdog whitespace cleanup

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

* fixup: custom repo template listing

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

* fixup: bump go version for integration tests

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

* fixup: adjust test-templates repo uri for e2e

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

* fix: don't fail when extended templates don't support a given runtime

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

* src: repo and template type hierarchy

As the client API increases in complexity, upgrading to a more correct
type hierarchy for the object managers serves to keep things clean.  In
this update, the Repository and Templates manager now use constructors
with private members, including a backreference to the root Client
object, which provides the mangers with full access to the current
client instance API for implementing their (growing) features.

* src: template manager writes

The templateWriter struct has now been upgraded to integrate with the
newly-added type system which includes a Templates Manager by adding a
.Write method which writes a template at the given location.  This
encapsulation of the write functionality moves us towards having a
cleaner abstraction atop writing any template to disk from any
repository.

In addition, the "Get" prefix was removed from many accessor methods, as
this is standard a Go idiom.

* src: templates write including denormalize

- merges templateWriter into templates manager
- denormalization of builders, health endpoints etc. made part of .Write
- write logic now works on a Template rather than string paths etc

The templates manager can now write out a template given a function directy.
Included internnaly to write is the denormalization logic, which is now closer
to where it is used, which should improve cohesion and decouple the template
implementation detail from the Client. Also moves the write logic closer to the
template itself, with the expectation the same will happen for functions when
Config and Function are merged.

* src: vendor

* src: merge manifests into domain model

In general, the manifests sytsem is merged more tightly into the overall
system while also expalding it to use a path to templates to avoid
having to create a full filesystem shadow-copy in yaml. Preserves
backwards-compatiblity by keeping the base case a yaml-free repo of only
templates.  Creaets a hierarchical inheritance from repository to
runtime to template for builders, endpoints etc.  whcih allows for the
manifest within templates to be a first-class citizen, though its use
will be rather rare.  Some more in-depth explanations of the more
substantive changes are as follows:

- Merges Manifest with Repository

The Manifest structure is essentially a serialized Repository, so they
are now the same object.

- Converts repo URL to a calculated field

The URL is informative and entirely dependent on the current state of
the repo, so it should be calculated to avoid confusion and avoid being
serialized to the manifest.

- Merge FunctionTemplate with Template

The struct being serialized here is a Template, so they are now the same object

- Extracts new "BuildConfig" embedded struct

The Builders and Buildpacks members are shared between Repository,
Runtime and Template, so they are now an embedded stuct in the same
manner as HealthEndpoints.

- yaml 'inline' declaration for embedded structs

The HealthEndpoints and other embedded structs were not actually being
read from their configs because of a nuance of yaml which (in contrast
to json unmarshallers) requires the `,inline` tag on the struct member
to trigger inclusion in decode.

- Replaces Repository's runtimes member with templates

While it is true that on disk templates are subdivided into their
effective runtime, this is for ease of development.  The logical
structure is: repositories have templates.  Templates are applicabe to
runtimes.  Therefore the correct API is to have templates a direct
member of repository but requiring a runtime filter for access.

- Use repository templates path instead of full list

The goal is to support the use of repositories which contain more than
just templates.  The solution is to define an alternate location for
templates (such as ./templates).  Creating an entire exhaustive manifest
where each runtime and each template is defined with a name and path is
a usurpation of the responsibilities of a filesystem, and causes
unintend negative knock-on effects.  Let's try this simple solution
before jumping to the nuclear option of defining a filesystem-in-yaml.

- Use filesystems when loading repository objects

The fact that a file exists on the disk, embedded, or remote should be
of no concern to most of the code.  This is accomplished by using the
filesystem abstraction which is used during template writing.  This will
be further improved in future versions by upgrading to use the fs.FS
interface and tooling.

- Uses manifest.yaml at all levels

Once the hierarchical nature of the manifest was instituted, it seemed
more intuitive to have the same filename at each level.  This also has
the nice benefit of being backwards-compatible with template-level
manifest.  This is not a correctness issue, but a guess that remembering
a single filename which can exist at different levels in a hierarchy is
easier to remember than different filenames, and its location in the
hierearchy sufficient differentiator making the different filenames
_perhaps_ unencssary.  The constants are left as separate for an easy
revert.

- Moves static defaults into code wherever possible

Wherever yaml was being statically compiled in, it was updated such that
canonical values for static defaults were defined on the Go structure,
with the yaml being for overrides.  For example Default Readiness and
Liveness endpoints.

Some notable benefits of letting the filesystem do it's thing:
* Preserves the ability to create a repository of templates without
  hacking yaml
* Reflects changes directly in IDEs which have native support for
  filesystem, not so for a proprietary manifest.yaml
* the builtin repository has no name, so parsing a manifest from within
  it is both prone to error and confusing, as it could lead future
  developers to submit PRs which change its name.

* fix: revert repository.git to a bare server repo

* src: repository default name

The Repository struct now includes a Name and DefaultName. The former is
the current name of the repository, and corresponds to the path on disk.
The latter is the name specified in the manifest.yaml, and is used as
the default name of the repository when no name is provided.

Fixes an issue where there could be name collisions using a uuid for the
initial name until the manifest is read in.

Restructures the embedded repositories such that one exemplifies a base
case repo with no metadata and only templates, the other specifying a
manifest to exemplify for example a complete language pack.

Adds a test such that all three cases are covered: explicit name, no
name but manifest-defined default name, URI-derived name.

* feat: single repo mode

Enables single repository mode suystem-wide, which fully implements the
logic intended by the WithRepository option.

The default repoisitory is now programatically defined, and while by
default is the embedded repo, it can be overriden using the
WithRepository option.  This keeps the logic internal to the
repositories managet, removeing the need for a crossp-cutting concern in
other parts of the system.

* src: manifest inheritance and existence tests

Respects alternate templates location when defined in a manifest.
Respects manifest embedded structs HealthEndpoints and BuildConfig at
each of the three levels, with inheritance:  Repo, Runtime and Template.
Separates test repositories into the two cases of a templates-only repo
(with no manifest) and a complex repo (with manifests) such as for
language packs.
Leaves the BuildConfig struct as inline but sets the HealthEndpoints as
being named, such that the latter has its fields in the yaml under the
key 'healthEndpoints' but the former does not (passthrough).
Adds error checks when attempting to access named repo when in
single-repo mode.

* src: remove function merge

Removes feature of mergine a func.yaml defined in a template in favor of
sticking with the manifest.yaml until such time as this is requested.
Assuming YAGNI.

* src: repo filesystems

- Embeds repositories with an internal filesystem
- Replaces filesystem disk checkouts with in-memory until final write
- Combines template Write of various types into a single write which uses the
  filesystem of the applicable templates's repository
- Template is now a simple noun, with logic localized to the templates manager
- Adds better error message regarding single repo mode conditions

The reason for replacing filesystem-based repository instances with in-memory
(especially remote for WithRepository mode) is for a few reasons:  First, 'Add'
will fail without using the temporary UUID hack if there already exists a
repository of the _repo_ name (due to a filesystem collision).  We have
to read the repo to determine the default name as well, so it's messy to avoid.
Second, using an on-disk version is potentially leaky because it may leave
files on the system in the event of a process interruption; able to be
mitigated, but with a likewise hacky use of a os temp directory.  Third, it
may cause racing conditions when using multiple instances the Client as a lib.
Lastly, it precludes our ability to run without touching the filesystm: a
useful mode when running as a pure library or in security-restricted
environments.

* fix: paths within embedded fs

* src: repositories code cleanup

* Removes the manual 0_18 version suffix
* Reanames "single" (uri for single-mode) to the more descriptive
  "remote" (with associated accessor api)
* Default repo name when no URI provided is set to default
* Various wording improvements in error text and comments

* src: error formatting

* feat: templates from local file paths

Adds back the local os filesystem as a fallthrough to support loading
template repositories from file:// paths on disk, without the
requirement that they also be git repositories.

* fix: clone once

Fixes the shortcut of performing a clone to read the manifest prior to
cloning the repository to disk.  This double-clone was replaced by a
single clone (applying the manifest) followed by a file copy from the
in-memory FS to the on-disk repository location.

* src: test fixes

* respect explict name on repository .Add
* fail if repository already exists
* update expected test filenames to new general (non-go-specific) setup
* adds the default repo name to the NewRepository constructor,
  internalizing the somewhat tricky default logic.
* move repo write logig to repo itself, as it will contain impl-specific
  nuances.
* invalid repo path is an error, but only if defined
* temporarily disable repository URL test

* src: update templates test to reflect new name 'cloudevents'

* src: fix go templates and repackage

* fixup: reviewdog spelling errors

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

* fixup: reviewdog whitespace cleanup

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

* fixup: run ./hack/update-codegen.sh

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

* fixup: restore boson-project templates for e2e

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

* fixup: do not error if default repo location does not exist

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

* fixup: typo

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

* paketo builder and paket community rust buildpack (#599)

* fixup: apply f161d50084

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

* fixup: update documentation to match impl

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

* fixup: add git attributes to ignore linting on binary files

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

* fixup: remove whitespace

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

* fixup: tweak linter rules

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

* fixup: tweak .gitattributes

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

Co-authored-by: Luke Kingland <lkingland2038@gmail.com>
Co-authored-by: Shashankft9 <48708039+Shashankft9@users.noreply.github.com>
2021-10-27 07:09:01 -07:00
Lance Ball b9d6d07b98
chore: use release-please fork for release branches (#609)
This is because we don't have the ability to set branch protection rules
in the kn-plugin-func repository, and release-please tries to force push
it's CHANGELOG updates to the release branch as new PRs land on main.

I **think** this will work.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-10-27 04:40:01 -07:00
Lance Ball fb7504a900
src: improve usability of Node.js and TypeScript templates (#608)
* src: improve usability of Node.js and TypeScript templates

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/596
Related: https://github.com/knative-sandbox/kn-plugin-func/issues/572

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

* fixup: whitespace again

Signed-off-by: Lance Ball <lball@redhat.com>
2021-10-27 04:39:01 -07:00
salaboy cf9596c83e
feat: validation for registry/namespace to not contain image name (#601)
* initial validation for registry/namespace to not contain image name

* Update function.go

* supporting nested namespace
2021-10-26 11:13:21 -07:00
knative-automation 4bba2b48cb
Format go code (#602)
Signed-off-by: Knative Automation <automation@knative.team>
2021-10-26 04:11:21 -07:00
jrangelramos 6385147e06
update test file name (#605) 2021-10-25 11:47:37 -07:00
Preetham 9b01368418
docs: documentation for `buildEnv` (#592)
* Doc for func.yaml's buildEnv

* Update docs/guides/func_yaml.md

Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com>

Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com>
2021-10-25 05:58:38 -07:00
Shashankft9 f161d50084
paketo builder and paket community rust buildpack (#599) 2021-10-25 05:57:38 -07:00
knative-automation 403e193ecc
Format go code (#593)
Signed-off-by: Knative Automation <automation@knative.team>
2021-10-20 01:59:53 -07:00
jrangelramos ec75319ba5
test: add e2e test for config labels and config envs (#568) 2021-10-19 04:06:34 -07:00
knative-automation cd45b6c007
Format go code (#589)
Signed-off-by: Knative Automation <automation@knative.team>
2021-10-18 10:08:22 +02:00
Preetham 114a5faee3
feat: allow developers to provide Build Envs to buildpacks in `func.yaml` (#571)
* Enhance func.yaml to provide build envs to buildpacks

* Add schema file deleted by make clean

* Add function ValidateBuildEnvs to config.go

* Addressed review comments

* Revert makefile changes to pkged.go

* Fixed buildpack env update lost in rebase

* Add support for local env in buildEnvs
2021-10-16 00:54:23 -07:00
jrangelramos 151f64f81e
test: Fix quarkus e2e update test template (#587) 2021-10-14 12:33:10 -07:00
knative-automation 66fb60904c
Update actions (#586)
Signed-off-by: Knative Automation <automation@knative.team>
2021-10-14 03:30:42 -07:00
Matthias Wessendorf 7d78de98a8
chore: remove unused Context import (#570)
* 💄 Remove unused Context import

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* ♻️ regenerate pkged.go

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2021-10-14 03:15:43 -07:00
Lance Ball 68b0904b17
feat!: rename event templates to 'cloudevents' (#584)
* feat!: rename event templates to 'cloudevents'

This commit renames the templates for cloudevents to be named "cloudevents".

BREAKING CHANGE

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

* fixup: update commands.md doc

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

* fixup: fix make test-templates

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

* fixup: missed an e2e test change

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

* fixup: gitignore and pkged.go

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

* fixup: adjust Makefile recipe for pkged.go

Signed-off-by: Lance Ball <lball@redhat.com>
2021-10-13 14:19:42 -07:00
Fabian Lopez d2ee140cee
Detect and report unreachable image deployment (#579)
* detect and report unreachable image deployment

* change error message for private images

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

Co-authored-by: Lance Ball <lball@redhat.com>
2021-10-13 06:43:48 -07:00
Matej Vasek e85a4aa7f3
feat: Save password after user input (#560)
* Save password after user input

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

* Improve wording

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Lance Ball <lball@redhat.com>

* Apply suggestions from code review

Signed-off-by: Matej Vasek <mvasek@redhat.com>
Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com>

* Improve test

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

* Fix for symlinks

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

Co-authored-by: Lance Ball <lball@redhat.com>
Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com>
2021-10-13 06:29:47 -07:00
Matej Vasek ef7b986900
feat: Improve build performance (#569)
* Update buildpack deps

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

* Update licences

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

* Enable trust for paketo buildpack builder

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

* Enable trust-builder for newer versions of podman

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

* fix style

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-10-11 06:17:16 -07:00
Matthias Wessendorf 52fb215c3c
chore: Cloudevents sdk 2.5.0 (#566)
* Bumping templates to 2.5.0

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>

* Bump the project to 2.5.0 as well

Signed-off-by: Matthias Wessendorf <mwessend@redhat.com>
2021-10-11 02:31:15 -07:00
Zbynek Roubalik 0e3c6764ef
fix: improve error message when invalid function name is used (#567)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-10-07 07:43:27 -07:00
David Simansky bb8dc74971
Fix plugin version retrieval (#564) 2021-10-07 06:42:28 -07:00
Lance Ball eccc0ad368
chore: improve messaging in func build (#562)
Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/552

Signed-off-by: Lance Ball <lball@redhat.com>
2021-10-07 06:41:36 -07:00
Fabian Lopez 7b80790bc9
Fix deployment on k8s cloud providers (#563)
* fix deployment on k8s cloud providers

* ran update codegen
2021-10-05 13:34:45 -07:00
Matej Vasek 4b47dbba78
Update Quarkus version in templates (#557)
* Update Quarkus version in templates

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

* Update Java to 11 in GH actions

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-09-27 14:33:13 -07:00
Fabian Lopez 62b21f0536
avoid unintentional image/registry overwrite (#551) 2021-09-24 05:43:23 -07:00
Matej Vasek b10c48453c
fix: registry URL comparison (#549)
* fix: registry URL comparison

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

* Changed port equivalence

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-09-23 08:04:14 -07:00
knative-automation 0ce0aad507
Update community files (#554)
Signed-off-by: Knative Automation <automation@knative.team>
2021-09-23 06:37:13 -07:00
Luke Kingland 4fe9fdcab0
feat: create cli (#547)
* feat: create cli prompts

* feat: display effective runtimes in prompt

replaces the static list of supported runtimes with a dynamic list of
currently installed+available runtimes; called the effective runtimes.
Used for both prompting and validation.

* feat: dynamic create help and error text

Output from create help text and the create commands now show valid
options for both language runtimes and templates.

* feat: runtime tab completion for runtmes and templates

* feat: support FUNC_PARENT_COMMAND in help

* feat: confirmation of successful create

* fix: include name in initial creation

* src: remove unnecessary comments on create name

* fix: associate prompt questions with struct members in create

* e2e: update tests for language flag

* fix: support nonexistent repositories path

Listing installed repositories considers a missing path equivalent to a
lack of installed repositories.  This will change to an error when the
logic to determin default config directory, and automatically create
initial structure, is moved into the client library.

* fix: only CLI-validate when no repo override
2021-09-22 13:00:12 -07:00
knative-automation 410f46e1e7
Update actions (#548)
Signed-off-by: Knative Automation <automation@knative.team>
2021-09-22 02:38:18 -07:00
Lance Ball 4f3e5fdb7a
fix: stop the progress ticker after build completes (#544)
This actually simplifies the ticker quite a bit by removing the
channel for communicating quit and instead just deferring calling
ticker.Stop()

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/542

Signed-off-by: Lance Ball <lball@redhat.com>
2021-09-21 08:19:36 -07:00
Matej Vasek 8e882bc934
Add serveraddress to auth header of docker API (#543)
* Add serverURL to RegistryAuth

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

* fixup

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-09-20 07:52:36 -07:00
Luke Kingland 25f8b4d6ea
fix: update-pkger.sh sed error on osX (#541)
The script depends on GNU-sed, which is not installed on OS X by
default.  This update changes the solution to using a touched file
rather than sed.
2021-09-20 07:40:35 -07:00
Markus Thömmes 163588f5a5
Add knative/hack scripts for updating deps (#534) 2021-09-19 16:04:33 -07:00
Lance Ball 01689e7c13
feat: periodically update progress during build (#537)
Some feedback from the user interviews indicated that people sometimes
get confused by how long it takes to  build a function the first time
and are tempted to kill the process. This change updates the progress
message every five seconds for twenty seconds, and if a build takes longer
than that the message remains "Still building".

Not sure if this is really needed, but it was a fun and easy fix.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-09-19 16:02:34 -07:00
Lance Ball ad4607bd50
fix: hide a fmt.Println behind verbose flag (#538)
Signed-off-by: Lance Ball <lball@redhat.com>
2021-09-19 16:00:34 -07:00
Omer B a167b89d5a
Update installing_cli.md (#539)
closes #441
2021-09-18 09:26:32 -07:00
knative-automation f1c1779e08
Update actions (#517)
Signed-off-by: Knative Automation <automation@knative.team>
2021-09-17 08:14:31 -07:00
github-actions[bot] 745d6a4253
chore: release 0.18.0 (#466)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-09-16 13:32:09 -04:00
Matej Vasek 16ee28c83d
fix: use full image names (#535)
This is useful when working with `podman` which dislikes short names.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-09-16 08:51:40 -07:00
Markus Thömmes 94e49eb3cd
Vendor dependencies (#531)
* Vendor dependencies

* Update pkger again

* Roll back go.sum changes
2021-09-16 04:42:39 -07:00
knative-automation c8fd06d288
Update community files (#530)
Signed-off-by: Knative Automation <automation@knative.team>
2021-09-16 03:57:39 -07:00
Matej Vasek 4236ba9287
Better credentials handling (#526)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-09-16 02:57:39 -07:00
Markus Thömmes 3bceab840d
Revert linting action to the canonical version (#533) 2021-09-16 02:46:39 -07:00
Luke Kingland 90c60b693d
fix: removal of repositories (#524) 2021-09-15 06:48:08 -07:00
knative-automation 07dda2b577
Update community files (#525)
Signed-off-by: Knative Automation <automation@knative.team>
2021-09-15 02:02:08 -07:00
David Simansky 5201c767d1
Update Knative dependencies to v0.24 (#521) 2021-09-13 07:43:33 -07:00
Zbynek Roubalik a73981abe0
src: add test for DeriveImage (#518)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-09-13 05:34:32 -07:00
Zbynek Roubalik bb2f306042
chore: properly access repositories (#519)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-09-10 06:03:30 -07:00
Luke Kingland e0aad6f936
feat: client effective runtimes list (#490)
* feat: repositories accessor

* feat: repository and templates client api

- Templates management api
- Repositories management api expansion

* fix: nil pointer reference on generate

* src: test temp directory name consistency and comment improvements

* feat: runtimes accessor
2021-09-09 14:25:30 -07:00
Luke Kingland ae638c349c
feat: repository management cli (#514)
* feat: repository management cli

* src: cleanup imports, newlines, spelling and trailing whitespace
2021-09-09 08:09:00 -07:00
Luke Kingland 1125c53d6b
ci: fix tar error on golangci-lint-action (#516) 2021-09-09 03:33:58 -07:00
Zbynek Roubalik 8aba038073
fix: `build` should honor registry specified in `-r` (#510)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-09-08 17:23:58 -07:00
knative-automation 927a26737a
Update actions (#509)
Signed-off-by: Knative Automation <automation@knative.team>
2021-09-08 11:49:45 -07:00
Lance Ball 71368c6a1d
chore: update files with goimport (#513)
* chore: update files with goimport

This should get https://github.com/knative-sandbox/kn-plugin-func/pull/509
happy and green.

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

* fixup: remove extraneous print statements

Signed-off-by: Lance Ball <lball@redhat.com>
2021-09-08 06:53:45 -07:00
Fabian Lopez eb17fb819c
chore: example message changes between standalone and plugin (#507)
* example message changes between standalone and plugin

Signed-off-by: Fabian Lopez <lfabian@vmware.com>

* make template name a parameter in replaceNameInTemplate

Signed-off-by: Fabian Lopez <lfabian@vmware.com>

* use ExecuteTemplate error

Signed-off-by: Fabian Lopez <lfabian@vmware.com>
2021-09-08 06:42:45 -07:00
Luke Kingland 232101d83b
remove superfluous headers from go template (#515) 2021-09-08 04:41:34 -07:00
knative-automation 3a6cde0d34
Update community files (#508)
Signed-off-by: Knative Automation <automation@knative.team>
2021-09-07 00:56:18 -07:00
jrangelramos 0c1dc13e51
test: adding e2e test for remote repository (#505) 2021-09-03 10:07:58 -07:00
Zbynek Roubalik 77b019213a
chore: fix typo in `build` help message (#503)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-09-02 04:50:06 -07:00
Lance Ball fcd04da267
chore: update buildpack image URI for Go and typescript (#502)
Now that we have the Go and TypeScript buildpack images published at
https://github.com/boson-project/packs the templates should reference
those images.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-09-01 00:31:32 -07:00
Lance Ball c7874538d0
chore: fix typo in deploy command output (#501) 2021-09-01 00:29:32 -07:00
jrangelramos 1172a85c80
fix: control chars on progress listener for Windows OS (#498) 2021-08-31 11:01:55 -07:00
Senthilnathan M 2ae3e46346
Minor fix in the help doc (#500) 2021-08-30 23:57:55 -07:00
Lance Ball 668804e53e
feat: builders/buildpacks configured in client (#495)
* feat: builders/buildpacks configured in client

We have provided support for modifiying the builders and buildpacks
in func.yaml but until now there has not been a way to set these values
when creating a new function with `client.Create(cfg)`. Any values
provided in `cfg` for the builders and buildpacks were ignored and the
builtin defaults were used.

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

* fixup: check err return status

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

* fixup: add test comments and move verbose output to print after user provided values are set

* fixup: incorporate PR feedback
2021-08-30 09:36:28 -07:00
Luke Kingland 25f7007300
fix: fast-fail on create if Function already exists (#496) 2021-08-26 08:33:32 -07:00
Matej Vasek f7c55cb42e
test: add test for listing labels (#494)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-26 04:03:31 -07:00
jrangelramos 5f843f09f6
test: separated with tags common language runtime e2e tests from othe… (#492)
* test: separated with tags common language runtime e2e tests from other e2e tests

* test: rewording e2e scripts and tags to better represent its purposes
2021-08-25 13:14:31 -07:00
Matej Vasek f2efbe5b42
fix: `config labels` panic (#493)
During refactor flag registration was unintentionally removed.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-25 05:32:25 -07:00
Luke Kingland 3f56a8fd7a
feat: repository and templates client api (#475)
* feat: repositories accessor

* feat: repository and templates client api

- Templates management api
- Repositories management api expansion

* fix: nil pointer reference on generate

* src: remove unused test functions

* src: test temp directory name consistency and comment improvements
2021-08-24 10:41:24 -07:00
Lance Ball a4b15ad992
feat: move go, typescript and nodejs to paketo builders (#485)
This commit removes the Red Hat builders from the built in templates
for Go, TypeScript and Node.js, replacing them with paketo builders.
For Go, the builder is augmented with a simple buildpack that installs
the Go wrapper code and its dependencies. For TypeScript, the paketo
buildpacks oddly don't support an `npm build` step, so these templates
are also dependent on a small Boson buildpack. These buildpacks are
currently at https://github.com/lance/boson-buildpacks but should find
a home either in the boson-project organization, or the knative-sandbox
organization.

This change also slightly modifies how the Node.js and TypeScript
templates are structured, reducing the coupling between the buildpack
and a function project.

This commit includes the code in https://github.com/knative-sandbox/kn-plugin-func/pull/465
and is dependent on it in the use of manifest.yaml.

Provide sane defaults for health endpoints

Note that this will need to be documented as a requirement for
language packs that do not wish to provide explicit endpoints for
these kube health checks. In that case, the language pack should
specify these both as the root path, with a query parameter. For
example, `/?health=readiness` and `/?health=liveness`, or some other
similar construct.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-08-24 08:46:24 -07:00
Omer B 5f9ba6ef08
Update OWNERS (#489)
Adding myself as an Owner so I can start using labels
2021-08-23 08:12:35 -07:00
Omer B 2bff56cfc6
add meeting time (#491) 2021-08-23 08:11:35 -07:00
Lance Ball 48f40c35e3
feat: allow language packs to set function metadata (#465)
This commit introduces the concept of a `manifest.yaml` file which
can be added to each template directory to specify things such as health
endpoints, builders and buildpacks for the function.

It problematic that, because we don't yet have the concept
of a global configuration file, the only place to store this metadata is
in a project's `func.yaml` file. There is no reason a function dev
should be exposed to things like health endpoints. This information is
determined by the language pack and integrated by the builder. The only
reason we need it is that it's necessary to determine these endpoints when
deploying. Otherwise, we would have to insist that all language packs
provide endpoints at `/health/readiness` and `/health/liveness`.

This commit also adds support for a `buildpacks` property in `manifest.yaml`
which will be used to set the buildpacks when a function is being built.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-08-22 09:00:34 -07:00
jrangelramos 4b5d7365ac
doc: fix create command help message description (#486) 2021-08-20 00:35:06 -07:00
jrangelramos 10145aab29
style: create command output formatting for repository option (#487) 2021-08-19 14:13:05 -07:00
Luke Kingland 2eae672a67
src: add integration test for remote modes (#484) 2021-08-19 11:47:05 -07:00
Luke Kingland ab4ad30e8d
Remote file modes unit test (#483)
* test: file modes retained from remote template repos

* src: remove unnecessary type coercion
2021-08-18 12:34:04 -07:00
Chris Suszynski e82f12073f
Using systemctl (#481)
Using systemctl is a better idea because users can utilize other subcommands like `status` or `stop` to further manage the podman service.
2021-08-17 09:13:17 -07:00
Lance Ball fcf9e77cb9
fix: support nested subdirs in remote templates (#482)
For some reason when a node in the git in-memory file system is
Stat()ed, if it's a directory the mode bits are 0644 which is not
correct, and causes a failure when trying to write the templates.
This commit explicitly sets the file mode for all directories to
0755.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-08-17 08:30:17 -07:00
Zbynek Roubalik a21252ac93
docs: change `describe` command to `info` (#480)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-08-17 04:19:16 -07:00
Luke Kingland 844e99bfd5
src: template tests use public api (#473)
* src: client tests now use public api

* Update templates_test.go

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

* Update templates_test.go

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

* Update templates_test.go

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

* Update templates_test.go

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

* Update templates_test.go

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

* Update templates_test.go

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

* Update templates_test.go

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

Co-authored-by: Lance Ball <lball@redhat.com>
2021-08-16 09:14:54 -07:00
Lance Ball 10a07578e9
feat!: change `describe` command to `info` (#474)
The describe command conflicts sematically with kubectl describe.
This commit changes the command name to `info`.

Fixes: https://github.com/knative-sandbox/kn-plugin-func/issues/337

Signed-off-by: Lance Ball <lball@redhat.com>
2021-08-15 21:43:54 -07:00
Matej Vasek c8875938d7
chore: ignore IDE files (#476)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-15 21:41:54 -07:00
Matej Vasek 25b1d63b9c
fix: better cleanup before pkger run (#479)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-15 21:28:54 -07:00
Matej Vasek c7b3af41b8
fix: regenerate pkged.go (#478)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-12 08:40:35 -07:00
Matej Vasek 84ff281bed
test: `config` sub-command (#457)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-12 06:30:35 -07:00
Matej Vasek 72a1cf885e
fix: enable healt checks for Quarkus (#477)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-08-12 06:27:35 -07:00
Senthilnathan M 78d7a1af3a
Support nested image paths (#464)
* Support nested image paths

* Added test for image path parsing
2021-08-11 20:31:34 -07:00
Zbynek Roubalik 55696811e3
feat!: use key&value for Labels (#472)
* feat!: use key/value for labels

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* fix typo

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-08-11 10:12:00 -07:00
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
Zbynek Roubalik 12c5cda8e2
feat: allow setting resource requests/limits (#386)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-21 08:38:50 +02:00
Zbynek Roubalik 7a24a103ef
src: refactor prompt to use `AlecAivazis/survey` (#397)
* src: refactor prompt to use `AlecAivazis/survey`

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-21 08:38:26 +02:00
Zbynek Roubalik 83a9ca684f
feat: `func config envs` - interactive prompt (#396)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-21 08:37:48 +02:00
Jim Crossley 4711638495
feat: Rust templates (#376)
* Rust templates for http/event triggers

Each template is a fully-formed actix-web application that includes a
main.rs providing the server configuration and a handler.rs showing an
example function and a few simple unit tests. A README.md provides a
bit more detail to get the user started. The events handler is similar
to the example in the old faas-rust-runtime project.

* With developer guide for Rust
2021-06-18 13:08:50 -04:00
Luke Kingland 40f10277a4
feat: typed errors for templates use cases 2021-06-18 19:08:01 +09:00
Jim Crossley 947fcaa968
feat: add a URL output type for `func describe` (#389)
* Added a URL output type for 'func describe'

Fixes #387

Co-authored-by: Zbynek Roubalik <726523+zroubalik@users.noreply.github.com>
2021-06-18 09:50:36 +02:00
Zbynek Roubalik 76b5800c62
src: envs: use `:` instead of `.` as separators (#394)
* src: envs: use `:` instead of `.` as separators

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* leftovers

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-18 09:50:07 +02:00
Zbynek Roubalik 54f60a2552
src: validate Env Var name (#395)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-18 09:12:45 +02:00
Zbynek Roubalik 4ba95b69a8
feat: `func config volumes` - interactive prompt (#391)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-17 09:21:07 +02:00
Matej Vasek 6e8517c023
fix: disable selinux labeling
disable selinux labeling

prevents permission denied on docker socket mount

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-06-16 23:54:28 +02:00
Zbynek Roubalik b92eaa796b
chore: fix typo in commands guide (#392)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-16 17:59:00 +02:00
Matej Vasek 84f896b329
fix: password read on windows
* fix: password read on windows

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-06-16 04:18:40 +02:00
Zbynek Roubalik a937c490b7
feat: allow setting autoscaling options to deployed KService (#374)
* feat: allow setting autoscaling options to deployed KService

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* incorporate feedback

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* move `target` & `utilization` to `scale` section

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* don't include concurrency.limit

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-15 09:26:36 +02:00
Luke Kingland 8041a25486
extensible repositories flag (#384)
The flag pointing to extensible template repositories is now called
repositories.  This fits with the expectation that this location
will most likely be filled with git repositories containing templates.
2021-06-14 14:57:05 -04:00
Luke Kingland 2147f97ba2
use 'a' for 'additional packages' parameter --packages 2021-06-10 22:42:53 +09:00
Luke Kingland 8ebf56e5f1
template parameter docs re-added 2021-06-10 22:42:33 +09:00
Lance Ball ce29ff6285
refactor!: change --trigger and --templates flags
This commit is a breaking change.

Change the `--trigger` flag to be `--template` and the `--templates` flag
to be `--packages`. This is being done in anticipation of future work focused
on making `func` extensibility friendlier, and in an attempt to finalized some
of the naming conventions we have used to date.

In fact, the `--trigger` flag used to be `--template` but we decided to
change that a few months ago. This commit reverses that decision. The reason
behind this is twofold.

1. Using 'trigger' has proved to be confusing. Even if I create a function
with an HTTP trigger, it will still be invoked when a CloudEvent is sent
to the function process. Or alternatively, it is possible to send a raw
HTTP request to a function with an event trigger. Using 'template' instead
implies that the incoming request does not determine how the function is
invoked - rather it is the structure of the function signature that informs
the invocation.

2. The `trigger` terminology is not inclusive enough for our use cases. For
example, a third party provider of function templates may provide a template
for multiplexing incoming HTTP requests in Go using `gorilla-mux`. It doesn't
really make sense to say that `gorilla-mux` is the trigger. It's just a
defining feature of how the template is structured. I think this:

```sh
func create --runtime go --template gorilla-mux
```

Makes more sense than this:

```sh
func create --runtime go --trigger gorilla-mux
```

In changing this flag to be `--template`, we then need to come up with
another name for our existing `--templates` flag. I chose `--packages`
because what is being specified here is more than just the template. The
user sees only the function template when they run `func create...` but
the filesystem from which this template is pulled also contains metadata
about the template - most importantly right now, `.builders.yaml`. It is
conceivable that we may ultimately want to stuff these directories with
event more metadata in the future.

Something like `--packages` makes sense to me, but I am open to suggestion.

Thinking of these as a package also allows for better extensibility features
down the road. For example, users could reference packages at a URI like so.

```
func create --packages https://mycompany.com/function/templates.tgz
```

This would result in `func` downloading the tarball, extracting it to the
config directory, and using it for additional templates.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-06-09 21:33:21 +09:00
Luke Kingland b30e883e67
refactor!: function signatures implied from trigger
Renames trigger to template, removing it as an unnecessary configuration.
This reiterates that a Function implementation can change function sig
implemented at any time, and it is not part of the configuration.  This
sets the stage for renaming 'templates', and the finalization of the
use cases enabling extensible templates.
2021-06-09 21:18:55 +09:00
Lucas Holmquist b3a6bdf398
chore: fix dead link on the developers guide. (#380)
* The link from the developers guide to the cli command reference guide was missing the file extension
2021-06-09 00:13:43 -04:00
Zbynek Roubalik 1dbb5aecbf
feat: reference ConfigMaps in `envs` and `volumes` sections in config (#371)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-04 15:25:41 +02:00
Zbynek Roubalik 553dfa83f6
chore: e2e tests should run against Knative 0.22.0 (#372)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-02 13:51:12 -04:00
jrangelramos ae8ee9a02c
ci: implementation proposal for func e2e test (#363)
Signed-off-by: Jefferson Ramos <jrangeramos@gmail.com>
2021-06-02 09:43:04 +02:00
Zbynek Roubalik 9d7fd34649
feat: reference Secrets in `envs` and `volumes` sections in config (#369)
* feat: reference Secrets in `envs` and `volumes` sections in config

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-02 09:20:28 +02:00
Zbynek Roubalik 4f0641f586
chore: bump Knative deps to 0.22.0 (#368)
* chore: bump Knative deps to 0.22.0

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-06-01 16:29:41 +02:00
Lance Ball 593bfd0dc9
chore(builders): add explicit version numbers for builder images (#365)
This commit adds specific version numbers to each of the builder images
referenced in function templates, func.yaml file. Because the API for
at least some of the runtimes has changed over time (looking at you,
faas-js-runtime), we should consider publishing our func.yaml files with
known-to-be-working-with-this-release versioned builder images.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-06-01 10:03:59 -04:00
github-actions[bot] aee6180063
chore: release 0.15.1 (#367)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-27 16:31:00 -04:00
Lance Ball 72584ced0d
fix: Revert "chore: bump Knative deps to 0.22.0 (#358)" (#366)
This reverts commit 27f62066ee.
2021-05-27 16:18:33 -04:00
github-actions[bot] 3dda1fa9c0
chore: release 0.15.0 (#346)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-27 12:58:34 -04:00
Lance Ball d3eafe2a84
feat: add typescript templates (#355)
* feat: add typescript templates

Bumps the faas-js-runtime dependency to 0.7.1 and Node.js buildpack dependency to v0.8.1

fix file globbing on windows

adjust eslint/prettier for windows

improve READMEs

add usage guide

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-26 11:23:42 -04:00
Jim Crossley caf0659900
src(templates)!: modify the nodejs event template to accept a cloudevent (#356)
* Simplify the nodejs events template

Pretty-printing the contents of the event and its envelope for each
request. This is handy when invoked as a Knative event sink as some
sources, e.g. Kafka, ignore the response body.

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

* Expect the event parameter to be the entire CloudEvent

This will require a change to the faas-js-runtime, but at least the
template won't need to change when that's released

* Update nodejs guide to reflect 2nd arg's type is CloudEvent

* Templates now using faas-js-runtime 0.7.1

Co-authored-by: Lance Ball <lball@redhat.com>
2021-05-25 13:49:48 -04:00
Zbynek Roubalik f62303b091
chore: bump golangci-lint version (#360)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-05-25 15:05:28 +02:00
Zbynek Roubalik eb47dc7ab2
chore: bump to Go 1.15 (#359)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-05-25 15:05:17 +02:00
Zbynek Roubalik 27f62066ee
chore: bump Knative deps to 0.22.0 (#358)
* chore: bump Knative deps to 0.22.0

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* update to Knative 0.22.0

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-05-25 15:05:05 +02:00
Helio Frota ea0a75a7cc
fix: minor typos in node template docs (#351) 2021-05-18 08:48:34 -04:00
Lance Ball 2a0724083b
src: fail fast with conflicting flags (#348)
Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-17 08:41:44 -04:00
Zbynek Roubalik a9bfb98f68
src: check that func.yaml is correct (#345)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-05-13 19:17:23 +02:00
Lance Ball 49594d9766
feat: add 'kn func emit' command (#332)
This commit adds an Emitter to be used by the CLI commands
for sending CloudEvents to functions, either locally, on
the cluster, or at a specified endpoint.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-13 12:44:11 -04:00
Matej Vasek a74e3dd5e8
src: update CLI help for env flag
Update CLI help for env flag. Now mentioning unsetting of variable.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-13 16:19:22 +02:00
Matej Vasek a72a9a858a
src: add tests
Tests for mergeEnvMaps.

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-13 15:01:33 +02:00
github-actions[bot] 1595b5bb48
chore: release 0.14.0 (#342)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-12 14:55:12 -04:00
Lance Ball 2b025df199
src!: revert bump to go 1.16 and template changes (#340)
* Revert "src: rename boson import 'fn'"

This reverts commit c0a6f561c0.

* Revert "src: all test dirs set to 0700"

This reverts commit 99f01220c2.

* Revert "src: better error when custom template not found"

This reverts commit 6673395834.

* Revert "src: better errors when custom runtime not found"

This reverts commit a31a6f67a1.

* Revert "build: create separate target for templates.tgz"

This reverts commit 11164bf8d9.

* Revert "src: use consistent separators for fs.FS instances"

This reverts commit 4db07b412f.

* Revert "src: update go event template dependencies"

This reverts commit 3bfc13380f.

* Revert "src: tarfs assumes forward slashes internally"

This reverts commit 6cc0e67b1c.

* Revert "feat: support windows paths in embedded templates FS"

This reverts commit c2b216857b.

* Revert "feat: positive error when runtimme or template unrecognized"

This reverts commit acc56b0900.

* Revert "fix: lint issues"

This reverts commit 895872aee7.

* Revert "ci: go 1.16 compatiblity updates"

This reverts commit 1e3959c045.

* Revert "feat: preserve file modes using in-memory tar FS"

This reverts commit 7dc772ec62.

* Revert "feat: create templates archive on go generate"

This reverts commit 63b7f11471.

* Revert "ci: remove pkger from ci"

This reverts commit 876b0dd0f7.

* Revert "src: remove pkger dependency and tidy"

This reverts commit f006ab1e32.

* Revert "src: remove packaging artifact"

This reverts commit 4d9d0a7b4e.

* Revert "src: remove pkger from make targets"

This reverts commit e44c1ad74c.

* Revert "src: replace pkger with embed.FS"

This reverts commit 38874a4afd.

* Revert "src: update references to deprecated ioutil"

This reverts commit 4025460f73.

* Revert "src: require go 1.16"

This reverts commit 512d4c2580.

* chore: update pkged.go

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-12 14:37:21 -04:00
github-actions[bot] c5d31c5691
chore: release 0.13.0 (#319)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-05-12 12:02:26 -04:00
Jefferson Ramos 94e387c932 fix: added checks on delete command test for lint 2021-05-11 13:05:57 -03:00
jrangelramos 203b0f28d1
Merge pull request #1 from matejvasek/tests-for-del-cmd
add tests for delete cmd
2021-05-10 16:51:59 -03:00
Matej Vasek 5a3d385432 add tests for delete cmd
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-10 21:22:11 +02:00
Jefferson Ramos cf9ce0bbd6 [docs] Updated guides for delete command 2021-05-10 15:46:29 -03:00
Jefferson Ramos 8ab0ba243a fix: func delete with explicity name as argument (#323) with strict validation 2021-05-10 13:38:19 -03:00
Luke Kingland 87fd7babf1
chore: remove deprecated func image 2021-05-10 21:00:23 +09:00
Luke Kingland c0a6f561c0
src: rename boson import 'fn' 2021-05-07 14:17:14 +09:00
Luke Kingland 99f01220c2
src: all test dirs set to 0700 2021-05-07 14:05:38 +09:00
Luke Kingland 6673395834
src: better error when custom template not found 2021-05-07 14:05:38 +09:00
Luke Kingland a31a6f67a1
src: better errors when custom runtime not found 2021-05-07 14:05:38 +09:00
Luke Kingland 11164bf8d9
build: create separate target for templates.tgz 2021-05-07 14:05:38 +09:00
Luke Kingland 4db07b412f
src: use consistent separators for fs.FS instances 2021-05-07 14:05:37 +09:00
Luke Kingland 3bfc13380f
src: update go event template dependencies 2021-05-07 14:05:37 +09:00
Luke Kingland 6cc0e67b1c
src: tarfs assumes forward slashes internally 2021-05-07 14:05:36 +09:00
Luke Kingland c2b216857b
feat: support windows paths in embedded templates FS 2021-05-07 14:05:16 +09:00
Luke Kingland acc56b0900
feat: positive error when runtimme or template unrecognized 2021-05-07 14:05:16 +09:00
Luke Kingland 895872aee7
fix: lint issues 2021-05-07 14:05:16 +09:00
Luke Kingland 1e3959c045
ci: go 1.16 compatiblity updates 2021-05-07 14:05:16 +09:00
Luke Kingland 7dc772ec62
feat: preserve file modes using in-memory tar FS 2021-05-07 14:05:14 +09:00
Luke Kingland 63b7f11471
feat: create templates archive on go generate 2021-05-07 14:04:41 +09:00
Luke Kingland 876b0dd0f7
ci: remove pkger from ci 2021-05-07 14:04:41 +09:00
Luke Kingland f006ab1e32
src: remove pkger dependency and tidy 2021-05-07 14:04:39 +09:00
Luke Kingland 4d9d0a7b4e
src: remove packaging artifact 2021-05-07 14:01:06 +09:00
Luke Kingland e44c1ad74c
src: remove pkger from make targets 2021-05-07 14:00:46 +09:00
Luke Kingland 38874a4afd
src: replace pkger with embed.FS 2021-05-07 14:00:46 +09:00
Luke Kingland 4025460f73
src: update references to deprecated ioutil 2021-05-07 14:00:46 +09:00
Luke Kingland 512d4c2580
src: require go 1.16 2021-05-07 14:00:46 +09:00
Matej Vasek 2b5814c8c8
src: cleanup after test
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-06 15:04:12 +02:00
Zbynek Roubalik 9488e01a26
chore: fix typo in node http template (#329)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-05-06 10:27:18 +02:00
Matej Vasek 18cb0f4652
src: update knative deps to 0.21.0
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-05-05 17:20:32 +02:00
Lance Ball 857b0fd19d
feat: add/improve spinner for build and deploy (#322)
This commit modifies the progress meter so that, by default there is no
step counter. It also modifies the responsibility for calling `Done()`,
making it the job of the command rather than the client. This is because
the client does not know how many commands will be executed and therefore
cannot know when the progress bar is done.

This commit also adds String() to the progress bar, and moves logging
responsibility out of the deployer itself and fully into the client.
Deployer#Deploy() now returns a DeploymentResult.

Fixes: https://github.com/boson-project/func/issues/296

Signed-off-by: Lance Ball <lball@redhat.com>
2021-05-03 14:25:19 -04:00
Lance Ball 5feb0e20f3
feat: add support for annotations in func.yaml (#314)
This commit adds limited support for annotations in the func.yaml
config file. The feature is limited, because it's only additive. A
user can add an annotation `foo: bar` in the config and deploy the
function, successfully setting that annotation on the Service.
However, if they subsequently remove `foo: bar` from the config
file, it will _not_ be removed from the deployment. This is because
it's not possible to know, from the set of annotations that currently
exist on the deployment, which ones were set by us and which were not.
So, removing any annotations that are not in func.yaml is unsafe.

It may be possible to store in a hidden file somewhere all of the
user-supplied annotations, allowing us to diff func.yaml with that file,
but I'm not sure I want to go down that path. It might just be best to
document this limitation.

We may also want to document that annotations added through func.yaml
should be user supplied settings/values, and not annotations that are
managed by knative (e.g. the autoscaling annotations).

Fixes: https://github.com/boson-project/func/issues/307

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-28 13:59:03 -04:00
lkingland 255b4fb33c
Draft releases through synchronous tagging (#320)
* feat: synchronously tag releases

* fix: missing verbose version info in inter-release binaries
2021-04-27 17:06:39 -04:00
Lance Ball 89ff286a1f
refactor!: change envVars to env in func.yaml (#316)
There are some places where I've changed variable and function names
where it wasn't strictly necessary. If you don't mind the bit of churn
that results, changing these makes `rg -i envvars` a nice way to check
for anything that could be overlooked.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-27 10:46:50 -04:00
Zbynek Roubalik 541e8586f7
feat: function name matches KService name (#317)
* feat: function name matches KService name

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>

* fix typo

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-26 10:13:32 +02:00
Zbynek Roubalik 36926acfb7
docs: tutorial references to /latest/ for binary download (#318)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-23 16:51:19 -04:00
Matej Vasek 7f8e5954a9
feat: usage of local evnvvar in func cfg file
User now can use syntax like:
envVars:
  SOME_SECRET: {{env.API_KEY}}

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-23 17:51:02 +02:00
Zbynek Roubalik f1ba8c8bd9
chore: adding references to guides (#313)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-23 11:45:26 -04:00
Lance Ball 0d21f62731
docs: add func.yaml field documentation (#312)
This adds a simple explanation of each of the fields in the `func.yaml`
configuration file.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-23 11:29:59 -04:00
Matej Vasek 06455f4bac
fix: default for `--builder` flag
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-22 15:44:15 +02:00
Matej Vasek 12b28f966b
docs: add template reference docs for Quarkus
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-19 16:24:48 +02:00
github-actions[bot] dd2061c3af
chore: release 0.12.1 (#295)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2021-04-14 14:53:41 -04:00
Zbynek Roubalik 2309dd3a53
docs: Golang function developer's guide (#297)
* docs: Golang function developer's guide

Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-14 14:39:15 -04:00
Matej Vasek 4f60504708
src: Quarkus events template uses CloudEvent<> (#303)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-14 14:28:08 -04:00
Zbynek Roubalik c86fdbc5e7
src: use go 1.14 in the templates (#299)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-14 19:47:32 +02:00
Lance Ball 5da927808e
chore: update Node.js faas-js-runtime dependency to 0.6.0 (#302)
* chore: update Node.js faas-js-runtime dependency to 0.6.0
* fixup: remove erroneous console.error statement

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-14 13:27:35 -04:00
Zbynek Roubalik ff4892f171
docs: minor chores and fixes (#298)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-14 13:00:55 -04:00
Zbynek Roubalik 4957b7c6bf
chore: bump CE version in Go templates (#300)
Signed-off-by: Zbynek Roubalik <zroubali@redhat.com>
2021-04-14 12:59:42 -04:00
Lance Ball ad335d217e
chore: update python templates to use parliament context/event (#301)
* chore: update python templates to use parliament context/event

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

* fixup: fix tests

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-14 12:50:52 -04:00
Lance Ball e8b2c1411a
docs: add template reference docs for Python (#292)
* docs: add template reference docs for Python
2021-04-14 10:00:59 -04:00
Matej Vasek 129dc5a834
fix: build needs to use legacy jar
this should be reverted once our buildpack supports fast-jar

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-12 16:52:49 +02:00
Shashankft9 436c5f8b3f
docs: integrators guide update (#293)
* doc update for function creation using client

* root changed to func name
2021-04-12 16:39:07 +02:00
Matej Vasek f2c7b764c2
chore: update Quarkus version (#291)
Signed-off-by: Matej Vasek <mvasek@redhat.com>
2021-04-01 09:28:36 -04:00
Lance Ball ce47370654
chore: fix versioning in CI builds (#290)
* chore: fix versioning in CI builds

For unknown reasons, the git tag for a release CI build via release-please
seems to happen after the build completes. It's a bit uncleear, but the
result is that we get v0.0.0 versions for released builds.

This commit modifies the Makefile to allow for an environment override of
the $VERS variable. Since the release-please-action documents `tag_name`
as output from the action, we can use this in CI to set the environment
variable.

Signed-off-by: Lance Ball <lball@redhat.com>
2021-04-01 09:28:08 -04:00
1393 changed files with 170226 additions and 19272 deletions

View File

@ -55,4 +55,4 @@
[{{ .Tag.Name }}]: {{ $.Info.RepositoryURL }}/compare/{{ .Tag.Previous.Name }}...{{ .Tag.Name }}
{{ end -}}
{{ end -}}
{{ end -}}
{{ end -}}

View File

@ -2,7 +2,7 @@ style: github
template: CHANGELOG.tpl.md
info:
title: CHANGELOG
repository_url: https://github.com/boson-project/func
repository_url: https://github.com/knative/func
options:
commits:
filters:
@ -37,4 +37,4 @@ options:
- Header
notes:
keywords:
- BREAKING CHANGE
- BREAKING CHANGE

27
.codecov.yaml Normal file
View File

@ -0,0 +1,27 @@
coverage:
# Commit status https://docs.codecov.io/docs/commit-status are used
# to block PR based on coverage threshold.
status:
project:
default:
target: auto
threshold: 4%
patch:
# Disable the coverage threshold of the patch, so that PRs are
# only failing because of overall project coverage threshold.
# See https://docs.codecov.io/docs/commit-status#disabling-a-status.
default: false
comment:
# Update existing comment or create new if deleted.
behavior: default
ignore:
- "testdata"
- "**/zz*_generated.go"
- "templates"
- "hack"
- "test"
- "generate"
- "docs"
- "plugin"
- "schema"
- "third_party"

View File

@ -1 +0,0 @@
/func

9
.gitattributes vendored Normal file
View File

@ -0,0 +1,9 @@
testdata/repository-a.git/objects/*/* ignore-lint=true
testdata/repository.git/objects/*/* ignore-lint=true
templates/node/*/package-lock.json ignore-lint=true
templates/typescript/*/package-lock.json ignore-lint=true
version.txt linguist-generated=true
zz_filesystem_generated.go linguist-generated=true
docker/zz_close_guarding_client_generated.go linguist-generated=true
pkg/oci/testdata/test-links/* ignore-lint=true

View File

@ -5,123 +5,258 @@ on:
branches:
- "main"
jobs:
test:
runs-on: 'ubuntu-latest'
check:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: Determine download URL for pkger
id: pkger-download-url
uses: actions/github-script@v2
with:
result-encoding: string
script: |
return github.repos.getReleaseByTag({
owner: "markbates",
repo: "pkger",
tag: "v0.17.1"
}).then(result => {
return result.data.assets
.filter(a => a.name.includes('Linux_x86'))
.map(a => a.browser_download_url)[0];
})
- name: Install pkger
run: |
curl -s -L -o pkger.tgz ${{ steps.pkger-download-url.outputs.result }}
tar xvzf pkger.tgz
- name: Test
run: make test
env:
PKGER: "./${{ steps.pkger-binaries.outputs.binary }}"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Lint
run: make check
outputs:
pkger: ${{ steps.pkger-download-url.outputs.result }}
run: make check && make check-templates
- name: Check that 'func.yaml schema' is up-to-date
run: make schema-check
- name: Check embedded templates content
run: go test -run "^\QTestFileSystems\E$/^\Qembedded\E$" ./pkg/filesystem
build-and-publish:
needs: test
test-unit:
strategy:
matrix:
java: [ 21 ]
os: [ "ubuntu-latest", "windows-latest", "macos-latest" ]
runs-on: ${{ matrix.os }}
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Unit Test
run: make test
- name: Template Unit Tests
run: make test-templates
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: unit-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
test-integration:
runs-on: "ubuntu-latest"
steps:
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Local Registry
run: ./hack/registry.sh
- name: Setup testing images
run: ./hack/setup-testing-images.sh
- name: Integration Tests
run: make test-integration
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: integration-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
e2e-test:
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Local Registry
run: ./hack/registry.sh
- name: E2E Test
run: make test-e2e
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: e2e-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
e2e-on-cluster-test:
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: imjasonh/setup-ko@v0.6
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Setup testing images
run: ./hack/setup-testing-images.sh
- name: Deploy Test Git Server
run: ./hack/install-git-server.sh
- name: E2E On Cluster Test
env:
E2E_RUNTIMES: ""
run: make test-e2e-on-cluster
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: e2e-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
build:
needs: [check, test-unit, test-integration, e2e-test, e2e-on-cluster-test]
runs-on: ubuntu-latest
steps:
# Create a release, or update the release PR
- uses: GoogleCloudPlatform/release-please-action@v2.5.5
id: release
with:
token: ${{ secrets.GITHUB_TOKEN }}
release-type: simple
bump-minor-pre-major: true
# Checkout and test
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: Install pkger
run: |
curl -s -L -o pkger.tgz ${{ needs.test.outputs.pkger }}
tar xvzf pkger.tgz
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
# Standard build tasks
- name: Build
run: make cross-platform
env:
PKGER: "./pkger"
# Upload all build artifacts whether it's a release or not
- uses: actions/upload-artifact@v2
run: make cross-platform
# Upload all build artifacts
- uses: actions/upload-artifact@v4
with:
name: OSX Binary
name: OSX Binary (AMD)
path: func_darwin_amd64
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: Linux Binary
name: OSX Binary (ARM)
path: func_darwin_arm64
- uses: actions/upload-artifact@v4
with:
name: Linux Binary (AMD)
path: func_linux_amd64
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: Linux Binary (ARM)
path: func_linux_arm64
- uses: actions/upload-artifact@v4
with:
name: Linux Binary (PPC64LE)
path: func_linux_ppc64le
- uses: actions/upload-artifact@v4
with:
name: Linux Binary (S390X)
path: func_linux_s390x
- uses: actions/upload-artifact@v4
with:
name: Windows Binary
path: func_windows_amd64.exe
# Build and push a latest image with each commit
- name: Image
run: make image
- name: Push Image
env:
USER: ${{ secrets.QUAY_USER }}
PASS: ${{ secrets.QUAY_TOKEN }}
publish-utils-image:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: docker/setup-qemu-action@v3
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
run: |
docker login -u "$USER" -p "$PASS" quay.io
make push && make latest
for a in amd64 arm64 ppc64le s390x; do
CGO_ENABLED=0 GOARCH="$a" go build -o "func-util-$a" -trimpath -ldflags '-w -s' ./cmd/func-util
done
docker buildx create --name multiarch --driver docker-container --use
docker buildx build . -f Dockerfile.utils \
--platform=linux/ppc64le,linux/s390x,linux/amd64,linux/arm64 \
--push \
-t "ghcr.io/knative/func-utils:v2" \
--annotation index:org.opencontainers.image.description="Knative Func Utils Image" \
--annotation index:org.opencontainers.image.source="https://github.com/knative/func" \
--annotation index:org.opencontainers.image.vendor="https://github.com/knative/func" \
--annotation index:org.opencontainers.image.url="https://github.com/knative/func/pkgs/container/func-utils"
# The following steps are only executed if this is a release
- name: Compress Binaries
if: ${{ steps.release.outputs.release_created }}
run: gzip func_darwin_amd64 func_linux_amd64 func_windows_amd64.exe
# Upload all binaries
- name: Upload Darwin Binary
uses: actions/upload-release-asset@v1
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./func_darwin_amd64.gz
asset_name: func_darwin_amd64.gz
asset_content_type: application/x-gzip
- name: Upload Linux Binary
uses: actions/upload-release-asset@v1
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./func_linux_amd64.gz
asset_name: func_linux_amd64.gz
asset_content_type: application/x-gzip
- name: Upload Windows Binary
uses: actions/upload-release-asset@v1
if: ${{ steps.release.outputs.release_created }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.release.outputs.upload_url }}
asset_path: ./func_windows_amd64.exe.gz
asset_name: func_windows_amd64.exe.gz
asset_content_type: application/x-gzip
publish-image:
needs: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: imjasonh/setup-ko@v0.6
- run: ko build --platform=linux/ppc64le,linux/s390x,linux/amd64,linux/arm64 -B ./cmd/func

14
.github/workflows/knative-go-build.yaml vendored Normal file
View File

@ -0,0 +1,14 @@
# Copyright 2020 The Knative Authors.
# SPDX-License-Identifier: Apache-2.0
# This file is automagically synced here from github.com/knative-extensions/knobots
name: Build
on:
pull_request:
branches: [ 'main', 'release-*' ]
jobs:
build:
uses: knative/actions/.github/workflows/reusable-go-build.yaml@main

19
.github/workflows/knative-go-test.yaml vendored Normal file
View File

@ -0,0 +1,19 @@
# Copyright 2022 The Knative Authors.
# SPDX-License-Identifier: Apache-2.0
# This file is automagically synced here from github.com/knative-extensions/knobots
name: Test
on:
push:
branches: [ 'main', 'release-*' ]
pull_request:
branches: [ 'main', 'release-*' ]
jobs:
test:
uses: knative/actions/.github/workflows/reusable-go-test.yaml@main
secrets:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

17
.github/workflows/knative-security.yaml vendored Normal file
View File

@ -0,0 +1,17 @@
# Copyright 2020 The Knative Authors.
# SPDX-License-Identifier: Apache-2.0
# This file is automagically synced here from github.com/knative-extensions/knobots
name: 'Security'
on:
push:
branches: [ 'main', 'release-*' ]
pull_request:
branches: [ 'main', 'release-*' ]
jobs:
analyze:
uses: knative/actions/.github/workflows/reusable-security.yaml@main

14
.github/workflows/knative-stale.yaml vendored Normal file
View File

@ -0,0 +1,14 @@
# Copyright 2020 The Knative Authors.
# SPDX-License-Identifier: Apache-2.0
# This file is automagically synced here from github.com/knative-extensions/knobots
name: 'Close stale'
on:
schedule:
- cron: '0 1 * * *'
jobs:
stale:
uses: knative/actions/.github/workflows/reusable-stale.yaml@main

15
.github/workflows/knative-style.yaml vendored Normal file
View File

@ -0,0 +1,15 @@
# Copyright 2020 The Knative Authors.
# SPDX-License-Identifier: Apache-2.0
# This file is automagically synced here from github.com/knative-extensions/knobots
name: Code Style
on:
pull_request:
branches: [ 'main', 'release-*' ]
jobs:
style:
uses: knative/actions/.github/workflows/reusable-style.yaml@main

26
.github/workflows/knative-verify.yaml vendored Normal file
View File

@ -0,0 +1,26 @@
# Copyright 2020 The Knative Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
# This file is automagically synced here from github.com/knative-extensions/.github
# repo by knobots: https://github.com/knative-extensions/knobots and will be overwritten.
name: Verify
on:
pull_request:
branches: [ 'main', 'release-*' ]
jobs:
verify:
uses: knative/actions/.github/workflows/reusable-verify-codegen.yaml@main

View File

@ -1,93 +0,0 @@
# Build and test all pull requests
name: Pull Requests
on: [pull_request]
jobs:
build:
strategy:
matrix:
os: ['ubuntu-latest', 'windows-latest', 'macos-latest']
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- name: Determine platform binaries
id: pkger-binaries
uses: actions/github-script@v2
with:
result-encoding: string
script: |
let platform, binary;
switch ('${{matrix.os}}') {
case 'ubuntu-latest':
platform = 'Linux_x86'
binary = 'pkger'
break
case 'windows-latest':
platform = 'Windows_x86'
binary = 'pkger.exe'
break
case 'macos-latest':
platform = 'Darwin_x86'
binary = 'pkger'
break
}
core.setOutput('platform', platform)
core.setOutput('binary', binary)
- name: Determine download URL for latest pkger
id: pkger-download-url
uses: actions/github-script@v2
with:
result-encoding: string
script: |
let platform = "${{ steps.pkger-binaries.outputs.platform }}"
let binary = "${{ steps.pkger-binaries.outputs.binary }}"
core.info('PLATFORM: ' + platform)
core.info('BINARY: ' + binary)
return github.repos.getReleaseByTag({
owner: "markbates",
repo: "pkger",
tag: "v0.17.1"
}).then(result => {
return result.data.assets
.filter(a => a.name.includes(platform))
.map(a => a.browser_download_url)[0];
})
- name: Install pkger
run: |
curl -s -L -o pkger.tgz ${{ steps.pkger-download-url.outputs.result }}
tar xvzf pkger.tgz
- name: Test
run: make test
env:
PKGER: "./${{ steps.pkger-binaries.outputs.binary }}"
- name: Build
run: make build
env:
PKGER: "./${{ steps.pkger-binaries.outputs.binary }}"
- name: Lint
run: make check
integration-test:
runs-on: 'ubuntu-latest'
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Go
uses: actions/setup-go@v2
- name: Provision Cluster
uses: lkingland/kind-action@v1 # use ./hack/allocate.sh locally
with:
version: v0.10.0
kubectl_version: v1.20.0
knative_serving: v0.20.0
knative_kourier: v0.20.0
knative_eventing: v0.20.0
config: testdata/cluster.yaml
- name: Configure Cluster
run: ./hack/configure.sh
- name: Integration Test
run: make test-integration

16
.github/workflows/schema.yaml vendored Normal file
View File

@ -0,0 +1,16 @@
name: Func Check Schema
on: [pull_request]
jobs:
check:
name: Check Schema
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Check that 'func.yaml schema' is up-to-date
run: make schema-check

View File

@ -0,0 +1,64 @@
name: Func E2E OnCluster RT Test
on: [pull_request]
jobs:
test:
name: On Cluster RT Test
continue-on-error: true
strategy:
matrix:
os: ["ubuntu-latest"]
func_builder: ["pack", "s2i"]
runs-on: ${{ matrix.os }}
steps:
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: imjasonh/setup-ko@v0.6
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Setup testing images
run: ./hack/setup-testing-images.sh
- name: Deploy Test Git Server
run: ./hack/install-git-server.sh
- name: E2E On Cluster Test (Runtimes)
env:
TEST_TAGS: runtime
E2E_REGISTRY_URL: registry.default.svc.cluster.local:5000
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
FUNC_BUILDER: ${{ matrix.func_builder }}
run: make test-e2e-on-cluster
- name: Dump Cluster Logs
if: always()
run: |
echo "::group::cluster events"
kubectl get events -A
echo "::endgroup::"
echo "::group::cluster containers logs"
stern '.*' --all-namespaces --no-follow
echo "::endgroup::"

View File

@ -0,0 +1,55 @@
name: Func E2E OnCluster Test
on: [pull_request]
jobs:
test:
name: On Cluster Test
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: imjasonh/setup-ko@v0.6
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Setup testing images
run: ./hack/setup-testing-images.sh
- name: Deploy Test Git Server
run: ./hack/install-git-server.sh
- name: E2E On Cluster Test
env:
E2E_RUNTIMES: ""
E2E_REGISTRY_URL: registry.default.svc.cluster.local:5000
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
run: make test-e2e-on-cluster
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: e2e-tests

78
.github/workflows/test-e2e-runtime.yaml vendored Normal file
View File

@ -0,0 +1,78 @@
name: Func E2E Lifecycle Test
on: [pull_request]
concurrency:
group: ci-e1e-${{ github.ref }}-1
cancel-in-progress: true
jobs:
test:
name: E2E Test
continue-on-error: true
strategy:
matrix:
os: [ "ubuntu-latest", "ubuntu-24.04-arm" ]
runtime: ["go", "quarkus"]
include:
- os: ubuntu-latest
runtime: node
- os: ubuntu-latest
runtime: typescript
- os: ubuntu-latest
runtime: springboot
- os: ubuntu-latest
runtime: rust
- os: ubuntu-24.04-arm
arch: arm64
runs-on: ${{ matrix.os }}
steps:
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Install Binaries
env:
ARCH: ${{ matrix.arch }}
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt for ${{matrix.runtime}} ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Local Registry
run: ./hack/registry.sh
- name: Build
run: make
- name: E2E runtime for ${{ matrix.runtime }}
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt for ${{matrix.runtime}} ------------------"
make test-e2e-runtime runtime=${{ matrix.runtime }} && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
done
echo "------------------ finished! attempt $attempt ------------------"

47
.github/workflows/test-e2e.yaml vendored Normal file
View File

@ -0,0 +1,47 @@
name: Func E2E Test
on: [pull_request]
jobs:
test:
name: E2E Test
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Local Registry
run: ./hack/registry.sh
- name: E2E Test
run: make test-e2e
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: e2e-tests

21
.github/workflows/test-embedded-fs.yaml vendored Normal file
View File

@ -0,0 +1,21 @@
name: Func Check Embedded FS
on: [pull_request]
jobs:
test:
name: Func Check Embedded FS
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Check embedded templates content
run: |
if ! make check-embedded-fs; then
echo "Content of templates directory and embedded FS (zz_filesystem_generated.go) doesn't match!"
echo "Consult https:.github.com/knative/func/blob/main/docs/CONTRIBUTING.md#templates ."
exit 1
fi

84
.github/workflows/test-integration.yaml vendored Normal file
View File

@ -0,0 +1,84 @@
name: Func Integration Test
on: [pull_request]
jobs:
test:
name: Integration Test
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Remove Unnecessary Software
run: |
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /opt/ghc || true
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
echo "TEKTON_TESTS_ENABLED=1" >> "$GITHUB_ENV"
echo "GITLAB_TESTS_ENABLED=1" >> "$GITHUB_ENV"
echo "GITLAB_HOSTNAME=gitlab.localtest.me" >> "$GITHUB_ENV"
echo "GITLAB_ROOT_PASSWORD=$(< /dev/urandom tr -dc _A-Z-a-z-0-9 | head -c${1:-32})" >> "$GITHUB_ENV"
echo "PAC_CONTROLLER_HOSTNAME=pac-ctr.localtest.me" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: imjasonh/setup-ko@v0.6
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Local Registry
run: ./hack/registry.sh
- name: Setup testing images
run: ./hack/setup-testing-images.sh
- name: Install Gitlab
run: ./hack/install-gitlab.sh
- name: Patch Hosts
run: ./hack/patch-hosts.sh
- name: Integration Test
env:
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
run: make test-integration
- name: Dump Cluster Logs
if: always()
run: |
echo "::group::cluster events" >> cluster_log.txt
kubectl get events -A >> cluster_log.txt 2>&1
echo "::endgroup::" >> cluster_log.txt
echo "::group::cluster containers logs" >> cluster_log.txt
stern '.*' --all-namespaces --no-follow >> cluster_log.txt 2>&1
echo "::endgroup::" >> cluster_log.txt
- name: "Archive log results"
if: always()
uses: actions/upload-artifact@v4
with:
name: cluster-logs
path: ./cluster_log.txt
retention-days: 7
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: integration-tests

85
.github/workflows/test-podman-next.yaml vendored Normal file
View File

@ -0,0 +1,85 @@
name: Func Podman Next Test
on:
schedule:
- cron: '0 2 * * *'
jobs:
test:
name: Podman Next Test
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Remove Unnecessary Software
run: |
sudo rm -rf /usr/share/dotnet || true
sudo rm -rf /usr/local/lib/android || true
sudo rm -rf /opt/ghc || true
- name: Install Podman Next (Nightly Build)
env:
FEDORA_RELEASE: 41
BASE_ARCH: x86_64
run: |
sudo apt update
sudo mkdir -p /etc/yum.repos.d
sudo apt install dnf -y
sudo apt install dnf-plugins-core -y
sudo apt install alien -y
sudo touch /etc/yum.repos.d/fedora.repo
sudo chmod 666 /etc/yum.repos.d/fedora.repo
cat << EOF >> /etc/yum.repos.d/fedora.repo
[fedora]
name=Fedora $FEDORA_RELEASE
metalink=https://mirrors.fedoraproject.org/metalink?repo=fedora-$FEDORA_RELEASE&arch=$BASE_ARCH
enabled=1
countme=1
metadata_expire=7d
repo_gpgcheck=0
type=rpm
gpgcheck=0
EOF
sudo chmod 644 /etc/yum.repos.d/fedora.repo
sudo dnf copr enable rhcontainerbot/podman-next fedora-$FEDORA_RELEASE-$BASE_ARCH --releasever=$FEDORA_RELEASE -y
sudo dnf download crun conmon podman --releasever=$FEDORA_RELEASE -y
sudo alien --to-deb $(ls -1 crun*.rpm) --install
sudo alien --to-deb $(ls -1 conmon*.rpm) --install
sudo alien --to-deb $(ls -1 podman*.rpm) --install
podman info
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Local Registry
run: ./hack/registry.sh
- name: Setup testing images
run: ./hack/setup-testing-images.sh
- name: Integration Test Podman
env:
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
run: ./hack/test-integration-podman.sh

54
.github/workflows/test-podman.yaml vendored Normal file
View File

@ -0,0 +1,54 @@
name: Func Podman Test
on: [pull_request]
jobs:
test:
name: Podman Test
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Set Environment Variables
run: |
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Install Podman
run: |
sudo apt update
sudo apt install podman -y
podman info
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: |
attempt=0
max_attempts=5
until [ $attempt -ge $max_attempts ]
do
attempt=$((attempt+1))
echo "------------------ Attempt $attempt ------------------"
./hack/allocate.sh && break
echo "------------------ failed, retrying... ------------------"
if [ $attempt -ge $max_attempts ]; then
echo "------------------ max # of retries reached, exiting ------------------"
exit 1
fi
./hack/delete.sh
echo "------------------ sleep for 5 minutes ------------------"
sleep 300
done
echo "------------------ finished! attempt $attempt ------------------"
- name: Local Registry
run: ./hack/registry.sh
- name: Setup testing images
run: ./hack/setup-testing-images.sh
- name: Integration Test Podman
env:
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
run: ./hack/test-integration-podman.sh

50
.github/workflows/test-unit.yaml vendored Normal file
View File

@ -0,0 +1,50 @@
name: Func Unit Test
on: [pull_request]
jobs:
test:
name: Unit Test
strategy:
matrix:
java: [21]
os: ["ubuntu-latest", "windows-latest", "macos-latest"]
runs-on: ${{ matrix.os }}
steps:
- name: Install Bash 4 on Mac
if: matrix.os == 'macos-latest'
run: |
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
brew update
brew install bash
brew install gnu-sed
echo "/usr/local/bin" >> $GITHUB_PATH
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
distribution: 'temurin'
- uses: actions-rust-lang/setup-rust-toolchain@v1
- name: Core Unit Tests
run: make test
env:
FUNC_REPO_REF: ${{ github.event.pull_request.head.repo.full_name }}
FUNC_REPO_BRANCH_REF: ${{ github.head_ref }}
- name: Template Unit Tests on Ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
python3 -m venv ${{ github.workspace }}/.venv
. ${{ github.workspace }}/.venv/bin/activate
make test-templates
- name: Template Unit Tests
if: matrix.os != 'ubuntu-latest'
run: make test-templates
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: unit-tests

31
.github/workflows/update-builder.yaml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Update builder-jammy-full image
on:
schedule:
- cron: '0 * * * *'
jobs:
build-and-push-image:
permissions:
contents: read
packages: write
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Build and Push
env:
GITHUB_TOKEN: ${{ github.token }}
run: |
docker run -d -p 5000:5000 --name registry registry:2.7
echo '{"insecure-registries" : "localhost:5000" }' | \
sudo tee /etc/docker/daemon.json
mkdir -p "$HOME/.config/containers/"
echo -e '\n[[registry]]\nlocation = "localhost:5000"\ninsecure = true\n' >> \
"$HOME/.config/containers/registries.conf"
skopeo login ghcr.io -u gh-action -p "$GITHUB_TOKEN"
docker login ghcr.io -u gh-action -p "$GITHUB_TOKEN"
make __update-builder

26
.github/workflows/update-ca-bundle.yaml vendored Normal file
View File

@ -0,0 +1,26 @@
name: Update CA bundle in embedded templates
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: '0 */4 * * *'
jobs:
update:
name: Update CA bundle
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install NPM deps.
run: npm install octokit@3.2.1
- name: Create PR
env:
GITHUB_TOKEN: ${{ github.token }}
run: node ./hack/update-ca-bundle.js

View File

@ -0,0 +1,31 @@
name: Update Quarkus Platform in embedded templates
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: '0 */4 * * *'
jobs:
update:
name: Update Quarkus Platform
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- name: Install NPM deps.
run: npm install xml2js octokit@3.2.1
- name: Create PR
env:
GITHUB_TOKEN: ${{ github.token }}
run: node ./hack/update-quarkus-platform.js

View File

@ -0,0 +1,31 @@
name: Update Spring Boot Platform in embedded templates
permissions:
contents: write
pull-requests: write
on:
schedule:
- cron: '0 */4 * * *'
jobs:
update:
name: Update Spring Boot Platform
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: knative/actions/setup-go@main
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-java@v4
with:
java-version: 21
distribution: 'temurin'
- name: Install NPM deps.
run: npm install xml2js octokit@3.2.1 yaml semver
- name: Create PR
env:
GITHUB_TOKEN: ${{ github.token }}
run: node ./hack/update-springboot-platform.js

38
.gitignore vendored
View File

@ -1,14 +1,40 @@
# Project
/func
/func_*
/templates/go/events/go.sum
/templates/go/http/go.sum
/cmd/func.yaml
/coverage.out
/coverage.txt
/.coverage
/bin
/target
/hack/bin
/.artifacts
target
/pkg/functions/testdata/migrations/*/.gitignore
/pkg/functions/testdata/default_home/go
/pkg/functions/testdata/default_home/.cache
/pkg/functions/testdata/migrations/*/.gitignore
# Go
/templates/go/cloudevents/go.sum
# JS
node_modules
__pycache__
/coverage.out
/bin
/templates/typescript/cloudevents/build
/templates/typescript/http/build
# Python
__pycache__
/templates/python/cloudevents/.venv
/templates/python/http/.venv
# E2E Tests
/e2e/testdata/default_home/go
/e2e/testdata/default_home/.cache
# Editors
.vscode
.idea
# Operating system temporary files
.DS_Store

View File

@ -1,28 +1,37 @@
#
# golangci-lint
#
# For defaults, see:
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
#
#
#
version: "2"
linters:
enable:
- unconvert
- prealloc
- bodyclose
issues:
exclude-rules:
- linters:
- staticcheck
# Error Text:
# "SA9004: only the first constant in this group has an explicit type"
# Efect:
# Allows short-hand first constant type declarations:
# Example:
# const (
# Name Type = "value"
# Name2 = "value2"
# )
text: "SA9004:"
exclusions:
generated: lax
presets:
- comments
- common-false-positives
- legacy
- std-error-handling
rules:
- linters:
- staticcheck
# Error Text:
# "SA9004: only the first constant in this group has an explicit type"
# Efect:
# Allows short-hand first constant type declarations:
# Example:
# const (
# Name Type = "value"
# Name2 = "value2"
# )
text: 'SA9004:'
paths:
- third_party$
- builtin$
- examples$
formatters:
exclusions:
generated: lax
paths:
- third_party$
- builtin$
- examples$

3
.ko.yaml Normal file
View File

@ -0,0 +1,3 @@
defaultBaseImage: gcr.io/distroless/static:nonroot
baseImageOverrides:
knative.dev/func/cmd/func: docker.io/library/alpine:latest

View File

@ -0,0 +1,2 @@
scan_exclude = [
]

16
.versionrc Normal file
View File

@ -0,0 +1,16 @@
{
"bumpFiles": [{
"filename": "version.txt",
"type": "plain-text"
}],
"types": [
{"type":"feat","section":"Features"},
{"type":"fix","section":"Bug Fixes"},
{"type":"chore","section":"Miscellaneous"},
{"type":"docs","section":"Documentation"},
{"type":"refactor","section":"Miscellaneous"}
],
"skip": {
"tag": true
}
}

7
AUTHORS Normal file
View File

@ -0,0 +1,7 @@
# This is the list of func authors for copyright purposes.
#
# This does not necessarily list everyone who has contributed code, since in
# some cases, their employer may be the copyright holder. To see the full list
# of contributors, see the revision history in source control.
Red Hat, Inc.

View File

@ -1,59 +1,478 @@
# Change Log
# Changelog
All notable changes to this project will be documented in this file. See [standard-version](https://github.com/conventional-changelog/standard-version) for commit guidelines.
## [0.26.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.25.0...v0.26.0) (2022-08-26)
### Features
* add OpenShift related Annotations & Labels ([#1106](https://github.com/knative-extensions/kn-plugin-func/issues/1106)) ([b4b4cc3](https://github.com/knative-extensions/kn-plugin-func/commit/b4b4cc34c3b32ad5f00d90ee8244702bef9e3673))
* add runtime icons on OpenShift ([#1116](https://github.com/knative-extensions/kn-plugin-func/issues/1116)) ([a7671e4](https://github.com/knative-extensions/kn-plugin-func/commit/a7671e45a791b88bed464becc79d419ed8eb803c))
* always store namespace in func.yaml and warn if current ns & func.yaml ns is different ([#1118](https://github.com/knative-extensions/kn-plugin-func/issues/1118)) ([8cb7080](https://github.com/knative-extensions/kn-plugin-func/commit/8cb70808f59dc0a4e19fc7d1b2f1ff3389bed4f2))
* build for Linux ARM64 ([#1123](https://github.com/knative-extensions/kn-plugin-func/issues/1123)) ([819b433](https://github.com/knative-extensions/kn-plugin-func/commit/819b433edbb313f4119d88cdf066b48813333a27))
* deploy Tekton task supports optional `image` parameter ([#1140](https://github.com/knative-extensions/kn-plugin-func/issues/1140)) ([65c30ab](https://github.com/knative-extensions/kn-plugin-func/commit/65c30abb39e05eaa6b4ebf9ba25d5cdfc0971cee))
* func deploy accepts image digest in --image ([#1098](https://github.com/knative-extensions/kn-plugin-func/issues/1098)) ([c57af36](https://github.com/knative-extensions/kn-plugin-func/commit/c57af36f7413e670d44f5111acd477e733aea2e4))
* languages list command ([#1114](https://github.com/knative-extensions/kn-plugin-func/issues/1114)) ([d1f935f](https://github.com/knative-extensions/kn-plugin-func/commit/d1f935fde991639c80b369797733e9e48b82805e))
* persist builder value in func.yaml ([#1099](https://github.com/knative-extensions/kn-plugin-func/issues/1099)) ([b1fd9f7](https://github.com/knative-extensions/kn-plugin-func/commit/b1fd9f71b16bd5d83d37cbaed47890775886d807))
* S2I strategy for on cluster build ([#1191](https://github.com/knative-extensions/kn-plugin-func/issues/1191)) ([1112aaa](https://github.com/knative-extensions/kn-plugin-func/commit/1112aaa2fe5fb5aa349251a34c2fccc529498b0d))
* templates list command ([#1134](https://github.com/knative-extensions/kn-plugin-func/issues/1134)) ([2f8d82b](https://github.com/knative-extensions/kn-plugin-func/commit/2f8d82bec283ad29e67bdeaef80f039d87f1a523))
### Bug Fixes
* add languages command to cmd root ([#1127](https://github.com/knative-extensions/kn-plugin-func/issues/1127)) ([59df756](https://github.com/knative-extensions/kn-plugin-func/commit/59df756e49eda6717d82caf8c8f54422fc79fcb0))
* correct error in OpenShift reg.cred.provider ([#1104](https://github.com/knative-extensions/kn-plugin-func/issues/1104)) ([a197f8b](https://github.com/knative-extensions/kn-plugin-func/commit/a197f8b330d6f5fdbc9c16585e605cdf74f9b8b9))
* ensure registry in func.yaml is respected ([#1168](https://github.com/knative-extensions/kn-plugin-func/issues/1168)) ([80657c9](https://github.com/knative-extensions/kn-plugin-func/commit/80657c90e3df49bd4a55c61ada0cbadbdff7a56d))
* image push authorization check ([#1109](https://github.com/knative-extensions/kn-plugin-func/issues/1109)) ([3b198cb](https://github.com/knative-extensions/kn-plugin-func/commit/3b198cb78164e751d293edc6467907cecd626643))
* image push authorization check ([#1130](https://github.com/knative-extensions/kn-plugin-func/issues/1130)) ([36216e7](https://github.com/knative-extensions/kn-plugin-func/commit/36216e7fed34d3cd20aed951a27ed5fdf995bafb))
* performance of template loading ([#1189](https://github.com/knative-extensions/kn-plugin-func/issues/1189)) ([dca11da](https://github.com/knative-extensions/kn-plugin-func/commit/dca11dad5bfefeb05b0d3ea2a88bc4f9b159a2b7))
* stop build progress loop when build completes ([#1133](https://github.com/knative-extensions/kn-plugin-func/issues/1133)) ([cf5be9a](https://github.com/knative-extensions/kn-plugin-func/commit/cf5be9a6161085a92f60d5345b15e8d394d69f0f))
* use 0 group id for func-buildpacks Task ([#1105](https://github.com/knative-extensions/kn-plugin-func/issues/1105)) ([f4537dd](https://github.com/knative-extensions/kn-plugin-func/commit/f4537dd3d5d5130c27ad8c1d1ff0df92569fbc25))
* use creds from creds store first ([#1103](https://github.com/knative-extensions/kn-plugin-func/issues/1103)) ([e1d5229](https://github.com/knative-extensions/kn-plugin-func/commit/e1d522990016f46beff26117f8b80ee16b098402))
* use space prefix for deploy output text ([#1144](https://github.com/knative-extensions/kn-plugin-func/issues/1144)) ([3b8c240](https://github.com/knative-extensions/kn-plugin-func/commit/3b8c24092b0e3c7863715ec9b96c8a86b10af245))
### Documentation
* replace commands.md with generated text file ([#1089](https://github.com/knative-extensions/kn-plugin-func/issues/1089)) ([df022f5](https://github.com/knative-extensions/kn-plugin-func/commit/df022f5c93911687e4356f4c58ccbb5d10b7a895))
### Miscellaneous
* add some milliseconds in client tests ([#1178](https://github.com/knative-extensions/kn-plugin-func/issues/1178)) ([3ac5d46](https://github.com/knative-extensions/kn-plugin-func/commit/3ac5d468bfdbb326375ebc5bc640729b59fec7f2))
* add validation for `builder` ([#1136](https://github.com/knative-extensions/kn-plugin-func/issues/1136)) ([71b0ddd](https://github.com/knative-extensions/kn-plugin-func/commit/71b0dddc556bcc6767354e66b25091eb001d0700))
* adjust codecov configuration ([#1177](https://github.com/knative-extensions/kn-plugin-func/issues/1177)) ([a52b7d5](https://github.com/knative-extensions/kn-plugin-func/commit/a52b7d5ecd895cd65e2844bc5b4d68974d8f3e6f))
* **deps:** bump github.com/containerd/containerd from 1.6.0 to 1.6.6 ([#1112](https://github.com/knative-extensions/kn-plugin-func/issues/1112)) ([7a760fb](https://github.com/knative-extensions/kn-plugin-func/commit/7a760fbf57925104b7d68dbc987183594cf0bc48))
* **deps:** update node/typescript deps in e2e tests ([#1119](https://github.com/knative-extensions/kn-plugin-func/issues/1119)) ([cccb283](https://github.com/knative-extensions/kn-plugin-func/commit/cccb2833d1ad8f77cfb200ef4f43a7e4098af92d))
* update node and typescript dependencies ([#1110](https://github.com/knative-extensions/kn-plugin-func/issues/1110)) ([29f3aad](https://github.com/knative-extensions/kn-plugin-func/commit/29f3aadb47ecd59a0783b2a20643b6963e82af2e))
* update Quarkus platform to 2.11.2.Final ([#1157](https://github.com/knative-extensions/kn-plugin-func/issues/1157)) ([849c2cd](https://github.com/knative-extensions/kn-plugin-func/commit/849c2cd7a187d37693ba963b6cd1fc9a0377ad4d))
* update Quarkus platform version to 2.11.3.Final ([#1187](https://github.com/knative-extensions/kn-plugin-func/issues/1187)) ([b3ced5e](https://github.com/knative-extensions/kn-plugin-func/commit/b3ced5ebd5353568a63bbbc0ecdd986ac52ad706))
* update Quarkus templates to 2.10.3.Final ([#1132](https://github.com/knative-extensions/kn-plugin-func/issues/1132)) ([a906b88](https://github.com/knative-extensions/kn-plugin-func/commit/a906b8866cb97894a676aeada9212df0e76a7ee0))
* update springboot dependencies ([#1183](https://github.com/knative-extensions/kn-plugin-func/issues/1183)) ([e465348](https://github.com/knative-extensions/kn-plugin-func/commit/e4653482101443ce81949c04f2c011b8470302a0))
* use dot as path default rather than absolute path ([#1184](https://github.com/knative-extensions/kn-plugin-func/issues/1184)) ([fecbc4e](https://github.com/knative-extensions/kn-plugin-func/commit/fecbc4ef8bc7a1e9007f8bc912af7d7a2cc9d0fa))
* use lower case *functions* in all CLI outputs ([#1135](https://github.com/knative-extensions/kn-plugin-func/issues/1135)) ([e659256](https://github.com/knative-extensions/kn-plugin-func/commit/e659256005cdc5231759beef2e706466820c129d))
* Use NodeJS for script instead of Shell ([#1170](https://github.com/knative-extensions/kn-plugin-func/issues/1170)) ([62b7232](https://github.com/knative-extensions/kn-plugin-func/commit/62b723263688336c4d5ff85d9652a2cd460d941a))
## [0.24.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.23.0...v0.24.0) (2022-06-01)
### Features
* configurable s2i builder images ([#1024](https://github.com/knative-extensions/kn-plugin-func/issues/1024)) ([096085d](https://github.com/knative-extensions/kn-plugin-func/commit/096085d751f105b5592a09c849fef364b84145b3))
* enable Paketo builders for Python functions ([#979](https://github.com/knative-extensions/kn-plugin-func/issues/979)) ([5af934b](https://github.com/knative-extensions/kn-plugin-func/commit/5af934be8d97b0de676fb7d81e07f7b07a33a9e3))
* expose default builder image logic for in-cluster builds ([#1021](https://github.com/knative-extensions/kn-plugin-func/issues/1021)) ([dc8abf1](https://github.com/knative-extensions/kn-plugin-func/commit/dc8abf179c63582d197e5a9add2006ad0c026ff6))
* improved invoke verbosity ([#1007](https://github.com/knative-extensions/kn-plugin-func/issues/1007)) ([867d4c2](https://github.com/knative-extensions/kn-plugin-func/commit/867d4c26d6dd0b4d06cf6428dc932004e20ca981))
* invoke verbose metadata ([#944](https://github.com/knative-extensions/kn-plugin-func/issues/944)) ([c3c1456](https://github.com/knative-extensions/kn-plugin-func/commit/c3c1456ede7b471a271d0680107657ac0e4f0568))
* make templates consistent across runtimes ([#948](https://github.com/knative-extensions/kn-plugin-func/issues/948)) ([13d4222](https://github.com/knative-extensions/kn-plugin-func/commit/13d4222461c553d5da1c8448713cba9e4a3e828a))
* s2i builder env var interpolation ([#991](https://github.com/knative-extensions/kn-plugin-func/issues/991)) ([1424831](https://github.com/knative-extensions/kn-plugin-func/commit/14248311b1254fe8601b394f064e2fdd92dd4ced))
* s2i builder quarkus support ([#993](https://github.com/knative-extensions/kn-plugin-func/issues/993)) ([397ce65](https://github.com/knative-extensions/kn-plugin-func/commit/397ce65598c1f61d2312c62016ed78453e1299a3))
* s2i builder typescript support ([#957](https://github.com/knative-extensions/kn-plugin-func/issues/957)) ([3be1a77](https://github.com/knative-extensions/kn-plugin-func/commit/3be1a77388647055dc67e3901da323c240dc77f4))
### Bug Fixes
* ignore `is forbidden` errors when deleting function and resources ([#988](https://github.com/knative-extensions/kn-plugin-func/issues/988)) ([ce26a23](https://github.com/knative-extensions/kn-plugin-func/commit/ce26a23352513747cad25b7668def43edff6f0fe))
* ignore node_modules for s2i builds ([#1019](https://github.com/knative-extensions/kn-plugin-func/issues/1019)) ([1d367c6](https://github.com/knative-extensions/kn-plugin-func/commit/1d367c6be50d36e045b475c7ff173001b1eaa3d0))
* read pwd from non-tty input ([#996](https://github.com/knative-extensions/kn-plugin-func/issues/996)) ([e9932cd](https://github.com/knative-extensions/kn-plugin-func/commit/e9932cdf43eb560ff496a98f83766d1c3e1fdc96))
* update various doc links ([#980](https://github.com/knative-extensions/kn-plugin-func/issues/980)) ([bc6383e](https://github.com/knative-extensions/kn-plugin-func/commit/bc6383e55c89349e8e25a79e0f90be1760818e50))
### Documentation
* add a language pack "contract" document ([#918](https://github.com/knative-extensions/kn-plugin-func/issues/918)) ([76c647a](https://github.com/knative-extensions/kn-plugin-func/commit/76c647a1c72f57efa8fad89c6802796d02254bd0))
### Miscellaneous
* add release process and func_darwin_arm64 to the release artifacts ([#945](https://github.com/knative-extensions/kn-plugin-func/issues/945)) ([4e369a0](https://github.com/knative-extensions/kn-plugin-func/commit/4e369a013ac3109bfea06dc730082b22f6d1cf36))
* add version.txt to .gitattributes for style ([#966](https://github.com/knative-extensions/kn-plugin-func/issues/966)) ([23d1188](https://github.com/knative-extensions/kn-plugin-func/commit/23d118831923bf798c5d839c276382f48c048a32))
* clean Repository and Runtimes structs ([#973](https://github.com/knative-extensions/kn-plugin-func/issues/973)) ([e502d55](https://github.com/knative-extensions/kn-plugin-func/commit/e502d554c8aafacc0f4d75bb7f6e1aef57e218fa))
* **deps:** bump faas-js-runtime version ([#1000](https://github.com/knative-extensions/kn-plugin-func/issues/1000)) ([83c081d](https://github.com/knative-extensions/kn-plugin-func/commit/83c081d34a08b4775787c61eb00f9ca39cfcd33d))
* templates ([#961](https://github.com/knative-extensions/kn-plugin-func/issues/961)) ([34cb893](https://github.com/knative-extensions/kn-plugin-func/commit/34cb893545a5f74a120783f66bb3a37d2b283d64))
* update allocate script with latest knative ([#965](https://github.com/knative-extensions/kn-plugin-func/issues/965)) ([4ffb1f9](https://github.com/knative-extensions/kn-plugin-func/commit/4ffb1f9cba3ee1bac248a033ece6e8473965f7a7))
* use paketo builders for all runtimes ([#1001](https://github.com/knative-extensions/kn-plugin-func/issues/1001)) ([31c1d66](https://github.com/knative-extensions/kn-plugin-func/commit/31c1d66eb3f0089541f8219f07722c75c8a82692))
<a name="unreleased"></a>
## [0.12.0](https://www.github.com/boson-project/func/compare/v0.11.0...v0.12.0) (2021-03-30)
---
### [0.23.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.23.0...v0.22.0) (2022-04-06)
### Features
* add --build (default: true) flag to func deploy ([8a91cac](https://www.github.com/boson-project/func/commit/8a91cac6cc78b5cf56d5158f3eb03a4076a34ffe))
* basic lifecycle integraiton tests ([8edd0df](https://www.github.com/boson-project/func/commit/8edd0df836055b33473f9a7774e8ae755f46ac2e))
* integration tests target ([ddf4ab8](https://www.github.com/boson-project/func/commit/ddf4ab86c46912f78e56a52a14efcf89fd187103))
* local cluster allocation, configuration and teardown ([9c499b6](https://www.github.com/boson-project/func/commit/9c499b69c4991b86e51127081cee7fb0fc34d554))
* using custom docker daemon (e.g podman) ([6d2d8c6](https://www.github.com/boson-project/func/commit/6d2d8c63b01e12f6cf277c2cd18c3f7298ce86ab))
* command help text template preprocessing ([#875](https://github.com/knative-extensions/kn-plugin-func/issues/875)) ([2bd5254](https://github.com/knative-extensions/kn-plugin-func/commit/2bd5254f19a14d6aae9bd4a4b59971ef36e96fad))
* invoke verbose metadata ([#944](https://github.com/knative-extensions/kn-plugin-func/issues/944)) ([c3c1456](https://github.com/knative-extensions/kn-plugin-func/commit/c3c1456ede7b471a271d0680107657ac0e4f0568))
* on cluster build doens't require privileged cluster permissions ([#934](https://github.com/knative-extensions/kn-plugin-func/issues/934)) ([e9251f5](https://github.com/knative-extensions/kn-plugin-func/commit/e9251f518cc806768f0221f11e39f04fa4619537))
* s2i builder with preliminary node support ([#923](https://github.com/knative-extensions/kn-plugin-func/issues/923)) ([a91bcc5](https://github.com/knative-extensions/kn-plugin-func/commit/a91bcc5fcfe66948c86ce3e33cf0d28230536f1c)), closes [#921](https://github.com/knative-extensions/kn-plugin-func/issues/921)
### Bug Fixes
* `func deploy` uses Docker API, not binary ([dc2fbee](https://www.github.com/boson-project/func/commit/dc2fbee67f7f2304bece83a9b4d4f051ed19cd61))
* `func run` now uses Docker API, not binary ([db0945e](https://www.github.com/boson-project/func/commit/db0945ed3ecb9e6e4283a0cb478d39657c6803dc))
* compare service names in integraiton tests ([1551d69](https://www.github.com/boson-project/func/commit/1551d69b5d287becaafdf3d5b99a6ba8da926fa6))
* exposed port ([7ed2e86](https://www.github.com/boson-project/func/commit/7ed2e86d9672f285c1def490a3d325ceb9e8471f))
* increase remove timeout to 120s ([80e366b](https://www.github.com/boson-project/func/commit/80e366b14234c184932d91db4188bdabb0742e7a))
* sprint-boot template ([38fd673](https://www.github.com/boson-project/func/commit/38fd673fdbef1094558b32910a42fcdff2d8bb0c))
* update pack dependency ([c3c2165](https://www.github.com/boson-project/func/commit/c3c21657b2bc3cba9e4ba87864d8fe0c5d4e43af))
* apply updated spring-boot-function dependency ([#936](https://github.com/knative-extensions/kn-plugin-func/issues/936)) ([4a4cebb](https://github.com/knative-extensions/kn-plugin-func/commit/4a4cebb1ea7226e7d7c1dbfb9e3fa8e5ec22c31d))
* bind verbose flag to root ([#884](https://github.com/knative-extensions/kn-plugin-func/issues/884)) ([25524a1](https://github.com/knative-extensions/kn-plugin-func/commit/25524a1f8435cd310b45f283e987eee7a8736ceb))
* full clone of template repos on add ([#904](https://github.com/knative-extensions/kn-plugin-func/issues/904)) ([564a34b](https://github.com/knative-extensions/kn-plugin-func/commit/564a34b3f53381bdd59262dcb78d2953f973c8bb))
* minor typos in docs ([#862](https://github.com/knative-extensions/kn-plugin-func/issues/862)) ([efc3b20](https://github.com/knative-extensions/kn-plugin-func/commit/efc3b208cb5ab76f1eb73801501bcbfc23f16928))
* use full root name for cmd help prefixes ([#873](https://github.com/knative-extensions/kn-plugin-func/issues/873)) ([3f30c91](https://github.com/knative-extensions/kn-plugin-func/commit/3f30c91116344b592bf392e92b63cb845b25428a))
## [0.11.0](https://www.github.com/boson-project/func/compare/v0.10.0...v0.11.0) (2021-01-21)
### Miscellaneous
* add Apple M1 build in cross-platform target ([#932](https://github.com/knative-extensions/kn-plugin-func/issues/932)) ([00d5a82](https://github.com/knative-extensions/kn-plugin-func/commit/00d5a8272284ea40ebeefa4f22f12c2d375aadae))
---
## [0.22.0](https://www.github.com/knative-extensions/kn-plugin-func/compare/v0.21.2...v0.22.0) (2022-02-22)
### Chore
- Bump Node.js builder image to the latest paketo builder, removing a non-fatal warning that was issued at function startup. (#[8](https://github.com/knative-extensions/kn-plugin-func/runs/5297690460?check_suite_focus=true#step:6:8)26, @lance)
- Update boson builder images to most recent versions (#8[10](https://github.com/knative-extensions/kn-plugin-func/runs/5297690460?check_suite_focus=true#step:6:10), @matejvasek)
### Enhancement
- Adds the --build flag for 'func deploy' to the shell completions (#802, @matejvasek)
### Documentation
- Clarify podman requirements on Linux vs. MacOS and Linux in podman.md guide (#836, @matejvasek)
### Bug or Regression
- Fix a bug where interactive prompt defaults were not being used (#821, @lkingland)
- Fixes a bug during func create when confirm option is used with the go language runtime (#8[15](https://github.com/knative-extensions/kn-plugin-func/runs/5297690460?check_suite_focus=true#step:6:15), @senthilnathan)
- Fixes a bug where the invoke and describe commands could fail if Knative Eventing is not installed on the cluster. (#8[23](https://github.com/knative-extensions/kn-plugin-func/runs/5297690460?check_suite_focus=true#step:6:23), @lance)
- Fixes missing `cloudevent` invocation format for Node.js, SpringBoot and Rust CloudEvent templates (#846, @lance)
### Uncategorized
- Detects when deploying to OpenShift and use internal registry (#8[25](https://github.com/knative-extensions/kn-plugin-func/runs/5297690460?check_suite_focus=true#step:6:25), @matejvasek)
---
## [0.21.2](https://www.github.com/knative-extensions/kn-plugin-func/compare/v0.21.1...v0.21.2) (2022-01-28)
## What's Changed
* backport: bug fixes for 0.21 by @lance in https://github.com/knative-extensions/kn-plugin-func/pull/793
**Full Changelog**: https://github.com/knative-extensions/kn-plugin-func/compare/v0.21.1...v0.21.2
---
## [0.21.1](https://www.github.com/knative-extensions/kn-plugin-func/compare/v0.21.0...v0.21.1) (2022-01-27)
### Enhancement
- Adds a label `function.knative.dev/name: functionName` to every resouce created for a Function ([#757](https://github.com/knative-extensions/kn-plugin-func/pull/757), [@zroubalik](https://github.com/zroubalik))
- Adds the ability to build a Function on the cluster using Tekton Pipelines. The build on the cluster is enabled by fetching Function source code from a remote Git repository. ([#743](https://github.com/knative-extensions/kn-plugin-func/pull/743), [@zroubalik](https://github.com/zroubalik))
### Bug or Regression
- Changes the springboot function templates to use the base builder instead of the tiny builder. ([#792](https://github.com/knative-extensions/kn-plugin-func/pull/792), [@lance](https://github.com/lance))
**Full Changelog**: https://github.com/knative-extensions/kn-plugin-func/compare/v0.21.0...v0.21.1
---
## [0.21.0](https://www.github.com/knative-extensions/kn-plugin-func/compare/v0.20.0...v0.21.0) (2022-01-12)
### Features
* add --all-namespaces flag to `func list` ([#242](https://www.github.com/boson-project/func/issues/242)) ([8e72fd2](https://www.github.com/boson-project/func/commit/8e72fd2eba9f4e6e5d3a0bd366215025ba1d1004))
* add possibility to disable pushing of image in `deploy` command ([#736](https://www.github.com/knative-extensions/kn-plugin-func/issues/736)) ([4e5a5e8](https://www.github.com/knative-extensions/kn-plugin-func/commit/4e5a5e830799b73f65aba8ee248a52bf1c643acb))
* add possibility to disable pushing of image in `deploy` command ([#739](https://www.github.com/knative-extensions/kn-plugin-func/issues/739)) ([64ba17b](https://www.github.com/knative-extensions/kn-plugin-func/commit/64ba17b4fbe9033e8279fa34aeebdb12edcee25d))
## [0.20.0](https://www.github.com/knative-extensions/kn-plugin-func/compare/v0.19.0...v0.20.0) (2021-12-20)
### ⚠ BREAKING CHANGES
* use `function.knative.dev` for Functions related labels (#717)
### Features
* add flag to push image at the end of a successful build ([#681](https://www.github.com/knative-extensions/kn-plugin-func/issues/681)) ([2f24182](https://www.github.com/knative-extensions/kn-plugin-func/commit/2f241824ff3a2664a987fe742aed2f0b56aeb9ab))
* add POD_NAME as an environment variable ([#660](https://www.github.com/knative-extensions/kn-plugin-func/issues/660)) ([64473b7](https://www.github.com/knative-extensions/kn-plugin-func/commit/64473b7197bb5a821b6724a8b914784891b1a828))
* add telemetry to Node.js and TypeScript function templates ([#719](https://www.github.com/knative-extensions/kn-plugin-func/issues/719)) ([d7cfe6e](https://www.github.com/knative-extensions/kn-plugin-func/commit/d7cfe6ead76f15c4bcd34a132d0c17c02a149548))
* allow build to be triggered from run when fn.Image is missing ([#644](https://www.github.com/knative-extensions/kn-plugin-func/issues/644)) ([b190b52](https://www.github.com/knative-extensions/kn-plugin-func/commit/b190b527542bf659f06bf931d94d09542d012c36))
* allow push to cluster internal registries ([#718](https://www.github.com/knative-extensions/kn-plugin-func/issues/718)) ([8d51393](https://www.github.com/knative-extensions/kn-plugin-func/commit/8d51393181adca0c74a4b08cfb2dc2da390f983b))
* automatically start podman service ([#648](https://www.github.com/knative-extensions/kn-plugin-func/issues/648)) ([bfdfb76](https://www.github.com/knative-extensions/kn-plugin-func/commit/bfdfb760cff575146764f9b841a0cafcb31bcd58))
* custom default HTTP transport ([#711](https://www.github.com/knative-extensions/kn-plugin-func/issues/711)) ([a13f897](https://www.github.com/knative-extensions/kn-plugin-func/commit/a13f897fbb996dbfcb2120965745477321087a9c))
* ensure config and repos path exists ([#683](https://www.github.com/knative-extensions/kn-plugin-func/issues/683)) ([db9ad07](https://www.github.com/knative-extensions/kn-plugin-func/commit/db9ad07c7048361946a8c7d45c549323eee44a58))
* function creation timestamp ([#651](https://www.github.com/knative-extensions/kn-plugin-func/issues/651)) ([1bf17ec](https://www.github.com/knative-extensions/kn-plugin-func/commit/1bf17ec976130551da366e75b38f5169b3daed4e))
* function version migrations ([#664](https://www.github.com/knative-extensions/kn-plugin-func/issues/664)) ([ccf0015](https://www.github.com/knative-extensions/kn-plugin-func/commit/ccf00152be0ceba1794267f8e03a09cb32fee514))
* In cluster dialer to proxy TCP connections to unexposed services ([#688](https://www.github.com/knative-extensions/kn-plugin-func/issues/688)) ([98ef5a0](https://www.github.com/knative-extensions/kn-plugin-func/commit/98ef5a00356a5b93ef1a6c581ae8d5ba86ee09e4))
* make SpringBoot template SpringNative by default ([#649](https://www.github.com/knative-extensions/kn-plugin-func/issues/649)) ([c70a21e](https://www.github.com/knative-extensions/kn-plugin-func/commit/c70a21e9a459d726a4118e177835082323698f83))
* use `function.knative.dev` for Functions related labels ([#717](https://www.github.com/knative-extensions/kn-plugin-func/issues/717)) ([feaf8f9](https://www.github.com/knative-extensions/kn-plugin-func/commit/feaf8f91091afc21bcc3e99ed3098c9ff0679883))
### Bug Fixes
* change --format flag to --output for list and describe commands ([#248](https://www.github.com/boson-project/func/issues/248)) ([6470d9e](https://www.github.com/boson-project/func/commit/6470d9e57462bc8d3a30583cf146d4f466e2d5f7))
* correct fn signatures in Go Events template ([#246](https://www.github.com/boson-project/func/issues/246)) ([5502492](https://www.github.com/boson-project/func/commit/55024921c26e044f83187cbd5510375d8702c6d9))
* correcting broken merge ([#252](https://www.github.com/boson-project/func/issues/252)) ([8d1f5b8](https://www.github.com/boson-project/func/commit/8d1f5b833d86fa959e3386db73f7e1b07bdd6dfd))
* fix the help text for the describe function ([#243](https://www.github.com/boson-project/func/issues/243)) ([5a3a0d6](https://www.github.com/boson-project/func/commit/5a3a0d6bdab4d01292c4c8f6011a3b67cadb8ef6))
* print "No functions found in [ns] namespace" for kn func list ([#240](https://www.github.com/boson-project/func/issues/240)) ([61ea8d4](https://www.github.com/boson-project/func/commit/61ea8d4fc6e841f0f10151244f10131862bf181c))
* set envVars when creating a function ([#250](https://www.github.com/boson-project/func/issues/250)) ([f0be048](https://www.github.com/boson-project/func/commit/f0be048c841be22fcd0d448fdecc0da33b8c77be))
* make registry validation work again ([#690](https://www.github.com/knative-extensions/kn-plugin-func/issues/690)) ([10f2cf4](https://www.github.com/knative-extensions/kn-plugin-func/commit/10f2cf44c74884b4585114affd3c05cfba4f7613))
* move integration port to unregistered range ([#701](https://www.github.com/knative-extensions/kn-plugin-func/issues/701)) ([f63af0d](https://www.github.com/knative-extensions/kn-plugin-func/commit/f63af0d34e97a549df51c47f12e22a7558504278))
* remove stray manifest.yaml files ([#628](https://www.github.com/knative-extensions/kn-plugin-func/issues/628)) ([c810efc](https://www.github.com/knative-extensions/kn-plugin-func/commit/c810efc7a4eb0d87f37f3acfafc46c1e4639fdc4))
* remove template manifest from final Function ([#703](https://www.github.com/knative-extensions/kn-plugin-func/issues/703)) ([79ad65d](https://www.github.com/knative-extensions/kn-plugin-func/commit/79ad65ddf42b1bfffacd3f6fe4d606885b1a3766))
* revert hostname alias ([#712](https://www.github.com/knative-extensions/kn-plugin-func/issues/712)) ([07062c1](https://www.github.com/knative-extensions/kn-plugin-func/commit/07062c144aa19e4eb4c4ef27d5c5cb1ebb8eb185))
* schema-generate should point to `function.go` ([#677](https://www.github.com/knative-extensions/kn-plugin-func/issues/677)) ([c7d18c8](https://www.github.com/knative-extensions/kn-plugin-func/commit/c7d18c89edaf0a4fcb5c7b684e5e151c217430c2))
* use default socket path for TCP connections ([#669](https://www.github.com/knative-extensions/kn-plugin-func/issues/669)) ([ee96bef](https://www.github.com/knative-extensions/kn-plugin-func/commit/ee96bef9aea34c9370cf1f871bc4c558ed449a13))
* use specific version of paketo builder ([#670](https://www.github.com/knative-extensions/kn-plugin-func/issues/670)) ([834e8ae](https://www.github.com/knative-extensions/kn-plugin-func/commit/834e8ae46c833d2052171dc8dde23648a1da5112))
## [0.10.0](https://www.github.com/boson-project/faas/compare/v0.9.0...v0.10.0) (2020-12-08)
## [0.19.0](https://www.github.com/knative-extensions/kn-plugin-func/compare/v0.18.0...v0.19.0) (2021-11-03)
### ⚠ BREAKING CHANGES
* rename event templates to 'cloudevents' (#584)
### Features
* add support for manifest.yaml at repo/language/template levels ([#558](https://www.github.com/knative-extensions/kn-plugin-func/issues/558)) ([e319ea3](https://www.github.com/knative-extensions/kn-plugin-func/commit/e319ea3b62150ea2939876cb078ce150b7580bdf))
* allow developers to provide Build Envs to buildpacks in `func.yaml` ([#571](https://www.github.com/knative-extensions/kn-plugin-func/issues/571)) ([114a5fa](https://www.github.com/knative-extensions/kn-plugin-func/commit/114a5faee3ab9ae1ec37ae5c4375c6218405c3b7))
* create cli ([#547](https://www.github.com/knative-extensions/kn-plugin-func/issues/547)) ([4fe9fdc](https://www.github.com/knative-extensions/kn-plugin-func/commit/4fe9fdcab08552814c86d85194c552b591f52cd7))
* Improve build performance ([#569](https://www.github.com/knative-extensions/kn-plugin-func/issues/569)) ([ef7b986](https://www.github.com/knative-extensions/kn-plugin-func/commit/ef7b986900e1eb6afd4203067aeac3dc99a4ede5))
* periodically update progress during build ([#537](https://www.github.com/knative-extensions/kn-plugin-func/issues/537)) ([01689e7](https://www.github.com/knative-extensions/kn-plugin-func/commit/01689e7c131dd79db1e469c3ce54bd011464a6ef))
* rename event templates to 'cloudevents' ([#584](https://www.github.com/knative-extensions/kn-plugin-func/issues/584)) ([68b0904](https://www.github.com/knative-extensions/kn-plugin-func/commit/68b0904b17dee5bc6a5ec71132d35c45d52f4b71))
* Save password after user input ([#560](https://www.github.com/knative-extensions/kn-plugin-func/issues/560)) ([e85a4aa](https://www.github.com/knative-extensions/kn-plugin-func/commit/e85a4aa7f38681eb7554cac818eab7b1ca3bded1))
* ssh connection to remote docker daemon ([#594](https://www.github.com/knative-extensions/kn-plugin-func/issues/594)) ([e1f164d](https://www.github.com/knative-extensions/kn-plugin-func/commit/e1f164d2ca6b0e720ebcf881b8d5fd123dfd0d82))
* validation for registry/namespace to not contain image name ([#601](https://www.github.com/knative-extensions/kn-plugin-func/issues/601)) ([cf9596c](https://www.github.com/knative-extensions/kn-plugin-func/commit/cf9596c83e6eae8229ca61a18fafb5ba4df31d6b))
### Bug Fixes
* ConfigMap/Secret key validation ([#623](https://www.github.com/knative-extensions/kn-plugin-func/issues/623)) ([0ed1e81](https://www.github.com/knative-extensions/kn-plugin-func/commit/0ed1e816920b3e750c0aa0ed25fd1e0308e80a2e))
* Environment values -> Environment variables ([#622](https://www.github.com/knative-extensions/kn-plugin-func/issues/622)) ([ac9de9d](https://www.github.com/knative-extensions/kn-plugin-func/commit/ac9de9dfc68969ecb825c9ee2a92aa9918ae5ea7))
* hide a fmt.Println behind verbose flag ([#538](https://www.github.com/knative-extensions/kn-plugin-func/issues/538)) ([ad4607b](https://www.github.com/knative-extensions/kn-plugin-func/commit/ad4607bd50ae0c41ba0792d46318757089239de4))
* improve error message when invalid function name is used ([#567](https://www.github.com/knative-extensions/kn-plugin-func/issues/567)) ([0e3c676](https://www.github.com/knative-extensions/kn-plugin-func/commit/0e3c6764ef716cf24a3f60676e139d0c61161693))
* registry URL comparison ([#549](https://www.github.com/knative-extensions/kn-plugin-func/issues/549)) ([b10c484](https://www.github.com/knative-extensions/kn-plugin-func/commit/b10c48453cc5817c4c28077be13fc03baee5d818))
* stop the progress ticker after build completes ([#544](https://www.github.com/knative-extensions/kn-plugin-func/issues/544)) ([4f3e5fd](https://www.github.com/knative-extensions/kn-plugin-func/commit/4f3e5fdb7a40a3419d8d731d5a0c916b81af069b))
* update-pkger.sh sed error on osX ([#541](https://www.github.com/knative-extensions/kn-plugin-func/issues/541)) ([25f8b4d](https://www.github.com/knative-extensions/kn-plugin-func/commit/25f8b4d6ead2f47c3ab6541e2bdb5016b4a423aa))
## [0.18.0](https://www.github.com/knative-extensions/kn-plugin-func/compare/v0.17.1...v0.18.0) (2021-09-16)
### ⚠ BREAKING CHANGES
* change `describe` command to `info` (#474)
* use key&value for Labels (#472)
### Features
* allow language packs to set function metadata ([#465](https://www.github.com/knative-extensions/kn-plugin-func/issues/465)) ([48f40c3](https://www.github.com/knative-extensions/kn-plugin-func/commit/48f40c35e3a239d09d6a87fc4603ad21db46bc37))
* builders/buildpacks configured in client ([#495](https://www.github.com/knative-extensions/kn-plugin-func/issues/495)) ([668804e](https://www.github.com/knative-extensions/kn-plugin-func/commit/668804e53e76ce153a887289efb2b05f88203a1f))
* change `describe` command to `info` ([#474](https://www.github.com/knative-extensions/kn-plugin-func/issues/474)) ([10a0757](https://www.github.com/knative-extensions/kn-plugin-func/commit/10a07578e9f6ab6bbbb8028633b37e3400fd22bb))
* client effective runtimes list ([#490](https://www.github.com/knative-extensions/kn-plugin-func/issues/490)) ([e0aad6f](https://www.github.com/knative-extensions/kn-plugin-func/commit/e0aad6f936067892e04a463f85ca46689714716c))
* generate json schema for func.yaml ([#460](https://www.github.com/knative-extensions/kn-plugin-func/issues/460)) ([8939f89](https://www.github.com/knative-extensions/kn-plugin-func/commit/8939f89beae7d5b2f66bc18b921ca3059f89e629))
* make func schema if config updated ([#468](https://www.github.com/knative-extensions/kn-plugin-func/issues/468)) ([6ae2157](https://www.github.com/knative-extensions/kn-plugin-func/commit/6ae215754930c8a1e1dc4b5cd0b8ef3d99bb2893))
* move go, typescript and nodejs to paketo builders ([#485](https://www.github.com/knative-extensions/kn-plugin-func/issues/485)) ([a4b15ad](https://www.github.com/knative-extensions/kn-plugin-func/commit/a4b15ad9926112910251a8d74747e2db368c86e9))
* repository and templates client api ([#475](https://www.github.com/knative-extensions/kn-plugin-func/issues/475)) ([3f56a8f](https://www.github.com/knative-extensions/kn-plugin-func/commit/3f56a8fd7a66b923294043bcaa68ad59b1228831))
* repository management cli ([#514](https://www.github.com/knative-extensions/kn-plugin-func/issues/514)) ([ae638c3](https://www.github.com/knative-extensions/kn-plugin-func/commit/ae638c349c46c035bad74645bfc612380c871a85))
* repository management client api ([#467](https://www.github.com/knative-extensions/kn-plugin-func/issues/467)) ([9fd2475](https://www.github.com/knative-extensions/kn-plugin-func/commit/9fd247557ae8ee30cc7c5f0107d80fa72fbe8086))
* use key&value for Labels ([#472](https://www.github.com/knative-extensions/kn-plugin-func/issues/472)) ([5569681](https://www.github.com/knative-extensions/kn-plugin-func/commit/55696811e317a51767e09acab3d4d4e2abc6e982))
### Bug Fixes
* `build` should honor registry specified in `-r` ([#510](https://www.github.com/knative-extensions/kn-plugin-func/issues/510)) ([8aba038](https://www.github.com/knative-extensions/kn-plugin-func/commit/8aba038073f5584133eb3d08ba85289800e2e770))
* `config labels` panic ([#493](https://www.github.com/knative-extensions/kn-plugin-func/issues/493)) ([f2efbe5](https://www.github.com/knative-extensions/kn-plugin-func/commit/f2efbe5b42a6e0af36ecc6be429a630312e0c6e5))
* better cleanup before pkger run ([#479](https://www.github.com/knative-extensions/kn-plugin-func/issues/479)) ([25b1d63](https://www.github.com/knative-extensions/kn-plugin-func/commit/25b1d63b9c1b332e1d59e494af83bdc3a1f576e9))
* control chars on progress listener for Windows OS ([#498](https://www.github.com/knative-extensions/kn-plugin-func/issues/498)) ([1172a85](https://www.github.com/knative-extensions/kn-plugin-func/commit/1172a85c80f834ff3958073bc36ff4a5173c9de6))
* enable healt checks for Quarkus ([#477](https://www.github.com/knative-extensions/kn-plugin-func/issues/477)) ([72a1cf8](https://www.github.com/knative-extensions/kn-plugin-func/commit/72a1cf885e092340295cc6ace3580e7420640cda))
* fast-fail on create if Function already exists ([#496](https://www.github.com/knative-extensions/kn-plugin-func/issues/496)) ([25f7007](https://www.github.com/knative-extensions/kn-plugin-func/commit/25f7007300c020b5a1d336740a2bbc2f546bf3da))
* regenerate pkged.go ([#478](https://www.github.com/knative-extensions/kn-plugin-func/issues/478)) ([c7b3af4](https://www.github.com/knative-extensions/kn-plugin-func/commit/c7b3af41b8cac0b9edfb96d3a01230d2606e320a))
* removal of repositories ([#524](https://www.github.com/knative-extensions/kn-plugin-func/issues/524)) ([90c60b6](https://www.github.com/knative-extensions/kn-plugin-func/commit/90c60b693d6b2dbb2c8edee27a7cf7b6e8d1c399))
* support nested subdirs in remote templates ([#482](https://www.github.com/knative-extensions/kn-plugin-func/issues/482)) ([fcf9e77](https://www.github.com/knative-extensions/kn-plugin-func/commit/fcf9e77cb93808d28d0c60f3a0959fac605771fb))
* use full image names ([#535](https://www.github.com/knative-extensions/kn-plugin-func/issues/535)) ([16ee28c](https://www.github.com/knative-extensions/kn-plugin-func/commit/16ee28c83debcc19092abb250ef20354eca09710))
### [0.17.1](https://www.github.com/knative-extensions/kn-plugin-func/compare/v0.17.0...v0.17.1) (2021-08-05)
### Bug Fixes
* hide progress indicator if asking for creds ([#458](https://www.github.com/knative-extensions/kn-plugin-func/issues/458)) ([79e2234](https://www.github.com/knative-extensions/kn-plugin-func/commit/79e2234cbc62319f35b18a9b2a39ca4dffe89d4d))
* use ascii chars in progress indicator on win ([#459](https://www.github.com/knative-extensions/kn-plugin-func/issues/459)) ([6fd42a4](https://www.github.com/knative-extensions/kn-plugin-func/commit/6fd42a421ea58a4e9e1b6b6bff3f97d1da99d349))
## [0.17.0](https://www.github.com/knative-extensions/kn-plugin-func/compare/v0.16.0...v0.17.0) (2021-08-03)
### Features
* add spring cloud function runtime and templates ([#231](https://www.github.com/boson-project/faas/issues/231)) ([557361a](https://www.github.com/boson-project/faas/commit/557361a37446953dc613ae30f59913f1924dedd3))
* Add proper example of configuring Rust functions. ([#436](https://www.github.com/knative-extensions/kn-plugin-func/issues/436)) ([7656c40](https://www.github.com/knative-extensions/kn-plugin-func/commit/7656c4097283ed54b9e5f0472947cff931973365))
* add support for labels in func.yaml ([#373](https://www.github.com/knative-extensions/kn-plugin-func/issues/373)) ([0dba677](https://www.github.com/knative-extensions/kn-plugin-func/commit/0dba67751e5a4c594701d674b44b101a043e9a2c))
* Configure Rust functions ([#430](https://www.github.com/knative-extensions/kn-plugin-func/issues/430)) ([a08b843](https://www.github.com/knative-extensions/kn-plugin-func/commit/a08b843a9c2639d6b237f4248341b35f3bd8b954))
* print emit response output if it's a cloudevent ([#444](https://www.github.com/knative-extensions/kn-plugin-func/issues/444)) ([a25b723](https://www.github.com/knative-extensions/kn-plugin-func/commit/a25b723dbcd50d544566a385441cbdd883017947))
* remote template repositories ([#437](https://www.github.com/knative-extensions/kn-plugin-func/issues/437)) ([9db1a3d](https://www.github.com/knative-extensions/kn-plugin-func/commit/9db1a3d902016d59e60b732de43bdf4be198334f))
### Bug Fixes
* Fix plugin version output ([#233](https://www.github.com/boson-project/faas/issues/233)) ([8a30ba1](https://www.github.com/boson-project/faas/commit/8a30ba193da6097a141332212cbd64e5a1a708e8))
* use image name for run command ([#238](https://www.github.com/boson-project/faas/issues/238)) ([985906b](https://www.github.com/boson-project/faas/commit/985906b0e1f692f94fc84e3e796893192d17bd4c))
* closing stdout ([6f40b29](https://www.github.com/knative-extensions/kn-plugin-func/commit/6f40b29d3e02193c51317a29737c20dc11730c5a))
* do not trust builder when using podman ([#420](https://www.github.com/knative-extensions/kn-plugin-func/issues/420)) ([894f4fe](https://www.github.com/knative-extensions/kn-plugin-func/commit/894f4febda1d7da5d3f47e1003b29b339b1f8cd4))
* fix unit tests for Node.js event templates ([#438](https://www.github.com/knative-extensions/kn-plugin-func/issues/438)) ([d71532a](https://www.github.com/knative-extensions/kn-plugin-func/commit/d71532a070b24ec70dd5b77221e11b53bd300e8d))
* unnecessary template repackaging ([#449](https://www.github.com/knative-extensions/kn-plugin-func/issues/449)) ([435d1ac](https://www.github.com/knative-extensions/kn-plugin-func/commit/435d1ac2a39c4e3abf1a6518b05be3151d132a57))
* update builders version ([#421](https://www.github.com/knative-extensions/kn-plugin-func/issues/421)) ([771a230](https://www.github.com/knative-extensions/kn-plugin-func/commit/771a2307a13d105a188a0fd2c2fa843f3a535277))
## [0.9.0](https://www.github.com/boson-project/faas/compare/v0.8.0...v0.9.0) (2020-11-06)
## [0.16.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.15.1...v0.16.0) (2021-06-23)
### ⚠ BREAKING CHANGES
* change --trigger and --templates flags
* function signatures implied from trigger
### Features
* `func config envs` - interactive prompt ([#396](https://github.com/knative-extensions/kn-plugin-func/issues/396)) ([83a9ca6](https://github.com/knative-extensions/kn-plugin-func/commit/83a9ca684f1b74458b4804fe0e0efe5e95507077))
* `func config volumes` - interactive prompt ([#391](https://github.com/knative-extensions/kn-plugin-func/issues/391)) ([4ba95b6](https://github.com/knative-extensions/kn-plugin-func/commit/4ba95b69a8926ef56773166951ab8fa577111d37))
* add a URL output type for `func describe` ([#389](https://github.com/knative-extensions/kn-plugin-func/issues/389)) ([947fcaa](https://github.com/knative-extensions/kn-plugin-func/commit/947fcaa968a90efed4b6037cafa19e8fadda1fc7)), closes [#387](https://github.com/knative-extensions/kn-plugin-func/issues/387)
* allow setting autoscaling options to deployed KService ([#374](https://github.com/knative-extensions/kn-plugin-func/issues/374)) ([a937c49](https://github.com/knative-extensions/kn-plugin-func/commit/a937c490b7e1ad31c3596f91c310c3f4560329fd))
* allow setting resource requests/limits ([#386](https://github.com/knative-extensions/kn-plugin-func/issues/386)) ([12c5cda](https://github.com/knative-extensions/kn-plugin-func/commit/12c5cda8e2157a775e9fc0bb14fc051c5119f86a))
* reference ConfigMaps in `envs` and `volumes` sections in config ([#371](https://github.com/knative-extensions/kn-plugin-func/issues/371)) ([1dbb5ae](https://github.com/knative-extensions/kn-plugin-func/commit/1dbb5aecbf73cd77a648eaff5e52c1c3ce282a67))
* reference Secrets in `envs` and `volumes` sections in config ([#369](https://github.com/knative-extensions/kn-plugin-func/issues/369)) ([9d7fd34](https://github.com/knative-extensions/kn-plugin-func/commit/9d7fd346495b119e895747d747c1c0a5bacb988e))
* Rust templates ([#376](https://github.com/knative-extensions/kn-plugin-func/issues/376)) ([4711638](https://github.com/knative-extensions/kn-plugin-func/commit/4711638495692e5b8fc1ccca34000c44afa3832c))
* typed errors for templates use cases ([40f1027](https://github.com/knative-extensions/kn-plugin-func/commit/40f10277a4efc3239bbec7a35586c3eabf3337ee))
### Bug Fixes
* disable selinux labeling ([6e8517c](https://github.com/knative-extensions/kn-plugin-func/commit/6e8517c023fa815c616606640657344785dbe4ff))
* password read on windows ([84f896b](https://github.com/knative-extensions/kn-plugin-func/commit/84f896b3298fffe9c8aeec2706c83b6a0fb48141))
* use credsStore ([88ea081](https://github.com/knative-extensions/kn-plugin-func/commit/88ea081cc0addb644ca4a575735a6dd3393197a2))
### Code Refactoring
* change --trigger and --templates flags ([ce29ff6](https://github.com/knative-extensions/kn-plugin-func/commit/ce29ff6285d68bc008fbf0cfbd956982044104bc))
* function signatures implied from trigger ([b30e883](https://github.com/knative-extensions/kn-plugin-func/commit/b30e883e671477ebfa217df03e6825778e84a3df))
### [0.15.1](https://github.com/knative-extensions/kn-plugin-func/compare/v0.15.0...v0.15.1) (2021-05-27)
### Bug Fixes
* Revert "chore: bump Knative deps to 0.22.0 ([#358](https://github.com/knative-extensions/kn-plugin-func/issues/358))" ([#366](https://github.com/knative-extensions/kn-plugin-func/issues/366)) ([72584ce](https://github.com/knative-extensions/kn-plugin-func/commit/72584ced0dc3af86852f56ce36171ba567481b41))
## [0.15.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.14.0...v0.15.0) (2021-05-26)
### ⚠ BREAKING CHANGES
* **templates:** modify the nodejs event template to accept a cloudevent (#356)
### Features
* add 'kn func emit' command ([#332](https://github.com/knative-extensions/kn-plugin-func/issues/332)) ([49594d9](https://github.com/knative-extensions/kn-plugin-func/commit/49594d976627c593ff18e42086199225ddcf5130))
* add typescript templates ([#355](https://github.com/knative-extensions/kn-plugin-func/issues/355)) ([d3eafe2](https://github.com/knative-extensions/kn-plugin-func/commit/d3eafe2a8451ebc28124b913f03c12e9359d5e30))
### Bug Fixes
* minor typos in node template docs ([#351](https://github.com/knative-extensions/kn-plugin-func/issues/351)) ([ea0a75a](https://github.com/knative-extensions/kn-plugin-func/commit/ea0a75a7ccb6d00b8c859ff4cd311ad33fb8dbc3))
### src
* **templates:** modify the nodejs event template to accept a cloudevent ([#356](https://github.com/knative-extensions/kn-plugin-func/issues/356)) ([caf0659](https://github.com/knative-extensions/kn-plugin-func/commit/caf0659900a79650bb11877ffaeadbc30be9f922))
## [0.14.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.13.0...v0.14.0) (2021-05-12)
### ⚠ BREAKING CHANGES
* revert bump to go 1.16 and template changes (#340)
### src
* revert bump to go 1.16 and template changes ([#340](https://github.com/knative-extensions/kn-plugin-func/issues/340)) ([2b025df](https://github.com/knative-extensions/kn-plugin-func/commit/2b025df19942e990050ef344784662fe77fd7309))
## [0.13.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.12.1...v0.13.0) (2021-05-12)
### ⚠ BREAKING CHANGES
* change envVars to env in func.yaml (#316)
### Features
* add support for annotations in func.yaml ([#314](https://github.com/knative-extensions/kn-plugin-func/issues/314)) ([5feb0e2](https://github.com/knative-extensions/kn-plugin-func/commit/5feb0e20f366f8dc46f339257d87419bc852753c))
* add/improve spinner for build and deploy ([#322](https://github.com/knative-extensions/kn-plugin-func/issues/322)) ([857b0fd](https://github.com/knative-extensions/kn-plugin-func/commit/857b0fd19d2a716c804426196e907a3ad31d559e))
* create templates archive on go generate ([63b7f11](https://github.com/knative-extensions/kn-plugin-func/commit/63b7f1147176ce5cfd21c3b74094fcc8154298df))
* function name matches KService name ([#317](https://github.com/knative-extensions/kn-plugin-func/issues/317)) ([541e858](https://github.com/knative-extensions/kn-plugin-func/commit/541e8586f7348fa92ee83f246ef34730b1801b9f))
* positive error when runtimme or template unrecognized ([acc56b0](https://github.com/knative-extensions/kn-plugin-func/commit/acc56b0900113ca68270bd3ac68310864e42b5a7))
* preserve file modes using in-memory tar FS ([7dc772e](https://github.com/knative-extensions/kn-plugin-func/commit/7dc772ec62536fc77b84b16550bf7d2a1f0b6a09))
* support windows paths in embedded templates FS ([c2b2168](https://github.com/knative-extensions/kn-plugin-func/commit/c2b216857bcc1e18555a2e41fa3ad675e75cf1c3))
* usage of local evnvvar in func cfg file ([7f8e595](https://github.com/knative-extensions/kn-plugin-func/commit/7f8e5954a939563486661a98198b22f41eebc195))
### Bug Fixes
* added checks on delete command test for lint ([94e387c](https://github.com/knative-extensions/kn-plugin-func/commit/94e387c9326aed79ede95f36b97da4de97c42dec))
* default for `--builder` flag ([06455f4](https://github.com/knative-extensions/kn-plugin-func/commit/06455f4bac02e8581ae4471e72909ba9fe7dbd4d))
* func delete with explicit name as argument ([#323](https://github.com/knative-extensions/kn-plugin-func/issues/323)) with strict validation ([8ab0ba2](https://github.com/knative-extensions/kn-plugin-func/commit/8ab0ba243ae4c40867a2426b2ca965559a03cd53))
* lint issues ([895872a](https://github.com/knative-extensions/kn-plugin-func/commit/895872aee76b44be739bd0eafb9f2cdcdc137494))
### Code Refactoring
* change envVars to env in func.yaml ([#316](https://github.com/knative-extensions/kn-plugin-func/issues/316)) ([89ff286](https://github.com/knative-extensions/kn-plugin-func/commit/89ff286a1f3afae655a2c724a05cb3bc3c281786))
### [0.12.1](https://github.com/knative-extensions/kn-plugin-func/compare/v0.12.0...v0.12.1) (2021-04-14)
### Bug Fixes
* build needs to use legacy jar ([129dc5a](https://github.com/knative-extensions/kn-plugin-func/commit/129dc5a8348dc8e4e14f5891871cf6b50ae35ccc))
## [0.12.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.11.0...v0.12.0) (2021-03-30)
### Features
* add --build (default: true) flag to func deploy ([8a91cac](https://github.com/knative-extensions/kn-plugin-func/commit/8a91cac6cc78b5cf56d5158f3eb03a4076a34ffe))
* basic lifecycle integraiton tests ([8edd0df](https://github.com/knative-extensions/kn-plugin-func/commit/8edd0df836055b33473f9a7774e8ae755f46ac2e))
* integration tests target ([ddf4ab8](https://github.com/knative-extensions/kn-plugin-func/commit/ddf4ab86c46912f78e56a52a14efcf89fd187103))
* local cluster allocation, configuration and teardown ([9c499b6](https://github.com/knative-extensions/kn-plugin-func/commit/9c499b69c4991b86e51127081cee7fb0fc34d554))
* using custom docker daemon (e.g podman) ([6d2d8c6](https://github.com/knative-extensions/kn-plugin-func/commit/6d2d8c63b01e12f6cf277c2cd18c3f7298ce86ab))
### Bug Fixes
* `func deploy` uses Docker API, not binary ([dc2fbee](https://github.com/knative-extensions/kn-plugin-func/commit/dc2fbee67f7f2304bece83a9b4d4f051ed19cd61))
* `func run` now uses Docker API, not binary ([db0945e](https://github.com/knative-extensions/kn-plugin-func/commit/db0945ed3ecb9e6e4283a0cb478d39657c6803dc))
* compare service names in integraiton tests ([1551d69](https://github.com/knative-extensions/kn-plugin-func/commit/1551d69b5d287becaafdf3d5b99a6ba8da926fa6))
* exposed port ([7ed2e86](https://github.com/knative-extensions/kn-plugin-func/commit/7ed2e86d9672f285c1def490a3d325ceb9e8471f))
* increase remove timeout to 120s ([80e366b](https://github.com/knative-extensions/kn-plugin-func/commit/80e366b14234c184932d91db4188bdabb0742e7a))
* sprint-boot template ([38fd673](https://github.com/knative-extensions/kn-plugin-func/commit/38fd673fdbef1094558b32910a42fcdff2d8bb0c))
* update pack dependency ([c3c2165](https://github.com/knative-extensions/kn-plugin-func/commit/c3c21657b2bc3cba9e4ba87864d8fe0c5d4e43af))
## [0.11.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.10.0...v0.11.0) (2021-01-21)
### Features
* add --all-namespaces flag to `func list` ([#242](https://github.com/knative-extensions/kn-plugin-func/issues/242)) ([8e72fd2](https://github.com/knative-extensions/kn-plugin-func/commit/8e72fd2eba9f4e6e5d3a0bd366215025ba1d1004))
### Bug Fixes
* change --format flag to --output for list and describe commands ([#248](https://github.com/knative-extensions/kn-plugin-func/issues/248)) ([6470d9e](https://github.com/knative-extensions/kn-plugin-func/commit/6470d9e57462bc8d3a30583cf146d4f466e2d5f7))
* correct fn signatures in Go Events template ([#246](https://github.com/knative-extensions/kn-plugin-func/issues/246)) ([5502492](https://github.com/knative-extensions/kn-plugin-func/commit/55024921c26e044f83187cbd5510375d8702c6d9))
* correcting broken merge ([#252](https://github.com/knative-extensions/kn-plugin-func/issues/252)) ([8d1f5b8](https://github.com/knative-extensions/kn-plugin-func/commit/8d1f5b833d86fa959e3386db73f7e1b07bdd6dfd))
* fix the help text for the describe function ([#243](https://github.com/knative-extensions/kn-plugin-func/issues/243)) ([5a3a0d6](https://github.com/knative-extensions/kn-plugin-func/commit/5a3a0d6bdab4d01292c4c8f6011a3b67cadb8ef6))
* print "No functions found in [ns] namespace" for kn func list ([#240](https://github.com/knative-extensions/kn-plugin-func/issues/240)) ([61ea8d4](https://github.com/knative-extensions/kn-plugin-func/commit/61ea8d4fc6e841f0f10151244f10131862bf181c))
* set envVars when creating a function ([#250](https://github.com/knative-extensions/kn-plugin-func/issues/250)) ([f0be048](https://github.com/knative-extensions/kn-plugin-func/commit/f0be048c841be22fcd0d448fdecc0da33b8c77be))
## [0.10.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.9.0...v0.10.0) (2020-12-08)
### Features
* add spring cloud function runtime and templates ([#231](https://github.com/knative-extensions/kn-plugin-func/issues/231)) ([557361a](https://github.com/knative-extensions/kn-plugin-func/commit/557361a37446953dc613ae30f59913f1924dedd3))
### Bug Fixes
* Fix plugin version output ([#233](https://github.com/knative-extensions/kn-plugin-func/issues/233)) ([8a30ba1](https://github.com/knative-extensions/kn-plugin-func/commit/8a30ba193da6097a141332212cbd64e5a1a708e8))
* use image name for run command ([#238](https://github.com/knative-extensions/kn-plugin-func/issues/238)) ([985906b](https://github.com/knative-extensions/kn-plugin-func/commit/985906b0e1f692f94fc84e3e796893192d17bd4c))
## [0.9.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.8.0...v0.9.0) (2020-11-06)
### ⚠ BREAKING CHANGES
@ -63,19 +482,19 @@
### Features
* Better output of build/deploy/delete commands ([#206](https://www.github.com/boson-project/faas/issues/206)) ([ddbb95b](https://www.github.com/boson-project/faas/commit/ddbb95b075a383fb1847be2c75fd2c216870c7f8))
* change default runtime to Node.js HTTP ([#198](https://www.github.com/boson-project/faas/issues/198)) ([61cb56a](https://www.github.com/boson-project/faas/commit/61cb56aec3461e9f9b35282435dbc884999be2b3))
* list command - improved output ([#205](https://www.github.com/boson-project/faas/issues/205)) ([29ca077](https://www.github.com/boson-project/faas/commit/29ca07768ca455debb7992ebbf09b2db2058f56d))
* remove create cli subcommand ([#180](https://www.github.com/boson-project/faas/issues/180)) ([57e1236](https://www.github.com/boson-project/faas/commit/57e12362af18f48624a9c303c070846e1645e08d))
* rename faas to function ([#210](https://www.github.com/boson-project/faas/issues/210)) ([cd57692](https://www.github.com/boson-project/faas/commit/cd57692c9d04fecb918abf4f15cd37d45592cf82))
* Better output of build/deploy/delete commands ([#206](https://github.com/knative-extensions/kn-plugin-func/issues/206)) ([ddbb95b](https://github.com/knative-extensions/kn-plugin-func/commit/ddbb95b075a383fb1847be2c75fd2c216870c7f8))
* change default runtime to Node.js HTTP ([#198](https://github.com/knative-extensions/kn-plugin-func/issues/198)) ([61cb56a](https://github.com/knative-extensions/kn-plugin-func/commit/61cb56aec3461e9f9b35282435dbc884999be2b3))
* list command - improved output ([#205](https://github.com/knative-extensions/kn-plugin-func/issues/205)) ([29ca077](https://github.com/knative-extensions/kn-plugin-func/commit/29ca07768ca455debb7992ebbf09b2db2058f56d))
* remove create cli subcommand ([#180](https://github.com/knative-extensions/kn-plugin-func/issues/180)) ([57e1236](https://github.com/knative-extensions/kn-plugin-func/commit/57e12362af18f48624a9c303c070846e1645e08d))
* rename faas to function ([#210](https://github.com/knative-extensions/kn-plugin-func/issues/210)) ([cd57692](https://github.com/knative-extensions/kn-plugin-func/commit/cd57692c9d04fecb918abf4f15cd37d45592cf82))
### Bug Fixes
* `delete` and `deploy sub-commands respects func.yaml conf ([d562498](https://www.github.com/boson-project/faas/commit/d5624980d5f31f98bc27e803ae94311491d4d078))
* return JSON in Node.js event template ([#211](https://www.github.com/boson-project/faas/issues/211)) ([beb838f](https://www.github.com/boson-project/faas/commit/beb838ff43d04c7ccec63a26fbe2af9fb167ae1a))
* `delete` and `deploy sub-commands respects func.yaml conf ([d562498](https://github.com/knative-extensions/kn-plugin-func/commit/d5624980d5f31f98bc27e803ae94311491d4d078))
* return JSON in Node.js event template ([#211](https://github.com/knative-extensions/kn-plugin-func/issues/211)) ([beb838f](https://github.com/knative-extensions/kn-plugin-func/commit/beb838ff43d04c7ccec63a26fbe2af9fb167ae1a))
## [0.8.0](https://www.github.com/boson-project/faas/compare/v0.7.0...v0.8.0) (2020-10-20)
## [0.8.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.7.0...v0.8.0) (2020-10-20)
### ⚠ BREAKING CHANGES
@ -85,48 +504,48 @@
### Features
* add health probes to node & go services ([#174](https://www.github.com/boson-project/faas/issues/174)) ([95c1eb5](https://www.github.com/boson-project/faas/commit/95c1eb5e59335cfee84ce536d086bd394268c81c))
* introduce CloudEvent data as first parameter for event functions ([#172](https://www.github.com/boson-project/faas/issues/172)) ([7451194](https://www.github.com/boson-project/faas/commit/74511948cefc368d898ad05b911fded74d44b759))
* user can set envvars ([5182487](https://www.github.com/boson-project/faas/commit/5182487df218685867fda10c3d1983b4c035c08a))
* **kn:** Enable faas to be integrated as plugin to kn ([#155](https://www.github.com/boson-project/faas/issues/155)) ([85a5f47](https://www.github.com/boson-project/faas/commit/85a5f475eb32269b9cced05fe36dc90f8befd000))
* ability for users to specify custom builders ([#147](https://www.github.com/boson-project/faas/issues/147)) ([c2b4a30](https://www.github.com/boson-project/faas/commit/c2b4a304bd3fa7d020c71db9f4d79c80c98d86d3))
* combine deploy and update commands ([#152](https://www.github.com/boson-project/faas/issues/152)) ([d5839ea](https://www.github.com/boson-project/faas/commit/d5839ea6c1e84e843ad643cc0611a82e2e6d2399))
* fish completion ([d822303](https://www.github.com/boson-project/faas/commit/d82230353d3d437e8f35e7f9ce3569988d765b42))
* add health probes to node & go services ([#174](https://github.com/knative-extensions/kn-plugin-func/issues/174)) ([95c1eb5](https://github.com/knative-extensions/kn-plugin-func/commit/95c1eb5e59335cfee84ce536d086bd394268c81c))
* introduce CloudEvent data as first parameter for event functions ([#172](https://github.com/knative-extensions/kn-plugin-func/issues/172)) ([7451194](https://github.com/knative-extensions/kn-plugin-func/commit/74511948cefc368d898ad05b911fded74d44b759))
* user can set envvars ([5182487](https://github.com/knative-extensions/kn-plugin-func/commit/5182487df218685867fda10c3d1983b4c035c08a))
* **kn:** Enable faas to be integrated as plugin to kn ([#155](https://github.com/knative-extensions/kn-plugin-func/issues/155)) ([85a5f47](https://github.com/knative-extensions/kn-plugin-func/commit/85a5f475eb32269b9cced05fe36dc90f8befd000))
* ability for users to specify custom builders ([#147](https://github.com/knative-extensions/kn-plugin-func/issues/147)) ([c2b4a30](https://github.com/knative-extensions/kn-plugin-func/commit/c2b4a304bd3fa7d020c71db9f4d79c80c98d86d3))
* combine deploy and update commands ([#152](https://github.com/knative-extensions/kn-plugin-func/issues/152)) ([d5839ea](https://github.com/knative-extensions/kn-plugin-func/commit/d5839ea6c1e84e843ad643cc0611a82e2e6d2399))
* fish completion ([d822303](https://github.com/knative-extensions/kn-plugin-func/commit/d82230353d3d437e8f35e7f9ce3569988d765b42))
### Bug Fixes
* examples in readme ([5591e7f](https://www.github.com/boson-project/faas/commit/5591e7fa2ca9584f03bf8d065778cd120ea9054f))
* image parsing ([6a621a5](https://www.github.com/boson-project/faas/commit/6a621a5186ffffec79e6f34c34681cc37eeaa0bd))
* regenerate pkger files ([#183](https://www.github.com/boson-project/faas/issues/183)) ([1d14a8c](https://www.github.com/boson-project/faas/commit/1d14a8c10156098d66ef691f84ecce1bd25a6d88))
* root cmd init ([ec5327d](https://www.github.com/boson-project/faas/commit/ec5327d5201b57d6a33bcc7314332686582b676f))
* stop using manually edited completion ([bf9b048](https://www.github.com/boson-project/faas/commit/bf9b04881333fed6038251fa4de92368771840d9))
* update quarkus templates ([ffc6a12](https://www.github.com/boson-project/faas/commit/ffc6a123e469968865fef1ccb5f8d84a443baccb))
* update to Knative 0.17 ([#145](https://www.github.com/boson-project/faas/issues/145)) ([5fe7052](https://www.github.com/boson-project/faas/commit/5fe70526e531e283c6704d9526e3cdd7ef64f9e1))
* examples in readme ([5591e7f](https://github.com/knative-extensions/kn-plugin-func/commit/5591e7fa2ca9584f03bf8d065778cd120ea9054f))
* image parsing ([6a621a5](https://github.com/knative-extensions/kn-plugin-func/commit/6a621a5186ffffec79e6f34c34681cc37eeaa0bd))
* regenerate pkger files ([#183](https://github.com/knative-extensions/kn-plugin-func/issues/183)) ([1d14a8c](https://github.com/knative-extensions/kn-plugin-func/commit/1d14a8c10156098d66ef691f84ecce1bd25a6d88))
* root cmd init ([ec5327d](https://github.com/knative-extensions/kn-plugin-func/commit/ec5327d5201b57d6a33bcc7314332686582b676f))
* stop using manually edited completion ([bf9b048](https://github.com/knative-extensions/kn-plugin-func/commit/bf9b04881333fed6038251fa4de92368771840d9))
* update quarkus templates ([ffc6a12](https://github.com/knative-extensions/kn-plugin-func/commit/ffc6a123e469968865fef1ccb5f8d84a443baccb))
* update to Knative 0.17 ([#145](https://github.com/knative-extensions/kn-plugin-func/issues/145)) ([5fe7052](https://github.com/knative-extensions/kn-plugin-func/commit/5fe70526e531e283c6704d9526e3cdd7ef64f9e1))
### src
* change all references of "repository" to "registry" for images ([#156](https://www.github.com/boson-project/faas/issues/156)) ([e425c8f](https://www.github.com/boson-project/faas/commit/e425c8f08183b333e56d5d3cfe74fc9e85a6c903))
* change all references of "repository" to "registry" for images ([#156](https://github.com/knative-extensions/kn-plugin-func/issues/156)) ([e425c8f](https://github.com/knative-extensions/kn-plugin-func/commit/e425c8f08183b333e56d5d3cfe74fc9e85a6c903))
## [0.7.0](https://www.github.com/boson-project/faas/compare/v0.6.2...v0.7.0) (2020-09-24)
## [0.7.0](https://github.com/knative-extensions/kn-plugin-func/compare/v0.6.2...v0.7.0) (2020-09-24)
### Features
* add local debugging to node.js templates ([#132](https://www.github.com/boson-project/faas/issues/132)) ([1b0bb15](https://www.github.com/boson-project/faas/commit/1b0bb15147889bb55ff33de1dc132cb0370d1da6))
* decouple function name from function domain ([#127](https://www.github.com/boson-project/faas/issues/127)) ([0258626](https://www.github.com/boson-project/faas/commit/025862689ec8dc460a1ef6f4402151c18a072ba3))
* default to no confirmation prompts for CLI commands ([566d8f9](https://www.github.com/boson-project/faas/commit/566d8f9255d532e88e72d5bce122bebaee88bc81))
* set builder images in templates and .faas.yaml ([#136](https://www.github.com/boson-project/faas/issues/136)) ([d6e131f](https://www.github.com/boson-project/faas/commit/d6e131f9153c20bd3edbf1441060610987fa5693))
* **ci/cd:** add release-please for automated release management ([8a60c5e](https://www.github.com/boson-project/faas/commit/8a60c5e0c44d28d2ff085e56299217e05e408df8))
* add local debugging to node.js templates ([#132](https://github.com/knative-extensions/kn-plugin-func/issues/132)) ([1b0bb15](https://github.com/knative-extensions/kn-plugin-func/commit/1b0bb15147889bb55ff33de1dc132cb0370d1da6))
* decouple function name from function domain ([#127](https://github.com/knative-extensions/kn-plugin-func/issues/127)) ([0258626](https://github.com/knative-extensions/kn-plugin-func/commit/025862689ec8dc460a1ef6f4402151c18a072ba3))
* default to no confirmation prompts for CLI commands ([566d8f9](https://github.com/knative-extensions/kn-plugin-func/commit/566d8f9255d532e88e72d5bce122bebaee88bc81))
* set builder images in templates and .faas.yaml ([#136](https://github.com/knative-extensions/kn-plugin-func/issues/136)) ([d6e131f](https://github.com/knative-extensions/kn-plugin-func/commit/d6e131f9153c20bd3edbf1441060610987fa5693))
* **ci/cd:** add release-please for automated release management ([8a60c5e](https://github.com/knative-extensions/kn-plugin-func/commit/8a60c5e0c44d28d2ff085e56299217e05e408df8))
### Bug Fixes
* correct value for config path and robustify ([#130](https://www.github.com/boson-project/faas/issues/130)) ([fae27da](https://www.github.com/boson-project/faas/commit/fae27dabc97c78cd98be400d296da6fc2fbeba65))
* delete command ([284b77f](https://www.github.com/boson-project/faas/commit/284b77f7ef6524195da958850131190399470375))
* describe works without Eventing ([6c16e65](https://www.github.com/boson-project/faas/commit/6c16e65d60543458f0b70c010d672cb4d45f6279))
* sync package-lock.json ([#137](https://www.github.com/boson-project/faas/issues/137)) ([02309a2](https://www.github.com/boson-project/faas/commit/02309a24a1d8779fb69e4f67fa4f7faea705b2ba))
* correct value for config path and robustify ([#130](https://github.com/knative-extensions/kn-plugin-func/issues/130)) ([fae27da](https://github.com/knative-extensions/kn-plugin-func/commit/fae27dabc97c78cd98be400d296da6fc2fbeba65))
* delete command ([284b77f](https://github.com/knative-extensions/kn-plugin-func/commit/284b77f7ef6524195da958850131190399470375))
* describe works without Eventing ([6c16e65](https://github.com/knative-extensions/kn-plugin-func/commit/6c16e65d60543458f0b70c010d672cb4d45f6279))
* sync package-lock.json ([#137](https://github.com/knative-extensions/kn-plugin-func/issues/137)) ([02309a2](https://github.com/knative-extensions/kn-plugin-func/commit/02309a24a1d8779fb69e4f67fa4f7faea705b2ba))
## [Unreleased]
@ -146,7 +565,7 @@
### Chore
- update quarkus version to 1.7.2.Final
- use organization-level secrets for image deployment
- **actions:** add binary uploads to develop branch CI ([#104](https://github.com/boson-project/faas/issues/104))
- **actions:** add binary uploads to develop branch CI ([#104](https://github.com/knative-extensions/kn-plugin-func/issues/104))
### Docs
- initial Go template READMEs
@ -154,13 +573,13 @@
### Fix
- build releases from main branch only
- remove references to unused binaries appsody, kn, kubectl
- image override ([#88](https://github.com/boson-project/faas/issues/88))
- image override ([#88](https://github.com/knative-extensions/kn-plugin-func/issues/88))
### Release
- v0.6.1
### Templates
- **node:** make node templates use npx [@redhat](https://github.com/redhat)/faas-js-runtime ([#99](https://github.com/boson-project/faas/issues/99))
- **node:** make node templates use npx [@redhat](https://github.com/redhat)/faas-js-runtime ([#99](https://github.com/knative-extensions/kn-plugin-func/issues/99))
<a name="v0.6.0"></a>
@ -171,7 +590,7 @@
### Docs
- fix function typos
- setting up remote access to kind clusters
- wireguard configuraiton for OS X
- wireguard configuration for OS X
- Kind cluster provisioning and TLS
- separate repository and system docs
- getting started with kubernetes, reorganization.
@ -183,8 +602,8 @@
- consolidate knative client config construction
- cli usability enhancements and API simplification
- the `list` sub-command uses namespace
- version command respects verbose flag ([#61](https://github.com/boson-project/faas/issues/61))
- add init/build/deploy commands and customizable namespace ([#65](https://github.com/boson-project/faas/issues/65))
- version command respects verbose flag ([#61](https://github.com/knative-extensions/kn-plugin-func/issues/61))
- add init/build/deploy commands and customizable namespace ([#65](https://github.com/knative-extensions/kn-plugin-func/issues/65))
- JSON output for the `list` sub-command
### Fix
@ -199,13 +618,13 @@
- v0.6.0
### Test
- add test targets for go and quarkus templates ([#72](https://github.com/boson-project/faas/issues/72))
- add test targets for go and quarkus templates ([#72](https://github.com/knative-extensions/kn-plugin-func/issues/72))
<a name="v0.5.0"></a>
## [v0.5.0] - 2020-07-31
### Actions
- add CHANGELOG.md and a release target to Makefile ([#45](https://github.com/boson-project/faas/issues/45))
- add CHANGELOG.md and a release target to Makefile ([#45](https://github.com/knative-extensions/kn-plugin-func/issues/45))
### Build
- reduce build verbosity for cross-platform compilations
@ -308,17 +727,17 @@
- add kn-based implementation
[Unreleased]: https://github.com/boson-project/faas/compare/v0.6.2...HEAD
[v0.6.2]: https://github.com/boson-project/faas/compare/v0.6.1...v0.6.2
[v0.6.1]: https://github.com/boson-project/faas/compare/v0.6.0...v0.6.1
[v0.6.0]: https://github.com/boson-project/faas/compare/v0.5.0...v0.6.0
[v0.5.0]: https://github.com/boson-project/faas/compare/v0.4.0...v0.5.0
[v0.4.0]: https://github.com/boson-project/faas/compare/v0.3.0...v0.4.0
[v0.3.0]: https://github.com/boson-project/faas/compare/v0.2.2...v0.3.0
[v0.2.2]: https://github.com/boson-project/faas/compare/v0.2.1...v0.2.2
[v0.2.1]: https://github.com/boson-project/faas/compare/v0.2.0...v0.2.1
[v0.2.0]: https://github.com/boson-project/faas/compare/v0.1.0...v0.2.0
[v0.1.0]: https://github.com/boson-project/faas/compare/v0.0.19...v0.1.0
[v0.0.19]: https://github.com/boson-project/faas/compare/v0.0.18...v0.0.19
[v0.0.18]: https://github.com/boson-project/faas/compare/v0.0.17...v0.0.18
[v0.0.17]: https://github.com/boson-project/faas/compare/v0.0.16...v0.0.17
[Unreleased]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.6.2...HEAD
[v0.6.2]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.6.1...v0.6.2
[v0.6.1]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.6.0...v0.6.1
[v0.6.0]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.5.0...v0.6.0
[v0.5.0]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.4.0...v0.5.0
[v0.4.0]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.3.0...v0.4.0
[v0.3.0]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.2.2...v0.3.0
[v0.2.2]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.2.1...v0.2.2
[v0.2.1]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.2.0...v0.2.1
[v0.2.0]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.1.0...v0.2.0
[v0.1.0]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.0.19...v0.1.0
[v0.0.19]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.0.18...v0.0.19
[v0.0.18]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.0.17...v0.0.18
[v0.0.17]: https://github.com/knative-extensions/kn-plugin-func/compare/v0.0.16...v0.0.17

3
CODE-OF-CONDUCT.md Normal file
View File

@ -0,0 +1,3 @@
## Knative Community Code of Conduct
The [Knative Community Code of Conduct](https://github.com/knative/community/blob/main/CODE-OF-CONDUCT.md) is defined in the [Knative community repository](https://github.com/knative/community).

View File

@ -1,3 +0,0 @@
# These owners will be the default owners for everything in
# the repo. Unless a later match takes precedence
* @lance @lkingland @matejvasek @zroubalik

View File

@ -1,10 +0,0 @@
FROM golang:alpine as build
RUN apk add make git gcc g++
COPY . /src
WORKDIR /src
RUN make
FROM alpine:latest
RUN apk add --no-cache ca-certificates
COPY --from=build /src/func /bin/
ENTRYPOINT ["func"]

18
Dockerfile.utils Normal file
View File

@ -0,0 +1,18 @@
FROM scratch
ARG TARGETARCH
ARG FUNC_UTIL_BINARY=func-util-$TARGETARCH
ENV PATH=/
COPY $FUNC_UTIL_BINARY /func-util
ADD func-util-symlinks.tgz /
LABEL \
org.opencontainers.image.description="Knative Func Utils Image" \
org.opencontainers.image.source="https://github.com/knative/func" \
org.opencontainers.image.vendor="https://github.com/knative/func" \
org.opencontainers.image.url="https://github.com/knative/func/pkgs/container/func-utils"
USER 0:0

374
Makefile
View File

@ -1,111 +1,323 @@
REPO := quay.io/boson/func
BIN := func
# ##
#
# Run 'make help' for a summary
#
# ##
PKGER?=pkger
# Binaries
BIN := func
BIN_DARWIN_AMD64 ?= $(BIN)_darwin_amd64
BIN_DARWIN_ARM64 ?= $(BIN)_darwin_arm64
BIN_LINUX_AMD64 ?= $(BIN)_linux_amd64
BIN_LINUX_ARM64 ?= $(BIN)_linux_arm64
BIN_LINUX_PPC64LE ?= $(BIN)_linux_ppc64le
BIN_LINUX_S390X ?= $(BIN)_linux_s390x
BIN_WINDOWS ?= $(BIN)_windows_amd64.exe
DARWIN=$(BIN)_darwin_amd64
LINUX=$(BIN)_linux_amd64
WINDOWS=$(BIN)_windows_amd64.exe
# Utilities
BIN_GOLANGCI_LINT ?= "$(PWD)/bin/golangci-lint"
CODE := $(shell find . -name '*.go')
DATE := $(shell date -u +"%Y%m%dT%H%M%SZ")
HASH := $(shell git rev-parse --short HEAD 2>/dev/null)
VTAG := $(shell git tag --points-at HEAD)
VERS := $(shell [ -z $(VTAG) ] && echo 'tip' || echo $(VTAG) )
# Version
# A verbose version is built into the binary including a date stamp, git commit
# hash and the version tag of the current commit (semver) if it exists.
# If the current commit does not have a semver tag, 'tip' is used, unless there
# is a TAG environment variable. Precedence is git tag, environment variable, 'tip'
HASH := $(shell git rev-parse --short HEAD 2>/dev/null)
VTAG := $(shell git tag --points-at HEAD | head -1)
VTAG := $(shell [ -z $(VTAG) ] && echo $(ETAG) || echo $(VTAG))
VERS ?= $(shell git describe --tags --match 'v*')
KVER ?= $(shell git describe --tags --match 'knative-*')
TEMPLATE_DIRS=$(shell find templates -type d)
TEMPLATE_FILES=$(shell find templates -type f -name '*')
TEMPLATE_PACKAGE=pkged.go
LDFLAGS := -X knative.dev/func/pkg/version.Vers=$(VERS) -X knative.dev/func/pkg/version.Kver=$(KVER) -X knative.dev/func/pkg/version.Hash=$(HASH)
build: all
all: $(TEMPLATE_PACKAGE) $(BIN)
FUNC_UTILS_IMG ?= ghcr.io/knative/func-utils:v2
LDFLAGS += -X knative.dev/func/pkg/k8s.SocatImage=$(FUNC_UTILS_IMG)
LDFLAGS += -X knative.dev/func/pkg/k8s.TarImage=$(FUNC_UTILS_IMG)
LDFLAGS += -X knative.dev/func/pkg/pipelines/tekton.FuncUtilImage=$(FUNC_UTILS_IMG)
$(TEMPLATE_PACKAGE): templates $(TEMPLATE_DIRS) $(TEMPLATE_FILES)
# ensure no cached dependencies are added to the binary
rm -rf templates/node/events/node_modules
rm -rf templates/node/http/node_modules
rm -rf templates/python/events/__pycache__
rm -rf templates/python/http/__pycache__
# to install pkger: go get github.com/markbates/pkger/cmd/pkger
$(PKGER)
GOFLAGS := "-ldflags=$(LDFLAGS)"
export GOFLAGS
cross-platform: $(TEMPLATE_PACKAGE) $(DARWIN) $(LINUX) $(WINDOWS)
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
darwin: $(DARWIN) ## Build for Darwin (macOS)
# Default Targets
.PHONY: all
all: build docs
@echo '🎉 Build process completed!'
linux: $(LINUX) ## Build for Linux
# Help Text
# Headings: lines with `##$` comment prefix
# Targets: printed if their line includes a `##` comment
.PHONY: help
help:
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
@echo ''
@echo 'Available targets are:'
@awk 'BEGIN {FS = ":.*##"; printf "\nUsage:\n make \033[36m<target>\033[0m\n"} /^[a-zA-Z0-9_-]+:.*?##/ { printf " \033[36m%-15s\033[0m %s\n", $$1, $$2 } /^##@/ { printf "\n\033[1m%s\033[0m\n", substr($$0, 5) } ' $(MAKEFILE_LIST)
windows: $(WINDOWS) ## Build for Windows
$(BIN): $(CODE) ## Build using environment defaults
env CGO_ENABLED=0 go build -ldflags "-X main.date=$(DATE) -X main.vers=$(VERS) -X main.hash=$(HASH)" ./cmd/$(BIN)
###############
##@ Development
###############
$(DARWIN):
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o $(DARWIN) -ldflags "-X main.date=$(DATE) -X main.vers=$(VERS) -X main.hash=$(HASH)" ./cmd/$(BIN)
.PHONY: build
build: $(BIN) ## (default) Build binary for current OS
$(LINUX):
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(LINUX) -ldflags "-X main.date=$(DATE) -X main.vers=$(VERS) -X main.hash=$(HASH)" ./cmd/$(BIN)
.PHONY: $(BIN)
$(BIN): generate/zz_filesystem_generated.go
env CGO_ENABLED=0 go build ./cmd/$(BIN)
$(WINDOWS):
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o $(WINDOWS) -ldflags "-X main.date=$(DATE) -X main.vers=$(VERS) -X main.hash=$(HASH)" ./cmd/$(BIN)
.PHONY: test
test: generate/zz_filesystem_generated.go ## Run core unit tests
go test -race -cover -coverprofile=coverage.txt ./...
test: test-binary test-node test-python test-quarkus test-go
.PHONY: check
check: $(BIN_GOLANGCI_LINT) ## Check code quality (lint)
$(BIN_GOLANGCI_LINT) run --timeout 300s
cd test && $(BIN_GOLANGCI_LINT) run --timeout 300s
test-binary:
go test -race -cover -coverprofile=coverage.out ./...
$(BIN_GOLANGCI_LINT):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v2.0.2
test-node:
cd templates/node/events && npm ci && npm test && rm -rf node_modules
.PHONY: generate/zz_filesystem_generated.go
generate/zz_filesystem_generated.go: clean_templates
go generate pkg/functions/templates_embedded.go
.PHONY: clean_templates
clean_templates:
# Removing temporary template files
@rm -rf templates/**/.DS_Store
@rm -rf templates/node/cloudevents/node_modules
@rm -rf templates/node/http/node_modules
@rm -rf templates/python/cloudevents/.venv
@rm -rf templates/python/cloudevents/.pytest_cache
@rm -rf templates/python/cloudevents/function/__pycache__
@rm -rf templates/python/cloudevents/tests/__pycache__
@rm -rf templates/python/http/.venv
@rm -rf templates/python/http/.pytest_cache
@rm -rf templates/python/http/function/__pycache__
@rm -rf templates/python/http/tests/__pycache__
@rm -rf templates/quarkus/cloudevents/target
@rm -rf templates/quarkus/http/target
@rm -rf templates/rust/cloudevents/target
@rm -rf templates/rust/http/target
@rm -rf templates/springboot/cloudevents/target
@rm -rf templates/springboot/http/target
@rm -rf templates/typescript/cloudevents/build
@rm -rf templates/typescript/cloudevents/node_modules
@rm -rf templates/typescript/http/build
@rm -rf templates/typescript/http/node_modules
.PHONY: clean
clean: clean_templates ## Remove generated artifacts such as binaries and schemas
rm -f $(BIN) $(BIN_WINDOWS) $(BIN_LINUX) $(BIN_DARWIN_AMD64) $(BIN_DARWIN_ARM64)
rm -f $(BIN_GOLANGCI_LINT)
rm -f schema/func_yaml-schema.json
rm -f coverage.txt
.PHONY: docs
docs:
# Generating command reference doc
KUBECONFIG="$(shell mktemp)" go run docs/generator/main.go
#############
##@ Prow Integration
#############
.PHONY: presubmit-unit-tests
presubmit-unit-tests: ## Run prow presubmit unit tests locally
docker run --platform linux/amd64 -it --rm -v$(MAKEFILE_DIR):/src/ us-docker.pkg.dev/knative-tests/images/prow-tests:v20230616-086ddd644 sh -c 'cd /src && runner.sh ./test/presubmit-tests.sh --unit-tests'
#############
##@ Templates
#############
.PHONY: check-embedded-fs
check-embedded-fs: ## Check the embedded templates FS
go test -run "^\QTestFileSystems\E$$/^\Qembedded\E$$" ./pkg/filesystem
# TODO: add linters for other templates
.PHONY: check-templates
check-templates: check-go check-rust ## Run template source code checks
.PHONY: check-go
check-go: ## Check Go templates' source
cd templates/go/scaffolding/instanced-http && go vet ./... && $(BIN_GOLANGCI_LINT) run
cd templates/go/scaffolding/instanced-cloudevents && go vet && $(BIN_GOLANGCI_LINT) run
cd templates/go/scaffolding/static-http && go vet ./... && $(BIN_GOLANGCI_LINT) run
cd templates/go/scaffolding/static-cloudevents && go vet ./... && $(BIN_GOLANGCI_LINT) run
.PHONY: check-rust
check-rust: ## Check Rust templates' source
cd templates/rust/cloudevents && cargo clippy && cargo clean
cd templates/rust/http && cargo clippy && cargo clean
.PHONY: test-templates
test-templates: test-go test-node test-python test-quarkus test-springboot test-rust test-typescript ## Run all template tests
.PHONY: test-go
test-go: ## Test Go templates
cd templates/go/cloudevents && go mod tidy && go test
cd templates/go/http && go mod tidy && go test
.PHONY: test-node
test-node: ## Test Node templates
cd templates/node/cloudevents && npm ci && npm test && rm -rf node_modules
cd templates/node/http && npm ci && npm test && rm -rf node_modules
test-python:
cd templates/python/events && pip3 install -r requirements.txt && python3 test_func.py
cd templates/python/http && python3 test_func.py
.PHONY: test-python
test-python: ## Test Python templates and Scaffolding
test/test_python.sh
test-quarkus:
cd templates/quarkus/events && mvn test
cd templates/quarkus/http && mvn test
.PHONY: test-quarkus
test-quarkus: ## Test Quarkus templates
cd templates/quarkus/cloudevents && ./mvnw -q test && ./mvnw clean && rm .mvn/wrapper/maven-wrapper.jar
cd templates/quarkus/http && ./mvnw -q test && ./mvnw clean && rm .mvn/wrapper/maven-wrapper.jar
test-go:
cd templates/go/events && go test
cd templates/go/http && go test
.PHONY: test-springboot
test-springboot: ## Test Spring Boot templates
cd templates/springboot/cloudevents && ./mvnw -q test && ./mvnw clean && rm .mvn/wrapper/maven-wrapper.jar
cd templates/springboot/http && ./mvnw -q test && ./mvnw clean && rm .mvn/wrapper/maven-wrapper.jar
test-integration:
go test -tags integration ./...
.PHONY: test-rust
test-rust: ## Test Rust templates
cd templates/rust/cloudevents && cargo -q test && cargo clean
cd templates/rust/http && cargo -q test && cargo clean
image: Dockerfile
docker build -t $(REPO):latest \
-t $(REPO):$(VERS) \
-t $(REPO):$(HASH) \
-t $(REPO):$(DATE)-$(VERS)-$(HASH) .
.PHONY: test-typescript
test-typescript: ## Test Typescript templates
cd templates/typescript/cloudevents && npm ci && npm test && rm -rf node_modules build
cd templates/typescript/http && npm ci && npm test && rm -rf node_modules build
push: image
docker push $(REPO):$(VERS)
docker push $(REPO):$(HASH)
docker push $(REPO):$(DATE)-$(VERS)-$(HASH)
###############
##@ Scaffolding
###############
latest:
# push the local 'latest' tag as the new public latest version
# (run by CI only for releases)
docker push $(REPO):latest
# Pulls runtimes then rebuilds the embedded filesystem
.PHONY: update-runtimes
update-runtimes: update-runtime-go generate/zz_filesystem_generated.go ## Update Scaffolding Runtimes
bin/golangci-lint:
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.28.0
.PHONY: update-runtime-go
update-runtime-go:
cd templates/go/scaffolding/instanced-http && go get -u knative.dev/func-go/http
cd templates/go/scaffolding/static-http && go get -u knative.dev/func-go/http
cd templates/go/scaffolding/instanced-cloudevents && go get -u knative.dev/func-go/cloudevents
cd templates/go/scaffolding/static-cloudevents && go get -u knative.dev/func-go/cloudevents
check: bin/golangci-lint
./bin/golangci-lint run --timeout 300s
release: build test
go get -u github.com/git-chglog/git-chglog/cmd/git-chglog
git-chglog --next-tag $(VTAG) -o CHANGELOG.md
git commit -am "release: $(VTAG)"
git tag $(VTAG)
.PHONY: certs
certs: templates/certs/ca-certificates.crt ## Update root certificates
cluster: ## Set up a local cluster for integraiton tests.
# Creating KinD cluster `kind`.
# Delete with ./hack/delete.sh
./hack/allocate.sh && ./hack/configure.sh
.PHONY: templates/certs/ca-certificates.crt
templates/certs/ca-certificates.crt:
# Updating root certificates
curl --output templates/certs/ca-certificates.crt https://curl.se/ca/cacert.pem
clean:
rm -f $(BIN) $(WINDOWS) $(LINUX) $(DARWIN)
-rm -f coverage.out
###################
##@ Extended Testing (cluster required)
###################
.PHONY: test-integration
test-integration: ## Run integration tests using an available cluster.
go test -tags integration -timeout 30m --coverprofile=coverage.txt ./... -v
.PHONY: func-instrumented
func-instrumented: # func binary instrumented with coverage reporting
env CGO_ENABLED=1 go build -cover -o func ./cmd/$(BIN)
.PHONY: test-e2e
test-e2e: func-instrumented ## Run end-to-end tests using an available cluster.
./test/e2e_extended_tests.sh
.PHONY: test-e2e-runtime
test-e2e-runtime: func-instrumented ## Run end-to-end lifecycle tests using an available cluster for a single runtime.
./test/e2e_lifecycle_tests.sh $(runtime)
.PHONY: test-e2e-on-cluster
test-e2e-on-cluster: func-instrumented ## Run end-to-end on-cluster build tests using an available cluster.
./test/e2e_oncluster_tests.sh
######################
##@ Release Artifacts
######################
.PHONY: cross-platform
cross-platform: darwin-arm64 darwin-amd64 linux-amd64 linux-arm64 linux-ppc64le linux-s390x windows ## Build all distributable (cross-platform) binaries
.PHONY: darwin-arm64
darwin-arm64: $(BIN_DARWIN_ARM64) ## Build for mac M1
$(BIN_DARWIN_ARM64): generate/zz_filesystem_generated.go
env CGO_ENABLED=0 GOOS=darwin GOARCH=arm64 go build -o $(BIN_DARWIN_ARM64) -trimpath -ldflags "$(LDFLAGS) -w -s" ./cmd/$(BIN)
.PHONY: darwn-amd64
darwin-amd64: $(BIN_DARWIN_AMD64) ## Build for Darwin (macOS)
$(BIN_DARWIN_AMD64): generate/zz_filesystem_generated.go
env CGO_ENABLED=0 GOOS=darwin GOARCH=amd64 go build -o $(BIN_DARWIN_AMD64) -trimpath -ldflags "$(LDFLAGS) -w -s" ./cmd/$(BIN)
.PHONY: linux-amd64
linux-amd64: $(BIN_LINUX_AMD64) ## Build for Linux amd64
$(BIN_LINUX_AMD64): generate/zz_filesystem_generated.go
env CGO_ENABLED=0 GOOS=linux GOARCH=amd64 go build -o $(BIN_LINUX_AMD64) -trimpath -ldflags "$(LDFLAGS) -w -s" ./cmd/$(BIN)
.PHONY: linux-arm64
linux-arm64: $(BIN_LINUX_ARM64) ## Build for Linux arm64
$(BIN_LINUX_ARM64): generate/zz_filesystem_generated.go
env CGO_ENABLED=0 GOOS=linux GOARCH=arm64 go build -o $(BIN_LINUX_ARM64) -trimpath -ldflags "$(LDFLAGS) -w -s" ./cmd/$(BIN)
.PHONY: linux-ppc64le
linux-ppc64le: $(BIN_LINUX_PPC64LE) ## Build for Linux ppc64le
$(BIN_LINUX_PPC64LE): generate/zz_filesystem_generated.go
env CGO_ENABLED=0 GOOS=linux GOARCH=ppc64le go build -o $(BIN_LINUX_PPC64LE) -trimpath -ldflags "$(LDFLAGS) -w -s" ./cmd/$(BIN)
.PHONY: linux-s390x
linux-s390x: $(BIN_LINUX_S390X) ## Build for Linux s390x
$(BIN_LINUX_S390X): generate/zz_filesystem_generated.go
env CGO_ENABLED=0 GOOS=linux GOARCH=s390x go build -o $(BIN_LINUX_S390X) -trimpath -ldflags "$(LDFLAGS) -w -s" ./cmd/$(BIN)
.PHONY: windows
windows: $(BIN_WINDOWS) ## Build for Windows
$(BIN_WINDOWS): generate/zz_filesystem_generated.go
env CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go build -o $(BIN_WINDOWS) -trimpath -ldflags "$(LDFLAGS) -w -s" ./cmd/$(BIN)
######################
##@ Schemas
######################
.PHONY: schema-generate
schema-generate: schema/func_yaml-schema.json ## Generate func.yaml schema
schema/func_yaml-schema.json: pkg/functions/function.go pkg/functions/function_*.go
go run schema/generator/main.go
.PHONY: schema-check
schema-check: ## Check that func.yaml schema is up-to-date
mv schema/func_yaml-schema.json schema/func_yaml-schema-previous.json
make schema-generate
diff schema/func_yaml-schema.json schema/func_yaml-schema-previous.json ||\
(echo "\n\nFunction config schema 'schema/func_yaml-schema.json' is obsolete, please run 'make schema-generate'.\n\n"; rm -rf schema/func_yaml-schema-previous.json; exit 1)
rm -rf schema/func_yaml-schema-previous.json
######################
##@ Hack scripting
######################
.PHONY: hack-generate-components
hack-generate-components: ## Regenerate components in hack/ dir
cd hack && go run ./cmd/components
.PHONY: test-hack
test-hack:
cd hack && go test ./... -v
## This is used by workflows
.PHONY: update-builder
__update-builder: # Used in automation
cd hack && go run ./cmd/update-builder

13
OWNERS Normal file
View File

@ -0,0 +1,13 @@
# The OWNERS file is used by prow to automatically merge approved PRs.
approvers:
- technical-oversight-committee
- knative-release-leads
- client-writers
- func-writers
- functions-wg-leads
reviewers:
- client-writers
- func-reviewers

126
OWNERS_ALIASES Normal file
View File

@ -0,0 +1,126 @@
# This file is auto-generated from peribolos.
# Do not modify this file, instead modify peribolos/knative.yaml
aliases:
client-reviewers: []
client-wg-leads:
- dsimansk
client-writers:
- dsimansk
docs-reviewers:
- nainaz
- skonto
docs-writers:
- skonto
eventing-reviewers:
- Leo6Leo
- aslom
- cali0707
- creydr
eventing-wg-leads:
- creydr
- pierDipi
eventing-writers:
- Leo6Leo
- aliok
- cali0707
- creydr
- matzew
- pierDipi
func-reviewers:
- jrangelramos
- nainaz
func-writers:
- gauron99
- jrangelramos
- lkingland
- matejvasek
- matzew
- salaboy
functions-wg-leads:
- lkingland
- salaboy
knative-admin:
- aliok
- arsenetar
- cardil
- dprotaso
- dsimansk
- evankanderson
- gauron99
- knative-automation
- knative-prow-releaser-robot
- knative-prow-robot
- knative-prow-updater-robot
- knative-test-reporter-robot
- matzew
- skonto
- upodroid
knative-release-leads:
- dprotaso
- dsimansk
- gauron99
- skonto
knative-robots:
- knative-automation
- knative-prow-releaser-robot
- knative-prow-robot
- knative-prow-updater-robot
- knative-test-reporter-robot
operations-reviewers:
- aliok
- houshengbo
- matzew
operations-wg-leads:
- houshengbo
operations-writers:
- aliok
- houshengbo
- matzew
productivity-leads:
- cardil
- upodroid
productivity-reviewers:
- evankanderson
- mgencur
productivity-wg-leads:
- cardil
- upodroid
productivity-writers:
- cardil
- upodroid
security-wg-leads:
- davidhadas
- evankanderson
security-writers:
- davidhadas
- evankanderson
serving-approvers:
- dsimansk
- skonto
serving-reviewers:
- skonto
serving-triage:
- skonto
serving-wg-leads:
- dprotaso
serving-writers:
- dprotaso
- dsimansk
- skonto
steering-committee:
- aliok
- arsenetar
- dprotaso
- evankanderson
- matzew
ux-wg-leads:
- Leo6Leo
- cali0707
- mmejia02
- zainabhusain227
ux-writers:
- Leo6Leo
- cali0707
- mmejia02
- zainabhusain227

View File

@ -1,19 +1,31 @@
# Boson Function CLI
# Func
[![Main Build Status](https://github.com/boson-project/func/workflows/Main/badge.svg?branch=main)](https://github.com/boson-project/func/actions?query=workflow%3AMain+branch%3Amain)
[![Develop Build Status](https://github.com/boson-project/func/workflows/Develop/badge.svg?branch=develop&label=develop)](https://github.com/boson-project/func/actions?query=workflow%3ADevelop+branch%3Adevelop)
[![Client API Documentation](https://godoc.org/github.com/boson-project/func?status.svg)](http://godoc.org/github.com/boson-project/func)
[![GitHub Issues](https://img.shields.io/github/issues/boson-project/func.svg)](https://github.com/boson-project/func/issues)
[![License](https://img.shields.io/github/license/boson-project/func)](https://github.com/boson-project/func/blob/main/LICENSE)
[![Release](https://img.shields.io/github/release/boson-project/func.svg?label=Release)](https://github.com/boson-project/func/releases)
[![CI Status](https://github.com/knative/func/actions/workflows/ci.yaml/badge.svg)](https://github.com/knative/func/actions/workflows/ci.yaml)
[![Client API Documentation](https://pkg.go.dev/badge/knative.dev/func?utm_source=godoc)](https://pkg.go.dev/knative.dev/func)
[![Issues](https://img.shields.io/github/issues/knative/func.svg)](https://github.com/knative/func/issues)
[![License](https://img.shields.io/github/license/knative/func)](https://github.com/knative/func/blob/main/LICENSE)
[![Releases](https://img.shields.io/github/v/release/knative/func.svg?label=Release)](https://github.com/knative/func/releases)
[![codecov](https://codecov.io/gh/knative/func/branch/main/graph/badge.svg)](https://codecov.io/gh/knative/func)
[Demo Screencast]
`func` is a Client Library and CLI enabling the development and deployment of Functions.
`func` is a Client Library and CLI for enabling the development of implicitly deployed, platform agnostic code.
[Try the QuickStart](https://knative.dev/docs/getting-started/about-knative-functions/)
[Read the Documentation](https://knative.dev/docs/functions/)
[Read the Documentation](docs/README.md)
## Roadmap
We use GitHub issues and project to track our roadmap. Please see our roadmap [here](https://github.com/orgs/knative/projects/49).
## Knative Function demos and examples
- [Knative Functions in action: Amsterdam City Data App](https://github.com/zroubalik/knative-functions-ams-data-demo/)
## Contributing
We are always looking for contributions from the Function Developer community. For more information on how to participate, see the [Contributor's Guide](docs/contributors_guide.md)
We are always looking for contributions from the Function Developer community. For more information on how to participate, see the [Contribuiting Guide](docs/CONTRIBUTING.md).
For a list of all help wanted issues in Knative, take a look at [CLOTRIBUTOR](https://clotributor.dev/search?project=knative&page=1).
The `func` Working Group meets @ 10:00 US Eastern every Tuesday, we'd love to have you! For more information, see the invitation on the [Knative Team Calendar](https://calendar.google.com/calendar/u/0/embed?src=knative.team_9q83bg07qs5b9rrslp5jor4l6s@group.calendar.google.com).
## Roadmap
Our project roadmap can be found: https://github.com/orgs/knative/projects/49

7
SECURITY.md Normal file
View File

@ -0,0 +1,7 @@
# Knative Security Policy
We're extremely grateful for security researchers and users that report vulnerabilities to the Knative Open Source Community. All reports are thoroughly investigated by a set of community volunteers.
To make a report, please email the private security@knative.team list with the security details and the details expected for all Knative bug reports.
See [Knative Security and Disclosure Information](https://knative.dev/docs/reference/security/) for more details.

View File

@ -1,98 +0,0 @@
package buildpacks
import (
"bytes"
"context"
"errors"
"fmt"
"io"
"os"
"runtime"
"github.com/buildpacks/pack"
"github.com/buildpacks/pack/logging"
bosonFunc "github.com/boson-project/func"
)
//Builder holds the configuration that will be passed to
//Buildpack builder
type Builder struct {
Verbose bool
}
//NewBuilder builds the new Builder configuration
func NewBuilder() *Builder {
return &Builder{}
}
//RuntimeToBuildpack holds the mapping between the Runtime and its corresponding
//Buildpack builder to use
var RuntimeToBuildpack = map[string]string{
"quarkus": "quay.io/boson/faas-quarkus-builder",
"node": "quay.io/boson/faas-nodejs-builder",
"go": "quay.io/boson/faas-go-builder",
"springboot": "quay.io/boson/faas-springboot-builder",
"python": "quay.io/boson/faas-python-builder",
}
// Build the Function at path.
func (builder *Builder) Build(ctx context.Context, f bosonFunc.Function) (err error) {
// Use the builder found in the Function configuration file
// If one isn't found, use the defaults
var packBuilder string
if f.Builder != "" {
packBuilder = f.Builder
pb, ok := f.BuilderMap[packBuilder]
if ok {
packBuilder = pb
}
} else {
packBuilder = RuntimeToBuildpack[f.Runtime]
if packBuilder == "" {
return errors.New(fmt.Sprint("unsupported runtime: ", f.Runtime))
}
}
// Build options for the pack client.
var network string
if runtime.GOOS == "linux" {
network = "host"
}
packOpts := pack.BuildOptions{
AppPath: f.Root,
Image: f.Image,
Builder: packBuilder,
DockerHost: os.Getenv("DOCKER_HOST"),
ContainerConfig: struct {
Network string
Volumes []string
}{Network: network, Volumes: nil},
}
// log output is either STDOUt or kept in a buffer to be printed on error.
var logWriter io.Writer
if builder.Verbose {
logWriter = os.Stdout
} else {
logWriter = &bytes.Buffer{}
}
// Client with a logger which is enabled if in Verbose mode.
packClient, err := pack.NewClient(pack.WithLogger(logging.New(logWriter)))
if err != nil {
return
}
// Build based using the given builder.
if err = packClient.Build(ctx, packOpts); err != nil {
// If the builder was not showing logs, embed the full logs in the error.
if !builder.Verbose {
err = fmt.Errorf("%v\noutput: %s\n", err, logWriter.(*bytes.Buffer).String())
}
}
return
}

555
client.go
View File

@ -1,555 +0,0 @@
package function
import (
"context"
"errors"
"fmt"
"io"
"io/ioutil"
"os"
"path/filepath"
"gopkg.in/yaml.v2"
)
const (
DefaultRegistry = "docker.io"
DefaultRuntime = "node"
DefaultTrigger = "http"
)
// Client for managing Function instances.
type Client struct {
verbose bool // print verbose logs
builder Builder // Builds a runnable image from Function source
pusher Pusher // Pushes the image assocaited with a Function.
deployer Deployer // Deploys or Updates a Function
runner Runner // Runs the Function locally
remover Remover // Removes remote services
lister Lister // Lists remote services
describer Describer
dnsProvider DNSProvider // Provider of DNS services
templates string // path to extensible templates
registry string // default registry for OCI image tags
progressListener ProgressListener // progress listener
}
// ErrNotBuilt indicates the Function has not yet been built.
var ErrNotBuilt = errors.New("not built")
// Builder of Function source to runnable image.
type Builder interface {
// Build a Function project with source located at path.
Build(context.Context, Function) error
}
// Pusher of Function image to a registry.
type Pusher interface {
// Push the image of the Function.
// Returns Image Digest - SHA256 hash of the produced image
Push(ctx context.Context, f Function) (string, error)
}
// Deployer of Function source to running status.
type Deployer interface {
// Deploy a Function of given name, using given backing image.
Deploy(context.Context, Function) error
}
// Runner runs the Function locally.
type Runner interface {
// Run the Function locally.
Run(context.Context, Function) error
}
// Remover of deployed services.
type Remover interface {
// Remove the Function from remote.
Remove(ctx context.Context, name string) error
}
// Lister of deployed services.
type Lister interface {
// List the Functions currently deployed.
List(ctx context.Context) ([]ListItem, error)
}
type ListItem struct {
Name string `json:"name" yaml:"name"`
Namespace string `json:"namespace" yaml:"namespace"`
Runtime string `json:"runtime" yaml:"runtime"`
URL string `json:"url" yaml:"url"`
KService string `json:"kservice" yaml:"kservice"`
Ready string `json:"ready" yaml:"ready"`
}
// ProgressListener is notified of task progress.
type ProgressListener interface {
// SetTotal steps of the given task.
SetTotal(int)
// Increment to the next step with the given message.
Increment(message string)
// Complete signals completion, which is expected to be somewhat different than a step increment.
Complete(message string)
// Done signals a cessation of progress updates. Should be called in a defer statement to ensure
// the progress listener can stop any outstanding tasks such as synchronous user updates.
Done()
}
// Describer of Functions' remote deployed aspect.
type Describer interface {
// Describe the running state of the service as reported by the underlyng platform.
Describe(name string) (description Description, err error)
}
type Description struct {
Name string `json:"name" yaml:"name"`
Image string `json:"image" yaml:"image"`
KService string `json:"kservice" yaml:"kservice"`
Namespace string `json:"namespace" yaml:"namespace"`
Routes []string `json:"routes" yaml:"routes"`
Subscriptions []Subscription `json:"subscriptions" yaml:"subscriptions"`
}
type Subscription struct {
Source string `json:"source" yaml:"source"`
Type string `json:"type" yaml:"type"`
Broker string `json:"broker" yaml:"broker"`
}
// DNSProvider exposes DNS services necessary for serving the Function.
type DNSProvider interface {
// Provide the given name by routing requests to address.
Provide(Function) error
}
// New client for Function management.
func New(options ...Option) *Client {
// Instantiate client with static defaults.
c := &Client{
builder: &noopBuilder{output: os.Stdout},
pusher: &noopPusher{output: os.Stdout},
deployer: &noopDeployer{output: os.Stdout},
runner: &noopRunner{output: os.Stdout},
remover: &noopRemover{output: os.Stdout},
lister: &noopLister{output: os.Stdout},
dnsProvider: &noopDNSProvider{output: os.Stdout},
progressListener: &noopProgressListener{},
}
// Apply passed options, which take ultimate precidence.
for _, o := range options {
o(c)
}
return c
}
// Option defines a Function which when passed to the Client constructor optionally
// mutates private members at time of instantiation.
type Option func(*Client)
// WithVerbose toggles verbose logging.
func WithVerbose(v bool) Option {
return func(c *Client) {
c.verbose = v
}
}
// WithBuilder provides the concrete implementation of a builder.
func WithBuilder(d Builder) Option {
return func(c *Client) {
c.builder = d
}
}
// WithPusher provides the concrete implementation of a pusher.
func WithPusher(d Pusher) Option {
return func(c *Client) {
c.pusher = d
}
}
// WithDeployer provides the concrete implementation of a deployer.
func WithDeployer(d Deployer) Option {
return func(c *Client) {
c.deployer = d
}
}
// WithRunner provides the concrete implementation of a deployer.
func WithRunner(r Runner) Option {
return func(c *Client) {
c.runner = r
}
}
// WithRemover provides the concrete implementation of a remover.
func WithRemover(r Remover) Option {
return func(c *Client) {
c.remover = r
}
}
// WithLister provides the concrete implementation of a lister.
func WithLister(l Lister) Option {
return func(c *Client) {
c.lister = l
}
}
// WithDescriber provides a concrete implementation of a Function describer.
func WithDescriber(describer Describer) Option {
return func(c *Client) {
c.describer = describer
}
}
// WithProgressListener provides a concrete implementation of a listener to
// be notified of progress updates.
func WithProgressListener(p ProgressListener) Option {
return func(c *Client) {
c.progressListener = p
}
}
// WithDNSProvider proivdes a DNS provider implementation for registering the
// effective DNS name which is either explicitly set via WithName or is derived
// from the root path.
func WithDNSProvider(provider DNSProvider) Option {
return func(c *Client) {
c.dnsProvider = provider
}
}
// WithTemplates sets the location to use for extensible templates.
// Extensible templates are additional templates that exist on disk and are
// not built into the binary.
func WithTemplates(templates string) Option {
return func(c *Client) {
c.templates = templates
}
}
// WithRegistry sets the default registry which is consulted when an image name/tag
// is not explocitly provided. Can be fully qualified, including the registry
// (ex: 'quay.io/myname') or simply the namespace 'myname' which indicates the
// the use of the default registry.
func WithRegistry(registry string) Option {
return func(c *Client) {
c.registry = registry
}
}
// New Function.
// Use Create, Build and Deploy independently for lower level control.
func (c *Client) New(ctx context.Context, cfg Function) (err error) {
c.progressListener.SetTotal(3)
defer c.progressListener.Done()
// Create local template
err = c.Create(cfg)
if err != nil {
return
}
// Load the now-initialized Function.
f, err := NewFunction(cfg.Root)
if err != nil {
return
}
// Build the now-initialized Function
c.progressListener.Increment("Building container image")
if err = c.Build(ctx, f.Root); err != nil {
return
}
// Deploy the initialized Function, returning its publicly
// addressible name for possible registration.
c.progressListener.Increment("Deploying Function to cluster")
if err = c.Deploy(ctx, f.Root); err != nil {
return
}
// Create an external route to the Function
c.progressListener.Increment("Creating route to Function")
if err = c.Route(f.Root); err != nil {
return
}
c.progressListener.Complete("Done")
// TODO: use the knative client during deployment such that the actual final
// route can be returned from the deployment step, passed to the DNS Router
// for routing actual traffic, and returned here.
if c.verbose {
fmt.Printf("https://%v/\n", f.Name)
}
return
}
// Create a new Function project locally using the settings provided on a
// Function object.
func (c *Client) Create(cfg Function) (err error) {
// Create project root directory, if it doesn't already exist
if err = os.MkdirAll(cfg.Root, 0755); err != nil {
return
}
// Create Function of the given root path.
f, err := NewFunction(cfg.Root)
if err != nil {
return
}
// Assert the specified root is free of visible files and contentious
// hidden files (the ConfigFile, which indicates it is already initialized)
if err = assertEmptyRoot(f.Root); err != nil {
return
}
// Map requested fields to the newly created function.
f.Image = cfg.Image
f.Name = cfg.Name
// Assert runtime was provided, or default.
f.Runtime = cfg.Runtime
if f.Runtime == "" {
f.Runtime = DefaultRuntime
}
// Assert trigger was provided, or default.
f.Trigger = cfg.Trigger
if f.Trigger == "" {
f.Trigger = DefaultTrigger
}
// Write out a template.
w := templateWriter{templates: c.templates, verbose: c.verbose}
if err = w.Write(f.Runtime, f.Trigger, f.Root); err != nil {
return
}
// Check if template specifies a builder image. If so, add to configuration
builderFilePath := filepath.Join(f.Root, ".builders.yaml")
if builderConfig, err := ioutil.ReadFile(builderFilePath); err == nil {
// A .builder file was found. Read the default builder and set in the config file
// TODO: A command line flag could be used to specify non-default builders
builders := make(map[string]string)
if err := yaml.Unmarshal(builderConfig, builders); err == nil {
f.Builder = builders["default"]
if c.verbose {
fmt.Printf("Builder: %s\n", f.Builder)
}
f.BuilderMap = builders
}
// Remove the builders.yaml file so the user is not confused by a
// configuration file that is only used for project creation/initialization
if err := os.Remove(builderFilePath); err != nil {
if c.verbose {
fmt.Printf("Cannot remove %v. %v\n", builderFilePath, err)
}
}
}
// Write out the config.
if err = writeConfig(f); err != nil {
return
}
// TODO: Create a status structure and return it for clients to use
// for output, such as from the CLI.
if c.verbose {
fmt.Println("Function project created")
}
return
}
// Build the Function at path. Errors if the Function is either unloadable or does
// not contain a populated Image.
func (c *Client) Build(ctx context.Context, path string) (err error) {
fmt.Println("Building function image")
f, err := NewFunction(path)
if err != nil {
return
}
// Derive Image from the path (precedence is given to extant config)
if f.Image, err = DerivedImage(path, c.registry); err != nil {
return
}
if err = c.builder.Build(ctx, f); err != nil {
return
}
// Write out config, which will now contain a populated image tag
// if it had not already
if err = writeConfig(f); err != nil {
return
}
// TODO: create a statu structure and return it here for optional
// use by the cli for user echo (rather than rely on verbose mode here)
fmt.Printf("Function image has been built, image: %v\n", f.Image)
return
}
// Deploy the Function at path. Errors if the Function has not been
// initialized with an image tag.
func (c *Client) Deploy(ctx context.Context, path string) (err error) {
f, err := NewFunction(path)
if err != nil {
return
}
// Functions must be built (have an associated image) before being deployed.
// Note that externally built images may be specified in the func.yaml
if !f.Built() {
return ErrNotBuilt
}
// Push the image for the named service to the configured registry
fmt.Println("Pushing function image to the registry")
imageDigest, err := c.pusher.Push(ctx, f)
if err != nil {
return
}
// Store the produced image Digest in the config
f.ImageDigest = imageDigest
if err = writeConfig(f); err != nil {
return
}
// Deploy a new or Update the previously-deployed Function
fmt.Println("Deploying function to the cluster")
return c.deployer.Deploy(ctx, f)
}
func (c *Client) Route(path string) (err error) {
// Ensure that the allocated final address is enabled with the
// configured DNS provider.
// NOTE:
// DNS and TLS are provisioned by Knative Serving + cert-manager,
// but DNS subdomain CNAME to the Kourier Load Balancer is
// still manual, and the initial cluster config to suppot the TLD
// is still manual.
f, err := NewFunction(path)
if err != nil {
return
}
return c.dnsProvider.Provide(f)
}
// Run the Function whose code resides at root.
func (c *Client) Run(ctx context.Context, root string) error {
// Create an instance of a Function representation at the given root.
f, err := NewFunction(root)
if err != nil {
return err
}
if !f.Initialized() {
// TODO: this needs a test.
return fmt.Errorf("the given path '%v' does not contain an initialized Function. Please create one at this path in order to run.", root)
}
// delegate to concrete implementation of runner entirely.
return c.runner.Run(ctx, f)
}
// List currently deployed Functions.
func (c *Client) List(ctx context.Context) ([]ListItem, error) {
// delegate to concrete implementation of lister entirely.
return c.lister.List(ctx)
}
// Describe a Function. Name takes precidence. If no name is provided,
// the Function defined at root is used.
func (c *Client) Describe(name, root string) (d Description, err error) {
// If name is provided, it takes precidence.
// Otherwise load the Function defined at root.
if name != "" {
return c.describer.Describe(name)
}
f, err := NewFunction(root)
if err != nil {
return d, err
}
if !f.Initialized() {
return d, fmt.Errorf("%v is not initialized", f.Name)
}
return c.describer.Describe(f.Name)
}
// Remove a Function. Name takes precidence. If no name is provided,
// the Function defined at root is used if it exists.
func (c *Client) Remove(ctx context.Context, cfg Function) error {
// If name is provided, it takes precidence.
// Otherwise load the Function deined at root.
if cfg.Name != "" {
return c.remover.Remove(ctx, cfg.Name)
}
f, err := NewFunction(cfg.Root)
if err != nil {
return err
}
if !f.Initialized() {
return fmt.Errorf("Function at %v can not be removed unless initialized. Try removing by name.", f.Root)
}
return c.remover.Remove(ctx, f.Name)
}
// Manual implementations (noops) of required interfaces.
// In practice, the user of this client package (for example the CLI) will
// provide a concrete implementation for all of the interfaces. For testing or
// development, however, it is usefule that they are defaulted to noops and
// provded only when necessary. Unit tests for the concrete implementations
// serve to keep the core logic here separate from the imperitive.
// -----------------------------------------------------
type noopBuilder struct{ output io.Writer }
func (n *noopBuilder) Build(ctx context.Context, _ Function) error { return nil }
type noopPusher struct{ output io.Writer }
func (n *noopPusher) Push(ctx context.Context, f Function) (string, error) { return "", nil }
type noopDeployer struct{ output io.Writer }
func (n *noopDeployer) Deploy(ctx context.Context, _ Function) error { return nil }
type noopRunner struct{ output io.Writer }
func (n *noopRunner) Run(_ context.Context, _ Function) error { return nil }
type noopRemover struct{ output io.Writer }
func (n *noopRemover) Remove(context.Context, string) error { return nil }
type noopLister struct{ output io.Writer }
func (n *noopLister) List(context.Context) ([]ListItem, error) { return []ListItem{}, nil }
type noopDNSProvider struct{ output io.Writer }
func (n *noopDNSProvider) Provide(_ Function) error { return nil }
type noopProgressListener struct{}
func (p *noopProgressListener) SetTotal(i int) {}
func (p *noopProgressListener) Increment(m string) {}
func (p *noopProgressListener) Complete(m string) {}
func (p *noopProgressListener) Done() {}

View File

@ -1,293 +0,0 @@
// +build integration
package function_test
import (
"context"
"os"
"reflect"
"testing"
"time"
boson "github.com/boson-project/func"
"github.com/boson-project/func/buildpacks"
"github.com/boson-project/func/docker"
"github.com/boson-project/func/knative"
)
/*
NOTE: Running integration tests locally requires a configured test cluster.
Test failures may require manual removal of dangling resources.
## Integration Cluster
These integration tests require a properly configured cluster,
such as that which is setup and configured in CI (see .github/workflows).
A local KinD cluster can be started via:
./hack/allocate.sh && ./hack/configure.sh
## Integration Testing
These tests can be run via the make target:
make test-integration
or manually by specifying the tag
go test -v -tags integration ./...
## Teardown and Cleanup
Tests should clean up after themselves. In the event of failures, one may
need to manually remove files:
rm -rf ./testdata/example.com
The test cluster is not automatically removed, as it can be reused. To remove:
./hack/delete.sh
*/
const (
// DefaultRegistry must contain both the registry host and
// registry namespace at this time. This will likely be
// split and defaulted to the forthcoming in-cluster registry.
DefaultRegistry = "localhost:5000/func"
// DefaultNamespace for the underlying deployments. Must be the same
// as is set up and configured (see hack/configure.sh)
DefaultNamespace = "func"
)
func TestList(t *testing.T) {
verbose := true
// Assemble
lister, err := knative.NewLister(DefaultNamespace)
if err != nil {
t.Fatal(err)
}
client := boson.New(
boson.WithLister(lister),
boson.WithVerbose(verbose))
// Act
names, err := client.List(context.Background())
if err != nil {
t.Fatal(err)
}
// Assert
if len(names) != 0 {
t.Fatalf("Expected no Functions, got %v", names)
}
}
// TestNew creates
func TestNew(t *testing.T) {
defer within(t, "testdata/example.com/testnew")()
verbose := true
client := newClient(verbose)
// Act
if err := client.New(context.Background(), boson.Function{Name: "testnew", Root: ".", Runtime: "go"}); err != nil {
t.Fatal(err)
}
defer del(t, client, "testnew")
// Assert
items, err := client.List(context.Background())
names := []string{}
for _, item := range items {
names = append(names, item.Name)
}
if err != nil {
t.Fatal(err)
}
if !reflect.DeepEqual(names, []string{"testnew"}) {
t.Fatalf("Expected function list ['testnew'], got %v", names)
}
}
// TestDeploy updates
func TestDeploy(t *testing.T) {
defer within(t, "testdata/example.com/deploy")()
verbose := true
client := newClient(verbose)
if err := client.New(context.Background(), boson.Function{Name: "deploy", Root: ".", Runtime: "go"}); err != nil {
t.Fatal(err)
}
defer del(t, client, "deploy")
if err := client.Deploy(context.Background(), "."); err != nil {
t.Fatal(err)
}
}
// TestRemove deletes
func TestRemove(t *testing.T) {
defer within(t, "testdata/example.com/remove")()
verbose := true
client := newClient(verbose)
if err := client.New(context.Background(), boson.Function{Name: "remove", Root: ".", Runtime: "go"}); err != nil {
t.Fatal(err)
}
waitFor(t, client, "remove")
if err := client.Remove(context.Background(), boson.Function{Name: "remove"}); err != nil {
t.Fatal(err)
}
names, err := client.List(context.Background())
if err != nil {
t.Fatal(err)
}
if len(names) != 0 {
t.Fatalf("Expected empty Functions list, got %v", names)
}
}
// ***********
// Helpers
// ***********
// newClient creates an instance of the func client whose concrete impls
// match those created by the kn func plugin CLI.
func newClient(verbose bool) *boson.Client {
builder := buildpacks.NewBuilder()
builder.Verbose = verbose
pusher, err := docker.NewPusher()
if err != nil {
panic(err)
}
pusher.Verbose = verbose
deployer, err := knative.NewDeployer(DefaultNamespace)
if err != nil {
panic(err) // TODO: remove error from deployer constructor
}
deployer.Verbose = verbose
remover, err := knative.NewRemover(DefaultNamespace)
if err != nil {
panic(err) // TODO: remove error from remover constructor
}
remover.Verbose = verbose
lister, err := knative.NewLister(DefaultNamespace)
if err != nil {
panic(err) // TODO: remove error from lister constructor
}
lister.Verbose = verbose
return boson.New(
boson.WithRegistry(DefaultRegistry),
boson.WithVerbose(verbose),
boson.WithBuilder(builder),
boson.WithPusher(pusher),
boson.WithDeployer(deployer),
boson.WithRemover(remover),
boson.WithLister(lister),
)
}
// Del cleans up after a test by removing a function by name.
// (test fails if the named function does not exist)
//
// Intended to be run in a defer statement immediately after creation, del
// works around the asynchronicity of the underlying platform's creation
// step by polling the provider until the names function becomes available
// (or the test times out), before firing off a deletion request.
// Of course, ideally this would be replaced by the use of a synchronous
// method, or at a minimum a way to register a callback/listener for the
// creation event. This is what we have for now, and the show must go on.
func del(t *testing.T, c *boson.Client, name string) {
t.Helper()
waitFor(t, c, name)
if err := c.Remove(context.Background(), boson.Function{Name: name}); err != nil {
t.Fatal(err)
}
}
// waitFor the named Function to become available in List output.
// TODO: the API should be synchronous, but that depends first on
// Create returning the derived name such that we can bake polling in.
// Ideally the Boson provider's Creaet would be made syncrhonous.
func waitFor(t *testing.T, c *boson.Client, name string) {
t.Helper()
var pollInterval = 2 * time.Second
for { // ever (i.e. defer to global test timeout)
nn, err := c.List(context.Background())
if err != nil {
t.Fatal(err)
}
for _, n := range nn {
if n.Name == name {
return
}
}
time.Sleep(pollInterval)
}
}
// Create the given directory, CD to it, and return a function which can be
// run in a defer statement to return to the original directory and cleanup.
// Note must be executed, not deferred itself
// NO: defer within(t, "somedir")
// YES: defer within(t, "somedir")()
func within(t *testing.T, root string) func() {
t.Helper()
cwd := pwd(t)
mkdir(t, root)
cd(t, root)
return func() {
cd(t, cwd)
rm(t, root)
}
}
func pwd(t *testing.T) string {
t.Helper()
dir, err := os.Getwd()
if err != nil {
t.Fatal(err)
}
return dir
}
func mkdir(t *testing.T, dir string) {
t.Helper()
if err := os.MkdirAll(dir, 0700); err != nil {
t.Fatal(err)
}
}
func cd(t *testing.T, dir string) {
t.Helper()
if err := os.Chdir(dir); err != nil {
t.Fatal(err)
}
}
func rm(t *testing.T, dir string) {
t.Helper()
if err := os.RemoveAll(dir); err != nil {
t.Fatal(err)
}
}
func touch(file string) {
_, err := os.Stat(file)
if os.IsNotExist(err) {
f, err := os.Create(file)
if err != nil {
panic(err)
}
defer f.Close()
}
t := time.Now().Local()
if err := os.Chtimes(file, t, t); err != nil {
panic(err)
}
}

View File

@ -1,710 +0,0 @@
// +build !integration
package function_test
import (
"context"
"errors"
"fmt"
"io/ioutil"
"os"
"path/filepath"
"testing"
bosonFunc "github.com/boson-project/func"
"github.com/boson-project/func/mock"
)
// TestRegistry for calculating destination image during tests.
// Will be optional once we support in-cluster container registries
// by default. See TestRegistryRequired for details.
const TestRegistry = "quay.io/alice"
// TestNew Function completes without error using defaults and zero values.
// New is the superset of creating a new fully deployed Function, and
// thus implicitly tests Create, Build and Deploy, which are exposed
// by the client API for those who prefer manual transmissions.
func TestNew(t *testing.T) {
root := "testdata/example.com/testCreate" // Root from which to run the test
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// New Client
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
// New Function using Client
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
}
// TestTemplateWrites ensures a template is written.
func TestTemplateWrites(t *testing.T) {
root := "testdata/example.com/testCreateWrites"
if err := os.MkdirAll(root, 0744); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
if err := client.Create(bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
// Assert file was written
if _, err := os.Stat(filepath.Join(root, bosonFunc.ConfigFile)); os.IsNotExist(err) {
t.Fatalf("Initialize did not result in '%v' being written to '%v'", bosonFunc.ConfigFile, root)
}
}
// TestExtantAborts ensures that a directory which contains an extant
// Function does not reinitialize
func TestExtantAborts(t *testing.T) {
root := "testdata/example.com/testCreateInitializedAborts"
if err := os.MkdirAll(root, 0744); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// New once
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
// New again should fail as already initialized
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err == nil {
t.Fatal("error expected initilizing a path already containing an initialized Function")
}
}
// TestNonemptyDirectoryAborts ensures that a directory which contains any
// visible files aborts.
func TestNonemptyDirectoryAborts(t *testing.T) {
root := "testdata/example.com/testCreateNonemptyDirectoryAborts" // contains only a single visible file.
if err := os.MkdirAll(root, 0744); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// An unexpected, non-hidden file.
_, err := os.Create(root + "/file.txt")
if err != nil {
t.Fatal(err)
}
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err == nil {
t.Fatal("error expected initilizing a Function in a nonempty directory")
}
}
// TestHiddenFilesIgnored ensures that initializing in a directory that
// only contains hidden files does not error, protecting against the naieve
// implementation of aborting initialization if any files exist, which would
// break functions tracked in source control (.git), or when used in
// conjunction with other tools (.envrc, etc)
func TestHiddenFilesIgnored(t *testing.T) {
// Create a directory for the Function
root := "testdata/example.com/testCreateHiddenFilesIgnored"
if err := os.MkdirAll(root, 0744); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// Create a hidden file that should be ignored.
hiddenFile := filepath.Join(root, ".envrc")
if err := ioutil.WriteFile(hiddenFile, []byte{}, 0644); err != nil {
t.Fatal(err)
}
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
}
// TestDefaultRuntime ensures that the default runtime is applied to new
// Functions and persisted.
func TestDefaultRuntime(t *testing.T) {
// Create a root for the new Function
root := "testdata/example.com/testCreateDefaultRuntime"
if err := os.MkdirAll(root, 0744); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// Create a new function at root with all defaults.
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
// Load the function
f, err := bosonFunc.NewFunction(root)
if err != nil {
t.Fatal(err)
}
// Ensure it has defaulted runtime
if f.Runtime != bosonFunc.DefaultRuntime {
t.Fatal("The default runtime was not applied or persisted.")
}
}
// TestDefaultTemplate ensures that the default template is
// applied when not provided.
func TestDefaultTrigger(t *testing.T) {
// TODO: need to either expose accessor for introspection, or compare
// the files written to those in the embedded repisotory?
}
// TestExtensibleTemplates templates. Ensures that templates are extensible
// using a custom path to a template repository on disk. Custom repository
// location is not defined herein but expected to be provided because, for
// example, a CLI may want to use XDG_CONFIG_HOME. Assuming a repository path
// $FUNC_TEMPLATES, a Go template named 'json' which is provided in the
// repository 'boson-experimental', would be expected to be in the location:
// $FUNC_TEMPLATES/boson-experimental/go/json
// See the CLI for full details, but a standard default location is
// $HOME/.config/templates/boson-experimental/go/json
func TestExtensibleTemplates(t *testing.T) {
// Create a directory for the new Function
root := "testdata/example.com/testExtensibleTemplates"
if err := os.MkdirAll(root, 0744); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// Create a new client with a path to the extensible templates
client := bosonFunc.New(
bosonFunc.WithTemplates("testdata/templates"),
bosonFunc.WithRegistry(TestRegistry))
// Create a Function specifying a template, 'json' that only exists in the extensible set
if err := client.New(context.Background(), bosonFunc.Function{Root: root, Trigger: "boson-experimental/json"}); err != nil {
t.Fatal(err)
}
// Ensure that a file from that only exists in that template set was actually written 'json.js'
if _, err := os.Stat(filepath.Join(root, "json.js")); os.IsNotExist(err) {
t.Fatalf("Initializing a custom did not result in json.js being written to '%v'", root)
} else if err != nil {
t.Fatal(err)
}
}
// TestUnsupportedRuntime generates an error.
func TestUnsupportedRuntime(t *testing.T) {
// Create a directory for the Function
root := "testdata/example.com/testUnsupportedRuntime"
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
// create a Function call witn an unsupported runtime should bubble
// the error generated by the underlying initializer.
if err := client.New(context.Background(), bosonFunc.Function{Root: root, Runtime: "invalid"}); err == nil {
t.Fatal("unsupported runtime did not generate error")
}
}
// TestNamed ensures that an explicitly passed name is used in leau of the
// path derived name when provided, and persists through instantiations.
func TestNamed(t *testing.T) {
// Explicit name to use
name := "service.example.com"
// Path which would derive to testWithHame.example.com were it not for the
// explicitly provided name.
root := "testdata/example.com/testWithName"
// Create a root directory for the Function
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
if err := client.New(context.Background(), bosonFunc.Function{Root: root, Name: name}); err != nil {
t.Fatal(err)
}
f, err := bosonFunc.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if f.Name != name {
t.Fatalf("expected name '%v' got '%v", name, f.Name)
}
}
// TestRegistryRequired ensures that a registry is required, and is
// prepended with the DefaultRegistry if a single token.
// Registry is the namespace at the container image registry.
// If not prepended with the registry, it will be defaulted:
// Examples: "docker.io/alice"
// "quay.io/bob"
// "charlie" (becomes [DefaultRegistry]/charlie
// At this time a registry namespace is required as we rely on a third-party
// registry in all cases. When we support in-cluster container registries,
// this configuration parameter will become optional.
func TestRegistryRequired(t *testing.T) {
// Create a root for the Function
root := "testdata/example.com/testRegistry"
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
client := bosonFunc.New()
var err error
if err = client.New(context.Background(), bosonFunc.Function{Root: root}); err == nil {
t.Fatal("did not receive expected error creating a Function without specifying Registry")
}
fmt.Println(err)
}
// TestDeriveImage ensures that the full image (tag) of the resultant OCI
// container is populated based of a derivation using configured registry
// plus the service name.
func TestDeriveImage(t *testing.T) {
// Create the root Function directory
root := "testdata/example.com/testDeriveImage"
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// Create the function which calculates fields such as name and image.
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
// Load the function with the now-populated fields.
f, err := bosonFunc.NewFunction(root)
if err != nil {
t.Fatal(err)
}
// In form: [Default Registry]/[Registry Namespace]/[Service Name]:latest
expected := TestRegistry + "/" + f.Name + ":latest"
if f.Image != expected {
t.Fatalf("expected image '%v' got '%v'", expected, f.Image)
}
}
// TestDeriveImageDefaultRegistry ensures that a Registry which does not have
// a registry prefix has the DefaultRegistry prepended.
// For example "alice" becomes "docker.io/alice"
func TestDeriveImageDefaultRegistry(t *testing.T) {
// Create the root Function directory
root := "testdata/example.com/testDeriveImageDefaultRegistry"
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// Create the function which calculates fields such as name and image.
// Rather than use TestRegistry, use a single-token name and expect
// the DefaultRegistry to be prepended.
client := bosonFunc.New(bosonFunc.WithRegistry("alice"))
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
// Load the function with the now-populated fields.
f, err := bosonFunc.NewFunction(root)
if err != nil {
t.Fatal(err)
}
// Expected image is [DefaultRegistry]/[namespace]/[servicename]:latest
expected := bosonFunc.DefaultRegistry + "/alice/" + f.Name + ":latest"
if f.Image != expected {
t.Fatalf("expected image '%v' got '%v'", expected, f.Image)
}
}
// TestDelegation ensures that Create invokes each of the individual
// subcomponents via delegation through Build, Push and
// Deploy (and confirms expected fields calculated).
func TestNewDelegates(t *testing.T) {
var (
root = "testdata/example.com/testCreateDelegates" // .. in which to initialize
expectedName = "testCreateDelegates" // expected to be derived
expectedImage = "quay.io/alice/testCreateDelegates:latest"
builder = mock.NewBuilder()
pusher = mock.NewPusher()
deployer = mock.NewDeployer()
)
// Create a directory for the new Function
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// Create a client with mocks for each of the subcomponents.
client := bosonFunc.New(
bosonFunc.WithRegistry(TestRegistry),
bosonFunc.WithBuilder(builder), // builds an image
bosonFunc.WithPusher(pusher), // pushes images to a registry
bosonFunc.WithDeployer(deployer), // deploys images as a running service
)
// Register Function delegates on the mocks which validate assertions
// -------------
// The builder should be invoked with a path to a Function project's source
// An example image name is returned.
builder.BuildFn = func(f bosonFunc.Function) error {
expectedPath, err := filepath.Abs(root)
if err != nil {
t.Fatal(err)
}
if expectedPath != f.Root {
t.Fatalf("builder expected path %v, got '%v'", expectedPath, f.Root)
}
return nil
}
pusher.PushFn = func(f bosonFunc.Function) (string, error) {
if f.Image != expectedImage {
t.Fatalf("pusher expected image '%v', got '%v'", expectedImage, f.Image)
}
return "", nil
}
deployer.DeployFn = func(f bosonFunc.Function) error {
if f.Name != expectedName {
t.Fatalf("deployer expected name '%v', got '%v'", expectedName, f.Name)
}
if f.Image != expectedImage {
t.Fatalf("deployer expected image '%v', got '%v'", expectedImage, f.Image)
}
return nil
}
// Invocation
// -------------
// Invoke the creation, triggering the Function delegates, and
// perform follow-up assertions that the Functions were indeed invoked.
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
// Confirm that each delegate was invoked.
if !builder.BuildInvoked {
t.Fatal("builder was not invoked")
}
if !pusher.PushInvoked {
t.Fatal("pusher was not invoked")
}
if !deployer.DeployInvoked {
t.Fatal("deployer was not invoked")
}
}
// TestRun ensures that the runner is invoked with the absolute path requested.
func TestRun(t *testing.T) {
// Create the root Function directory
root := "testdata/example.com/testRun"
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// Create a client with the mock runner and the new test Function
runner := mock.NewRunner()
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry), bosonFunc.WithRunner(runner))
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
// Run the newly created function
if err := client.Run(context.Background(), root); err != nil {
t.Fatal(err)
}
// Assert the runner was invoked, and with the expected root.
if !runner.RunInvoked {
t.Fatal("run did not invoke the runner")
}
absRoot, err := filepath.Abs(root)
if err != nil {
t.Fatal(err)
}
if runner.RootRequested != absRoot {
t.Fatalf("expected path '%v', got '%v'", absRoot, runner.RootRequested)
}
}
// TestUpdate ensures that the deployer properly invokes the build/push/deploy
// process, erroring if run on a directory uncreated.
func TestUpdate(t *testing.T) {
var (
root = "testdata/example.com/testUpdate"
expectedName = "testUpdate"
expectedImage = "quay.io/alice/testUpdate:latest"
builder = mock.NewBuilder()
pusher = mock.NewPusher()
deployer = mock.NewDeployer()
)
// Create the root Function directory
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// A client with mocks whose implementaton will validate input.
client := bosonFunc.New(
bosonFunc.WithRegistry(TestRegistry),
bosonFunc.WithBuilder(builder),
bosonFunc.WithPusher(pusher),
bosonFunc.WithDeployer(deployer))
// create the new Function which will be updated
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
// Builder whose implementation verifies the expected root
builder.BuildFn = func(f bosonFunc.Function) error {
rootPath, err := filepath.Abs(root)
if err != nil {
t.Fatal(err)
}
if f.Root != rootPath {
t.Fatalf("builder expected path %v, got '%v'", rootPath, f.Root)
}
return nil
}
// Pusher whose implementaiton verifies the expected image
pusher.PushFn = func(f bosonFunc.Function) (string, error) {
if f.Image != expectedImage {
t.Fatalf("pusher expected image '%v', got '%v'", expectedImage, f.Image)
}
// image of given name wouold be pushed to the configured registry.
return "", nil
}
// Update whose implementaiton verifed the expected name and image
deployer.DeployFn = func(f bosonFunc.Function) error {
if f.Name != expectedName {
t.Fatalf("updater expected name '%v', got '%v'", expectedName, f.Name)
}
if f.Image != expectedImage {
t.Fatalf("updater expected image '%v', got '%v'", expectedImage, f.Image)
}
return nil
}
// Invoke the creation, triggering the Function delegates, and
// perform follow-up assertions that the Functions were indeed invoked.
if err := client.Deploy(context.Background(), root); err != nil {
t.Fatal(err)
}
if !builder.BuildInvoked {
t.Fatal("builder was not invoked")
}
if !pusher.PushInvoked {
t.Fatal("pusher was not invoked")
}
if !deployer.DeployInvoked {
t.Fatal("deployer was not invoked")
}
}
// TestRemoveByPath ensures that the remover is invoked to remove
// the Function with the name of the function at the provided root.
func TestRemoveByPath(t *testing.T) {
var (
root = "testdata/example.com/testRemoveByPath"
expectedName = "testRemoveByPath"
remover = mock.NewRemover()
)
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
client := bosonFunc.New(
bosonFunc.WithRegistry(TestRegistry),
bosonFunc.WithRemover(remover))
if err := client.New(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
remover.RemoveFn = func(name string) error {
if name != expectedName {
t.Fatalf("Expected to remove '%v', got '%v'", expectedName, name)
}
return nil
}
if err := client.Remove(context.Background(), bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
if !remover.RemoveInvoked {
t.Fatal("remover was not invoked")
}
}
// TestRemoveByName ensures that the remover is invoked to remove the function
// of the name provided, with precidence over a provided root path.
func TestRemoveByName(t *testing.T) {
var (
root = "testdata/example.com/testRemoveByPath"
expectedName = "explicitName.example.com"
remover = mock.NewRemover()
)
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
client := bosonFunc.New(
bosonFunc.WithRegistry(TestRegistry),
bosonFunc.WithRemover(remover))
if err := client.Create(bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
remover.RemoveFn = func(name string) error {
if name != expectedName {
t.Fatalf("Expected to remove '%v', got '%v'", expectedName, name)
}
return nil
}
// Run remove with only a name
if err := client.Remove(context.Background(), bosonFunc.Function{Name: expectedName}); err != nil {
t.Fatal(err)
}
// Run remove with a name and a root, which should be ignored in favor of the name.
if err := client.Remove(context.Background(), bosonFunc.Function{Name: expectedName, Root: root}); err != nil {
t.Fatal(err)
}
if !remover.RemoveInvoked {
t.Fatal("remover was not invoked")
}
}
// TestRemoveUninitializedFails ensures that attempting to remove a Function
// by path only (no name) fails unless the Function has been initialized. I.e.
// the name will not be derived from path and the Function removed by this
// derived name; which could be unexpected and destructive.
func TestRemoveUninitializedFails(t *testing.T) {
var (
root = "testdata/example.com/testRemoveUninitializedFails"
remover = mock.NewRemover()
)
err := os.MkdirAll(root, 0700)
if err != nil {
panic(err)
}
defer os.RemoveAll(root)
// remover fails if invoked
remover.RemoveFn = func(name string) error {
return fmt.Errorf("remove invoked for unitialized Function %v", name)
}
// Instantiate the client with the failing remover.
client := bosonFunc.New(
bosonFunc.WithRegistry(TestRegistry),
bosonFunc.WithRemover(remover))
// Attempt to remove by path (uninitialized), expecting an error.
if err := client.Remove(context.Background(), bosonFunc.Function{Root: root}); err == nil {
t.Fatalf("did not received expeced error removing an uninitialized func")
}
}
// TestList merely ensures that the client invokes the configured lister.
func TestList(t *testing.T) {
lister := mock.NewLister()
client := bosonFunc.New(bosonFunc.WithLister(lister)) // lists deployed Functions.
if _, err := client.List(context.Background()); err != nil {
t.Fatal(err)
}
if !lister.ListInvoked {
t.Fatal("list did not invoke lister implementation")
}
}
// TestListOutsideRoot ensures that a call to a Function (in this case list)
// that is not contextually dependent on being associated with a Function,
// can be run from anywhere, thus ensuring that the client itself makes
// a distinction between Function-scoped methods and not.
func TestListOutsideRoot(t *testing.T) {
lister := mock.NewLister()
// Instantiate in the current working directory, with no name.
client := bosonFunc.New(bosonFunc.WithLister(lister))
if _, err := client.List(context.Background()); err != nil {
t.Fatal(err)
}
if !lister.ListInvoked {
t.Fatal("list did not invoke lister implementation")
}
}
// TestDeployUnbuilt ensures that a call to deploy a Function which was not
// fully created (ie. was only initialized, not actually built and deploys)
// yields an expected, and informative, error.
func TestDeployUnbuilt(t *testing.T) {
root := "testdata/example.com/testDeploy" // Root from which to run the test
if err := os.MkdirAll(root, 0700); err != nil {
t.Fatal(err)
}
defer os.RemoveAll(root)
// New Client
client := bosonFunc.New(bosonFunc.WithRegistry(TestRegistry))
// Initialize (half-create) a new Function at root
if err := client.Create(bosonFunc.Function{Root: root}); err != nil {
t.Fatal(err)
}
// Now try to deploy it. Ie. without having run the necessary build step.
err := client.Deploy(context.Background(), root)
if err == nil {
t.Fatal("did not receive an error attempting to deploy an unbuilt Function")
}
if !errors.Is(err, bosonFunc.ErrNotBuilt) {
t.Fatalf("did not receive expected error type. Expected ErrNotBuilt, got %T", err)
}
}
// TODO: The tests which confirm an error is generated do not currently test
// that the expected error is received; just that any error is generated.
// This should be replaced with typed errors or at a minimum code prefixes
// on the string to avoid tests passing for unrelated errors.

View File

@ -1,157 +1,436 @@
package cmd
import (
"context"
"errors"
"fmt"
"strings"
"github.com/AlecAivazis/survey/v2"
"github.com/ory/viper"
"github.com/spf13/cobra"
bosonFunc "github.com/boson-project/func"
"github.com/boson-project/func/buildpacks"
"github.com/boson-project/func/prompt"
"knative.dev/func/pkg/builders"
pack "knative.dev/func/pkg/builders/buildpacks"
"knative.dev/func/pkg/builders/s2i"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/oci"
)
func init() {
root.AddCommand(buildCmd)
buildCmd.Flags().StringP("builder", "b", "default", "Buildpack builder, either an as a an image name or a mapping name as defined in func.yaml")
buildCmd.Flags().BoolP("confirm", "c", false, "Prompt to confirm all configuration options (Env: $FUNC_CONFIRM)")
buildCmd.Flags().StringP("image", "i", "", "Full image name in the orm [registry]/[namespace]/[name]:[tag] (optional). This option takes precedence over --registry (Env: $FUNC_IMAGE")
buildCmd.Flags().StringP("path", "p", cwd(), "Path to the project directory (Env: $FUNC_PATH)")
buildCmd.Flags().StringP("registry", "r", "", "Registry + namespace part of the image to build, ex 'quay.io/myuser'. The full image name is automatically determined based on the local directory name. If not provided the registry will be taken from func.yaml (Env: $FUNC_REGISTRY)")
func NewBuildCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "build",
Short: "Build a function container",
Long: `
NAME
{{rootCmdUse}} build - Build a function container locally without deploying
err := buildCmd.RegisterFlagCompletionFunc("builder", CompleteBuilderList)
SYNOPSIS
{{rootCmdUse}} build [-r|--registry] [--builder] [--builder-image]
[--push] [--username] [--password] [--token]
[--platform] [-p|--path] [-c|--confirm] [-v|--verbose]
[--build-timestamp] [--registry-insecure]
DESCRIPTION
Builds a function's container image and optionally pushes it to the
configured container registry.
By default building is handled automatically when deploying (see the deploy
subcommand). However, sometimes it is useful to build a function container
outside of this normal deployment process, for example for testing or during
composition when integrating with other systems. Additionally, the container
can be pushed to the configured registry using the --push option.
When building a function for the first time, either a registry or explicit
image name is required. Subsequent builds will reuse these option values.
EXAMPLES
o Build a function container using the given registry.
The full image name will be calculated using the registry and function name.
$ {{rootCmdUse}} build --registry registry.example.com/alice
o Build a function container using an explicit image name, ignoring registry
and function name.
$ {{rootCmdUse}} build --image registry.example.com/alice/f:latest
o Rebuild a function using prior values to determine container name.
$ {{rootCmdUse}} build
o Build a function specifying the Source-to-Image (S2I) builder
$ {{rootCmdUse}} build --builder=s2i
o Build a function specifying the Pack builder with a custom Buildpack
builder image.
$ {{rootCmdUse}} build --builder=pack --builder-image=cnbs/sample-builder:bionic
`,
SuggestFor: []string{"biuld", "buidl", "built"},
PreRunE: bindEnv("image", "path", "builder", "registry", "confirm",
"push", "builder-image", "base-image", "platform", "verbose",
"build-timestamp", "registry-insecure", "username", "password", "token"),
RunE: func(cmd *cobra.Command, args []string) error {
return runBuild(cmd, args, newClient)
},
}
// Global Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Function Context
f, _ := fn.NewFunction(effectivePath())
if f.Initialized() {
cfg = cfg.Apply(f) // defined values on f take precedence over cfg defaults
}
// Flags
//
// NOTE on flag defaults:
// Use the config value when available, as this will include global static
// defaults, user settings and the value from the function with context.
// Use the function struct for flag flags which are not globally configurable
//
// Globally-Configurable Flags:
// Options whose value may be defined globally may also exist on the
// contextually relevant function; sets are flattened above via cfg.Apply(f)
cmd.Flags().StringP("builder", "b", cfg.Builder,
fmt.Sprintf("Builder to use when creating the function's container. Currently supported builders are %s. ($FUNC_BUILDER)", KnownBuilders()))
cmd.Flags().StringP("registry", "r", cfg.Registry,
"Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)")
cmd.Flags().Bool("registry-insecure", cfg.RegistryInsecure, "Skip TLS certificate verification when communicating in HTTPS with the registry ($FUNC_REGISTRY_INSECURE)")
// Function-Context Flags:
// Options whose value is available on the function with context only
// (persisted but not globally configurable)
builderImage := f.Build.BuilderImages[f.Build.Builder]
cmd.Flags().StringP("builder-image", "", builderImage,
"Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)")
cmd.Flags().StringP("base-image", "", f.Build.BaseImage,
"Override the base image for your function (host builder only)")
cmd.Flags().StringP("image", "i", f.Image,
"Full image name in the form [registry]/[namespace]/[name]:[tag] (optional). This option takes precedence over --registry ($FUNC_IMAGE)")
// Static Flags:
// Options which are either empty or have static defaults only (not
// globally configurable nor persisted with the function)
cmd.Flags().BoolP("push", "u", false,
"Attempt to push the function image to the configured registry after being successfully built")
cmd.Flags().StringP("platform", "", "",
"Optionally specify a target platform, for example \"linux/amd64\" when using the s2i build strategy")
cmd.Flags().StringP("username", "", "",
"Username to use when pushing to the registry.")
cmd.Flags().StringP("password", "", "",
"Password to use when pushing to the registry.")
cmd.Flags().StringP("token", "", "",
"Token to use when pushing to the registry.")
cmd.Flags().BoolP("build-timestamp", "", false, "Use the actual time as the created time for the docker image. This is only useful for buildpacks builder.")
// Temporarily Hidden Basic Auth Flags
// Username, Password and Token flags, which plumb through basic auth, are
// currently only available on the "host" builder.
_ = cmd.Flags().MarkHidden("username")
_ = cmd.Flags().MarkHidden("password")
_ = cmd.Flags().MarkHidden("token")
// Oft-shared flags:
addConfirmFlag(cmd, cfg.Confirm)
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
// Tab Completion
if err := cmd.RegisterFlagCompletionFunc("builder", CompleteBuilderList); err != nil {
fmt.Println("internal: error while calling RegisterFlagCompletionFunc: ", err)
}
if err := cmd.RegisterFlagCompletionFunc("builder-image", CompleteBuilderImageList); err != nil {
fmt.Println("internal: error while calling RegisterFlagCompletionFunc: ", err)
}
return cmd
}
var buildCmd = &cobra.Command{
Use: "build",
Short: "Build a function project as a container image",
Long: `Build a function project as a container image
func runBuild(cmd *cobra.Command, _ []string, newClient ClientFactory) (err error) {
var (
cfg buildConfig
f fn.Function
)
if cfg, err = newBuildConfig().Prompt(); err != nil { // gather values into a single instruction set
return
}
if err = cfg.Validate(); err != nil { // Perform any pre-validation
return
}
if f, err = fn.NewFunction(cfg.Path); err != nil { // Read in the Function
return
}
if !f.Initialized() {
return fn.NewErrNotInitialized(f.Root)
}
f = cfg.Configure(f) // Returns an f updated with values from the config (flags, envs, etc)
This command builds the function project in the current directory or in the directory
specified by --path. The result will be a container image that is pushed to a registry.
The func.yaml file is read to determine the image name and registry.
If the project has not already been built, either --registry or --image must be provided
and the image name is stored in the configuration file.
`,
Example: `
# Build from the local directory, using the given registry as target.
# The full image name will be determined automatically based on the
# project directory name
kn func build --registry quay.io/myuser
cmd.SetContext(cfg.WithValues(cmd.Context())) // Some optional settings are passed via context
# Build from the local directory, specifying the full image name
kn func build --image quay.io/myuser/myfunc
# Re-build, picking up a previously supplied image name from a local func.yml
kn func build
# Build with a custom buildpack builder
kn func build --builder cnbs/sample-builder:bionic
`,
SuggestFor: []string{"biuld", "buidl", "built"},
PreRunE: bindEnv("image", "path", "builder", "registry", "confirm"),
RunE: runBuild,
}
func runBuild(cmd *cobra.Command, _ []string) (err error) {
config := newBuildConfig().Prompt()
function, err := functionWithOverrides(config.Path, functionOverrides{Builder: config.Builder, Image: config.Image})
// Client
clientOptions, err := cfg.clientOptions()
if err != nil {
return
}
client, done := newClient(ClientConfig{Verbose: cfg.Verbose}, clientOptions...)
defer done()
// Check if the Function has been initialized
if !function.Initialized() {
return fmt.Errorf("the given path '%v' does not contain an initialized function. Please create one at this path before deploying", config.Path)
// Build
buildOptions, err := cfg.buildOptions() // build-specific options from the finalized cfg
if err != nil {
return
}
// If the Function does not yet have an image name and one was not provided on the command line
if function.Image == "" {
// AND a --registry was not provided, then we need to
// prompt for a registry from which we can derive an image name.
if config.Registry == "" {
fmt.Print("A registry for function images is required (e.g. 'quay.io/boson').\n\n")
config.Registry = prompt.ForString("Registry for function images", "")
if config.Registry == "" {
return fmt.Errorf("unable to determine function image name")
}
if f, err = client.Build(cmd.Context(), f, buildOptions...); err != nil {
return
}
if cfg.Push {
if f, _, err = client.Push(cmd.Context(), f); err != nil {
return
}
// We have the registry, so let's use it to derive the Function image name
config.Image = deriveImage(config.Image, config.Registry, config.Path)
function.Image = config.Image
}
// All set, let's write changes in the config to the disk
err = function.WriteConfig()
if err != nil {
if err = f.Write(); err != nil {
return
}
// Stamp is a performance optimization: treat the function as being built
// (cached) unless the fs changes.
return f.Stamp()
}
builder := buildpacks.NewBuilder()
builder.Verbose = config.Verbose
client := bosonFunc.New(
bosonFunc.WithVerbose(config.Verbose),
bosonFunc.WithRegistry(config.Registry), // for deriving image name when --image not provided explicitly.
bosonFunc.WithBuilder(builder))
return client.Build(cmd.Context(), config.Path)
// WithValues returns a context populated with values from the build config
// which are provided to the system via the context.
func (c buildConfig) WithValues(ctx context.Context) context.Context {
// Push
ctx = context.WithValue(ctx, fn.PushUsernameKey{}, c.Username)
ctx = context.WithValue(ctx, fn.PushPasswordKey{}, c.Password)
ctx = context.WithValue(ctx, fn.PushTokenKey{}, c.Token)
return ctx
}
type buildConfig struct {
// Globals (builder, confirm, registry, verbose)
config.Global
// BuilderImage is the image (name or mapping) to use for building. Usually
// set automatically.
BuilderImage string
// Image name in full, including registry, repo and tag (overrides
// image name derivation based on Registry and Function Name)
// image name derivation based on registry and function name)
Image string
// Path of the Function implementation on local disk. Defaults to current
// BaseImage is an image to build a function upon (host builder only)
// TODO: gauron99 -- make option to add a path to dockerfile ?
BaseImage string
// Path of the function implementation on local disk. Defaults to current
// working directory of the process.
Path string
// Platform ofr resultant image (s2i builder only)
Platform string
// Push the resulting image to the registry after building.
Push bool
// Registry at which interstitial build artifacts should be kept.
// This setting is ignored if Image is specified, which includes the full
Registry string
// Username when specifying optional basic auth.
Username string
// Verbose logging.
Verbose bool
// Password when using optional basic auth. Should be provided along
// with Username.
Password string
// Confirm: confirm values arrived upon from environment plus flags plus defaults,
// with interactive prompting (only applicable when attached to a TTY).
Confirm bool
Builder string
// Token when performing basic auth using a bearer token. Should be
// exclusive with Username and Password.
Token string
// Build with the current timestamp as the created time for docker image.
// This is only useful for buildpacks builder.
WithTimestamp bool
}
// newBuildConfig gathers options into a single build request.
func newBuildConfig() buildConfig {
return buildConfig{
Image: viper.GetString("image"),
Path: viper.GetString("path"),
Registry: viper.GetString("registry"),
Verbose: viper.GetBool("verbose"), // defined on root
Confirm: viper.GetBool("confirm"),
Builder: viper.GetString("builder"),
Global: config.Global{
Builder: viper.GetString("builder"),
Confirm: viper.GetBool("confirm"),
Registry: registry(), // deferred defaulting
Verbose: viper.GetBool("verbose"),
RegistryInsecure: viper.GetBool("registry-insecure"),
},
BuilderImage: viper.GetString("builder-image"),
BaseImage: viper.GetString("base-image"),
Image: viper.GetString("image"),
Path: viper.GetString("path"),
Platform: viper.GetString("platform"),
Push: viper.GetBool("push"),
Username: viper.GetString("username"),
Password: viper.GetString("password"),
Token: viper.GetString("token"),
WithTimestamp: viper.GetBool("build-timestamp"),
}
}
// Prompt the user with value of config members, allowing for interaractive changes.
// Configure the given function. Updates a function struct with all
// configurable values. Note that buildConfig already includes function's
// current values, as they were passed through via flag defaults, so overwriting
// is a noop.
func (c buildConfig) Configure(f fn.Function) fn.Function {
f = c.Global.Configure(f)
if f.Build.Builder != "" && c.BuilderImage != "" {
f.Build.BuilderImages[f.Build.Builder] = c.BuilderImage
}
f.Image = c.Image
f.Build.BaseImage = c.BaseImage
// Path, Platform and Push are not part of a function's state.
return f
}
// Prompt the user with value of config members, allowing for interactive changes.
// Skipped if not in an interactive terminal (non-TTY), or if --confirm false (agree to
// all prompts) was set (default).
func (c buildConfig) Prompt() buildConfig {
imageName := deriveImage(c.Image, c.Registry, c.Path)
if !interactiveTerminal() || !c.Confirm {
return c
func (c buildConfig) Prompt() (buildConfig, error) {
if !interactiveTerminal() {
return c, nil
}
return buildConfig{
Path: prompt.ForString("Path to project directory", c.Path),
Image: prompt.ForString("Full image name (e.g. quay.io/boson/node-sample)", imageName, prompt.WithRequired(true)),
Verbose: c.Verbose,
// Registry not prompted for as it would be confusing when combined with explicit image. Instead it is
// inferred by the derived default for Image, which uses Registry for derivation.
// If there is no registry nor explicit image name defined, the
// Registry prompt is shown whether or not we are in confirm mode.
// Otherwise, it is only showin if in confirm mode
// NOTE: the default in this latter situation will ignore the current function
// value and will always use the value from the config (flag or env variable).
// This is not strictly correct and will be fixed when Global Config: Function
// Context is available (PR#1416)
f, err := fn.NewFunction(c.Path)
if err != nil {
return c, err
}
if (f.Registry == "" && c.Registry == "" && c.Image == "") || c.Confirm {
fmt.Println("A registry for function images is required. For example, 'docker.io/tigerteam'.")
err := survey.AskOne(
&survey.Input{Message: "Registry for function images:", Default: c.Registry},
&c.Registry,
survey.WithValidator(NewRegistryValidator(c.Path)))
if err != nil {
return c, fn.ErrRegistryRequired
}
fmt.Println("Note: building a function the first time will take longer than subsequent builds")
}
// Remainder of prompts are optional and only shown if in --confirm mode
if !c.Confirm {
return c, nil
}
// Image Name Override
// Calculate a better image name message which shows the value of the final
// image name as it will be calculated if an explicit image name is not used.
qs := []*survey.Question{
{
Name: "image",
Prompt: &survey.Input{
Message: "Optionally specify an exact image name to use (e.g. quay.io/boson/node-sample:latest)",
},
},
{
Name: "path",
Prompt: &survey.Input{
Message: "Project path:",
Default: c.Path,
},
},
}
//
// TODO(lkingland): add confirmation prompts for other config members here
//
err = survey.Ask(qs, &c)
return c, err
}
// Validate the config passes an initial consistency check
func (c buildConfig) Validate() (err error) {
// Builder value must refer to a known builder short name
if err = ValidateBuilder(c.Builder); err != nil {
return
}
// Platform is only supported with the S2I builder at this time
if c.Platform != "" && c.Builder != builders.S2I {
err = errors.New("only S2I builds currently support specifying platform")
return
}
// BaseImage is only supported with the host builder
if c.BaseImage != "" && c.Builder != "host" {
err = errors.New("only host builds support specifying the base image")
}
return
}
// clientOptions returns options suitable for instantiating a client based on
// the current state of the build config object.
// This will be unnecessary and refactored away when the host-based OCI
// builder and pusher are the default implementations and the Pack and S2I
// constructors simplified.
//
// TODO: Platform is currently only used by the S2I builder. This should be
// a multi-valued argument which passes through to the "host" builder (which
// supports multi-arch/platform images), and throw an error if either trying
// to specify a platform for buildpacks, or trying to specify more than one
// for S2I.
//
// TODO: As a further optimization, it might be ideal to only build the
// image necessary for the target cluster, since the end product of a function
// deployment is not the contiainer, but rather the running service.
func (c buildConfig) clientOptions() ([]fn.Option, error) {
o := []fn.Option{fn.WithRegistry(c.Registry)}
switch c.Builder {
case builders.Host:
o = append(o,
fn.WithBuilder(oci.NewBuilder(builders.Host, c.Verbose)),
fn.WithPusher(oci.NewPusher(c.RegistryInsecure, false, c.Verbose)))
case builders.Pack:
o = append(o,
fn.WithBuilder(pack.NewBuilder(
pack.WithName(builders.Pack),
pack.WithTimestamp(c.WithTimestamp),
pack.WithVerbose(c.Verbose))))
case builders.S2I:
o = append(o,
fn.WithBuilder(s2i.NewBuilder(
s2i.WithName(builders.S2I),
s2i.WithVerbose(c.Verbose))))
default:
return o, builders.ErrUnknownBuilder{Name: c.Builder, Known: KnownBuilders()}
}
return o, nil
}
// buildOptions returns options for use with the client.Build request
func (c buildConfig) buildOptions() (oo []fn.BuildOption, err error) {
oo = []fn.BuildOption{}
// Platforms
//
// TODO: upgrade --platform to a multi-value field. The individual builder
// implementations are responsible for bubbling an error if they do
// not support this. Pack supports none, S2I supports one, host builder
// supports multi.
if c.Platform != "" {
parts := strings.Split(c.Platform, "/")
if len(parts) != 2 {
return oo, fmt.Errorf("the value for --patform must be in the form [OS]/[Architecture]. eg \"linux/amd64\"")
}
oo = append(oo, fn.BuildWithPlatforms([]fn.Platform{{OS: parts[0], Architecture: parts[1]}}))
}
return
}

160
cmd/build_test.go Normal file
View File

@ -0,0 +1,160 @@
package cmd
import (
"errors"
"testing"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/mock"
. "knative.dev/func/pkg/testing"
)
// TestBuild_BuilderPersists ensures that the builder chosen is read from
// the function by default, and is able to be overridden by flags/env vars.
func TestBuild_BuilderPersists(t *testing.T) {
testBuilderPersists(NewBuildCmd, t)
}
// TestBuild_ValidateBuilder ensures that the validation function correctly
// identifies valid and invalid builder short names.
func TestBuild_BuilderValidated(t *testing.T) {
testBuilderValidated(NewBuildCmd, t)
}
// TestBuild_ConfigApplied ensures that the build command applies config
// settings at each level (static, global, function, envs, flags).
func TestBuild_ConfigApplied(t *testing.T) {
testConfigApplied(NewBuildCmd, t)
}
// TestBuild_ConfigPrecedence ensures that the correct precidence for config
// are applied: static < global < function context < envs < flags
func TestBuild_ConfigPrecedence(t *testing.T) {
testConfigPrecedence(NewBuildCmd, t)
}
// TestBuild_Default ensures that running build on a valid default Function
// (only required options populated; all else default) completes successfully.
func TestBuild_Default(t *testing.T) {
testDefault(NewBuildCmd, t)
}
// TestBuild_FunctionContext ensures that the function contectually relevant
// to the current command execution is loaded and used for flag defaults by
// spot-checking the builder setting.
func TestBuild_FunctionContext(t *testing.T) {
testFunctionContext(NewBuildCmd, t)
}
// TestBuild_ImageFlag ensures that the image flag is used when specified.
func TestBuild_ImageFlag(t *testing.T) {
testImageFlag(NewBuildCmd, t)
}
// TestBuild_ImageAndRegistry ensures that image is derived when --registry
// is provided without --image; that --image is used if provided; that when
// both are provided, they are both passed to the builder; and that these
// values are persisted.
func TestBuild_ImageAndRegistry(t *testing.T) {
testImageAndRegistry(NewBuildCmd, t)
}
// TestBuild_InvalidRegistry ensures that providing an invalid registry
// fails with the expected error.
func TestBuild_InvalidRegistry(t *testing.T) {
testInvalidRegistry(NewBuildCmd, t)
}
// TestBuild_Registry ensures that a function's registry member is kept in
// sync with the image tag.
// During normal operation (using the client API) a function's state on disk
// will be in a valid state, but it is possible that a function could be
// manually edited, necessitating some kind of consistency recovery (as
// preferable to just an error).
func TestBuild_Registry(t *testing.T) {
testRegistry(NewBuildCmd, t)
}
// TestBuild_RegistryLoads ensures that a function with a defined registry
// will use this when recalculating .Image on build when no --image is
// explicitly provided.
func TestBuild_RegistryLoads(t *testing.T) {
testRegistryLoads(NewBuildCmd, t)
}
// TestBuild_RegistryOrImageRequired ensures that when no registry or image are
// provided (or exist on the function already), and the client has not been
// instantiated with a default registry, an ErrRegistryRequired is received.
func TestBuild_RegistryOrImageRequired(t *testing.T) {
testRegistryOrImageRequired(NewBuildCmd, t)
}
// TestBuild_Authentication ensures that Token and Username/Password auth
// propagate to pushers which support them.
func TestBuild_Authentication(t *testing.T) {
testAuthentication(NewBuildCmd, t)
}
// TestBuild_BaseImage ensures that base image is used only with the right
// builders and propagates into f.Build.BaseImage
func TestBuild_BaseImage(t *testing.T) {
testBaseImage(NewBuildCmd, t)
}
// TestBuild_Push ensures that the build command properly pushes and respects
// the --push flag.
// - Push triggered after a successful build
// - Push not triggered after an unsuccessful build
// - Push can be disabled
func TestBuild_Push(t *testing.T) {
root := FromTempDirectory(t)
f := fn.Function{
Root: root,
Name: "myfunc",
Runtime: "go",
Registry: "example.com/alice",
}
if _, err := fn.New().Init(f); err != nil {
t.Fatal(err)
}
var (
builder = mock.NewBuilder()
pusher = mock.NewPusher()
)
cmd := NewBuildCmd(NewTestClient(fn.WithRegistry(TestRegistry), fn.WithBuilder(builder), fn.WithPusher(pusher)))
cmd.SetArgs([]string{})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Assert there was no push
if pusher.PushInvoked {
t.Fatal("push should not be invoked by default")
}
// Execute with push enabled
cmd.SetArgs([]string{"--push"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Assert there was a push
if !pusher.PushInvoked {
t.Fatal("push should be invoked when requested and a successful build")
}
// Execute with push enabled but with a failed build
builder.BuildFn = func(f fn.Function) error {
return errors.New("mock error")
}
pusher.PushInvoked = false
_ = cmd.Execute() // expected error
// Assert push was not invoked when the build failed
if pusher.PushInvoked {
t.Fatal("push should not be invoked on a failed build")
}
}

150
cmd/client.go Normal file
View File

@ -0,0 +1,150 @@
package cmd
import (
"fmt"
"net/http"
"os"
"knative.dev/func/cmd/prompt"
"knative.dev/func/pkg/builders/buildpacks"
"knative.dev/func/pkg/config"
"knative.dev/func/pkg/docker"
"knative.dev/func/pkg/docker/creds"
fn "knative.dev/func/pkg/functions"
fnhttp "knative.dev/func/pkg/http"
"knative.dev/func/pkg/k8s"
"knative.dev/func/pkg/knative"
"knative.dev/func/pkg/pipelines/tekton"
)
// ClientConfig settings for use with NewClient
// These are the minimum settings necessary to create the default client
// instance which has most subsystems initialized.
type ClientConfig struct {
// Verbose logging. By default, logging output is kept to the bare minimum.
// Use this flag to configure verbose logging throughout.
Verbose bool
// Allow insecure server connections when using SSL
InsecureSkipVerify bool
}
// ClientFactory defines a constructor which assists in the creation of a Client
// for use by commands.
// See the NewClient constructor which is the fully populated ClientFactory used
// by commands by default.
// See NewClientFactory which constructs a minimal ClientFactory for use
// during testing.
type ClientFactory func(ClientConfig, ...fn.Option) (*fn.Client, func())
// NewTestClient returns a client factory which will ignore options used,
// instead using those provided when creating the factory. This allows
// for tests to create an entirely default client but with N mocks.
func NewTestClient(options ...fn.Option) ClientFactory {
return func(_ ClientConfig, _ ...fn.Option) (*fn.Client, func()) {
return fn.New(options...), func() {}
}
}
// NewClient constructs an fn.Client with the majority of
// the concrete implementations set. Provide additional Options to this constructor
// to override or augment as needed, or override the ClientFactory passed to
// commands entirely to mock for testing. Note the returned cleanup function.
// 'Namespace' is optional. If not provided (see DefaultNamespace commentary),
// the currently configured is used.
// 'Verbose' indicates the system should write out a higher amount of logging.
func NewClient(cfg ClientConfig, options ...fn.Option) (*fn.Client, func()) {
var (
t = newTransport(cfg.InsecureSkipVerify) // may provide a custom impl which proxies
c = newCredentialsProvider(config.Dir(), t) // for accessing registries
d = newKnativeDeployer(cfg.Verbose)
pp = newTektonPipelinesProvider(c, cfg.Verbose)
o = []fn.Option{ // standard (shared) options for all commands
fn.WithVerbose(cfg.Verbose),
fn.WithTransport(t),
fn.WithRepositoriesPath(config.RepositoriesPath()),
fn.WithBuilder(buildpacks.NewBuilder(buildpacks.WithVerbose(cfg.Verbose))),
fn.WithRemover(knative.NewRemover(cfg.Verbose)),
fn.WithDescriber(knative.NewDescriber(cfg.Verbose)),
fn.WithLister(knative.NewLister(cfg.Verbose)),
fn.WithDeployer(d),
fn.WithPipelinesProvider(pp),
fn.WithPusher(docker.NewPusher(
docker.WithCredentialsProvider(c),
docker.WithTransport(t),
docker.WithVerbose(cfg.Verbose))),
}
)
// Client is constructed with standard options plus any additional options
// which either augment or override the defaults.
client := fn.New(append(o, options...)...)
// A deferrable cleanup function which is used to perform any cleanup, such
// as closing the transport
cleanup := func() {
if err := t.Close(); err != nil {
fmt.Fprintf(os.Stderr, "error closing http transport. %v", err)
}
}
return client, cleanup
}
// newTransport returns a transport with cluster-flavor-specific variations
// which take advantage of additional features offered by cluster variants.
func newTransport(insecureSkipVerify bool) fnhttp.RoundTripCloser {
return fnhttp.NewRoundTripper(fnhttp.WithInsecureSkipVerify(insecureSkipVerify), fnhttp.WithOpenShiftServiceCA())
}
// newCredentialsProvider returns a credentials provider which possibly
// has cluster-flavor specific additional credential loaders to take advantage
// of features or configuration nuances of cluster variants.
func newCredentialsProvider(configPath string, t http.RoundTripper) docker.CredentialsProvider {
options := []creds.Opt{
creds.WithPromptForCredentials(prompt.NewPromptForCredentials(os.Stdin, os.Stdout, os.Stderr)),
creds.WithPromptForCredentialStore(prompt.NewPromptForCredentialStore()),
creds.WithTransport(t),
creds.WithAdditionalCredentialLoaders(k8s.GetOpenShiftDockerCredentialLoaders()...),
}
// Other cluster variants can be supported here
return creds.NewCredentialsProvider(configPath, options...)
}
func newTektonPipelinesProvider(creds docker.CredentialsProvider, verbose bool) *tekton.PipelinesProvider {
options := []tekton.Opt{
tekton.WithCredentialsProvider(creds),
tekton.WithVerbose(verbose),
tekton.WithPipelineDecorator(deployDecorator{}),
}
return tekton.NewPipelinesProvider(options...)
}
func newKnativeDeployer(verbose bool) fn.Deployer {
options := []knative.DeployerOpt{
knative.WithDeployerVerbose(verbose),
knative.WithDeployerDecorator(deployDecorator{}),
}
return knative.NewDeployer(options...)
}
type deployDecorator struct {
oshDec k8s.OpenshiftMetadataDecorator
}
func (d deployDecorator) UpdateAnnotations(function fn.Function, annotations map[string]string) map[string]string {
if k8s.IsOpenShift() {
return d.oshDec.UpdateAnnotations(function, annotations)
}
return annotations
}
func (d deployDecorator) UpdateLabels(function fn.Function, labels map[string]string) map[string]string {
if k8s.IsOpenShift() {
return d.oshDec.UpdateLabels(function, labels)
}
return labels
}

55
cmd/client_test.go Normal file
View File

@ -0,0 +1,55 @@
package cmd
import (
"context"
"testing"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/mock"
)
// Test_NewTestClient ensures that the convenience method for
// constructing a mocked client for testing properly considers options:
// options provided to the factory constructor are considered exaustive,
// such that the test can force the user of the factory to use specific mocks.
// In other words, options provided when invoking the factory (such as by
// a command implementation) are ignored.
func Test_NewTestClient(t *testing.T) {
var (
remover = mock.NewRemover()
describer = mock.NewDescriber()
)
// Factory constructor options which should be used when invoking later
clientFn := NewTestClient(fn.WithRemover(remover))
// Factory should ignore options provided when invoking
client, _ := clientFn(ClientConfig{}, fn.WithDescriber(describer))
// Trigger an invocation of the mocks by running the associated client
// methods which depend on them
err := client.Remove(context.Background(), "myfunc", "myns", fn.Function{}, true)
if err != nil {
t.Fatal(err)
}
_, err = client.Describe(context.Background(), "myfunc", "myns", fn.Function{})
if err != nil {
t.Fatal(err)
}
// Ensure the first set of options, held on the factory (the mock remover)
// is invoked.
if !remover.RemoveInvoked {
t.Fatalf("factory (outer) options not carried through to final client instance")
}
// Ensure the second set of options, provided when constructing the client
// using the factory, are ignored.
if describer.DescribeInvoked {
t.Fatalf("test client factory should ignore options when invoked.")
}
// This ensures that the NewTestClient function, when provided a set
// of optional implementations (mocks) will override any which are set
// by commands, allowing tests to "force" a command to use the mocked
// implementations.
}

View File

@ -7,15 +7,11 @@ import (
"github.com/spf13/cobra"
)
func init() {
root.AddCommand(completionCmd)
}
// completionCmd represents the completion command
var completionCmd = &cobra.Command{
Use: "completion <bash|zsh|fish>",
Short: "Generate completion scripts for bash, fish and zsh",
Long: `To load completion run
func NewCompletionCmd() *cobra.Command {
return &cobra.Command{
Use: "completion <bash|zsh|fish>",
Short: "Output functions shell completion code",
Long: `To load completion run
For zsh:
source <(func completion zsh)
@ -28,23 +24,25 @@ For bash:
source <(func completion bash)
`,
ValidArgs: []string{"bash", "zsh", "fish"},
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
if len(args) < 1 {
return errors.New("missing argument")
}
switch args[0] {
case "bash":
err = root.GenBashCompletion(os.Stdout)
case "zsh":
err = root.GenZshCompletion(os.Stdout)
case "fish":
err = root.GenFishCompletion(os.Stdout, true)
default:
err = errors.New("unknown shell, only bash, zsh and fish are supported")
}
ValidArgs: []string{"bash", "zsh", "fish"},
Args: cobra.ExactArgs(1),
RunE: func(cmd *cobra.Command, args []string) (err error) {
if len(args) < 1 {
return errors.New("missing argument")
}
switch args[0] {
case "bash":
err = cmd.Root().GenBashCompletion(os.Stdout)
case "zsh":
err = cmd.Root().GenZshCompletion(os.Stdout)
case "fish":
err = cmd.Root().GenFishCompletion(os.Stdout, true)
default:
err = errors.New("unknown shell, only bash, zsh and fish are supported")
}
return err
},
}
return err
},
}

View File

@ -2,24 +2,22 @@ package cmd
import (
"encoding/json"
"fmt"
"os"
"os/user"
"path"
"strings"
"github.com/spf13/cobra"
bosonFunc "github.com/boson-project/func"
"github.com/boson-project/func/buildpacks"
"github.com/boson-project/func/knative"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/knative"
)
func CompleteFunctionList(cmd *cobra.Command, args []string, toComplete string) (strings []string, directive cobra.ShellCompDirective) {
lister, err := knative.NewLister("")
if err != nil {
directive = cobra.ShellCompDirectiveError
return
}
list, err := lister.List(cmd.Context())
lister := knative.NewLister(false)
list, err := lister.List(cmd.Context(), "")
if err != nil {
directive = cobra.ShellCompDirectiveError
return
@ -31,14 +29,50 @@ func CompleteFunctionList(cmd *cobra.Command, args []string, toComplete string)
directive = cobra.ShellCompDirectiveDefault
return
}
func CompleteRuntimeList(cmd *cobra.Command, args []string, toComplete string) (strings []string, directive cobra.ShellCompDirective) {
strings = []string{}
for lang := range buildpacks.RuntimeToBuildpack {
strings = append(strings, lang)
func CompleteRuntimeList(cmd *cobra.Command, args []string, toComplete string, client *fn.Client) (matches []string, directive cobra.ShellCompDirective) {
runtimes, err := client.Runtimes()
if err != nil {
fmt.Fprintf(os.Stderr, "error listing runtimes for flag completion: %v", err)
return
}
for _, runtime := range runtimes {
if strings.HasPrefix(runtime, toComplete) {
matches = append(matches, runtime)
}
}
directive = cobra.ShellCompDirectiveDefault
return
}
func CompleteTemplateList(cmd *cobra.Command, args []string, toComplete string, client *fn.Client) (matches []string, directive cobra.ShellCompDirective) {
directive = cobra.ShellCompDirectiveError
lang, err := cmd.Flags().GetString("language")
if err != nil {
fmt.Fprintf(os.Stderr, "cannot list templates: %v", err)
return
}
if lang == "" {
fmt.Fprintln(os.Stderr, "cannot list templates: language not specified")
return
}
templates, err := client.Templates().List(lang)
if err != nil {
fmt.Fprintf(os.Stderr, "cannot list templates: %v", err)
return
}
directive = cobra.ShellCompDirectiveDefault
for _, t := range templates {
if strings.HasPrefix(t, toComplete) {
matches = append(matches, t)
}
}
return
}
func CompleteOutputFormatList(cmd *cobra.Command, args []string, toComplete string) (strings []string, directive cobra.ShellCompDirective) {
directive = cobra.ShellCompDirectiveDefault
strings = []string{"plain", "yaml", "xml", "json"}
@ -73,13 +107,13 @@ func CompleteRegistryList(cmd *cobra.Command, args []string, toComplete string)
return
}
func CompleteBuilderList(cmd *cobra.Command, args []string, complete string) (strings []string, directive cobra.ShellCompDirective) {
func CompleteBuilderImageList(cmd *cobra.Command, args []string, complete string) (builderImages []string, directive cobra.ShellCompDirective) {
directive = cobra.ShellCompDirectiveError
var (
err error
path string
f bosonFunc.Function
f fn.Function
)
path, err = cmd.Flags().GetString("path")
@ -87,16 +121,40 @@ func CompleteBuilderList(cmd *cobra.Command, args []string, complete string) (st
return
}
f, err = bosonFunc.NewFunction(path)
f, err = fn.NewFunction(path)
if err != nil {
return
}
strings = make([]string, 0, len(f.BuilderMap))
for name := range f.BuilderMap {
strings = append(strings, name)
builderImages = make([]string, 0, len(f.Build.BuilderImages))
for name := range f.Build.BuilderImages {
if len(complete) == 0 {
builderImages = append(builderImages, name)
continue
}
if strings.HasPrefix(name, complete) {
builderImages = append(builderImages, name)
}
}
directive = cobra.ShellCompDirectiveNoFileComp
return
}
func CompleteBuilderList(cmd *cobra.Command, args []string, complete string) (matches []string, d cobra.ShellCompDirective) {
d = cobra.ShellCompDirectiveNoFileComp
matches = []string{}
if len(complete) == 0 {
matches = KnownBuilders()
return
}
for _, b := range KnownBuilders() {
if strings.HasPrefix(b, complete) {
matches = append(matches, b)
}
}
directive = cobra.ShellCompDirectiveDefault
return
}

175
cmd/config.go Normal file
View File

@ -0,0 +1,175 @@
package cmd
import (
"fmt"
"github.com/AlecAivazis/survey/v2"
"github.com/ory/viper"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
)
type functionLoader interface {
Load(path string) (fn.Function, error)
}
type functionSaver interface {
Save(f fn.Function) error
}
type functionLoaderSaver interface {
functionLoader
functionSaver
}
type standardLoaderSaver struct{}
func (s standardLoaderSaver) Load(path string) (fn.Function, error) {
f, err := fn.NewFunction(path)
if err != nil {
return fn.Function{}, fmt.Errorf("failed to create new function (path: %q): %w", path, err)
}
if !f.Initialized() {
return fn.Function{}, fn.NewErrNotInitialized(f.Root)
}
return f, nil
}
func (s standardLoaderSaver) Save(f fn.Function) error {
return f.Write()
}
var defaultLoaderSaver standardLoaderSaver
func NewConfigCmd(loadSaver functionLoaderSaver, newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "config",
Short: "Configure a function",
Long: `Configure a function
Interactive prompt that allows configuration of Git configuration, Volume mounts, Environment
variables, and Labels for a function project present in the current directory
or from the directory specified with --path.
`,
SuggestFor: []string{"cfg", "cofnig"},
PreRunE: bindEnv("path", "verbose"),
RunE: runConfigCmd,
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
cmd.AddCommand(NewConfigGitCmd(newClient))
cmd.AddCommand(NewConfigLabelsCmd(loadSaver))
cmd.AddCommand(NewConfigEnvsCmd(loadSaver))
cmd.AddCommand(NewConfigVolumesCmd())
return cmd
}
func runConfigCmd(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(defaultLoaderSaver)
if err != nil {
return
}
var qs = []*survey.Question{
{
Name: "selectedConfig",
Prompt: &survey.Select{
Message: "What do you want to configure?",
Options: []string{"Git", "Environment variables", "Volumes", "Labels"},
Default: "Git",
},
},
{
Name: "selectedOperation",
Prompt: &survey.Select{
Message: "What operation do you want to perform?",
Options: []string{"Add", "Remove", "List"},
Default: "List",
},
},
}
answers := struct {
SelectedConfig string
SelectedOperation string
}{}
err = survey.Ask(qs, &answers)
if err != nil {
return
}
switch answers.SelectedOperation {
case "Add":
switch answers.SelectedConfig {
case "Volumes":
err = runAddVolumesPrompt(cmd.Context(), function)
case "Environment variables":
err = runAddEnvsPrompt(cmd.Context(), function)
case "Labels":
err = runAddLabelsPrompt(cmd.Context(), function, defaultLoaderSaver)
case "Git":
err = runConfigGitSetCmd(cmd, NewClient)
}
case "Remove":
switch answers.SelectedConfig {
case "Volumes":
err = runRemoveVolumesPrompt(function)
case "Environment variables":
err = runRemoveEnvsPrompt(function)
case "Labels":
err = runRemoveLabelsPrompt(function, defaultLoaderSaver)
case "Git":
err = runConfigGitRemoveCmd(cmd, NewClient)
}
case "List":
switch answers.SelectedConfig {
case "Volumes":
listVolumes(function)
case "Environment variables":
err = listEnvs(function, cmd.OutOrStdout(), Human)
case "Labels":
err = listLabels(function, cmd.OutOrStdout(), Human)
case "Git":
err = runConfigGitCmd(cmd, NewClient)
}
}
return
}
// CLI Configuration (parameters)
// ------------------------------
type configCmdConfig struct {
Path string
Verbose bool
}
func newConfigCmdConfig() configCmdConfig {
return configCmdConfig{
Path: viper.GetString("path"),
Verbose: viper.GetBool("verbose"),
}
}
func initConfigCommand(loader functionLoader) (fn.Function, error) {
config := newConfigCmdConfig()
function, err := loader.Load(config.Path)
if err != nil {
return fn.Function{}, err
}
return function, nil
}

533
cmd/config_envs.go Normal file
View File

@ -0,0 +1,533 @@
package cmd
import (
"context"
"encoding/json"
"errors"
"fmt"
"io"
"os"
"github.com/AlecAivazis/survey/v2"
"github.com/AlecAivazis/survey/v2/terminal"
"github.com/ory/viper"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/k8s"
"knative.dev/func/pkg/utils"
)
func NewConfigEnvsCmd(loadSaver functionLoaderSaver) *cobra.Command {
cmd := &cobra.Command{
Use: "envs",
Short: "List and manage configured environment variable for a function",
Long: `List and manage configured environment variable for a function
Prints configured Environment variable for a function project present in
the current directory or from the directory specified with --path.
`,
Aliases: []string{"env"},
SuggestFor: []string{"ensv"},
PreRunE: bindEnv("path", "output", "verbose"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(loadSaver)
if err != nil {
return
}
return listEnvs(function, cmd.OutOrStdout(), Format(viper.GetString("output")))
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
cmd.Flags().StringP("output", "o", "human", "Output format (human|json) ($FUNC_OUTPUT)")
configEnvsAddCmd := NewConfigEnvsAddCmd(loadSaver)
configEnvsRemoveCmd := NewConfigEnvsRemoveCmd(loadSaver)
addPathFlag(cmd)
addPathFlag(configEnvsAddCmd)
addPathFlag(configEnvsRemoveCmd)
addVerboseFlag(cmd, cfg.Verbose)
addVerboseFlag(configEnvsAddCmd, cfg.Verbose)
addVerboseFlag(configEnvsRemoveCmd, cfg.Verbose)
cmd.AddCommand(configEnvsAddCmd)
cmd.AddCommand(configEnvsRemoveCmd)
return cmd
}
func NewConfigEnvsAddCmd(loadSaver functionLoaderSaver) *cobra.Command {
cmd := &cobra.Command{
Use: "add",
Short: "Add environment variable to the function configuration",
Long: `Add environment variable to the function configuration.
If environment variable is not set explicitly by flag, interactive prompt is used.
The environment variable can be set directly from a value,
from an environment variable on the local machine or from Secrets and ConfigMaps.
It is also possible to import all keys as environment variables from a Secret or ConfigMap.`,
Example: `# set environment variable directly
{{rootCmdUse}} config envs add --name=VARNAME --value=myValue
# set environment variable from local env $LOC_ENV
{{rootCmdUse}} config envs add --name=VARNAME --value='{{"{{"}} env:LOC_ENV {{"}}"}}'
set environment variable from a secret
{{rootCmdUse}} config envs add --name=VARNAME --value='{{"{{"}} secret:secretName:key {{"}}"}}'
# set all key as environment variables from a secret
{{rootCmdUse}} config envs add --value='{{"{{"}} secret:secretName {{"}}"}}'
# set environment variable from a configMap
{{rootCmdUse}} config envs add --name=VARNAME --value='{{"{{"}} configMap:confMapName:key {{"}}"}}'
# set all key as environment variables from a configMap
{{rootCmdUse}} config envs add --value='{{"{{"}} configMap:confMapName {{"}}"}}'`,
SuggestFor: []string{"ad", "create", "insert", "append"},
PreRunE: bindEnv("path", "name", "value", "verbose"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(loadSaver)
if err != nil {
return
}
var np *string
var vp *string
if cmd.Flags().Changed("name") {
s, e := cmd.Flags().GetString("name")
if e != nil {
return e
}
np = &s
}
if cmd.Flags().Changed("value") {
s, e := cmd.Flags().GetString("value")
if e != nil {
return e
}
vp = &s
}
if np != nil || vp != nil {
if np != nil {
if err := utils.ValidateEnvVarName(*np); err != nil {
return err
}
}
function.Run.Envs = append(function.Run.Envs, fn.Env{Name: np, Value: vp})
return loadSaver.Save(function)
}
return runAddEnvsPrompt(cmd.Context(), function)
},
}
cmd.Flags().StringP("name", "", "", "Name of the environment variable.")
cmd.Flags().StringP("value", "", "", "Value of the environment variable.")
return cmd
}
func NewConfigEnvsRemoveCmd(loadSaver functionLoaderSaver) *cobra.Command {
cmd := &cobra.Command{
Use: "remove",
Short: "Remove environment variable from the function configuration",
Long: `Remove environment variable from the function configuration
Interactive prompt to remove Environment variables from the function project
in the current directory or from the directory specified with --path.
`,
Aliases: []string{"rm"},
SuggestFor: []string{"del", "delete", "rmeove"},
PreRunE: bindEnv("path", "name", "verbose"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(loadSaver)
if err != nil {
return
}
var name string
if cmd.Flags().Changed("name") {
s, e := cmd.Flags().GetString("name")
if e != nil {
return e
}
name = s
}
if name != "" {
envs := []fn.Env{}
for _, v := range function.Run.Envs {
if *v.Name != name {
envs = append(envs, v)
}
}
function.Run.Envs = envs
return loadSaver.Save(function)
}
return runRemoveEnvsPrompt(function)
},
}
cmd.Flags().StringP("name", "", "", "Name of the environment variable.")
return cmd
}
func listEnvs(f fn.Function, w io.Writer, outputFormat Format) error {
switch outputFormat {
case Human:
if len(f.Run.Envs) == 0 {
_, err := fmt.Fprintln(w, "There aren't any configured Environment variables")
return err
}
fmt.Println("Configured Environment variables:")
for _, e := range f.Run.Envs {
_, err := fmt.Fprintln(w, " - ", e.String())
if err != nil {
return err
}
}
return nil
case JSON:
enc := json.NewEncoder(w)
return enc.Encode(f.Run.Envs)
default:
return fmt.Errorf("bad format: %v", outputFormat)
}
}
func runAddEnvsPrompt(ctx context.Context, f fn.Function) (err error) {
insertToIndex := 0
// SECTION - if there are some envs already set, let choose the position of the new entry
if len(f.Run.Envs) > 0 {
options := []string{}
for _, e := range f.Run.Envs {
options = append(options, fmt.Sprintf("Insert before: %s", e.String()))
}
options = append(options, "Insert here.")
selectedEnv := ""
prompt := &survey.Select{
Message: "Where do you want to add the Environment variable?",
Options: options,
Default: options[len(options)-1],
}
err = survey.AskOne(prompt, &selectedEnv)
if err != nil {
return
}
for i, option := range options {
if option == selectedEnv {
insertToIndex = i
break
}
}
}
// SECTION - select the type of Environment variable to be added
secrets, err := k8s.ListSecretsNamesIfConnected(ctx, f.Deploy.Namespace)
if err != nil {
return
}
configMaps, err := k8s.ListConfigMapsNamesIfConnected(ctx, f.Deploy.Namespace)
if err != nil {
return
}
selectedOption := ""
const (
optionEnvValue = "Environment variable with a specified value"
optionEnvLocal = "Value from a local environment variable"
optionEnvConfigMap = "ConfigMap: all key=value pairs as environment variables"
optionEnvConfigMapKey = "ConfigMap: value from a key"
optionEnvSecret = "Secret: all key=value pairs as environment variables"
optionEnvSecretKey = "Secret: value from a key"
)
options := []string{optionEnvValue, optionEnvLocal}
if len(configMaps) > 0 {
options = append(options, optionEnvConfigMap)
options = append(options, optionEnvConfigMapKey)
}
if len(secrets) > 0 {
options = append(options, optionEnvSecret)
options = append(options, optionEnvSecretKey)
}
err = survey.AskOne(&survey.Select{
Message: "What type of Environment variable do you want to add?",
Options: options,
}, &selectedOption)
if err != nil {
return
}
newEnv := fn.Env{}
switch selectedOption {
// SECTION - add new Environment variable with the specified value
case optionEnvValue:
qs := []*survey.Question{
{
Name: "name",
Prompt: &survey.Input{Message: "Please specify the Environment variable name:"},
Validate: func(val interface{}) error {
return utils.ValidateEnvVarName(val.(string))
},
},
{
Name: "value",
Prompt: &survey.Input{Message: "Please specify the Environment variable value:"},
},
}
answers := struct {
Name string
Value string
}{}
err = survey.Ask(qs, &answers)
if err != nil {
if errors.Is(err, terminal.InterruptErr) {
return nil
}
return
}
newEnv.Name = &answers.Name
newEnv.Value = &answers.Value
// SECTION - add new Environment variable with value from a local environment variable
case optionEnvLocal:
qs := []*survey.Question{
{
Name: "name",
Prompt: &survey.Input{Message: "Please specify the Environment variable name:"},
Validate: func(val interface{}) error {
return utils.ValidateEnvVarName(val.(string))
},
},
{
Name: "value",
Prompt: &survey.Input{Message: "Please specify the local Environment variable:"},
Validate: survey.Required,
},
}
answers := struct {
Name string
Value string
}{}
err = survey.Ask(qs, &answers)
if err != nil {
if errors.Is(err, terminal.InterruptErr) {
return nil
}
return
}
if _, ok := os.LookupEnv(answers.Value); !ok {
fmt.Printf("Warning: specified local environment variable %q is not set\n", answers.Value)
}
value := fmt.Sprintf("{{ env:%s }}", answers.Value)
newEnv.Name = &answers.Name
newEnv.Value = &value
// SECTION - Add all key=value pairs from ConfigMap as environment variables
case optionEnvConfigMap:
selectedResource := ""
err = survey.AskOne(&survey.Select{
Message: "Which ConfigMap do you want to use?",
Options: configMaps,
}, &selectedResource)
if err != nil {
if errors.Is(err, terminal.InterruptErr) {
return nil
}
return
}
value := fmt.Sprintf("{{ configMap:%s }}", selectedResource)
newEnv.Value = &value
// SECTION - Environment variable with value from a key from ConfigMap
case optionEnvConfigMapKey:
qs := []*survey.Question{
{
Name: "configmap",
Prompt: &survey.Select{
Message: "Which ConfigMap do you want to use?",
Options: configMaps,
},
},
{
Name: "name",
Prompt: &survey.Input{Message: "Please specify the Environment variable name:"},
Validate: func(val interface{}) error {
return utils.ValidateEnvVarName(val.(string))
},
},
{
Name: "key",
Prompt: &survey.Input{Message: "Please specify a key from the selected ConfigMap:"},
Validate: func(val interface{}) error {
return utils.ValidateConfigMapKey(val.(string))
},
},
}
answers := struct {
ConfigMap string
Name string
Key string
}{}
err = survey.Ask(qs, &answers)
if err != nil {
if errors.Is(err, terminal.InterruptErr) {
return nil
}
return
}
value := fmt.Sprintf("{{ configMap:%s:%s }}", answers.ConfigMap, answers.Key)
newEnv.Name = &answers.Name
newEnv.Value = &value
// SECTION - Add all key=value pairs from Secret as environment variables
case optionEnvSecret:
selectedResource := ""
err = survey.AskOne(&survey.Select{
Message: "Which Secret do you want to use?",
Options: secrets,
}, &selectedResource)
if err != nil {
if err == terminal.InterruptErr {
return nil
}
return
}
value := fmt.Sprintf("{{ secret:%s }}", selectedResource)
newEnv.Value = &value
// SECTION - Environment variable with value from a key from Secret
case optionEnvSecretKey:
qs := []*survey.Question{
{
Name: "secret",
Prompt: &survey.Select{
Message: "Which Secret do you want to use?",
Options: secrets,
},
},
{
Name: "name",
Prompt: &survey.Input{Message: "Please specify the Environment variable name:"},
Validate: func(val interface{}) error {
return utils.ValidateEnvVarName(val.(string))
},
},
{
Name: "key",
Prompt: &survey.Input{Message: "Please specify a key from the selected Secret:"},
Validate: func(val interface{}) error {
return utils.ValidateSecretKey(val.(string))
},
},
}
answers := struct {
Secret string
Name string
Key string
}{}
err = survey.Ask(qs, &answers)
if err != nil {
if err == terminal.InterruptErr {
return nil
}
return
}
value := fmt.Sprintf("{{ secret:%s:%s }}", answers.Secret, answers.Key)
newEnv.Name = &answers.Name
newEnv.Value = &value
}
// we have all necessary information -> let's insert the env to the selected position in the list
if insertToIndex == len(f.Run.Envs) {
f.Run.Envs = append(f.Run.Envs, newEnv)
} else {
f.Run.Envs = append(f.Run.Envs[:insertToIndex+1], f.Run.Envs[insertToIndex:]...)
f.Run.Envs[insertToIndex] = newEnv
}
err = f.Write()
if err == nil {
fmt.Println("Environment variable entry was added to the function configuration")
}
return
}
func runRemoveEnvsPrompt(f fn.Function) (err error) {
if len(f.Run.Envs) == 0 {
fmt.Println("There aren't any configured Environment variables")
return
}
options := []string{}
for _, e := range f.Run.Envs {
options = append(options, e.String())
}
selectedEnv := ""
prompt := &survey.Select{
Message: "Which Environment variables do you want to remove?",
Options: options,
}
err = survey.AskOne(prompt, &selectedEnv)
if err != nil {
if err == terminal.InterruptErr {
return nil
}
return
}
var newEnvs []fn.Env
removed := false
for i, e := range f.Run.Envs {
if e.String() == selectedEnv {
newEnvs = append(f.Run.Envs[:i], f.Run.Envs[i+1:]...)
removed = true
break
}
}
if removed {
f.Run.Envs = newEnvs
err = f.Write()
if err == nil {
fmt.Println("Environment variable entry was removed from the function configuration")
}
}
return
}

56
cmd/config_git.go Normal file
View File

@ -0,0 +1,56 @@
package cmd
import (
"fmt"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
)
func NewConfigGitCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "git",
Short: "Manage Git configuration of a function",
Long: `Manage Git configuration of a function
Prints Git configuration for a function project present in
the current directory or from the directory specified with --path.
`,
SuggestFor: []string{"gti", "Git", "Gti"},
PreRunE: bindEnv("path"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
return runConfigGitCmd(cmd, newClient)
},
}
// Global Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Function Context
f, _ := fn.NewFunction(effectivePath())
if f.Initialized() {
cfg = cfg.Apply(f)
}
configGitSetCmd := NewConfigGitSetCmd(newClient)
configGitRemoveCmd := NewConfigGitRemoveCmd(newClient)
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
cmd.AddCommand(configGitSetCmd)
cmd.AddCommand(configGitRemoveCmd)
return cmd
}
func runConfigGitCmd(_ *cobra.Command, _ ClientFactory) (err error) {
fmt.Printf("--------------------------- Function Git config ---------------------------\n")
fmt.Printf("Not implemented yet.\n")
return nil
}

170
cmd/config_git_remove.go Normal file
View File

@ -0,0 +1,170 @@
package cmd
import (
"fmt"
"github.com/AlecAivazis/survey/v2"
"github.com/ory/viper"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/pipelines"
)
func NewConfigGitRemoveCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "remove",
Short: "Remove Git settings from the function configuration",
Long: `Remove Git settings from the function configuration
Interactive prompt to remove Git settings from the function project in the current
directory or from the directory specified with --path.
It also removes any generated resources that are used for Git based build and deployment,
such as local generated Pipelines resources and any resources generated on the cluster.
`,
SuggestFor: []string{"rem", "rmeove", "del", "dle"},
PreRunE: bindEnv("path", "delete-local", "delete-cluster"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
return runConfigGitRemoveCmd(cmd, newClient)
},
}
// Global Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Resources generated related Flags:
cmd.Flags().Bool("delete-local", false, "Delete local resources (pipeline templates).")
cmd.Flags().Bool("delete-cluster", false, "Delete cluster resources (credentials and config on the cluster).")
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
type configGitRemoveConfig struct {
// Globals (builder, confirm, registry, verbose)
config.Global
// Path of the function implementation on local disk. Defaults to current
// working directory of the process.
Path string
// informs whether any specific flag for deleting only a subset of resources has been set
flagSet bool
metadata pipelines.PacMetadata
}
// newConfigGitRemoveConfig creates a configGitRemoveConfig populated from command flags
func newConfigGitRemoveConfig(_ *cobra.Command) (c configGitRemoveConfig) {
flagSet := false
// decide what resources we should delete:
// - by default all resources
// - if any parameter is explicitly specified then get value from parameters
deleteLocal := true
deleteCluster := true
if viper.HasChanged("delete-local") || viper.HasChanged("delete-cluster") {
deleteLocal = viper.GetBool("delete-local")
deleteCluster = viper.GetBool("delete-cluster")
flagSet = true
}
c = configGitRemoveConfig{
flagSet: flagSet,
metadata: pipelines.PacMetadata{
ConfigureLocalResources: deleteLocal,
ConfigureClusterResources: deleteCluster,
},
}
return c
}
func (c configGitRemoveConfig) Prompt(f fn.Function) (configGitRemoveConfig, error) {
deleteAll := true
// prompt if any flag hasn't been set yet
if !c.flagSet {
if err := survey.AskOne(&survey.Confirm{
Message: "Do you want to delete all Git related resources?",
Help: "Delete Git config, local Pipeline resourdces and on the cluster resources.",
Default: deleteAll,
}, &deleteAll, survey.WithValidator(survey.Required)); err != nil {
return c, err
}
}
if !deleteAll {
deleteLocal := true
if err := survey.AskOne(&survey.Confirm{
Message: "Do you want to delete all local Git related resources (Pipelines)?",
Help: "Delete local Pipeline resources created in the function project directory.",
Default: deleteLocal,
}, &deleteLocal, survey.WithValidator(survey.Required)); err != nil {
return c, err
}
c.metadata.ConfigureLocalResources = deleteLocal
deleteCluster := true
if err := survey.AskOne(&survey.Confirm{
Message: "Do you want to delete all Git related resources present on the cluster?",
Help: "Delete all Pipeline resources that were created on the cluster.",
Default: deleteCluster,
}, &deleteCluster, survey.WithValidator(survey.Required)); err != nil {
return c, err
}
c.metadata.ConfigureClusterResources = deleteCluster
}
return c, nil
}
// Configure the given function. Updates a function struct with all
// configurable values. Note that the config already includes function's
// current values, as they were passed through via flag defaults.
func (c configGitRemoveConfig) Configure(f fn.Function) (fn.Function, error) {
var err error
if c.metadata.ConfigureLocalResources {
f.Build.Git = fn.Git{}
}
// Save the function which has now been updated with flags/config
if err = f.Write(); err != nil { // TODO: remove when client API uses 'f'
return f, err
}
return f, nil
}
func runConfigGitRemoveCmd(cmd *cobra.Command, newClient ClientFactory) (err error) {
var (
cfg configGitRemoveConfig
f fn.Function
)
if err = config.CreatePaths(); err != nil { // for possible auth.json usage
return
}
cfg = newConfigGitRemoveConfig(cmd)
if f, err = fn.NewFunction(cfg.Path); err != nil {
return
}
if cfg, err = cfg.Prompt(f); err != nil {
return
}
if f, err = cfg.Configure(f); err != nil { // Updates f with deploy cfg
return
}
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
return client.RemovePAC(cmd.Context(), f, cfg.metadata)
}

311
cmd/config_git_set.go Normal file
View File

@ -0,0 +1,311 @@
package cmd
import (
"fmt"
"github.com/AlecAivazis/survey/v2"
"github.com/ory/viper"
"github.com/spf13/cobra"
pacgit "github.com/openshift-pipelines/pipelines-as-code/pkg/git"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/git"
"knative.dev/func/pkg/pipelines"
)
func NewConfigGitSetCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "set",
Short: "Set Git settings in the function configuration",
Long: `Set Git settings in the function configuration
Interactive prompt to set Git settings in the function project in the current
directory or from the directory specified with --path.
`,
SuggestFor: []string{"add", "ad", "update", "create", "insert", "append"},
PreRunE: bindEnv("path", "builder", "builder-image", "image", "registry", "git-provider", "git-url", "git-branch", "git-dir", "gh-access-token", "config-local", "config-cluster", "config-remote"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
return runConfigGitSetCmd(cmd, newClient)
},
}
// Global Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Function Context
f, _ := fn.NewFunction(effectivePath())
if f.Initialized() {
cfg = cfg.Apply(f)
}
// Flags
//
// Globally-Configurable Flags:
// Options whose value may be defined globally may also exist on the
// contextually relevant function; but sets are flattened via cfg.Apply(f)
cmd.Flags().StringP("builder", "b", cfg.Builder,
fmt.Sprintf("Builder to use when creating the function's container. Currently supported builders are %s.", KnownBuilders()))
cmd.Flags().StringP("registry", "r", cfg.Registry,
"Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)")
cmd.Flags().StringP("namespace", "n", cfg.Namespace,
"Deploy into a specific namespace. Will use function's current namespace by default if already deployed, and the currently active namespace if it can be determined. ($FUNC_NAMESPACE)")
// Function-Context Flags:
// Options whose value is avaolable on the function with context only
// (persisted but not globally configurable)
builderImage := f.Build.BuilderImages[f.Build.Builder]
cmd.Flags().StringP("builder-image", "", builderImage,
"Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)")
cmd.Flags().StringP("image", "i", f.Image, "Full image name in the form [registry]/[namespace]/[name]:[tag]@[digest]. This option takes precedence over --registry. Specifying digest is optional, but if it is given, 'build' and 'push' phases are disabled. ($FUNC_IMAGE)")
// Git related Flags:
cmd.Flags().String("git-provider", "",
fmt.Sprintf("The type of the Git platform provider to setup webhook. This value is usually automatically generated from input URL, use this parameter to override this setting. Currently supported providers are %s.", git.SupportedProvidersList.PrettyString()))
cmd.Flags().StringP("git-url", "g", "",
"Repository url containing the function to build ($FUNC_GIT_URL)")
cmd.Flags().StringP("git-branch", "t", "",
"Git revision (branch) to be used when deploying via the Git repository ($FUNC_GIT_BRANCH)")
cmd.Flags().StringP("git-dir", "d", "",
"Directory in the Git repository containing the function (default is the root) ($FUNC_GIT_DIR)")
// GitHub related Flags:
cmd.Flags().String("gh-access-token", "",
"GitHub Personal Access Token. For public repositories the scope is 'public_repo', for private is 'repo'. If you want to configure the webhook automatically, 'admin:repo_hook' is needed as well. Get more details: https://pipelines-as-code.pages.dev/docs/install/github_webhook/.")
cmd.Flags().String("gh-webhook-secret", "",
"GitHub Webhook Secret used for payload validation. If not specified, it will be generated automatically.")
// Resources generated related Flags:
cmd.Flags().Bool("config-local", false, "Configure local resources (pipeline templates).")
cmd.Flags().Bool("config-cluster", false, "Configure cluster resources (credentials and config on the cluster).")
cmd.Flags().Bool("config-remote", false, "Configure remote resources (webhook on the Git provider side).")
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
type configGitSetConfig struct {
buildConfig // further embeds config.Global
GitProvider string
GitURL string
GitRevision string
GitContextDir string
ConfigureRemoteResourcesSet bool // whether ConfigureRemoteResources value has been set
metadata pipelines.PacMetadata
}
// newConfigGitSetConfig creates a buildConfig populated from command flags and
// environment variables; in that precedence.
func newConfigGitSetConfig(_ *cobra.Command) (c configGitSetConfig) {
// decide what resources we should configure:
// - by default all resources
// - if any parameter is explicitly specified then get value from parameters
configLocal := true
configCluster := true
configRemote := true
configRemoteSet := false
if viper.HasChanged("config-local") || viper.HasChanged("config-cluster") || viper.HasChanged("config-remote") {
configLocal = viper.GetBool("config-local")
configCluster = viper.GetBool("config-cluster")
configRemote = viper.GetBool("config-remote")
configRemoteSet = true
}
c = configGitSetConfig{
buildConfig: newBuildConfig(),
GitURL: viper.GetString("git-url"),
GitRevision: viper.GetString("git-branch"),
GitContextDir: viper.GetString("git-dir"),
ConfigureRemoteResourcesSet: configRemoteSet,
metadata: pipelines.PacMetadata{
GitProvider: viper.GetString("git-provider"),
PersonalAccessToken: viper.GetString("gh-access-token"),
WebhookSecret: viper.GetString("gh-webhook-secret"),
ConfigureLocalResources: configLocal,
ConfigureClusterResources: configCluster,
ConfigureRemoteResources: configRemote,
},
}
return c
}
func (c configGitSetConfig) Prompt(f fn.Function) (configGitSetConfig, error) {
var err error
if c.buildConfig, err = c.buildConfig.Prompt(); err != nil {
return c, err
}
// try to read git url from the local .git settings
gitInfo := pacgit.GetGitInfo(c.Path)
// prompt if git URL hasn't been set previously
if c.GitURL == "" {
url := f.Build.Git.URL
if gitInfo.URL != "" {
url = gitInfo.URL
}
if err := survey.AskOne(&survey.Input{
Message: "The URL to Git repository with the function source code:",
Default: url,
}, &url, survey.WithValidator(survey.Required)); err != nil {
return c, err
}
c.GitURL = url
}
// prompt if git revision hasn't been set previously
if c.GitRevision == "" {
revision := f.Build.Git.Revision
if gitInfo.Branch != "" {
revision = gitInfo.Branch
}
if err := survey.AskOne(&survey.Input{
Message: "The Git branch or tag we are targeting:",
Help: "ie: main, refs/tags/*",
Default: revision,
}, &revision); err != nil {
return c, err
}
c.GitRevision = revision
}
// prompt if contextDir hasn't been set previously
if c.GitContextDir == "" {
contextDir := f.Build.Git.ContextDir
if err := survey.AskOne(&survey.Input{
Message: "A subpath within the repository:",
Help: "A subpath within the repository where the source code of a function is located.",
Default: contextDir,
}, &contextDir); err != nil {
return c, err
}
c.GitContextDir = contextDir
}
// prompt if webhook trigger setting hasn't been set previously
if !c.ConfigureRemoteResourcesSet {
trigger := true
if err := survey.AskOne(&survey.Confirm{
Message: "Do you want to configure webhook trigger?",
Help: "Webhook trigger also running pipeline on a git event, ie: commit, push",
Default: trigger,
}, &trigger, survey.WithValidator(survey.Required)); err != nil {
return c, err
}
c.metadata.ConfigureRemoteResources = trigger
c.ConfigureRemoteResourcesSet = true
}
if c.metadata.ConfigureRemoteResources {
// Configure Git provider
if c.metadata.GitProvider == "" {
provider, err := git.GitProviderName(c.GitURL)
if err != nil {
msg := "Please select the type of the Git platform provider to setup webhook:"
if err = survey.AskOne(&survey.Select{
Message: msg,
Options: git.SupportedProvidersList,
Default: 0,
}, &provider); err != nil {
return c, err
}
}
c.metadata.GitProvider = provider
}
// prompt if PersonalAccessToken hasn't been set previously
if c.metadata.PersonalAccessToken == "" {
var personalAccessToken string
if err := survey.AskOne(&survey.Password{
Message: "Please enter the GitHub Personal Access Token:",
Help: "For public repositories the scope is 'public_repo', for private is 'repo'. If you want to configure the webhook automatically 'admin:repo_hook' is needed as well. Get more details: https://pipelines-as-code.pages.dev/docs/install/github_webhook/.",
}, &personalAccessToken, survey.WithValidator(survey.Required)); err != nil {
return c, err
}
c.metadata.PersonalAccessToken = personalAccessToken
}
}
return c, nil
}
func (c configGitSetConfig) Validate(cmd *cobra.Command) (err error) {
// Bubble validation
if err = c.buildConfig.Validate(); err != nil {
return
}
return
}
// Configure the given function. Updates a function struct with all
// configurable values. Note that the config already includes function's
// current values, as they were passed through via flag defaults.
func (c configGitSetConfig) Configure(f fn.Function) (fn.Function, error) {
var err error
// Bubble configure request
//
// The member values on the config object now take absolute precidence
// because they include 1) static config 2) user's global config
// 3) Environment variables and 4) flag values (which were set with their
// default being 1-3).
f = c.buildConfig.Configure(f) // also configures .buildConfig.Global
// Configure basic members
f.Build.Git.URL = c.GitURL
f.Build.Git.ContextDir = c.GitContextDir
f.Build.Git.Revision = c.GitRevision // TODO: should match; perhaps "refSpec"
// Save the function which has now been updated with flags/config
if err = f.Write(); err != nil { // TODO: remove when client API uses 'f'
return f, err
}
return f, nil
}
func runConfigGitSetCmd(cmd *cobra.Command, newClient ClientFactory) (err error) {
var (
cfg configGitSetConfig
f fn.Function
)
if err = config.CreatePaths(); err != nil { // for possible auth.json usage
return
}
cfg = newConfigGitSetConfig(cmd)
if f, err = fn.NewFunction(cfg.Path); err != nil {
return
}
if cfg, err = cfg.Prompt(f); err != nil {
return
}
if err = cfg.Validate(cmd); err != nil {
return
}
if f, err = cfg.Configure(f); err != nil { // Updates f with deploy cfg
return
}
client, done := newClient(ClientConfig{Verbose: cfg.Verbose}, fn.WithRegistry(cfg.Registry))
defer done()
return client.ConfigurePAC(cmd.Context(), f, cfg.metadata)
}

360
cmd/config_labels.go Normal file
View File

@ -0,0 +1,360 @@
package cmd
import (
"context"
"encoding/json"
"fmt"
"io"
"os"
"github.com/AlecAivazis/survey/v2"
"github.com/ory/viper"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/utils"
)
func NewConfigLabelsCmd(loaderSaver functionLoaderSaver) *cobra.Command {
var configLabelsCmd = &cobra.Command{
Use: "labels",
Short: "List and manage configured labels for a function",
Long: `List and manage configured labels for a function
Prints configured labels for a function project present in
the current directory or from the directory specified with --path.
`,
Aliases: []string{"label"},
SuggestFor: []string{"albels", "abels"},
PreRunE: bindEnv("path", "output", "verbose"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(loaderSaver)
if err != nil {
return
}
return listLabels(function, cmd.OutOrStdout(), Format(viper.GetString("output")))
},
}
var configLabelsAddCmd = &cobra.Command{
Use: "add",
Short: "Add labels to the function configuration",
Long: `Add labels to the function configuration
If label is not set explicitly by flag, interactive prompt is used.
The label can be set directly from a value or from an environment variable on
the local machine.
`,
Example: `# set label directly
{{rootCmdUse}} config labels add --name=Foo --value=Bar
# set label from local env $FOO
{{rootCmdUse}} config labels add --name=Foo --value='{{"{{"}} env:FOO {{"}}"}}'`,
SuggestFor: []string{"ad", "create", "insert", "append"},
PreRunE: bindEnv("path", "name", "value", "verbose"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(loaderSaver)
if err != nil {
return
}
var np *string
var vp *string
if cmd.Flags().Changed("name") {
s, e := cmd.Flags().GetString("name")
if e != nil {
return e
}
np = &s
}
if cmd.Flags().Changed("value") {
s, e := cmd.Flags().GetString("value")
if e != nil {
return e
}
vp = &s
}
if np != nil && vp != nil {
if err := utils.ValidateLabelKey(*np); err != nil {
return err
}
if err := utils.ValidateLabelValue(*vp); err != nil {
return err
}
function.Deploy.Labels = append(function.Deploy.Labels, fn.Label{Key: np, Value: vp})
return loaderSaver.Save(function)
}
return runAddLabelsPrompt(cmd.Context(), function, loaderSaver)
},
}
var configLabelsRemoveCmd = &cobra.Command{
Use: "remove",
Short: "Remove labels from the function configuration",
Long: `Remove labels from the function configuration
Interactive prompt to remove labels from the function project in the current
directory or from the directory specified with --path.
`,
Aliases: []string{"rm"},
SuggestFor: []string{"del", "delete", "rmeove"},
PreRunE: bindEnv("path", "name", "verbose"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(loaderSaver)
if err != nil {
return
}
var name string
if cmd.Flags().Changed("name") {
s, e := cmd.Flags().GetString("name")
if e != nil {
return e
}
name = s
}
if name != "" {
labels := []fn.Label{}
for _, v := range function.Deploy.Labels {
if v.Key == nil || *v.Key != name {
labels = append(labels, v)
}
}
function.Deploy.Labels = labels
return loaderSaver.Save(function)
}
return runRemoveLabelsPrompt(function, loaderSaver)
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(configLabelsCmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Add flags
configLabelsCmd.Flags().StringP("output", "o", "human", "Output format (human|json)")
configLabelsAddCmd.Flags().StringP("name", "", "", "Name of the label.")
configLabelsAddCmd.Flags().StringP("value", "", "", "Value of the label.")
configLabelsRemoveCmd.Flags().StringP("name", "", "", "Name of the label.")
addPathFlag(configLabelsCmd)
addPathFlag(configLabelsAddCmd)
addPathFlag(configLabelsRemoveCmd)
addVerboseFlag(configLabelsCmd, cfg.Verbose)
addVerboseFlag(configLabelsAddCmd, cfg.Verbose)
addVerboseFlag(configLabelsRemoveCmd, cfg.Verbose)
configLabelsCmd.AddCommand(configLabelsAddCmd)
configLabelsCmd.AddCommand(configLabelsRemoveCmd)
return configLabelsCmd
}
func listLabels(f fn.Function, w io.Writer, outputFormat Format) error {
switch outputFormat {
case Human:
if len(f.Deploy.Labels) == 0 {
_, err := fmt.Fprintln(w, "No labels defined")
return err
}
fmt.Fprintln(w, "Labels:")
for _, e := range f.Deploy.Labels {
_, err := fmt.Fprintln(w, " - ", e.String())
if err != nil {
return err
}
}
return nil
case JSON:
enc := json.NewEncoder(w)
return enc.Encode(f.Deploy.Labels)
default:
return fmt.Errorf("invalid format: %v", outputFormat)
}
}
func runAddLabelsPrompt(_ context.Context, f fn.Function, saver functionSaver) (err error) {
insertToIndex := 0
// SECTION - if there are some labels already set, choose the position of the new entry
if len(f.Deploy.Labels) > 0 {
options := []string{}
for _, e := range f.Deploy.Labels {
options = append(options, fmt.Sprintf("Insert before: %s", e.String()))
}
options = append(options, "Insert here.")
selectedLabel := ""
prompt := &survey.Select{
Message: "Where do you want to add the label?",
Options: options,
Default: options[len(options)-1],
}
err = survey.AskOne(prompt, &selectedLabel)
if err != nil {
return
}
for i, option := range options {
if option == selectedLabel {
insertToIndex = i
break
}
}
}
// SECTION - select the type of label to be added
selectedOption := ""
const (
optionLabelValue = "Label with a specified value"
optionLabelLocal = "Value from a local environment variable"
)
options := []string{optionLabelValue, optionLabelLocal}
err = survey.AskOne(&survey.Select{
Message: "What type of label do you want to add?",
Options: options,
}, &selectedOption)
if err != nil {
return
}
newPair := fn.Label{}
switch selectedOption {
// SECTION - add new label with the specified value
case optionLabelValue:
qs := []*survey.Question{
{
Name: "key",
Prompt: &survey.Input{Message: "Please specify the label key:"},
Validate: func(val interface{}) error {
return utils.ValidateLabelKey(val.(string))
},
},
{
Name: "value",
Prompt: &survey.Input{Message: "Please specify the label value:"},
Validate: func(val interface{}) error {
return utils.ValidateLabelValue(val.(string))
}},
}
answers := struct {
Key string
Value string
}{}
err = survey.Ask(qs, &answers)
if err != nil {
return
}
newPair.Key = &answers.Key
newPair.Value = &answers.Value
// SECTION - add new label with value from a local environment variable
case optionLabelLocal:
qs := []*survey.Question{
{
Name: "key",
Prompt: &survey.Input{Message: "Please specify the label key:"},
Validate: func(val interface{}) error {
return utils.ValidateLabelKey(val.(string))
},
},
{
Name: "value",
Prompt: &survey.Input{Message: "Please specify the local environment variable:"},
Validate: func(val interface{}) error {
return utils.ValidateLabelValue(val.(string))
},
},
}
answers := struct {
Key string
Value string
}{}
err = survey.Ask(qs, &answers)
if err != nil {
return
}
if _, ok := os.LookupEnv(answers.Value); !ok {
fmt.Printf("Warning: specified local environment variable %q is not set\n", answers.Value)
}
value := fmt.Sprintf("{{ env:%s }}", answers.Value)
newPair.Key = &answers.Key
newPair.Value = &value
}
// we have all necessary information -> let's insert the label to the selected position in the list
if insertToIndex == len(f.Deploy.Labels) {
f.Deploy.Labels = append(f.Deploy.Labels, newPair)
} else {
f.Deploy.Labels = append(f.Deploy.Labels[:insertToIndex+1], f.Deploy.Labels[insertToIndex:]...)
f.Deploy.Labels[insertToIndex] = newPair
}
err = saver.Save(f)
if err == nil {
fmt.Println("Label entry was added to the function configuration")
}
return
}
func runRemoveLabelsPrompt(f fn.Function, saver functionSaver) (err error) {
if len(f.Deploy.Labels) == 0 {
fmt.Println("There aren't any configured labels")
return
}
options := []string{}
for _, e := range f.Deploy.Labels {
options = append(options, e.String())
}
selectedLabel := ""
prompt := &survey.Select{
Message: "Which labels do you want to remove?",
Options: options,
}
err = survey.AskOne(prompt, &selectedLabel)
if err != nil {
return
}
var newLabels []fn.Label
removed := false
for i, e := range f.Deploy.Labels {
if e.String() == selectedLabel {
newLabels = append(f.Deploy.Labels[:i], f.Deploy.Labels[i+1:]...)
removed = true
break
}
}
if removed {
f.Deploy.Labels = newLabels
err = saver.Save(f)
if err == nil {
fmt.Println("Label was removed from the function configuration")
}
}
return
}

199
cmd/config_labels_test.go Normal file
View File

@ -0,0 +1,199 @@
//go:build linux
// +build linux
package cmd
import (
"context"
"os"
"reflect"
"sync"
"testing"
"time"
"github.com/Netflix/go-expect"
"github.com/creack/pty"
"github.com/hinshun/vt10x"
"github.com/spf13/cobra"
fn "knative.dev/func/pkg/functions"
)
type mockFunctionLoaderSaver struct {
f fn.Function
}
func (m *mockFunctionLoaderSaver) Load(path string) (fn.Function, error) {
return m.f, nil
}
func (m *mockFunctionLoaderSaver) Save(f fn.Function) error {
m.f = f
return nil
}
func assertLabelEq(t *testing.T, actual []fn.Label, want []fn.Label) {
t.Helper()
if !reflect.DeepEqual(actual, want) {
t.Errorf("labels = %v, want %v", actual, want)
}
}
func createRunFunc(cmd *cobra.Command, t *testing.T) func(subcmd string, input ...string) {
return func(subcmd string, input ...string) {
ctx := context.Background()
ptm, pts, err := pty.Open()
if err != nil {
t.Fatal(err)
}
term := vt10x.New(vt10x.WithWriter(pts))
c, err := expect.NewConsole(expect.WithStdin(ptm), expect.WithStdout(term), expect.WithCloser(ptm, pts))
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() { c.Close() })
var wg sync.WaitGroup
wg.Add(1)
go func() {
//defer wg.Done()
_, _ = c.ExpectEOF()
}()
go func() {
defer wg.Done()
time.Sleep(time.Millisecond * 50)
for _, s := range input {
_, _ = c.Send(s)
time.Sleep(time.Millisecond * 50)
}
}()
a := []string{subcmd}
cmd.SetArgs(a)
func() {
defer withMockedStdio(t, c)()
err = cmd.ExecuteContext(ctx)
wg.Wait()
}()
if err != nil {
t.Fatal(err)
}
}
}
func withMockedStdio(t *testing.T, c *expect.Console) func() {
t.Helper()
oldIn := os.Stdin
oldOut := os.Stdout
oldErr := os.Stderr
os.Stdin = c.Tty()
os.Stdout = c.Tty()
os.Stderr = c.Tty()
return func() {
os.Stdin = oldIn
os.Stdout = oldOut
os.Stderr = oldErr
}
}
const (
arrowUp = "\033[A"
arrowDown = "\033[B"
enter = "\r"
)
func TestNewConfigLabelsCmd(t *testing.T) {
var loaderSaver mockFunctionLoaderSaver
labels := &loaderSaver.f.Deploy.Labels
cmd := NewConfigLabelsCmd(&loaderSaver)
cmd.SetArgs([]string{})
run := createRunFunc(cmd, t)
p := func(k, v string) fn.Label {
return fn.Label{Key: &k, Value: &v}
}
assertLabel := func(ps []fn.Label) {
t.Helper()
assertLabelEq(t, *labels, ps)
}
run("add", enter, "a", enter, "b", enter)
assertLabel([]fn.Label{p("a", "b")})
run("add", enter, enter, "c", enter, "d", enter)
assertLabel([]fn.Label{p("a", "b"), p("c", "d")})
run("add", arrowUp, arrowUp, enter, enter, "e", enter, "f", enter)
assertLabel([]fn.Label{p("e", "f"), p("a", "b"), p("c", "d")})
run("remove", arrowDown, enter)
assertLabel([]fn.Label{p("e", "f"), p("c", "d")})
}
func TestListLabels(t *testing.T) {
p := func(k, v string) fn.Label {
return fn.Label{Key: &k, Value: &v}
}
var loaderSaver mockFunctionLoaderSaver
labels := &loaderSaver.f.Deploy.Labels
*labels = append(*labels, p("a", "b"), p("c", "d"))
cmd := NewConfigLabelsCmd(&loaderSaver)
cmd.SetArgs([]string{})
ctx := context.Background()
c, err := expect.NewConsole()
if err != nil {
t.Fatal(err)
}
defer c.Close()
errChan := make(chan error, 1)
func() {
var err error
defer func() {
errChan <- err
}()
defer withMockedStdio(t, c)()
err = cmd.ExecuteContext(ctx)
}()
expected := []string{
`Labels:`,
` - Label with key "a" and value "b"`,
` - Label with key "c" and value "d"`,
}
// prevents the ExpectString() function from waiting indefinitely
// in case when expected string is not printed to stdout nor the stdout is closed
go func() {
time.Sleep(time.Second * 5)
c.Close()
}()
for _, s := range expected {
out, err := c.ExpectString(s)
if err != nil {
t.Errorf("unexpected output: %q, err: %v\n", out, err)
}
}
err = <-errChan
if err != nil {
t.Fatal(err)
}
}

181
cmd/config_test.go Normal file
View File

@ -0,0 +1,181 @@
package cmd_test
import (
"bytes"
"encoding/json"
"fmt"
"io"
"sort"
"testing"
"github.com/ory/viper"
fnCmd "knative.dev/func/cmd"
fn "knative.dev/func/pkg/functions"
)
func TestListEnvs(t *testing.T) {
mock := newMockLoaderSaver()
foo := "foo"
bar := "bar"
envs := []fn.Env{{Name: &foo, Value: &bar}}
mock.load = func(path string) (fn.Function, error) {
if path != "<path>" {
t.Fatalf("bad path, got %q but expected <path>", path)
}
return fn.Function{Run: fn.RunSpec{Envs: envs}}, nil
}
cmd := fnCmd.NewConfigCmd(mock, fnCmd.NewClient)
cmd.SetArgs([]string{"envs", "-o=json", "--path=<path>"})
var buff bytes.Buffer
cmd.SetOut(&buff)
cmd.SetErr(&buff)
err := cmd.Execute()
if err != nil {
t.Fatal(err)
}
var data []fn.Env
err = json.Unmarshal(buff.Bytes(), &data)
if err != nil {
t.Fatal(err)
}
if !envsEqual(envs, data) {
t.Errorf("env mismatch, expedted %v but got %v", envs, data)
}
}
func TestListEnvAdd(t *testing.T) {
// strings as vars so we can take address of them
foo := "foo"
bar := "bar"
answer := "answer"
fortyTwo := "42"
configMapExpression := "{{ configMap:myMap }}"
mock := newMockLoaderSaver()
mock.load = func(path string) (fn.Function, error) {
return fn.Function{Run: fn.RunSpec{Envs: []fn.Env{{Name: &foo, Value: &bar}}}}, nil
}
var expectedEnvs []fn.Env
mock.save = func(f fn.Function) error {
if !envsEqual(expectedEnvs, f.Run.Envs) {
return fmt.Errorf("unexpected envs: got %v but %v was expected", f.Run.Envs, expectedEnvs)
}
return nil
}
expectedEnvs = []fn.Env{{Name: &foo, Value: &bar}, {Name: &answer, Value: &fortyTwo}}
cmd := fnCmd.NewConfigCmd(mock, fnCmd.NewClient)
cmd.SetArgs([]string{"envs", "add", "--name=answer", "--value=42"})
cmd.SetOut(io.Discard)
cmd.SetErr(io.Discard)
err := cmd.Execute()
if err != nil {
t.Error(err)
}
viper.Reset()
expectedEnvs = []fn.Env{{Name: &foo, Value: &bar}, {Name: nil, Value: &configMapExpression}}
cmd = fnCmd.NewConfigCmd(mock, fnCmd.NewClient)
cmd.SetArgs([]string{"envs", "add", "--value={{ configMap:myMap }}"})
cmd.SetOut(io.Discard)
cmd.SetErr(io.Discard)
err = cmd.Execute()
if err != nil {
t.Error(err)
}
viper.Reset()
cmd = fnCmd.NewConfigCmd(mock, fnCmd.NewClient)
cmd.SetArgs([]string{"envs", "add", "--name=1", "--value=abc"})
cmd.SetOut(io.Discard)
cmd.SetErr(io.Discard)
err = cmd.Execute()
if err == nil {
t.Error("expected variable name error but got nil")
}
}
func envsEqual(a, b []fn.Env) bool {
if len(a) != len(b) {
return false
}
strPtrEq := func(x, y *string) bool {
switch {
case x == nil && y == nil:
return true
case x != nil && y != nil:
return *x == *y
default:
return false
}
}
strPtrLess := func(x, y *string) bool {
switch {
case x == nil && y == nil:
return false
case x != nil && y != nil:
return *x < *y
case x == nil:
return true
default:
return false
}
}
lessForSlice := func(s []fn.Env) func(i, j int) bool {
return func(i, j int) bool {
x := s[i]
y := s[j]
if strPtrLess(x.Name, y.Name) {
return true
}
return strPtrLess(x.Value, y.Value)
}
}
sort.Slice(a, lessForSlice(a))
sort.Slice(b, lessForSlice(b))
for i := range a {
x := a[i]
y := b[i]
if !strPtrEq(x.Name, y.Name) || !strPtrEq(x.Value, y.Value) {
return false
}
}
return true
}
func newMockLoaderSaver() *mockLoaderSaver {
return &mockLoaderSaver{
load: func(path string) (fn.Function, error) {
return fn.Function{}, nil
},
save: func(f fn.Function) error {
return nil
},
}
}
type mockLoaderSaver struct {
load func(path string) (fn.Function, error)
save func(f fn.Function) error
}
func (m mockLoaderSaver) Load(path string) (fn.Function, error) {
return m.load(path)
}
func (m mockLoaderSaver) Save(f fn.Function) error {
return m.save(f)
}

433
cmd/config_volumes.go Normal file
View File

@ -0,0 +1,433 @@
package cmd
import (
"context"
"fmt"
"strings"
"github.com/AlecAivazis/survey/v2"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/k8s"
)
func NewConfigVolumesCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "volumes",
Short: "List and manage configured volumes for a function",
Long: `List and manage configured volumes for a function
Prints configured Volume mounts for a function project present in
the current directory or from the directory specified with --path.
`,
Aliases: []string{"volume"},
SuggestFor: []string{"vol", "volums", "vols"},
PreRunE: bindEnv("path", "verbose"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(defaultLoaderSaver)
if err != nil {
return
}
listVolumes(function)
return
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
configVolumesAddCmd := NewConfigVolumesAddCmd()
configVolumesRemoveCmd := NewConfigVolumesRemoveCmd()
addPathFlag(cmd)
addPathFlag(configVolumesAddCmd)
addPathFlag(configVolumesRemoveCmd)
addVerboseFlag(cmd, cfg.Verbose)
addVerboseFlag(configVolumesAddCmd, cfg.Verbose)
addVerboseFlag(configVolumesRemoveCmd, cfg.Verbose)
cmd.AddCommand(configVolumesAddCmd)
cmd.AddCommand(configVolumesRemoveCmd)
return cmd
}
func NewConfigVolumesAddCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "add",
Short: "Add volume to the function configuration",
Long: `Add volume to the function configuration
Interactive prompt to add Secrets and ConfigMaps as Volume mounts to the function project
in the current directory or from the directory specified with --path.
For non-interactive usage, use flags to specify the volume type and configuration.
`,
Example: `# Add a ConfigMap volume
{{rootCmdUse}} config volumes add --type=configmap --source=my-config --path=/etc/config
# Add a Secret volume
{{rootCmdUse}} config volumes add --type=secret --source=my-secret --path=/etc/secret
# Add a PersistentVolumeClaim volume
{{rootCmdUse}} config volumes add --type=pvc --source=my-pvc --path=/data
{{rootCmdUse}} config volumes add --type=pvc --source=my-pvc --path=/data --read-only
# Add an EmptyDir volume
{{rootCmdUse}} config volumes add --type=emptydir --path=/tmp/cache
{{rootCmdUse}} config volumes add --type=emptydir --path=/tmp/cache --size=1Gi --medium=Memory`,
SuggestFor: []string{"ad", "create", "insert", "append"},
PreRunE: bindEnv("path", "verbose", "type", "source", "mount-path", "read-only", "size", "medium"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(defaultLoaderSaver)
if err != nil {
return
}
// Check if flags are provided for non-interactive mode
volumeType, _ := cmd.Flags().GetString("type")
if volumeType != "" {
return runAddVolume(cmd, function)
}
// Fall back to interactive mode
return runAddVolumesPrompt(cmd.Context(), function)
},
}
// Add flags for non-interactive mode
cmd.Flags().StringP("type", "t", "", "Volume type: configmap, secret, pvc, or emptydir")
cmd.Flags().StringP("source", "s", "", "Name of the ConfigMap, Secret, or PVC to mount (not used for emptydir)")
cmd.Flags().StringP("mount-path", "m", "", "Path where the volume should be mounted in the container")
cmd.Flags().BoolP("read-only", "r", false, "Mount volume as read-only (only for PVC)")
cmd.Flags().StringP("size", "", "", "Maximum size limit for EmptyDir volume (e.g., 1Gi)")
cmd.Flags().StringP("medium", "", "", "Storage medium for EmptyDir volume: 'Memory' or '' (default)")
return cmd
}
func NewConfigVolumesRemoveCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "remove",
Short: "Remove volume from the function configuration",
Long: `Remove volume from the function configuration
Interactive prompt to remove Volume mounts from the function project
in the current directory or from the directory specified with --path.
For non-interactive usage, use the --mount-path flag to specify which volume to remove.
`,
Example: `# Remove a volume by its mount path
{{rootCmdUse}} config volumes remove --mount-path=/etc/config`,
Aliases: []string{"rm"},
SuggestFor: []string{"del", "delete", "rmeove"},
PreRunE: bindEnv("path", "verbose", "mount-path"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(defaultLoaderSaver)
if err != nil {
return
}
// Check if mount-path flag is provided for non-interactive mode
mountPath, _ := cmd.Flags().GetString("mount-path")
if mountPath != "" {
return runRemoveVolume(cmd, function, mountPath)
}
// Fall back to interactive mode
return runRemoveVolumesPrompt(function)
},
}
// Add flag for non-interactive mode
cmd.Flags().StringP("mount-path", "m", "", "Path of the volume mount to remove")
return cmd
}
func listVolumes(f fn.Function) {
if len(f.Run.Volumes) == 0 {
fmt.Println("There aren't any configured Volume mounts")
return
}
fmt.Println("Configured Volumes mounts:")
for _, v := range f.Run.Volumes {
fmt.Println(" - ", v.String())
}
}
func runAddVolumesPrompt(ctx context.Context, f fn.Function) (err error) {
secrets, err := k8s.ListSecretsNamesIfConnected(ctx, f.Deploy.Namespace)
if err != nil {
return
}
configMaps, err := k8s.ListConfigMapsNamesIfConnected(ctx, f.Deploy.Namespace)
if err != nil {
return
}
persistentVolumeClaims, err := k8s.ListPersistentVolumeClaimsNamesIfConnected(ctx, f.Deploy.Namespace)
if err != nil {
return
}
// SECTION - select resource type to be mounted
options := []string{}
selectedOption := ""
const optionConfigMap = "ConfigMap"
const optionSecret = "Secret"
const optionPersistentVolumeClaim = "PersistentVolumeClaim"
const optionEmptyDir = "EmptyDir"
if len(configMaps) > 0 {
options = append(options, optionConfigMap)
}
if len(secrets) > 0 {
options = append(options, optionSecret)
}
if len(persistentVolumeClaims) > 0 {
options = append(options, optionPersistentVolumeClaim)
}
options = append(options, optionEmptyDir)
if len(options) == 1 {
selectedOption = options[0]
} else {
err = survey.AskOne(&survey.Select{
Message: "What do you want to mount as a Volume?",
Options: options,
}, &selectedOption)
if err != nil {
return
}
}
// SECTION - display a help message to enable advanced features
if selectedOption == optionEmptyDir || selectedOption == optionPersistentVolumeClaim {
fmt.Printf("Please make sure to enable the %s extension flag: https://knative.dev/docs/serving/configuration/feature-flags/\n", selectedOption)
}
// SECTION - select the specific resource to be mounted
optionsResoures := []string{}
switch selectedOption {
case optionConfigMap:
optionsResoures = configMaps
case optionSecret:
optionsResoures = secrets
case optionPersistentVolumeClaim:
optionsResoures = persistentVolumeClaims
}
selectedResource := ""
if selectedOption != optionEmptyDir {
err = survey.AskOne(&survey.Select{
Message: fmt.Sprintf("Which \"%s\" do you want to mount?", selectedOption),
Options: optionsResoures,
}, &selectedResource)
if err != nil {
return
}
}
// SECTION - specify mount Path of the Volume
path := ""
err = survey.AskOne(&survey.Input{
Message: fmt.Sprintf("Please specify the path where the %s should be mounted:", selectedOption),
}, &path, survey.WithValidator(func(val interface{}) error {
if str, ok := val.(string); !ok || len(str) <= 0 || !strings.HasPrefix(str, "/") {
return fmt.Errorf("the input must be non-empty absolute path")
}
return nil
}))
if err != nil {
return
}
// SECTION - is this read only for pvc
readOnly := false
if selectedOption == optionPersistentVolumeClaim {
err = survey.AskOne(&survey.Confirm{
Message: "Is this volume read-only?",
Default: false,
}, &readOnly)
if err != nil {
return
}
}
// we have all necessary information -> let's store the new Volume
newVolume := fn.Volume{Path: &path}
switch selectedOption {
case optionConfigMap:
newVolume.ConfigMap = &selectedResource
case optionSecret:
newVolume.Secret = &selectedResource
case optionPersistentVolumeClaim:
newVolume.PersistentVolumeClaim = &fn.PersistentVolumeClaim{
ClaimName: &selectedResource,
ReadOnly: readOnly,
}
case optionEmptyDir:
newVolume.EmptyDir = &fn.EmptyDir{}
}
f.Run.Volumes = append(f.Run.Volumes, newVolume)
err = f.Write()
if err == nil {
fmt.Println("Volume entry was added to the function configuration")
}
return
}
func runRemoveVolumesPrompt(f fn.Function) (err error) {
if len(f.Run.Volumes) == 0 {
fmt.Println("There aren't any configured Volume mounts")
return
}
options := []string{}
for _, v := range f.Run.Volumes {
options = append(options, v.String())
}
selectedVolume := ""
prompt := &survey.Select{
Message: "Which Volume do you want to remove?",
Options: options,
}
err = survey.AskOne(prompt, &selectedVolume)
if err != nil {
return
}
var newVolumes []fn.Volume
removed := false
for i, v := range f.Run.Volumes {
if v.String() == selectedVolume {
newVolumes = append(f.Run.Volumes[:i], f.Run.Volumes[i+1:]...)
removed = true
break
}
}
if removed {
f.Run.Volumes = newVolumes
err = f.Write()
if err == nil {
fmt.Println("Volume entry was removed from the function configuration")
}
}
return
}
// runAddVolume handles adding volumes using command line flags
func runAddVolume(cmd *cobra.Command, f fn.Function) error {
var (
volumeType, _ = cmd.Flags().GetString("type")
source, _ = cmd.Flags().GetString("source")
mountPath, _ = cmd.Flags().GetString("mount-path")
readOnly, _ = cmd.Flags().GetBool("read-only")
sizeLimit, _ = cmd.Flags().GetString("size")
medium, _ = cmd.Flags().GetString("medium")
)
// Validate mount path
if mountPath == "" {
return fmt.Errorf("--mount-path is required")
}
if !strings.HasPrefix(mountPath, "/") {
return fmt.Errorf("mount path must be an absolute path (start with /)")
}
// Create the volume based on type
newVolume := fn.Volume{Path: &mountPath}
// All volumeTypes except emptydir require a source
if volumeType != "emptydir" && source == "" {
return fmt.Errorf("--source is required for %s volumes", volumeType)
}
switch volumeType {
case "configmap":
newVolume.ConfigMap = &source
case "secret":
newVolume.Secret = &source
case "pvc":
newVolume.PersistentVolumeClaim = &fn.PersistentVolumeClaim{
ClaimName: &source,
ReadOnly: readOnly,
}
if readOnly {
fmt.Fprintf(cmd.OutOrStderr(), "PersistentVolumeClaim will be mounted as read-only")
}
fmt.Fprintf(cmd.OutOrStderr(), "Please ensure the PersistentVolumeClaim extension flag is enabled:\nhttps://knative.dev/docs/serving/configuration/feature-flags/\n")
case "emptydir":
emptyDir := &fn.EmptyDir{}
if sizeLimit != "" {
emptyDir.SizeLimit = &sizeLimit
}
if medium != "" {
if medium != fn.StorageMediumMemory && medium != fn.StorageMediumDefault {
return fmt.Errorf("invalid medium: must be 'Memory' or empty")
}
emptyDir.Medium = medium
}
newVolume.EmptyDir = emptyDir
fmt.Fprintf(cmd.OutOrStderr(), "Please make sure to enable the EmptyDir extension flag:\nhttps://knative.dev/docs/serving/configuration/feature-flags/\n")
default:
return fmt.Errorf("invalid volume type: %s (must be one of: configmap, secret, pvc, emptydir)", volumeType)
}
// Add the volume to the function
f.Run.Volumes = append(f.Run.Volumes, newVolume)
// Save the function
err := f.Write()
if err == nil {
fmt.Printf("Volume entry was added to the function configuration\n")
fmt.Printf("Added: %s\n", newVolume.String())
}
return err
}
// runRemoveVolume handles removing volumes by mount path
func runRemoveVolume(cmd *cobra.Command, f fn.Function, mountPath string) error {
if !strings.HasPrefix(mountPath, "/") {
return fmt.Errorf("mount path must be an absolute path (start with /)")
}
// Find and remove the volume with the specified path
var newVolumes []fn.Volume
removed := false
for _, v := range f.Run.Volumes {
if v.Path != nil && *v.Path == mountPath {
removed = true
} else {
newVolumes = append(newVolumes, v)
}
}
if !removed {
return fmt.Errorf("no volume found with mount path: %s", mountPath)
}
f.Run.Volumes = newVolumes
err := f.Write()
if err == nil {
fmt.Fprintf(cmd.OutOrStderr(), "Volume entry was removed from the function configuration\n")
fmt.Fprintf(cmd.OutOrStderr(), "Removed volume at path: %s\n", mountPath)
}
return err
}

View File

@ -1,142 +1,570 @@
package cmd
import (
"errors"
"fmt"
"path/filepath"
"os"
"strings"
"text/tabwriter"
"text/template"
"github.com/AlecAivazis/survey/v2"
"github.com/ory/viper"
"github.com/spf13/cobra"
bosonFunc "github.com/boson-project/func"
"github.com/boson-project/func/prompt"
"github.com/boson-project/func/utils"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/utils"
)
func init() {
root.AddCommand(createCmd)
createCmd.Flags().BoolP("confirm", "c", false, "Prompt to confirm all configuration options (Env: $FUNC_CONFIRM)")
createCmd.Flags().StringP("runtime", "l", bosonFunc.DefaultRuntime, "Function runtime language/framework. Available runtimes: "+utils.RuntimeList()+" (Env: $FUNC_RUNTIME)")
createCmd.Flags().StringP("templates", "", filepath.Join(configPath(), "templates"), "Path to additional templates (Env: $FUNC_TEMPLATES)")
createCmd.Flags().StringP("trigger", "t", bosonFunc.DefaultTrigger, "Function trigger. Available triggers: 'http' and 'events' (Env: $FUNC_TRIGGER)")
// ErrNoRuntime indicates that the language runtime flag was not passed.
type ErrNoRuntime error
if err := createCmd.RegisterFlagCompletionFunc("runtime", CompleteRuntimeList); err != nil {
fmt.Println("internal: error while calling RegisterFlagCompletionFunc: ", err)
}
}
// ErrInvalidRuntime indicates that the passed language runtime was invalid.
type ErrInvalidRuntime error
var createCmd = &cobra.Command{
Use: "create [PATH]",
Short: "Create a function project",
Long: `Create a function project
// ErrInvalidTemplate indicates that the passed template was invalid.
type ErrInvalidTemplate error
Creates a new function project in PATH, or in the current directory if no PATH is given.
The name of the project is determined by the directory name the project is created in.
`,
Example: `
# Create a Node.js function project in the current directory, choosing the
# directory name as the project's name.
kn func create
// NewCreateCmd creates a create command using the given client creator.
func NewCreateCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "create",
Short: "Create a function",
Long: `
NAME
{{.Name}} create - Create a function
# Create a Quarkus function project in the directory "sample-service".
# The directory will be created in the local directory if non-existent and
# the project is called "sample-service"
kn func create --runtime quarkus myfunc
SYNOPSIS
{{.Name}} create [-l|--language] [-t|--template] [-r|--repository]
[-c|--confirm] [-v|--verbose] [path]
# Create a function project that uses a CloudEvent based function signature
kn func create --trigger events myfunc
`,
SuggestFor: []string{"inti", "new"},
PreRunE: bindEnv("runtime", "templates", "trigger", "confirm"),
RunE: runCreate,
// TODO: autocomplate Functions for runtime and trigger.
}
DESCRIPTION
Creates a new function project.
func runCreate(cmd *cobra.Command, args []string) error {
config := newCreateConfig(args).Prompt()
$ {{.Name}} create -l node
function := bosonFunc.Function{
Name: config.Name,
Root: config.Path,
Runtime: config.Runtime,
Trigger: config.Trigger,
Creates a function in the current directory '.' which is written in the
language/runtime 'node' and handles HTTP events.
If [path] is provided, the function is initialized at that path, creating
the path if necessary.
To complete this command interactively, use --confirm (-c):
$ {{.Name}} create -c
Available Language Runtimes and Templates:
{{ .Options | indent 2 " " | indent 1 "\t" }}
To install more language runtimes and their templates see '{{.Name}} repository'.
EXAMPLES
o Create a Node.js function in the current directory (the default path) which
handles http events (the default template).
$ {{.Name}} create -l node
o Create a Node.js function in the directory 'myfunc'.
$ {{.Name}} create -l node myfunc
o Create a Go function which handles CloudEvents in ./myfunc.
$ {{.Name}} create -l go -t cloudevents myfunc
`,
SuggestFor: []string{"vreate", "creaet", "craete", "new"},
PreRunE: bindEnv("language", "template", "repository", "confirm", "verbose"),
Aliases: []string{"init"},
RunE: func(cmd *cobra.Command, args []string) error {
return runCreate(cmd, args, newClient)
},
}
client := bosonFunc.New(
bosonFunc.WithTemplates(config.Templates),
bosonFunc.WithVerbose(config.Verbose))
// Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
return client.Create(function)
// Flags
cmd.Flags().StringP("language", "l", cfg.Language, "Language Runtime (see help text for list) ($FUNC_LANGUAGE)")
cmd.Flags().StringP("template", "t", fn.DefaultTemplate, "Function template. (see help text for list) ($FUNC_TEMPLATE)")
cmd.Flags().StringP("repository", "r", "", "URI to a Git repository containing the specified template ($FUNC_REPOSITORY)")
addConfirmFlag(cmd, cfg.Confirm)
// TODO: refactor to use --path like all the other commands
addVerboseFlag(cmd, cfg.Verbose)
// Help Action
cmd.SetHelpFunc(func(cmd *cobra.Command, args []string) { runCreateHelp(cmd, args, newClient) })
// Tab completion
if err := cmd.RegisterFlagCompletionFunc("language", newRuntimeCompletionFunc(newClient)); err != nil {
fmt.Fprintf(os.Stderr, "unable to provide language runtime suggestions: %v", err)
}
if err := cmd.RegisterFlagCompletionFunc("template", newTemplateCompletionFunc(newClient)); err != nil {
fmt.Fprintf(os.Stderr, "unable to provide template suggestions: %v", err)
}
return cmd
}
// Run Create
func runCreate(cmd *cobra.Command, args []string, newClient ClientFactory) (err error) {
// Config
// Create a config based on args. Also uses the newClient to create a
// temporary client for completing options such as available runtimes.
cfg, err := newCreateConfig(cmd, args, newClient)
if err != nil {
return
}
// Client
// From environment variables, flags, arguments, and user prompts if --confirm
// (in increasing levels of precedence)
client, done := newClient(
ClientConfig{Verbose: cfg.Verbose},
fn.WithRepository(cfg.Repository))
defer done()
// Validate - a deeper validation than that which is performed when
// instantiating the client with the raw config above.
if err = cfg.Validate(client); err != nil {
return
}
// Create
_, err = client.Init(fn.Function{
Name: cfg.Name,
Root: cfg.Path,
Runtime: cfg.Runtime,
Template: cfg.Template,
})
if err != nil {
return err
}
// Confirm
fmt.Fprintf(cmd.OutOrStderr(), "Created %v function in %v\n", cfg.Runtime, cfg.Path)
return nil
}
type createConfig struct {
// Name of the Function.
Path string // Absolute path to function source
Runtime string // Language Runtime
Repository string // Repository URI (overrides builtin and installed)
Verbose bool // Verbose output
Confirm bool // Confirm values via an interactive prompt
// Template is the code written into the new function project, including
// an implementation adhering to one of the supported function signatures.
// May also include additional configuration settings or examples.
// For example, embedded are 'http' for a function whose function signature
// is invoked via straight HTTP requests, or 'events' for a function which
// will be invoked with CloudEvents. These embedded templates contain a
// minimum implementation of the signature itself and example tests.
Template string
// Name of the function
Name string
// Absolute path to Function on disk.
Path string
// Runtime language/framework.
Runtime string
// Templates is an optional path that, if it exists, will be used as a source
// for additional templates not included in the binary. If not provided
// explicitly as a flag (--templates) or env (FUNC_TEMPLATES), the default
// location is $XDG_CONFIG_HOME/templates ($HOME/.config/func/templates)
Templates string
// Trigger is the form of the resultant Function, i.e. the Function signature
// and contextually avaialable resources. For example 'http' for a Function
// expected to be invoked via straight HTTP requests, or 'events' for a
// Function which will be invoked with CloudEvents.
Trigger string
// Verbose output
Verbose bool
// Confirm: confirm values arrived upon from environment plus flags plus defaults,
// with interactive prompting (only applicable when attached to a TTY).
Confirm bool
}
// newCreateConfig returns a config populated from the current execution context
// (args, flags and environment variables)
func newCreateConfig(args []string) createConfig {
var path string
// The client constructor function is used to create a transient client for
// accessing things like the current valid templates list, and uses the
// current value of the config at time of prompting.
func newCreateConfig(cmd *cobra.Command, args []string, newClient ClientFactory) (cfg createConfig, err error) {
var (
path string
dirName string
absolutePath string
)
if len(args) >= 1 {
path = args[0]
}
// Convert the path to an absolute path, and extract the ending directory name
// as the function name. TODO: refactor to be git-like with no name up-front
// and set instead as a named one-to-many deploy target.
dirName, absolutePath = deriveNameAndAbsolutePathFromPath(path)
// Config is the final default values based off the execution context.
// When prompting, these become the defaults presented.
cfg = createConfig{
Name: dirName, // TODO: refactor to be git-like
Path: absolutePath,
Repository: viper.GetString("repository"),
Runtime: viper.GetString("language"), // users refer to it is language
Template: viper.GetString("template"),
Confirm: viper.GetBool("confirm"),
Verbose: viper.GetBool("verbose"),
}
// If not in confirm/prompting mode, this cfg structure is complete.
if !cfg.Confirm {
return
}
// Create a tempoarary client for use by the following prompts to complete
// runtime/template suggestions etc
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
// IN confirm mode. If also in an interactive terminal, run prompts.
if interactiveTerminal() {
createdCfg, err := cfg.prompt(client)
if err != nil {
return createdCfg, err
}
fmt.Println("Command:")
fmt.Println(singleCommand(cmd, args, createdCfg))
return createdCfg, nil
}
// Confirming, but noninteractive
// Print out the final values as a confirmation. Only show Repository or
// Repositories, not both (repository takes precedence) in order to avoid
// likely confusion if both are displayed and one is empty.
// be removed and both displayed.
fmt.Printf("Path: %v\n", cfg.Path)
fmt.Printf("Language: %v\n", cfg.Runtime) // users refer to it as language
if cfg.Repository != "" { // if an override was provided
fmt.Printf("Repository: %v\n", cfg.Repository) // show only the override
}
fmt.Printf("Template: %v\n", cfg.Template)
return
}
// singleCommand that could be used by the current user to minimally recreate the current state.
func singleCommand(cmd *cobra.Command, args []string, cfg createConfig) string {
var b strings.Builder
b.WriteString(cmd.Root().Name()) // process executable
b.WriteString(" -l " + cfg.Runtime) // language runtime is required
if cmd.Flags().Lookup("template").Changed {
b.WriteString(" -t " + cfg.Template)
}
if cmd.Flags().Lookup("repository").Changed {
b.WriteString(" -r " + cfg.Repository)
}
if cmd.Flags().Lookup("verbose").Changed {
b.WriteString(fmt.Sprintf(" -v %v", cfg.Verbose))
}
if len(args) > 0 {
path = args[0] // If explicitly provided, use.
b.WriteString(" " + cfg.Path) // optional trailing <path> argument
}
return b.String()
}
// Validate the current state of the config, returning any errors.
// Note this is a deeper validation using a client already configured with a
// preliminary config object from flags/config, such that the client instance
// can be used to determine possible values for runtime, templates, etc. a
// pre-client validation should not be required, as the Client does its own
// validation.
func (c createConfig) Validate(client *fn.Client) (err error) {
// Confirm Name is valid
// Note that this is highly constricted, as it must currently adhere to the
// naming of a Knative Service, which itself is constrained to a Kubernetes
// Service, which itself is constrained to a DNS label (a subdomain).
// TODO: refactor to be git-like with no name at time of creation, but rather
// with named deployment targets in a one-to-many configuration.
dirName, _ := deriveNameAndAbsolutePathFromPath(c.Path)
if err = utils.ValidateFunctionName(dirName); err != nil {
return
}
derivedName, derivedPath := deriveNameAndAbsolutePathFromPath(path)
return createConfig{
Name: derivedName,
Path: derivedPath,
Runtime: viper.GetString("runtime"),
Templates: viper.GetString("templates"),
Trigger: viper.GetString("trigger"),
Confirm: viper.GetBool("confirm"),
Verbose: viper.GetBool("verbose"),
// Validate Runtime and Template Name
//
// Perhaps additional validation would be of use here in the CLI, but
// the client libray itself is ultimately responsible for validating all input
// prior to exeuting any requests.
// Client validates both language runtime and template exist, with language runtime
// being a mandatory flag while defaulting template if not present to 'http'.
// However, if either of them are invalid, or the chosen combination does not exist,
// the error message is a rather terse one-liner. This is suitable for libraries, but
// for a CLI it behooves us to be more verbose, including valid options for
// each. So here, we check that the values entered (if any) are both valid
// and valid together.
if c.Runtime == "" {
return noRuntimeError(client)
}
if c.Runtime != "" && c.Repository == "" &&
!isValidRuntime(client, c.Runtime) {
return newInvalidRuntimeError(client, c.Runtime)
}
if c.Template != "" && c.Repository == "" &&
!isValidTemplate(client, c.Runtime, c.Template) {
return newInvalidTemplateError(client, c.Runtime, c.Template)
}
return
}
// isValidRuntime determines if the given language runtime is a valid choice.
func isValidRuntime(client *fn.Client, runtime string) bool {
runtimes, err := client.Runtimes()
if err != nil {
return false
}
for _, v := range runtimes {
if v == runtime {
return true
}
}
return false
}
// isValidTemplate determines if the given template is valid for the given
// runtime.
func isValidTemplate(client *fn.Client, runtime, template string) bool {
if !isValidRuntime(client, runtime) {
return false
}
templates, err := client.Templates().List(runtime)
if err != nil {
return false
}
for _, v := range templates {
if v == template {
return true
}
}
return false
}
// noRuntimeError creates an error stating that the language flag
// is required, and a verbose list of valid options.
func noRuntimeError(client *fn.Client) error {
b := strings.Builder{}
fmt.Fprintf(&b, "Required flag \"language\" not set.\n")
fmt.Fprintln(&b, "Available language runtimes are:")
runtimes, err := client.Runtimes()
if err != nil {
return err
}
for _, v := range runtimes {
fmt.Fprintf(&b, " %v\n", v)
}
return ErrNoRuntime(errors.New(b.String()))
}
// newInvalidRuntimeError creates an error stating that the given language
// is not valid, and a verbose list of valid options.
func newInvalidRuntimeError(client *fn.Client, runtime string) error {
b := strings.Builder{}
fmt.Fprintf(&b, "The language runtime '%v' is not recognized.\n", runtime)
fmt.Fprintln(&b, "Available language runtimes are:")
runtimes, err := client.Runtimes()
if err != nil {
return err
}
for _, v := range runtimes {
fmt.Fprintf(&b, " %v\n", v)
}
return ErrInvalidRuntime(errors.New(b.String()))
}
// newInvalidTemplateError creates an error stating that the given template
// is not available for the given runtime, and a verbose list of valid options.
// The runtime is expected to already have been validated.
func newInvalidTemplateError(client *fn.Client, runtime, template string) error {
b := strings.Builder{}
fmt.Fprintf(&b, "The template '%v' was not found for language runtime '%v'.\n", template, runtime)
fmt.Fprintln(&b, "Available templates for this language runtime are:")
templates, err := client.Templates().List(runtime)
if err != nil {
return err
}
for _, v := range templates {
fmt.Fprintf(&b, " %v\n", v)
}
return ErrInvalidTemplate(errors.New(b.String()))
}
// prompt the user with value of config members, allowing for interactively
// mutating the values. The provided clientFn is used to construct a transient
// client for use during prompt autocompletion/suggestions (such as suggesting
// valid templates)
func (c createConfig) prompt(client *fn.Client) (createConfig, error) {
var qs []*survey.Question
runtimes, err := client.Runtimes()
if err != nil {
return createConfig{}, err
}
// First ask for path...
qs = []*survey.Question{
{
Name: "Path",
Prompt: &survey.Input{
Message: "Function Path:",
Default: c.Path,
},
Validate: func(val interface{}) error {
derivedName, _ := deriveNameAndAbsolutePathFromPath(val.(string))
return utils.ValidateFunctionName(derivedName)
},
Transform: func(ans interface{}) interface{} {
_, absolutePath := deriveNameAndAbsolutePathFromPath(ans.(string))
return absolutePath
},
}, {
Name: "Runtime",
Prompt: &survey.Select{
Message: "Language Runtime:",
Options: runtimes,
Default: surveySelectDefault(c.Runtime, runtimes),
},
}}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}
// Second loop: choose template with autocompletion filtered by chosen runtime
qs = []*survey.Question{
{
Name: "Template",
Prompt: &survey.Input{
Message: "Template:",
Default: c.Template,
Suggest: func(prefix string) []string {
suggestions, err := templatesWithPrefix(prefix, c.Runtime, client)
if err != nil {
fmt.Fprintf(os.Stderr, "unable to suggest: %v", err)
}
return suggestions
},
},
},
}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}
return c, nil
}
// Tab Completion and Prompt Suggestions Helpers
// ---------------------------------------------
type flagCompletionFunc func(*cobra.Command, []string, string) ([]string, cobra.ShellCompDirective)
func newRuntimeCompletionFunc(newClient ClientFactory) flagCompletionFunc {
return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
cfg, err := newCreateConfig(cmd, args, newClient)
if err != nil {
fmt.Fprintf(os.Stderr, "error creating client config for flag completion: %v", err)
}
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
return CompleteRuntimeList(cmd, args, toComplete, client)
}
}
// Prompt the user with value of config members, allowing for interaractive changes.
// Skipped if not in an interactive terminal (non-TTY), or if --confirm false (agree to
// all prompts) was set (default).
func (c createConfig) Prompt() createConfig {
if !interactiveTerminal() || !c.Confirm {
// Just print the basics if not confirming
fmt.Printf("Project path: %v\n", c.Path)
fmt.Printf("Function name: %v\n", c.Name)
fmt.Printf("Runtime: %v\n", c.Runtime)
fmt.Printf("Trigger: %v\n", c.Trigger)
return c
}
derivedName, derivedPath := deriveNameAndAbsolutePathFromPath(prompt.ForString("Project path", c.Path, prompt.WithRequired(true)))
return createConfig{
Name: derivedName,
Path: derivedPath,
Runtime: prompt.ForString("Runtime", c.Runtime),
Trigger: prompt.ForString("Trigger", c.Trigger),
// Templates intentiopnally omitted from prompt for being an edge case.
func newTemplateCompletionFunc(newClient ClientFactory) flagCompletionFunc {
return func(cmd *cobra.Command, args []string, toComplete string) ([]string, cobra.ShellCompDirective) {
cfg, err := newCreateConfig(cmd, args, newClient)
if err != nil {
fmt.Fprintf(os.Stderr, "error creating client config for flag completion: %v", err)
}
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
return CompleteTemplateList(cmd, args, toComplete, client)
}
}
// return templates for language runtime whose full name (including repository)
// have the given prefix.
func templatesWithPrefix(prefix, runtime string, client *fn.Client) ([]string, error) {
var (
suggestions = []string{}
templates, err = client.Templates().List(runtime)
)
if err != nil {
return suggestions, err
}
for _, template := range templates {
if strings.HasPrefix(template, prefix) {
suggestions = append(suggestions, template)
}
}
return suggestions, nil
}
// runCreateHelp prints help for the create command using a template
// and options.
func runCreateHelp(cmd *cobra.Command, args []string, newClient ClientFactory) {
failSoft := func(err error) {
if err != nil {
fmt.Fprintf(cmd.OutOrStderr(), "error: help text may be partial: %v", err)
}
}
tpl := newHelpTemplate(cmd)
cfg, err := newCreateConfig(cmd, args, newClient)
failSoft(err)
client, done := newClient(
ClientConfig{Verbose: cfg.Verbose},
fn.WithRepository(cfg.Repository))
defer done()
options, err := RuntimeTemplateOptions(client) // human-friendly
failSoft(err)
var data = struct {
Options string
Name string
}{
Options: options,
Name: cmd.Root().Use,
}
if err := tpl.Execute(cmd.OutOrStdout(), data); err != nil {
fmt.Fprintf(cmd.ErrOrStderr(), "unable to display help text: %v", err)
}
}
// newHelpTemplate returns a template for the create command's help text
func newHelpTemplate(cmd *cobra.Command) *template.Template {
body := cmd.Long + "\n\n" + cmd.UsageString()
t := template.New("help")
fm := template.FuncMap{
"indent": func(i int, c string, v string) string {
indentation := strings.Repeat(c, i)
return indentation + strings.ReplaceAll(v, "\n", "\n"+indentation)
},
}
t.Funcs(fm)
return template.Must(t.Parse(body))
}
// RuntimeTemplateOptions is a human-friendly table of valid Language Runtime
// to Template combinations.
// Exported for use in docs.
func RuntimeTemplateOptions(client *fn.Client) (string, error) {
runtimes, err := client.Runtimes()
if err != nil {
return "", err
}
builder := strings.Builder{}
writer := tabwriter.NewWriter(&builder, 0, 0, 3, ' ', 0)
fmt.Fprint(writer, "Language\tTemplate\n")
fmt.Fprint(writer, "--------\t--------\n")
for _, r := range runtimes {
templates, err := client.Templates().List(r)
// Not all language packs will have templates for
// all available runtimes. Without this check
if err != nil && !errors.Is(err, fn.ErrTemplateNotFound) {
return "", err
}
for _, t := range templates {
fmt.Fprintf(writer, "%v\t%v\n", r, t) // write tabbed
}
}
writer.Flush()
return builder.String(), nil
}

100
cmd/create_test.go Normal file
View File

@ -0,0 +1,100 @@
package cmd
import (
"errors"
"testing"
. "knative.dev/func/pkg/testing"
"knative.dev/func/pkg/utils"
)
// TestCreate_Execute ensures that an invocation of create with minimal settings
// and valid input completes without error; degenerate case.
func TestCreate_Execute(t *testing.T) {
_ = FromTempDirectory(t)
cmd := NewCreateCmd(NewClient)
cmd.SetArgs([]string{"--language", "go", "myfunc"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
}
// TestCreate_NoRuntime ensures that an invocation of create must be
// done with a runtime.
func TestCreate_NoRuntime(t *testing.T) {
_ = FromTempDirectory(t)
cmd := NewCreateCmd(NewClient)
cmd.SetArgs([]string{"myfunc"}) // Do not use test command args
err := cmd.Execute()
var e ErrNoRuntime
if !errors.As(err, &e) {
t.Fatalf("Did not receive ErrNoRuntime. Got %v", err)
}
}
// TestCreate_WithNoRuntime ensures that an invocation of create must be
// done with one of the valid runtimes only.
func TestCreate_WithInvalidRuntime(t *testing.T) {
_ = FromTempDirectory(t)
cmd := NewCreateCmd(NewClient)
cmd.SetArgs([]string{"--language", "invalid", "myfunc"})
err := cmd.Execute()
var e ErrInvalidRuntime
if !errors.As(err, &e) {
t.Fatalf("Did not receive ErrInvalidRuntime. Got %v", err)
}
}
// TestCreate_InvalidTemplate ensures that an invocation of create must be
// done with one of the valid templates only.
func TestCreate_InvalidTemplate(t *testing.T) {
_ = FromTempDirectory(t)
cmd := NewCreateCmd(NewClient)
cmd.SetArgs([]string{"--language", "go", "--template", "invalid", "myfunc"})
err := cmd.Execute()
var e ErrInvalidTemplate
if !errors.As(err, &e) {
t.Fatalf("Did not receive ErrInvalidTemplate. Got %v", err)
}
}
// TestCreate_ValidatesName ensures that the create command only accepts
// DNS-1123 labels for function name.
func TestCreate_ValidatesName(t *testing.T) {
_ = FromTempDirectory(t)
// Execute the command with a function name containing invalid characters and
// confirm the expected error is returned
cmd := NewCreateCmd(NewClient)
cmd.SetArgs([]string{"invalid!"})
err := cmd.Execute()
var e utils.ErrInvalidFunctionName
if !errors.As(err, &e) {
t.Fatalf("Did not receive ErrInvalidFunctionName. Got %v", err)
}
}
// TestCreate_ConfigOptional ensures that the system can be used without
// any additional configuration being required.
func TestCreate_ConfigOptional(t *testing.T) {
_ = FromTempDirectory(t)
t.Setenv("XDG_CONFIG_HOME", t.TempDir())
cmd := NewCreateCmd(NewClient)
cmd.SetArgs([]string{"--language=go", "myfunc"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Not failing is success. Config files or settings beyond what are
// automatically written to to the given config home are currently optional.
}

View File

@ -3,108 +3,156 @@ package cmd
import (
"fmt"
"github.com/AlecAivazis/survey/v2"
"github.com/ory/viper"
"github.com/spf13/cobra"
bosonFunc "github.com/boson-project/func"
"github.com/boson-project/func/knative"
"github.com/boson-project/func/prompt"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
)
func init() {
root.AddCommand(deleteCmd)
deleteCmd.Flags().BoolP("confirm", "c", false, "Prompt to confirm all configuration options (Env: $FUNC_CONFIRM)")
deleteCmd.Flags().StringP("path", "p", cwd(), "Path to the function project that should be undeployed (Env: $FUNC_PATH)")
deleteCmd.Flags().StringP("namespace", "n", "", "Namespace of the function to undeploy. By default, the namespace in func.yaml is used or the actual active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)")
}
func NewDeleteCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "delete <name>",
Short: "Undeploy a function",
Long: `Undeploy a function
var deleteCmd = &cobra.Command{
Use: "delete [NAME]",
Short: "Undeploy a function",
Long: `Undeploy a function
This command undeploys a function from the cluster. By default the function from
the project in the current directory is undeployed. Alternatively either the name
This command undeploys a function from the cluster. By default the function from
the project in the current directory is undeployed. Alternatively either the name
of the function can be given as argument or the project path provided with --path.
No local files are deleted.
`,
Example: `
Example: `
# Undeploy the function defined in the local directory
kn func delete
{{rootCmdUse}} delete
# Undeploy the function 'myfunc' in namespace 'apps'
kn func delete -n apps myfunc
{{rootCmdUse}} delete myfunc --namespace apps
`,
SuggestFor: []string{"remove", "rm", "del"},
ValidArgsFunction: CompleteFunctionList,
PreRunE: bindEnv("path", "confirm", "namespace"),
RunE: runDelete,
SuggestFor: []string{"remove", "del"},
Aliases: []string{"rm"},
ValidArgsFunction: CompleteFunctionList,
PreRunE: bindEnv("path", "confirm", "all", "namespace", "verbose"),
SilenceUsage: true, // no usage dump on error
RunE: func(cmd *cobra.Command, args []string) error {
return runDelete(cmd, args, newClient)
},
}
// Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Flags
cmd.Flags().StringP("namespace", "n", defaultNamespace(fn.Function{}, false), "The namespace when deleting by name. ($FUNC_NAMESPACE)")
cmd.Flags().StringP("all", "a", "true", "Delete all resources created for a function, eg. Pipelines, Secrets, etc. ($FUNC_ALL) (allowed values: \"true\", \"false\")")
addConfirmFlag(cmd, cfg.Confirm)
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
func runDelete(cmd *cobra.Command, args []string) (err error) {
config := newDeleteConfig(args).Prompt()
function, err := bosonFunc.NewFunction(config.Path)
func runDelete(cmd *cobra.Command, args []string, newClient ClientFactory) (err error) {
cfg, err := newDeleteConfig(cmd, args)
if err != nil {
return
}
// Check if the Function has been initialized
if !function.Initialized() {
return fmt.Errorf("the given path '%v' does not contain an initialized function", config.Path)
}
ns := config.Namespace
if ns == "" {
ns = function.Namespace
}
remover, err := knative.NewRemover(ns)
if err != nil {
if cfg, err = cfg.Prompt(); err != nil {
return
}
remover.Verbose = config.Verbose
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
client := bosonFunc.New(
bosonFunc.WithVerbose(config.Verbose),
bosonFunc.WithRemover(remover))
return client.Remove(cmd.Context(), function)
if cfg.Name != "" { // Delete by name if provided
return client.Remove(cmd.Context(), cfg.Name, cfg.Namespace, fn.Function{}, cfg.All)
} else { // Otherwise; delete the function at path (cwd by default)
f, err := fn.NewFunction(cfg.Path)
if err != nil {
return err
}
return client.Remove(cmd.Context(), "", "", f, cfg.All)
}
}
type deleteConfig struct {
Name string
Namespace string
Path string
All bool
Verbose bool
}
// newDeleteConfig returns a config populated from the current execution context
// (args, flags and environment variables)
func newDeleteConfig(args []string) deleteConfig {
func newDeleteConfig(cmd *cobra.Command, args []string) (cfg deleteConfig, err error) {
var name string
if len(args) > 0 {
name = args[0]
}
return deleteConfig{
Path: viper.GetString("path"),
cfg = deleteConfig{
All: viper.GetBool("all"),
Name: name, // args[0] or derived
Namespace: viper.GetString("namespace"),
Name: deriveName(name, viper.GetString("path")), // args[0] or derived
Verbose: viper.GetBool("verbose"), // defined on root
Path: viper.GetString("path"),
Verbose: viper.GetBool("verbose"), // defined on root
}
if cfg.Name == "" && cmd.Flags().Changed("namespace") {
// logicially inconsistent to supply only a namespace.
// Either use the function's local state in its entirety, or specify
// both a name and a namespace to ignore any local function source.
err = fmt.Errorf("must also specify a name when specifying namespace")
}
if cfg.Name != "" && cmd.Flags().Changed("path") {
// logically inconsistent to provide both a name and a path to source.
// Either use the function's local state on disk (--path), or specify
// a name and a namespace to ignore any local function source.
err = fmt.Errorf("only one of --path and [NAME] should be provided")
}
return
}
// Prompt the user with value of config members, allowing for interaractive changes.
// Skipped if not in an interactive terminal (non-TTY), or if --yes (agree to
// all prompts) was explicitly set.
func (c deleteConfig) Prompt() deleteConfig {
func (c deleteConfig) Prompt() (deleteConfig, error) {
if !interactiveTerminal() || !viper.GetBool("confirm") {
return c
return c, nil
}
return deleteConfig{
// TODO: Path should be prompted for and set prior to name attempting path derivation. Test/fix this if necessary.
Name: prompt.ForString("Function to remove", deriveName(c.Name, c.Path), prompt.WithRequired(true)),
dc := c
var qs = []*survey.Question{
{
Name: "name",
Prompt: &survey.Input{
Message: "Function to remove:",
Default: deriveName(c.Name, c.Path)},
Validate: survey.Required,
},
{
Name: "all",
Prompt: &survey.Confirm{
Message: "Do you want to delete all resources?",
Default: c.All,
},
},
}
answers := struct {
Name string
All bool
}{}
err := survey.Ask(qs, &answers)
if err != nil {
return dc, err
}
dc.Name = answers.Name
dc.All = answers.All
return dc, err
}

320
cmd/delete_test.go Normal file
View File

@ -0,0 +1,320 @@
package cmd
import (
"context"
"os"
"testing"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/mock"
. "knative.dev/func/pkg/testing"
)
// TestDelete_Default ensures that the deployed function is deleted correctly
// with default options and the default situation: running "delete" from
// within the same directory of the function which is to be deleted.
func TestDelete_Default(t *testing.T) {
var (
err error
root = FromTempDirectory(t)
name = "myfunc"
namespace = "testns"
remover = mock.NewRemover()
ctx = context.Background()
)
// Remover which confirms the name and namespace received are those
// originally requested via the CLI flags.
remover.RemoveFn = func(n, ns string) error {
if n != name {
t.Errorf("expected name '%v', got '%v'", name, n)
}
if ns != namespace {
t.Errorf("expected namespace '%v', got '%v'", namespace, ns)
}
return nil
}
// A function which will be created in the requested namespace
f := fn.Function{
Runtime: "go",
Name: name,
Namespace: namespace,
Root: root,
Registry: TestRegistry,
}
if _, f, err = fn.New().New(ctx, f); err != nil {
t.Fatal(err)
}
if err = f.Write(); err != nil {
t.Fatal(err)
}
cmd := NewDeleteCmd(NewTestClient(fn.WithRemover(remover)))
cmd.SetArgs([]string{})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Fail if remover's .Remove not invoked at all
if !remover.RemoveInvoked {
t.Fatal("fn.Remover not invoked")
}
}
// TestDelete_ByName ensures that running delete specifying the name of the
// function explicitly as an argument invokes the remover appropriately.
func TestDelete_ByName(t *testing.T) {
var (
root = FromTempDirectory(t)
testname = "testname" // explicit name for the function
testnamespace = "testnamespace" // explicit namespace for the function
remover = mock.NewRemover() // with a mock remover
err error
)
// Remover fails the test if it receives the incorrect name
remover.RemoveFn = func(n, _ string) error {
if n != testname {
t.Fatalf("expected delete name %v, got %v", testname, n)
}
return nil
}
f := fn.Function{
Root: root,
Runtime: "go",
Registry: TestRegistry,
Name: "testname",
}
if f, err = fn.New().Init(f); err != nil {
t.Fatal(err)
}
// simulate deployed function in namespace for the client Remover
f.Deploy.Namespace = testnamespace
if err = f.Write(); err != nil {
t.Fatal(err)
}
// Create a command with a client constructor fn that instantiates a client
// with a mocked remover.
cmd := NewDeleteCmd(NewTestClient(fn.WithRemover(remover)))
cmd.SetArgs([]string{testname}) // run: func delete <name>
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Fail if remover's .Remove not invoked at all
if !remover.RemoveInvoked {
t.Fatal("fn.Remover not invoked")
}
}
// TestDelete_Namespace ensures that remover is envoked when --namespace flag is
// given --> func delete myfunc --namespace myns
func TestDelete_Namespace(t *testing.T) {
var (
namespace = "myns"
remover = mock.NewRemover()
testname = "testname"
)
remover.RemoveFn = func(_, ns string) error {
if ns != namespace {
t.Fatalf("expected delete namespace '%v', got '%v'", namespace, ns)
}
return nil
}
cmd := NewDeleteCmd(NewTestClient(fn.WithRemover(remover)))
cmd.SetArgs([]string{testname, "--namespace", namespace})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
if !remover.RemoveInvoked {
t.Fatal("remover was not invoked")
}
}
// TestDelete_NamespaceFlagPriority ensures that even thought there is
// a deployed function the namespace flag takes precedence and essentially
// ignores the the function on disk
func TestDelete_NamespaceFlagPriority(t *testing.T) {
var (
root = FromTempDirectory(t)
namespace = "myns"
namespace2 = "myns2"
remover = mock.NewRemover()
testname = "testname"
err error
)
remover.RemoveFn = func(_, ns string) error {
if ns != namespace2 {
t.Fatalf("expected delete namespace '%v', got '%v'", namespace2, ns)
}
return nil
}
// Ensure the extant function's namespace is used
f := fn.Function{
Name: testname,
Root: root,
Runtime: "go",
Registry: TestRegistry,
Namespace: namespace,
}
client := fn.New()
_, _, err = client.New(context.Background(), f)
if err != nil {
t.Fatal(err)
}
cmd := NewDeleteCmd(NewTestClient(fn.WithRemover(remover)))
cmd.SetArgs([]string{testname, "--namespace", namespace2})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
if !remover.RemoveInvoked {
t.Fatal("remover was not invoked")
}
}
// TestDelete_NamespaceWithoutNameFails ensures that providing wrong argument
// combination fails nice and fast (no name of the Function)
func TestDelete_NamespaceWithoutNameFails(t *testing.T) {
_ = FromTempDirectory(t)
cmd := NewDeleteCmd(NewTestClient())
cmd.SetArgs([]string{"--namespace=myns"})
if err := cmd.Execute(); err == nil {
t.Fatal("invoking Delete with namespace BUT without name provided anywhere")
}
}
// TestDelete_ByProject ensures that running delete with a valid project as its
// context invokes remove and with the correct name (reads name from func.yaml)
func TestDelete_ByProject(t *testing.T) {
_ = FromTempDirectory(t)
// Write a func.yaml config which specifies a name
funcYaml := `name: bar
namespace: "func"
runtime: go
image: ""
builder: quay.io/boson/faas-go-builder
builders:
default: quay.io/boson/faas-go-builder
envs: []
annotations: {}
labels: []
created: 2021-01-01T00:00:00+00:00
`
if err := os.WriteFile("func.yaml", []byte(funcYaml), 0600); err != nil {
t.Fatal(err)
}
// A mock remover which fails if the name from the func.yaml is not received.
remover := mock.NewRemover()
remover.RemoveFn = func(n, _ string) error {
if n != "bar" {
t.Fatalf("expected name 'bar', got '%v'", n)
}
return nil
}
// Command with a Client constructor that returns client with the
// mocked remover.
cmd := NewDeleteCmd(NewTestClient(fn.WithRemover(remover)))
cmd.SetArgs([]string{}) // Do not use test command args
// Execute the command simulating no arguments.
err := cmd.Execute()
if err != nil {
t.Fatal(err)
}
// Also fail if remover's .Remove is not invoked
if !remover.RemoveInvoked {
t.Fatal("fn.Remover not invoked")
}
}
// TestDelete_ByPath ensures that providing only path deletes the Function
// successfully
func TestDelete_ByPath(t *testing.T) {
var (
// A mock remover which will be sampled to ensure it is not invoked.
remover = mock.NewRemover()
root = FromTempDirectory(t)
err error
namespace = "func"
)
// Ensure the extant function's namespace is used
f := fn.Function{
Root: root,
Runtime: "go",
Registry: TestRegistry,
Deploy: fn.DeploySpec{Namespace: namespace},
}
// Initialize a function in temp dir
if f, err = fn.New().Init(f); err != nil {
t.Fatal(err)
}
if err = f.Write(); err != nil {
t.Fatal(err)
}
// Command with a Client constructor using the mock remover.
cmd := NewDeleteCmd(NewTestClient(fn.WithRemover(remover)))
// Execute the command only with the path argument
cmd.SetArgs([]string{"-p", root})
err = cmd.Execute()
if err != nil {
t.Fatalf("failed with: %v", err)
}
// Also fail if remover's .Remove is not invoked.
if !remover.RemoveInvoked {
t.Fatal("fn.Remover not invoked despite valid argument")
}
}
// TestDelete_NameAndPathExclusivity ensures that providing both a name and a
// path generates an error.
// Providing the --path (-p) flag indicates the name of the function to delete
// is to be taken from the function at the given path. Providing the name as
// an argument as well is therefore redundant and an error.
func TestDelete_NameAndPathExclusivity(t *testing.T) {
// A mock remover which will be sampled to ensure it is not invoked.
remover := mock.NewRemover()
// Command with a Client constructor using the mock remover.
cmd := NewDeleteCmd(NewTestClient(fn.WithRemover(remover)))
// Execute the command simulating the invalid argument combination of both
// a path and an explicit name.
cmd.SetArgs([]string{"-p", "./testpath", "testname"})
err := cmd.Execute()
if err == nil {
// TODO should really either parse the output or use typed errors to ensure it's
// failing for the expected reason.
t.Fatalf("expected error on conflicting flags not received")
}
// Also fail if remover's .Remove is invoked.
if remover.RemoveInvoked {
t.Fatal("fn.Remover invoked despite invalid combination and an error")
}
}

File diff suppressed because it is too large Load Diff

2244
cmd/deploy_test.go Normal file

File diff suppressed because it is too large Load Diff

View File

@ -3,6 +3,7 @@ package cmd
import (
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io"
"os"
@ -11,73 +12,86 @@ import (
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
bosonFunc "github.com/boson-project/func"
"github.com/boson-project/func/knative"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
)
func init() {
root.AddCommand(describeCmd)
describeCmd.Flags().StringP("namespace", "n", "", "Namespace of the function. By default, the namespace in func.yaml is used or the actual active namespace if not set in the configuration. (Env: $FUNC_NAMESPACE)")
describeCmd.Flags().StringP("output", "o", "human", "Output format (human|plain|json|xml|yaml) (Env: $FUNC_OUTPUT)")
describeCmd.Flags().StringP("path", "p", cwd(), "Path to the project directory (Env: $FUNC_PATH)")
func NewDescribeCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "describe <name>",
Short: "Describe a function",
Long: `Describe a function
err := describeCmd.RegisterFlagCompletionFunc("output", CompleteOutputFormatList)
if err != nil {
fmt.Println("internal: error while calling RegisterFlagCompletionFunc: ", err)
}
}
var describeCmd = &cobra.Command{
Use: "describe <name>",
Short: "Show details of a function",
Long: `Show details of a function
Prints the name, route and any event subscriptions for a deployed function in
Prints the name, route and event subscriptions for a deployed function in
the current directory or from the directory specified with --path.
`,
Example: `
Example: `
# Show the details of a function as declared in the local func.yaml
kn func describe
{{rootCmdUse}} describe
# Show the details of the function in the myotherfunc directory with yaml output
kn func describe --output yaml --path myotherfunc
# Show the details of the function in the directory with yaml output
{{rootCmdUse}} describe --output yaml --path myotherfunc
`,
SuggestFor: []string{"desc", "get"},
ValidArgsFunction: CompleteFunctionList,
PreRunE: bindEnv("namespace", "output", "path"),
RunE: runDescribe,
SuggestFor: []string{"ifno", "fino", "get"},
ValidArgsFunction: CompleteFunctionList,
Aliases: []string{"info", "desc"},
PreRunE: bindEnv("output", "path", "namespace", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runDescribe(cmd, args, newClient)
},
}
// Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Flags
cmd.Flags().StringP("output", "o", "human", "Output format (human|plain|json|xml|yaml|url) ($FUNC_OUTPUT)")
cmd.Flags().StringP("namespace", "n", defaultNamespace(fn.Function{}, false), "The namespace in which to look for the named function. ($FUNC_NAMESPACE)")
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
if err := cmd.RegisterFlagCompletionFunc("output", CompleteOutputFormatList); err != nil {
fmt.Println("internal: error while calling RegisterFlagCompletionFunc: ", err)
}
return cmd
}
func runDescribe(cmd *cobra.Command, args []string) (err error) {
config := newDescribeConfig(args)
function, err := bosonFunc.NewFunction(config.Path)
func runDescribe(cmd *cobra.Command, args []string, newClient ClientFactory) (err error) {
cfg, err := newDescribeConfig(cmd, args)
if err != nil {
return
}
// TODO cfg.Prompt()
// Check if the Function has been initialized
if !function.Initialized() {
return fmt.Errorf("the given path '%v' does not contain an initialized function", config.Path)
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
var details fn.Instance
if cfg.Name != "" { // Describe by name if provided
details, err = client.Describe(cmd.Context(), cfg.Name, cfg.Namespace, fn.Function{})
if err != nil {
return err
}
} else {
f, err := fn.NewFunction(cfg.Path)
if err != nil {
return err
}
if !f.Initialized() {
return errors.New("function not found at this path and no name provided")
}
details, err = client.Describe(cmd.Context(), "", "", f)
if err != nil {
return err
}
}
describer, err := knative.NewDescriber(config.Namespace)
if err != nil {
return
}
describer.Verbose = config.Verbose
client := bosonFunc.New(
bosonFunc.WithVerbose(config.Verbose),
bosonFunc.WithDescriber(describer))
d, err := client.Describe(config.Name, config.Path)
if err != nil {
return
}
d.Image = function.Image
write(os.Stdout, description(d), config.Output)
write(os.Stdout, info(details), cfg.Output)
return
}
@ -92,75 +106,105 @@ type describeConfig struct {
Verbose bool
}
func newDescribeConfig(args []string) describeConfig {
func newDescribeConfig(cmd *cobra.Command, args []string) (cfg describeConfig, err error) {
var name string
if len(args) > 0 {
name = args[0]
}
return describeConfig{
Name: deriveName(name, viper.GetString("path")),
cfg = describeConfig{
Name: name,
Namespace: viper.GetString("namespace"),
Output: viper.GetString("output"),
Path: viper.GetString("path"),
Verbose: viper.GetBool("verbose"),
}
if cfg.Name == "" && cmd.Flags().Changed("namespace") {
// logicially inconsistent to supply only a namespace.
// Either use the function's local state in its entirety, or specify
// both a name and a namespace to ignore any local function source.
err = fmt.Errorf("must also specify a name when specifying namespace")
}
if cfg.Name != "" && cmd.Flags().Changed("path") {
// logically inconsistent to provide both a name and a path to source.
// Either use the function's local state on disk (--path), or specify
// a name and a namespace to ignore any local function source.
err = fmt.Errorf("only one of --path and [NAME] should be provided")
}
return
}
// Output Formatting (serializers)
// -------------------------------
type description bosonFunc.Description
type info fn.Instance
func (d description) Human(w io.Writer) error {
func (i info) Human(w io.Writer) error {
fmt.Fprintln(w, "Function name:")
fmt.Fprintf(w, " %v\n", d.Name)
fmt.Fprintf(w, " %v\n", i.Name)
fmt.Fprintln(w, "Function is built in image:")
fmt.Fprintf(w, " %v\n", d.Image)
fmt.Fprintln(w, "Function is deployed as Knative Service:")
fmt.Fprintf(w, " %v\n", d.KService)
fmt.Fprintf(w, " %v\n", i.Image)
fmt.Fprintln(w, "Function is deployed in namespace:")
fmt.Fprintf(w, " %v\n", d.Namespace)
fmt.Fprintf(w, " %v\n", i.Namespace)
fmt.Fprintln(w, "Routes:")
for _, route := range d.Routes {
for _, route := range i.Routes {
fmt.Fprintf(w, " %v\n", route)
}
if len(d.Subscriptions) > 0 {
if len(i.Subscriptions) > 0 {
fmt.Fprintln(w, "Subscriptions (Source, Type, Broker):")
for _, s := range d.Subscriptions {
for _, s := range i.Subscriptions {
fmt.Fprintf(w, " %v %v %v\n", s.Source, s.Type, s.Broker)
}
}
return nil
}
func (d description) Plain(w io.Writer) error {
fmt.Fprintf(w, "Name %v\n", d.Name)
fmt.Fprintf(w, "Image %v\n", d.Image)
fmt.Fprintf(w, "Knative Service %v\n", d.KService)
fmt.Fprintf(w, "Namespace %v\n", d.Namespace)
for _, route := range d.Routes {
fmt.Fprintf(w, "Route %v\n", route)
}
if len(d.Subscriptions) > 0 {
for _, s := range d.Subscriptions {
fmt.Fprintf(w, "Subscription %v %v %v\n", s.Source, s.Type, s.Broker)
if len(i.Labels) > 0 {
fmt.Fprintln(w, "Labels:")
for k, v := range i.Labels {
fmt.Fprintf(w, " %v: %v\n", k, v)
}
}
return nil
}
func (d description) JSON(w io.Writer) error {
return json.NewEncoder(w).Encode(d)
func (i info) Plain(w io.Writer) error {
fmt.Fprintf(w, "Name %v\n", i.Name)
fmt.Fprintf(w, "Image %v\n", i.Image)
fmt.Fprintf(w, "Namespace %v\n", i.Namespace)
for _, route := range i.Routes {
fmt.Fprintf(w, "Route %v\n", route)
}
if len(i.Subscriptions) > 0 {
for _, s := range i.Subscriptions {
fmt.Fprintf(w, "Subscription %v %v %v\n", s.Source, s.Type, s.Broker)
}
}
if len(i.Labels) > 0 {
for k, v := range i.Labels {
fmt.Fprintf(w, "Label %v %v\n", k, v)
}
}
return nil
}
func (d description) XML(w io.Writer) error {
return xml.NewEncoder(w).Encode(d)
func (i info) JSON(w io.Writer) error {
return json.NewEncoder(w).Encode(i)
}
func (d description) YAML(w io.Writer) error {
return yaml.NewEncoder(w).Encode(d)
func (i info) XML(w io.Writer) error {
return xml.NewEncoder(w).Encode(i)
}
func (i info) YAML(w io.Writer) error {
return yaml.NewEncoder(w).Encode(i)
}
func (i info) URL(w io.Writer) error {
if len(i.Routes) > 0 {
fmt.Fprintf(w, "%s\n", i.Routes[0])
}
return nil
}

135
cmd/describe_test.go Normal file
View File

@ -0,0 +1,135 @@
package cmd
import (
"context"
"strings"
"testing"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/mock"
. "knative.dev/func/pkg/testing"
)
// TestDescribe_Default ensures that running describe when there is no
// function in the given directory fails correctly.
func TestDescribe_Default(t *testing.T) {
_ = FromTempDirectory(t)
describer := mock.NewDescriber()
cmd := NewDescribeCmd(NewTestClient(fn.WithDescriber(describer)))
cmd.SetArgs([]string{})
err := cmd.Execute()
if err == nil {
t.Fatal("describing a nonexistent function should error")
}
if !strings.Contains(err.Error(), "function not found at this path and no name provided") {
t.Fatalf("Unexpected error text returned: %v", err)
}
if describer.DescribeInvoked {
t.Fatal("Describer incorrectly invoked")
}
}
// TestDescribe_Undeployed ensures that describing a function which exists,
// but has not been deployed, does not error but rather delegates to the
// deployer which will presumably describe it as being !deployed (See deployer
// test suite)
func TestDescribe_Undeployed(t *testing.T) {
root := FromTempDirectory(t)
client := fn.New()
_, err := client.Init(fn.Function{
Name: "testfunc",
Runtime: "go",
Registry: TestRegistry,
Root: root,
})
if err != nil {
t.Fatal(err)
}
describer := mock.NewDescriber()
cmd := NewDescribeCmd(NewTestClient(fn.WithDescriber(describer)))
cmd.SetArgs([]string{})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
if !describer.DescribeInvoked {
t.Fatal("Describer should have been invoked for any initialized function")
}
}
// TestDescribe_ByName ensures that describing a function by name invokes
// the describer appropriately.
func TestDescribe_ByName(t *testing.T) {
var (
testname = "testname"
describer = mock.NewDescriber()
)
describer.DescribeFn = func(_ context.Context, name, namespace string) (fn.Instance, error) {
if name != testname {
t.Fatalf("expected describe name '%v', got '%v'", testname, name)
}
return fn.Instance{}, nil
}
cmd := NewDescribeCmd(NewTestClient(fn.WithDescriber(describer)))
cmd.SetArgs([]string{testname})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
if !describer.DescribeInvoked {
t.Fatal("Describer not invoked")
}
}
// TestDescribe_ByProject ensures that describing the currently active project
// (func created in the current working directory) invokes the describer with
// its name correctly.
func TestDescribe_ByProject(t *testing.T) {
root := FromTempDirectory(t)
expected := "testname"
_, err := fn.New().Init(fn.Function{
Name: expected,
Runtime: "go",
Registry: TestRegistry,
Root: root,
})
if err != nil {
t.Fatal(err)
}
describer := mock.NewDescriber()
describer.DescribeFn = func(_ context.Context, name, namespace string) (i fn.Instance, err error) {
if name != expected {
t.Fatalf("expected describer to receive name %q, got %q", expected, name)
}
return
}
cmd := NewDescribeCmd(NewTestClient(fn.WithDescriber(describer)))
cmd.SetArgs([]string{})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
}
// TestDescribe_NameAndPathExclusivity ensures that providing both a name
// and a path will generate an error.
func TestDescribe_NameAndPathExclusivity(t *testing.T) {
d := mock.NewDescriber()
cmd := NewDescribeCmd(NewTestClient(fn.WithDescriber(d)))
cmd.SetArgs([]string{"-p", "./testpath", "testname"})
if err := cmd.Execute(); err == nil {
// TODO(lkingland): use a typed error
t.Fatalf("expected error on conflicting flags not received")
}
if d.DescribeInvoked {
t.Fatal("describer was invoked when conflicting flags were provided")
}
}

222
cmd/environment.go Normal file
View File

@ -0,0 +1,222 @@
package cmd
import (
"context"
"encoding/json"
"fmt"
"os"
"strings"
"github.com/ory/viper"
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
"knative.dev/func/pkg/builders/buildpacks"
"knative.dev/func/pkg/builders/s2i"
"knative.dev/func/pkg/config"
"knative.dev/func/pkg/functions"
"knative.dev/func/pkg/k8s"
"knative.dev/func/pkg/pipelines/tekton"
)
var format string = "json"
func NewEnvironmentCmd(newClient ClientFactory, version *Version) *cobra.Command {
cmd := &cobra.Command{
Use: "environment",
Short: "Display function execution environment information",
Long: `
NAME
{{rootCmdUse}} environment - display function execution environment information
SYNOPSIS
{{rootCmdUse}} environment [-f|--format] [-v|--verbose] [-p|--path]
DESCRIPTION
Display information about the function execution environment, including
the version of func, the version of the function spec, the default builder,
available runtimes, and available templates.
`,
PreRunE: bindEnv("verbose", "format", "path"),
RunE: func(cmd *cobra.Command, args []string) error {
return runEnvironment(cmd, newClient, version)
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
cmd.Flags().StringP("format", "f", format, "Format of output environment information, 'json' or 'yaml'. ($FUNC_FORMAT)")
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
type Environment struct {
Version string
GitRevision string
SpecVersion string
SocatImage string
TarImage string
FuncUtilsImage string
DeployerImage string
ScaffoldImage string
S2IImage string
Languages []string
DefaultImageBuilders map[string]map[string]string
Templates map[string][]string
Environment []string
Cluster string
Defaults config.Global
Function *functions.Function `json:",omitempty" yaml:",omitempty"`
Instance *functions.Instance `json:",omitempty" yaml:",omitempty"`
}
func runEnvironment(cmd *cobra.Command, newClient ClientFactory, v *Version) (err error) {
cfg, err := newEnvironmentConfig()
if err != nil {
return
}
// Create a client to get runtimes and templates
client := functions.New(functions.WithVerbose(cfg.Verbose))
r, err := getRuntimes(client)
if err != nil {
return
}
t, err := getTemplates(client, r)
if err != nil {
return
}
// Get all environment variables that start with FUNC_
var envs []string
for _, e := range os.Environ() {
if strings.HasPrefix(e, "FUNC_") {
envs = append(envs, e)
}
}
// If no environment variables are set, make sure we return an empty array
// otherwise the output is "null" instead of "[]"
if len(envs) == 0 {
envs = make([]string, 0)
}
// Get global defaults
defaults, err := config.NewDefault()
if err != nil {
return
}
// Gets the cluster host
var host string
cc, err := k8s.GetClientConfig().ClientConfig()
if err != nil {
fmt.Printf("error getting client config %v\n", err)
} else {
host = cc.Host
}
//Get default image builders
builderimagesdefault := make(map[string]map[string]string)
builderimagesdefault["s2i"] = s2i.DefaultBuilderImages
builderimagesdefault["buildpacks"] = buildpacks.DefaultBuilderImages
environment := Environment{
Version: v.String(),
GitRevision: v.Hash,
SpecVersion: functions.LastSpecVersion(),
SocatImage: k8s.SocatImage,
TarImage: k8s.TarImage,
FuncUtilsImage: tekton.FuncUtilImage,
DeployerImage: tekton.DeployerImage,
ScaffoldImage: tekton.ScaffoldImage,
S2IImage: tekton.S2IImage,
Languages: r,
DefaultImageBuilders: builderimagesdefault,
Templates: t,
Environment: envs,
Cluster: host,
Defaults: defaults,
}
function, instance := describeFuncInformation(cmd.Context(), newClient, cfg)
if function != nil {
environment.Function = function
}
if instance != nil {
environment.Instance = instance
}
var s []byte
switch cfg.Format {
case "json":
s, err = json.MarshalIndent(environment, "", " ")
case "yaml":
s, err = yaml.Marshal(&environment)
default:
err = fmt.Errorf("unsupported format: %s", cfg.Format)
}
if err != nil {
return err
}
fmt.Fprintln(cmd.OutOrStdout(), string(s))
return nil
}
func getRuntimes(client *functions.Client) ([]string, error) {
runtimes, err := client.Runtimes()
if err != nil {
return nil, err
}
return runtimes, nil
}
func getTemplates(client *functions.Client, runtimes []string) (map[string][]string, error) {
templateMap := make(map[string][]string)
for _, runtime := range runtimes {
templates, err := client.Templates().List(runtime)
if err != nil {
return nil, err
}
templateMap[runtime] = templates
}
return templateMap, nil
}
func describeFuncInformation(context context.Context, newClient ClientFactory, cfg environmentConfig) (*functions.Function, *functions.Instance) {
function, err := functions.NewFunction(cfg.Path)
if err != nil || !function.Initialized() {
return nil, nil
}
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
instance, err := client.Describe(context, function.Name, function.Deploy.Namespace, function)
if err != nil {
return &function, nil
}
return &function, &instance
}
type environmentConfig struct {
Verbose bool
Format string
Path string
}
func newEnvironmentConfig() (cfg environmentConfig, err error) {
cfg = environmentConfig{
Verbose: viper.GetBool("verbose"),
Format: viper.GetString("format"),
Path: viper.GetString("path"),
}
return
}

View File

@ -3,7 +3,6 @@ package cmd
import (
"fmt"
"io"
"os"
)
type Format string
@ -14,6 +13,7 @@ const (
JSON = "json" // Technically a ⊆ yaml, but no one likes yaml.
XML = "xml"
YAML = "yaml"
URL = "url"
)
// formatter is any structure which has methods for serialization.
@ -23,6 +23,7 @@ type Formatter interface {
JSON(io.Writer) error
XML(io.Writer) error
YAML(io.Writer) error
URL(io.Writer) error
}
// write to the output the output of the formatter's appropriate serilization function.
@ -40,11 +41,12 @@ func write(out io.Writer, s Formatter, formatName string) {
err = s.XML(out)
case YAML:
err = s.YAML(out)
case URL:
err = s.URL(out)
default:
err = fmt.Errorf("format not recognized: %v\n", formatName)
err = fmt.Errorf("format not recognized: %v", formatName)
}
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(2)
panic(err)
}
}

202
cmd/func-util/main.go Normal file
View File

@ -0,0 +1,202 @@
//go:build exclude_graphdriver_btrfs || !cgo
// +build exclude_graphdriver_btrfs !cgo
package main
import (
"context"
"flag"
"fmt"
"os"
"os/signal"
"path/filepath"
"slices"
"syscall"
"golang.org/x/sys/unix"
"github.com/openshift/source-to-image/pkg/cmd/cli"
"k8s.io/klog/v2"
"knative.dev/func/pkg/builders/s2i"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/k8s"
"knative.dev/func/pkg/knative"
"knative.dev/func/pkg/scaffolding"
"knative.dev/func/pkg/tar"
)
func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
go func() {
<-sigs
cancel()
<-sigs // second sigint/sigterm is treated as sigkill
os.Exit(137)
}()
var cmd = unknown
switch filepath.Base(os.Args[0]) {
case "deploy":
cmd = deploy
case "scaffold":
cmd = scaffold
case "s2i":
cmd = s2iCmd
case "socat":
cmd = socat
case "sh":
cmd = sh
case "s2i-generate":
cmd = s2iGenerate
}
err := cmd(ctx)
if err != nil {
_, _ = fmt.Fprintf(os.Stderr, "ERROR: %s\n", err)
os.Exit(1)
}
}
func unknown(_ context.Context) error {
return fmt.Errorf("unknown command: %q", os.Args[0])
}
func socat(ctx context.Context) error {
cmd := newSocatCmd()
cmd.SetContext(ctx)
return cmd.Execute()
}
func scaffold(ctx context.Context) error {
if len(os.Args) != 2 {
return fmt.Errorf("expected exactly one positional argument (function project path)")
}
path := os.Args[1]
f, err := fn.NewFunction(path)
if err != nil {
return fmt.Errorf("cannot load func project: %w", err)
}
if f.Runtime != "go" && f.Runtime != "python" {
// Scaffolding is for now supported/needed only for Go.
return nil
}
embeddedRepo, err := fn.NewRepository("", "")
if err != nil {
return fmt.Errorf("cannot initialize repository: %w", err)
}
appRoot := filepath.Join(f.Root, ".s2i", "builds", "last")
_ = os.RemoveAll(appRoot)
err = scaffolding.Write(appRoot, f.Root, f.Runtime, f.Invoke, embeddedRepo.FS())
if err != nil {
return fmt.Errorf("cannot write the scaffolding: %w", err)
}
if err := os.MkdirAll(filepath.Join(f.Root, ".s2i", "bin"), 0755); err != nil {
return fmt.Errorf("unable to create .s2i bin dir. %w", err)
}
var asm string
switch f.Runtime {
case "go":
asm = s2i.GoAssembler
case "python":
asm = s2i.PythonAssembler
default:
panic("unreachable")
}
if err := os.WriteFile(filepath.Join(f.Root, ".s2i", "bin", "assemble"), []byte(asm), 0755); err != nil {
return fmt.Errorf("unable to write go assembler. %w", err)
}
return nil
}
func s2iCmd(ctx context.Context) error {
klog.InitFlags(flag.CommandLine)
cmd := cli.CommandFor()
cmd.SetContext(ctx)
return cmd.Execute()
}
func deploy(ctx context.Context) error {
var err error
deployer := knative.NewDeployer(
knative.WithDeployerVerbose(true),
knative.WithDeployerDecorator(deployDecorator{}))
var root string
if len(os.Args) > 1 {
root = os.Args[1]
} else {
root, err = os.Getwd()
if err != nil {
return fmt.Errorf("cannot determine working directory: %w", err)
}
}
f, err := fn.NewFunction(root)
if err != nil {
return fmt.Errorf("cannot load function: %w", err)
}
if len(os.Args) > 2 {
f.Deploy.Image = os.Args[2]
}
if f.Deploy.Image == "" {
f.Deploy.Image = f.Image
}
res, err := deployer.Deploy(ctx, f)
if err != nil {
return fmt.Errorf("cannont deploy the function: %w", err)
}
fmt.Printf("function has been deployed\n%+v\n", res)
return nil
}
type deployDecorator struct {
oshDec k8s.OpenshiftMetadataDecorator
}
func (d deployDecorator) UpdateAnnotations(function fn.Function, annotations map[string]string) map[string]string {
if k8s.IsOpenShift() {
return d.oshDec.UpdateAnnotations(function, annotations)
}
return annotations
}
func (d deployDecorator) UpdateLabels(function fn.Function, labels map[string]string) map[string]string {
if k8s.IsOpenShift() {
return d.oshDec.UpdateLabels(function, labels)
}
return labels
}
func sh(ctx context.Context) error {
if !slices.Equal(os.Args[1:], []string{"-c", "umask 0000 && exec tar -xmf -"}) {
return fmt.Errorf("this is a fake sh (only for backward compatiblility purposes)")
}
wd, err := os.Getwd()
if err != nil {
return fmt.Errorf("cannot get working directory: %w", err)
}
unix.Umask(0)
return tar.Extract(os.Stdin, wd)
}

View File

@ -0,0 +1,143 @@
//go:build exclude_graphdriver_btrfs || !cgo
// +build exclude_graphdriver_btrfs !cgo
package main
import (
"context"
"fmt"
"net/url"
"os"
"path/filepath"
"strings"
"github.com/openshift/source-to-image/pkg/api"
"github.com/openshift/source-to-image/pkg/build"
"github.com/openshift/source-to-image/pkg/build/strategies"
"github.com/openshift/source-to-image/pkg/scm/git"
"github.com/spf13/cobra"
fn "knative.dev/func/pkg/functions"
)
func s2iGenerate(ctx context.Context) error {
cmd := newS2IGenerateCmd()
err := cmd.ExecuteContext(ctx)
if err != nil {
return fmt.Errorf("cannot s2i generate: %w", err)
}
return nil
}
type genConfig struct {
target string
pathContext string
builderImage string
registry string
imageScriptUrl string
logLevel string
envVars []string
}
func newS2IGenerateCmd() *cobra.Command {
var config genConfig
genCmd := &cobra.Command{
RunE: func(cmd *cobra.Command, args []string) error {
config.envVars = args
return runS2IGenerate(cmd.Context(), config)
},
}
genCmd.Flags().StringVar(&config.target, "target", "/gen-source", "")
genCmd.Flags().StringVar(&config.pathContext, "path-context", ".", "")
genCmd.Flags().StringVar(&config.builderImage, "builder-image", "", "")
genCmd.Flags().StringVar(&config.registry, "registry", "", "")
genCmd.Flags().StringVar(&config.imageScriptUrl, "image-script-url", "image:///usr/libexec/s2i", "")
genCmd.Flags().StringVar(&config.logLevel, "log-level", "0", "")
return genCmd
}
func runS2IGenerate(ctx context.Context, c genConfig) error {
wd, err := os.Getwd()
if err != nil {
return fmt.Errorf("cannot get working directory: %w", err)
}
funcRoot := filepath.Join(wd, c.pathContext)
// replace registry in func.yaml
f, err := fn.NewFunction(funcRoot)
if err != nil {
return fmt.Errorf("cannot load function: %w", err)
}
f.Registry = c.registry
err = f.Write()
if err != nil {
return fmt.Errorf("cannot write function: %w", err)
}
// append node_modules into .s2iignore
s2iIgnorePath := filepath.Join(funcRoot, ".s2iignore")
if fi, _ := os.Stat(s2iIgnorePath); fi != nil {
var file *os.File
file, err = os.OpenFile(s2iIgnorePath, os.O_APPEND|os.O_WRONLY, 0644)
if err != nil {
return fmt.Errorf("cannot open s2i ignore file for append: %w", err)
}
defer func(file *os.File) {
_ = file.Close()
}(file)
_, err = file.Write([]byte("\nnode_modules"))
if err != nil {
return fmt.Errorf("cannot append node_modules directory to s2i ignore file: %w", err)
}
}
// prepare envvars
var envs = make([]api.EnvironmentSpec, 0, len(c.envVars))
for _, e := range c.envVars {
var es api.EnvironmentSpec
part := strings.SplitN(e, "=", 2)
switch len(part) {
case 1:
es.Name = part[0]
case 2:
es.Name = part[0]
es.Value = part[1]
default:
continue
}
if es.Name != "" {
envs = append(envs, es)
}
}
s2iConfig := api.Config{
Source: &git.URL{
URL: url.URL{Path: funcRoot},
Type: git.URLTypeLocal,
},
BuilderImage: c.builderImage,
ImageScriptsURL: c.imageScriptUrl,
KeepSymlinks: true,
Environment: envs,
AsDockerfile: filepath.Join(c.target, "Dockerfile.gen"),
}
builder, _, err := strategies.Strategy(nil, &s2iConfig, build.Overrides{})
if err != nil {
return fmt.Errorf("cannot create builder: %w", err)
}
_, err = builder.Build(&s2iConfig)
if err != nil {
return fmt.Errorf("cannot build: %w", err)
}
return nil
}

141
cmd/func-util/socat.go Normal file
View File

@ -0,0 +1,141 @@
package main
import (
"fmt"
"io"
"net"
"os"
"strings"
"github.com/spf13/cobra"
"golang.org/x/sync/errgroup"
)
func newSocatCmd() *cobra.Command {
var (
uniDir bool
dbg string
)
cmd := cobra.Command{
Use: "socat [-u] <address> <address>",
Short: "Minimalistic socat.",
Long: `Minimalistic socat.
Implements only TCP, OPEN and stdio ("-") addresses with no options.
Only supported flag is -u.`,
Args: cobra.ExactArgs(2),
RunE: func(cmd *cobra.Command, args []string) error {
stdio := rwc{
ReadCloser: cmd.InOrStdin().(io.ReadCloser),
WriteCloser: cmd.OutOrStdout().(io.WriteCloser),
}
left, err := createConnection(args[0], stdio)
if err != nil {
return err
}
defer left.Close()
right, err := createConnection(args[1], stdio)
if err != nil {
return err
}
defer right.Close()
return connect(left, right, uniDir)
},
}
cmd.Flags().BoolVarP(&uniDir, "unidirect", "u", false, "unidirectional mode (left to right)")
cmd.Flags().StringVarP(&dbg, "debug", "d", "", "log level (this flag is present only for compatibility and has no effect)")
return &cmd
}
func createConnection(address string, stdio connection) (connection, error) {
if address == "-" {
return stdio, nil
}
parts := strings.SplitN(address, ":", 2)
if len(parts) != 2 {
return nil, fmt.Errorf("cannot parse address: %q", address)
}
typ := strings.ToLower(parts[0])
parts = strings.Split(parts[1], ",")
if len(parts) > 1 {
_, _ = fmt.Fprintf(os.Stderr, "ignored options: %q\n", parts[1])
}
addr := parts[0]
switch typ {
case "tcp", "tcp4", "tcp6":
_, _ = fmt.Fprintln(os.Stderr, "opening connection")
var laddr net.TCPAddr
raddr, err := net.ResolveTCPAddr(typ, addr)
if err != nil {
return nil, fmt.Errorf("name does not resolve: %w", err)
}
conn, err := net.DialTCP(typ, &laddr, raddr)
if err == nil {
_, _ = fmt.Fprintf(os.Stderr, "successfully connected to %v\n", raddr)
}
return conn, err
case "open":
return os.OpenFile(addr, os.O_RDWR, 0644)
default:
return nil, fmt.Errorf("unsupported address: %q", address)
}
}
func connect(left, right connection, uniDir bool) error {
g := errgroup.Group{}
g.SetLimit(2)
if !uniDir {
g.Go(func() error {
_, err := io.Copy(left, right)
tryCloseWriteSide(left)
return err
})
}
g.Go(func() error {
_, err := io.Copy(right, left)
tryCloseWriteSide(right)
return err
})
return g.Wait()
}
type connection interface {
io.Reader
io.Writer
io.Closer
}
type writeCloser interface {
CloseWrite() error
}
type rwc struct {
io.ReadCloser
io.WriteCloser
}
func (r rwc) Close() error {
err := r.WriteCloser.Close()
if err != nil {
return err
}
return r.ReadCloser.Close()
}
func (r rwc) CloseWrite() error {
return r.WriteCloser.Close()
}
func tryCloseWriteSide(c connection) {
if wc, ok := c.(writeCloser); ok {
err := wc.CloseWrite()
if err != nil {
fmt.Fprintf(os.Stderr, "waring: cannot close write side: %+v\n", err)
}
}
}

226
cmd/func-util/socat_test.go Normal file
View File

@ -0,0 +1,226 @@
package main
import (
"bytes"
"errors"
"io"
"net"
"os"
"path/filepath"
"strings"
"testing"
)
func TestRootCmd(t *testing.T) {
/* Begin prepare TCP server and the files */
addr := startTCPEcho(t)
const testData = "file-content\n"
tmpDir := t.TempDir()
inputFile := filepath.Join(tmpDir, "a.txt")
err := os.WriteFile(inputFile, []byte(testData), 0644)
if err != nil {
t.Fatal(err)
}
outputFile := filepath.Join(tmpDir, "b.txt")
err = os.WriteFile(outputFile, []byte{}, 0644)
if err != nil {
t.Fatal(err)
}
/* End prepare TCP server and the files */
type matcher = func(string) bool
contains := func(pattern string) func(string) bool {
return func(s string) bool { return strings.Contains(s, pattern) }
}
equalsTo := func(pattern string) func(string) bool {
return func(s string) bool { return s == pattern }
}
type args struct {
args []string
inputString string
outMatcher matcher
errOutMatcher matcher
outFileMatcher matcher
wantErr bool
}
tests := []struct {
name string
args args
}{
{
name: "stdio<->tcp",
args: args{
args: []string{"-", "TCP:" + addr},
inputString: testData,
outMatcher: equalsTo(testData),
},
},
{
name: "tcp<->stdio",
args: args{
args: []string{"TCP:" + addr, "-"},
inputString: testData,
outMatcher: equalsTo(testData),
},
},
{
name: "tcp-no-such-host",
args: args{
args: []string{"-", "TCP:does.not.exist:10000"},
inputString: "tcp-echo",
errOutMatcher: contains("not resolve"),
wantErr: true,
},
},
{
name: "file->stdio",
args: args{
args: []string{"-u", "OPEN:" + inputFile, "-"},
inputString: "",
outMatcher: equalsTo(testData),
},
},
{
name: "stdio->file",
args: args{
args: []string{"-u", "-", "OPEN:" + outputFile},
inputString: testData,
outFileMatcher: equalsTo(testData),
},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
var out, errOut bytes.Buffer
stdout := &testWriter{Writer: &out}
stderr := &testWriter{Writer: &errOut}
cmd := newSocatCmd()
cmd.SetIn(io.NopCloser(strings.NewReader(tt.args.inputString)))
cmd.SetOut(stdout)
cmd.SetErr(stderr)
cmd.SetArgs(tt.args.args)
err = cmd.Execute()
if err != nil && !tt.args.wantErr {
t.Error(err)
t.Logf("errOut: %q", errOut.String())
}
if err == nil && tt.args.wantErr {
t.Error("expected error but got nil")
}
if tt.args.outMatcher != nil && !tt.args.outMatcher(out.String()) {
t.Error("bad standard output")
}
if tt.args.errOutMatcher != nil && !tt.args.errOutMatcher(errOut.String()) {
t.Error("bad standard error output")
}
if tt.args.outFileMatcher != nil {
bs, e := os.ReadFile(outputFile)
if e != nil {
t.Fatal(e)
}
if !tt.args.outFileMatcher(string(bs)) {
t.Error("bad content of the output file")
}
}
})
}
}
type testWriter struct {
io.Writer
}
func (n *testWriter) Close() error {
return nil
}
func startTCPEcho(t *testing.T) (addr string) {
l, err := net.Listen("tcp", "localhost:0")
if err != nil {
t.Fatal(err)
}
addr = l.Addr().String()
go func() {
for {
conn, err := l.Accept()
if err != nil {
if errors.Is(err, net.ErrClosed) {
return
}
panic(err)
}
go func(conn net.Conn) {
defer conn.Close()
_, err = io.Copy(conn, conn)
if err != nil {
panic(err)
}
}(conn)
}
}()
t.Cleanup(func() {
l.Close()
})
return addr
}
func TestNewRootCmdWithPipe(t *testing.T) {
addr := startTCPEcho(t)
r, stdOut, err := os.Pipe()
if err != nil {
t.Fatal(err)
}
stdIn, w, err := os.Pipe()
if err != nil {
t.Fatal(err)
}
var data = []byte("testing data")
go func() {
var err error
_, err = w.Write(data)
if err != nil {
t.Error(err)
}
err = w.Close()
if err != nil {
t.Error(err)
}
}()
go func() {
var err error
var errBuff bytes.Buffer
cmd := newSocatCmd()
cmd.SetIn(stdIn)
cmd.SetOut(stdOut)
cmd.SetErr(&errBuff)
cmd.SetArgs([]string{"-dd", "-", "TCP:" + addr})
err = cmd.Execute()
if err != nil {
t.Error(err)
}
}()
bs, e := io.ReadAll(r)
if e != nil {
t.Error(e)
}
t.Log(string(data))
if !bytes.Equal(data, bs) {
t.Errorf("bad data: %q", string(bs))
}
}

View File

@ -1,32 +1,7 @@
package main
import (
"context"
"github.com/boson-project/func/cmd"
"os"
"os/signal"
"syscall"
)
// Statically-populated build metadata set
// by `make build`.
var date, vers, hash string
import "knative.dev/func/pkg/app"
func main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
sigs := make(chan os.Signal, 1)
signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM)
go func() {
<-sigs
cancel()
// second sigint/sigterm is treated as sigkill
<-sigs
os.Exit(137)
}()
cmd.SetMeta(date, vers, hash)
cmd.Execute(ctx)
app.Main()
}

421
cmd/invoke.go Normal file
View File

@ -0,0 +1,421 @@
package cmd
import (
"fmt"
"os"
"strings"
"github.com/AlecAivazis/survey/v2"
"github.com/ory/viper"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/utils"
)
func NewInvokeCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "invoke",
Short: "Invoke a local or remote function",
Long: `
NAME
{{rootCmdUse}} invoke - test a function by invoking it with test data
SYNOPSIS
{{rootCmdUse}} invoke [-t|--target] [-f|--format]
[--id] [--source] [--type] [--data] [--file] [--content-type]
[-s|--save] [-p|--path] [-i|--insecure] [-c|--confirm] [-v|--verbose]
DESCRIPTION
Invokes the function by sending a test request to the currently running
function instance, either locally or remote. If the function is running
both locally and remote, the local instance will be invoked. This behavior
can be manually overridden using the --target flag.
Functions are invoked with a test data structure consisting of five values:
id: A unique identifier for the request.
source: A sender name for the request (sender).
type: A type for the request.
data: Data (content) for this request.
content-type: The MIME type of the value contained in 'data'.
The values of these parameters can be individually altered from their defaults
using their associated flags. Data can also be provided from a file using the
--file flag.
Invocation Target
The function instance to invoke can be specified using the --target flag
which accepts the values "local", "remote", or <URL>. By default the
local function instance is chosen if running (see {{rootCmdUse}} run).
To explicitly target the remote (deployed) function:
{{rootCmdUse}} invoke --target=remote
To target an arbitrary endpoint, provide a URL:
{{rootCmdUse}} invoke --target=https://myfunction.example.com
Invocation Data
Providing a filename in the --file flag will base64 encode its contents
as the "data" parameter sent to the function. The value of --content-type
should be set to the type from the source file. For example, the following
would send a JPEG base64 encoded in the "data" POST parameter:
{{rootCmdUse}} invoke --file=example.jpeg --content-type=image/jpeg
Message Format
By default functions are sent messages which match the invocation format
of the template they were created using; for example "http" or "cloudevent".
To override this behavior, use the --format (-f) flag.
{{rootCmdUse}} invoke -f=cloudevent -t=http://my-sink.my-cluster
EXAMPLES
o Invoke the default (local or remote) running function with default values
$ {{rootCmdUse}} invoke
o Run the function locally and then invoke it with a test request:
(run in two terminals or by running the first in the background)
$ {{rootCmdUse}} run
$ {{rootCmdUse}} invoke
o Deploy and then invoke the remote function:
$ {{rootCmdUse}} deploy
$ {{rootCmdUse}} invoke
o Invoke a remote (deployed) function when it is already running locally:
(overrides the default behavior of preferring locally running instances)
$ {{rootCmdUse}} invoke --target=remote
o Specify the data to send to the function as a flag
$ {{rootCmdUse}} invoke --data="Hello World!"
o Send a JPEG to the function
$ {{rootCmdUse}} invoke --file=example.jpeg --content-type=image/jpeg
o Invoke an arbitrary endpoint (HTTP POST)
$ {{rootCmdUse}} invoke --target="https://my-http-handler.example.com"
o Invoke an arbitrary endpoint (CloudEvent)
$ {{rootCmdUse}} invoke -f=cloudevent -t="https://my-event-broker.example.com"
o Allow insecure server connections when using SSL
$ {{rootCmdUse}} invoke --insecure
o In case you need to specifically send GET request
$ {{rootCmdUse}} invoke --request-type=GET
`,
SuggestFor: []string{"emit", "emti", "send", "emit", "exec", "nivoke",
"onvoke", "unvoke", "knvoke", "imvoke", "ihvoke", "ibvoke"},
PreRunE: bindEnv("path", "format", "target", "id", "source", "type",
"data", "content-type", "request-type", "file", "insecure",
"confirm", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runInvoke(cmd, args, newClient)
},
}
// Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Flags
cmd.Flags().StringP("format", "f", "", "Format of message to send, 'http' or 'cloudevent'. Default is to choose automatically. ($FUNC_FORMAT)")
cmd.Flags().StringP("target", "t", "", "Function instance to invoke. Can be 'local', 'remote' or a URL. Defaults to auto-discovery if not provided. ($FUNC_TARGET)")
cmd.Flags().StringP("id", "", "", "ID for the request data. ($FUNC_ID)")
cmd.Flags().StringP("source", "", fn.DefaultInvokeSource, "Source value for the request data. ($FUNC_SOURCE)")
cmd.Flags().StringP("type", "", fn.DefaultInvokeType, "Type value for the request data. ($FUNC_TYPE)")
cmd.Flags().StringP("content-type", "", fn.DefaultInvokeContentType, "Content Type of the data. ($FUNC_CONTENT_TYPE)")
cmd.Flags().StringP("request-type", "", fn.DefaultInvokeRequestType, "Type of request to use. Can be POST or GET. ($FUNC_REQUEST_TYPE)")
cmd.Flags().StringP("data", "", fn.DefaultInvokeData, "Data to send in the request. ($FUNC_DATA)")
cmd.Flags().StringP("file", "", "", "Path to a file to use as data. Overrides --data flag and should be sent with a correct --content-type. ($FUNC_FILE)")
cmd.Flags().BoolP("insecure", "i", false, "Allow insecure server connections when using SSL. ($FUNC_INSECURE)")
addConfirmFlag(cmd, cfg.Confirm)
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
// Run
func runInvoke(cmd *cobra.Command, _ []string, newClient ClientFactory) (err error) {
// Gather flag values for the invocation
cfg, err := newInvokeConfig()
if err != nil {
return
}
// Load the function
f, err := fn.NewFunction(cfg.Path)
if err != nil {
return
}
if err = f.Validate(); err != nil {
fmt.Printf("error validating function at '%v'. %v\n", f.Root, err)
return err
}
if !f.Initialized() {
return fn.NewErrNotInitialized(f.Root)
}
// Client instance from env vars, flags, args and user prompts (if --confirm)
client, done := newClient(ClientConfig{Verbose: cfg.Verbose, InsecureSkipVerify: cfg.Insecure})
defer done()
// Message to send the running function built from parameters gathered
// from the user (or defaults)
m := fn.InvokeMessage{
ID: cfg.ID,
Source: cfg.Source,
Type: cfg.Type,
ContentType: cfg.ContentType,
RequestType: strings.ToUpper(cfg.RequestType),
Data: cfg.Data,
Format: cfg.Format,
}
// If --file was specified, use its content for message data
if cfg.File != "" {
content, err := os.ReadFile(cfg.File)
if err != nil {
return err
}
m.Data = content
}
// Invoke
metadata, body, err := client.Invoke(cmd.Context(), cfg.Path, cfg.Target, m)
if err != nil {
return err
}
// When Verbose
// - Print an explicit "Received response" indicator
// - Print metadata (headers for HTTP requests, CloudEvents already include
// metadata in their data value.
if cfg.Verbose {
// Print a "Received response" message because a simple echo to
// stdout could be confusing on a first-time run, viewing a proper echo.
// user feedback suggests this actually be placed behind the --verbose
// setting:
fmt.Println("Function invoked. Response:")
if len(metadata) > 0 {
fmt.Println(" Metadata:")
}
for k, vv := range metadata {
values := strings.Join(vv, ";")
fmt.Fprintf(cmd.OutOrStdout(), " %v: %v\n", k, values)
}
if len(metadata) > 0 {
fmt.Println(" Content:")
}
}
// Always print the response's default stringification
// Note body already includes a linebreak.
fmt.Fprint(cmd.OutOrStdout(), body)
return
}
type invokeConfig struct {
Path string
Target string
Format string
ID string
Source string
Type string
Data []byte
ContentType string
RequestType string
File string
Confirm bool
Verbose bool
Insecure bool
}
func newInvokeConfig() (cfg invokeConfig, err error) {
cfg = invokeConfig{
Path: viper.GetString("path"),
Target: viper.GetString("target"),
Format: viper.GetString("format"),
ID: viper.GetString("id"),
Source: viper.GetString("source"),
Type: viper.GetString("type"),
Data: []byte(viper.GetString("data")),
ContentType: viper.GetString("content-type"),
RequestType: viper.GetString("request-type"),
File: viper.GetString("file"),
Confirm: viper.GetBool("confirm"),
Verbose: viper.GetBool("verbose"),
Insecure: viper.GetBool("insecure"),
}
// If file was passed, read it in as data
if cfg.File != "" {
b, err := os.ReadFile(cfg.File)
if err != nil {
return cfg, err
}
cfg.Data = b
}
// if not in confirm/prompting mode, the cfg structure is complete.
if !cfg.Confirm {
return
}
// If in interactive terminal mode, prompt to modify defaults.
if interactiveTerminal() {
return cfg.prompt()
}
// Confirming, but noninteractive, is essentially a selective verbose mode
// which prints out the effective values of config as a confirmation.
fmt.Printf("Path: %v\n", cfg.Path)
fmt.Printf("Target: %v\n", cfg.Target)
fmt.Printf("ID: %v\n", cfg.ID)
fmt.Printf("Source: %v\n", cfg.Source)
fmt.Printf("Type: %v\n", cfg.Type)
fmt.Printf("Data: %v\n", cfg.Data)
fmt.Printf("Content Type: %v\n", cfg.ContentType)
fmt.Printf("File: %v\n", cfg.File)
fmt.Printf("Insecure: %v\n", cfg.Insecure)
return
}
func (c invokeConfig) prompt() (invokeConfig, error) {
var qs []*survey.Question
// First get path to effective function
qs = []*survey.Question{
{
Name: "Path",
Prompt: &survey.Input{
Message: "Function Path:",
Default: c.Path,
},
Validate: func(val interface{}) error {
if val.(string) != "" {
derivedName, _ := deriveNameAndAbsolutePathFromPath(val.(string))
return utils.ValidateFunctionName(derivedName)
}
return nil
},
Transform: func(ans interface{}) interface{} {
if ans.(string) != "" {
_, absolutePath := deriveNameAndAbsolutePathFromPath(ans.(string))
return absolutePath
}
return ""
},
},
}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}
formatOptions := []string{"", "http", "cloudevent"}
qs = []*survey.Question{
{
Name: "Target",
Prompt: &survey.Input{
Message: "(Optional) Target ('local', 'remote' or URL). If not provided, local will be preferred over remote.",
Default: "",
},
},
{
Name: "Format",
Prompt: &survey.Select{
Message: "(Optional) Format Override",
Options: formatOptions,
Default: surveySelectDefault(c.Format, formatOptions),
},
},
}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}
// Prompt for the next set of values, with defaults set first by the function
// as it exists on disk, followed by environment variables, and finally flags.
// user interactive prompts therefore are the last applied, and thus highest
// precedence values.
qs = []*survey.Question{
{
Name: "ID",
Prompt: &survey.Input{
Message: "Data ID",
Default: c.ID,
},
}, {
Name: "Source",
Prompt: &survey.Input{
Message: "Data Source",
Default: c.Source,
},
}, {
Name: "Type",
Prompt: &survey.Input{
Message: "Data Type",
Default: c.Type,
},
}, {
Name: "File",
Prompt: &survey.Input{
Message: "(Optional) Load Data Content from File",
Default: c.File,
},
},
}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}
// If the user did not specify a file for data content, prompt for it
if c.File == "" {
qs = []*survey.Question{
{
Name: "Data",
Prompt: &survey.Input{
Message: "Data Content",
Default: string(c.Data),
},
},
}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}
}
// Finally, allow mutation of the data content type.
contentTypeMessage := "Content type of data"
if c.File != "" {
contentTypeMessage = "Content type of file"
}
qs = []*survey.Question{
{
Name: "ContentType",
Prompt: &survey.Input{
Message: contentTypeMessage,
Default: c.ContentType,
},
},
}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}
qs = []*survey.Question{
{
Name: "Insecure",
Prompt: &survey.Confirm{
Message: "Allow insecure server connections when using SSL",
Default: c.Insecure,
},
},
}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}
return c, nil
}

80
cmd/invoke_test.go Normal file
View File

@ -0,0 +1,80 @@
package cmd
import (
"context"
"errors"
"fmt"
"net"
"net/http"
"os"
"sync/atomic"
"testing"
"time"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/mock"
. "knative.dev/func/pkg/testing"
)
// TestInvoke command executes the invocation path.
func TestInvoke(t *testing.T) {
root := FromTempDirectory(t)
var invoked int32
// Create a test function to be invoked
if _, err := fn.New().Init(fn.Function{Runtime: "go", Root: root}); err != nil {
t.Fatal(err)
}
// Mock Runner
// Starts a service which sets invoked=1 on any request
runner := mock.NewRunner()
runner.RunFn = func(ctx context.Context, f fn.Function, _ string, _ time.Duration) (job *fn.Job, err error) {
var (
l net.Listener
h = http.NewServeMux()
s = http.Server{Handler: h}
)
if l, err = net.Listen("tcp4", "127.0.0.1:"); err != nil {
t.Fatal(err)
}
h.HandleFunc("/", func(res http.ResponseWriter, req *http.Request) {
atomic.StoreInt32(&invoked, 1)
_, _ = res.Write([]byte("invoked"))
})
go func() {
if err = s.Serve(l); err != nil && !errors.Is(err, http.ErrServerClosed) {
fmt.Fprintf(os.Stderr, "error serving: %v", err)
}
}()
host, port, _ := net.SplitHostPort(l.Addr().String())
errs := make(chan error, 10)
stop := func() error { _ = s.Close(); return nil }
return fn.NewJob(f, host, port, errs, stop, false)
}
// Run the mock http service function interloper
f, err := fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
client := fn.New(fn.WithRunner(runner))
job, err := client.Run(context.Background(), f)
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() { _ = job.Stop() })
// Test that the invoke command invokes
cmd := NewInvokeCmd(NewClient)
cmd.SetArgs([]string{})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
if atomic.LoadInt32(&invoked) != 1 {
t.Fatal("function was not invoked")
}
}

117
cmd/languages.go Normal file
View File

@ -0,0 +1,117 @@
package cmd
import (
"encoding/json"
"fmt"
"github.com/ory/viper"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
)
func NewLanguagesCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "languages",
Short: "List available function language runtimes",
Long: `
NAME
{{rootCmdUse}} languages - list available language runtimes.
SYNOPSIS
{{rootCmdUse}} languages [--json] [-r|--repository]
DESCRIPTION
List the language runtimes that are currently available.
This includes embedded (included) language runtimes as well as any installed
via the 'repositories add' command.
To specify a URI of a single, specific repository for which languages
should be displayed, use the --repository flag.
Installed repositories are by default located at ~/.func/repositories
($XDG_CONFIG_HOME/.func/repositories). This can be overridden with
$FUNC_REPOSITORIES_PATH.
To see templates available for a given language, see the 'templates' command.
EXAMPLES
o Show a list of all available language runtimes
$ {{rootCmdUse}} languages
o Return a list of all language runtimes in JSON
$ {{rootCmdUse}} languages --json
o Return language runtimes in a specific repository
$ {{rootCmdUse}} languages --repository=https://github.com/boson-project/templates
`,
SuggestFor: []string{"language", "runtime", "runtimes", "lnaguages", "languagse",
"panguages", "manguages", "kanguages", "lsnguages", "lznguages"},
PreRunE: bindEnv("json", "repository", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runLanguages(cmd, newClient)
},
}
// Global Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
cmd.Flags().BoolP("json", "", false, "Set output to JSON format. ($FUNC_JSON)")
cmd.Flags().StringP("repository", "r", "", "URI to a specific repository to consider ($FUNC_REPOSITORY)")
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
func runLanguages(cmd *cobra.Command, newClient ClientFactory) (err error) {
cfg, err := newLanguagesConfig()
if err != nil {
return
}
client, done := newClient(
ClientConfig{Verbose: cfg.Verbose},
fn.WithRepository(cfg.Repository))
defer done()
runtimes, err := client.Runtimes()
if err != nil {
return
}
if cfg.JSON {
var s []byte
s, err = json.MarshalIndent(runtimes, "", " ")
if err != nil {
return
}
fmt.Fprintln(cmd.OutOrStdout(), string(s))
} else {
for _, runtime := range runtimes {
fmt.Fprintln(cmd.OutOrStdout(), runtime)
}
}
return
}
type languagesConfig struct {
Verbose bool
Repository string // Consider only a specific repository (URI)
JSON bool // output as JSON
}
func newLanguagesConfig() (cfg languagesConfig, err error) {
cfg = languagesConfig{
Verbose: viper.GetBool("verbose"),
Repository: viper.GetString("repository"),
JSON: viper.GetBool("json"),
}
return
}

60
cmd/languages_test.go Normal file
View File

@ -0,0 +1,60 @@
package cmd
import (
"testing"
. "knative.dev/func/pkg/testing"
)
// TestLanguages_Default ensures that the default behavior of listing
// all supported languages is to print a plain text list of all the builtin
// language runtimes.
func TestLanguages_Default(t *testing.T) {
_ = FromTempDirectory(t)
buf := piped(t) // gather output
cmd := NewLanguagesCmd(NewClient)
cmd.SetArgs([]string{})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
expected := `go
node
python
quarkus
rust
springboot
typescript`
output := buf()
if output != expected {
t.Fatalf("expected:\n'%v'\ngot:\n'%v'\n", expected, output)
}
}
// TestLanguages_JSON ensures that listing languages in --json format returns
// builtin languages as a JSON array.
func TestLanguages_JSON(t *testing.T) {
_ = FromTempDirectory(t)
buf := piped(t) // gather output
cmd := NewLanguagesCmd(NewClient)
cmd.SetArgs([]string{"--json"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
expected := `[
"go",
"node",
"python",
"quarkus",
"rust",
"springboot",
"typescript"
]`
output := buf()
if output != expected {
t.Fatalf("expected:\n%v\ngot:\n%v\n", expected, output)
}
}

View File

@ -3,6 +3,7 @@ package cmd
import (
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io"
"os"
@ -12,75 +13,96 @@ import (
"github.com/spf13/cobra"
"gopkg.in/yaml.v2"
bosonFunc "github.com/boson-project/func"
"github.com/boson-project/func/knative"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
)
func init() {
root.AddCommand(listCmd)
listCmd.Flags().BoolP("all-namespaces", "A", false, "List functions in all namespaces. If set, the --namespace flag is ignored.")
listCmd.Flags().StringP("namespace", "n", "", "Namespace to search for functions. By default, the functions of the actual active namespace are listed. (Env: $FUNC_NAMESPACE)")
listCmd.Flags().StringP("output", "o", "human", "Output format (human|plain|json|xml|yaml) (Env: $FUNC_OUTPUT)")
err := listCmd.RegisterFlagCompletionFunc("output", CompleteOutputFormatList)
if err != nil {
fmt.Println("internal: error while calling RegisterFlagCompletionFunc: ", err)
}
}
func NewListCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "list",
Short: "List deployed functions",
Long: `List deployed functions
var listCmd = &cobra.Command{
Use: "list",
Short: "List functions",
Long: `List functions
Lists all deployed functions in a given namespace.
Lists deployed functions.
`,
Example: `
Example: `
# List all functions in the current namespace with human readable output
kn func list
{{rootCmdUse}} list
# List all functions in the 'test' namespace with yaml output
kn func list --namespace test --output yaml
{{rootCmdUse}} list --namespace test --output yaml
# List all functions in all namespaces with JSON output
kn func list --all-namespaces --output json
{{rootCmdUse}} list --all-namespaces --output json
`,
SuggestFor: []string{"ls", "lsit"},
PreRunE: bindEnv("namespace", "output"),
RunE: runList,
SuggestFor: []string{"lsit"},
Aliases: []string{"ls"},
PreRunE: bindEnv("all-namespaces", "output", "namespace", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runList(cmd, args, newClient)
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Namespace Config
// Differing from other commands, the default namespace for the list
// command is set to the currently active namespace as returned by
// calling k8s.DefaultNamespace(). This way a call to `func list` will
// show functions in the currently active namespace. If the value can
// not be determined due to error, a warning is printed to log and
// no namespace is passed to the lister, which should result in the
// lister showing functions for all namespaces.
//
// This also extends to the treatment of the global setting for
// namespace. This is likewise intended for command which require a
// namespace no matter what. Therefore the global namespace setting is
// not applicable to this command because "default" really means "all".
//
// This is slightly different than other commands wherein their
// default is often to presume namespace "default" if none was either
// supplied nor available.
// Flags
cmd.Flags().BoolP("all-namespaces", "A", false, "List functions in all namespaces. If set, the --namespace flag is ignored.")
cmd.Flags().StringP("namespace", "n", defaultNamespace(fn.Function{}, false), "The namespace for which to list functions. ($FUNC_NAMESPACE)")
cmd.Flags().StringP("output", "o", "human", "Output format (human|plain|json|xml|yaml) ($FUNC_OUTPUT)")
addVerboseFlag(cmd, cfg.Verbose)
if err := cmd.RegisterFlagCompletionFunc("output", CompleteOutputFormatList); err != nil {
fmt.Println("internal: error while calling RegisterFlagCompletionFunc: ", err)
}
return cmd
}
func runList(cmd *cobra.Command, args []string) (err error) {
config := newListConfig()
lister, err := knative.NewLister(config.Namespace)
func runList(cmd *cobra.Command, _ []string, newClient ClientFactory) (err error) {
cfg, err := newListConfig(cmd)
if err != nil {
return
}
lister.Verbose = config.Verbose
a, err := cmd.Flags().GetBool("all-namespaces")
if err != nil {
return
}
if a {
lister.Namespace = ""
return err
}
client := bosonFunc.New(
bosonFunc.WithVerbose(config.Verbose),
bosonFunc.WithLister(lister))
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
items, err := client.List(cmd.Context())
items, err := client.List(cmd.Context(), cfg.Namespace)
if err != nil {
return
}
if len(items) < 1 {
fmt.Printf("No functions found in %v namespace\n", lister.Namespace)
if len(items) == 0 {
if cfg.Namespace != "" {
fmt.Printf("no functions found in namespace '%v'\n", cfg.Namespace)
} else {
fmt.Println("no functions found")
}
return
}
write(os.Stdout, listItems(items), config.Output)
write(os.Stdout, listItems(items), cfg.Output)
return
}
@ -94,18 +116,30 @@ type listConfig struct {
Verbose bool
}
func newListConfig() listConfig {
return listConfig{
func newListConfig(cmd *cobra.Command) (cfg listConfig, err error) {
cfg = listConfig{
Namespace: viper.GetString("namespace"),
Output: viper.GetString("output"),
Verbose: viper.GetBool("verbose"),
}
// If --all-namespaces, zero out any value for namespace (such as)
// "all" to the lister.
if viper.GetBool("all-namespaces") {
cfg.Namespace = ""
}
// specifying both -A and --namespace is logically inconsistent
if cmd.Flags().Changed("namespace") && viper.GetBool("all-namespaces") {
err = errors.New("both --namespace and --all-namespaces specified")
}
return
}
// Output Formatting (serializers)
// -------------------------------
type listItems []bosonFunc.ListItem
type listItems []fn.ListItem
func (items listItems) Human(w io.Writer) error {
return items.Plain(w)
@ -117,9 +151,9 @@ func (items listItems) Plain(w io.Writer) error {
tabWriter := tabwriter.NewWriter(w, 0, 8, 2, ' ', 0)
defer tabWriter.Flush()
fmt.Fprintf(tabWriter, "%s\t%s\t%s\t%s\t%s\t%s\n", "NAME", "NAMESPACE", "RUNTIME", "URL", "KSERVICE", "READY")
fmt.Fprintf(tabWriter, "%s\t%s\t%s\t%s\t%s\n", "NAME", "NAMESPACE", "RUNTIME", "URL", "READY")
for _, item := range items {
fmt.Fprintf(tabWriter, "%s\t%s\t%s\t%s\t%s\t%s\n", item.Name, item.Namespace, item.Runtime, item.URL, item.KService, item.Ready)
fmt.Fprintf(tabWriter, "%s\t%s\t%s\t%s\t%s\n", item.Name, item.Namespace, item.Runtime, item.URL, item.Ready)
}
return nil
}
@ -135,3 +169,10 @@ func (items listItems) XML(w io.Writer) error {
func (items listItems) YAML(w io.Writer) error {
return yaml.NewEncoder(w).Encode(items)
}
func (items listItems) URL(w io.Writer) error {
for _, item := range items {
fmt.Fprintf(w, "%s\n", item.URL)
}
return nil
}

109
cmd/list_test.go Normal file
View File

@ -0,0 +1,109 @@
package cmd
import (
"context"
"testing"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/mock"
. "knative.dev/func/pkg/testing"
)
// TestList_Namespace ensures that list command handles namespace options
// namespace (--namespace) and all namespaces (--all-namespaces) correctly
// and that the current kube context is used by default.
func TestList_Namespace(t *testing.T) {
_ = FromTempDirectory(t)
tests := []struct {
name string
namespace string // --namespace flag (use specific namespace)
all bool // --all-namespaces (no namespace filter)
allShort bool // -A (no namespace filter)
expected string // expected value passed to lister
err bool // expected error
}{
{
name: "default (none specififed)",
namespace: "",
all: false,
allShort: false,
expected: "func", // see testdata kubeconfig
},
{
name: "namespace provided",
namespace: "ns",
all: false,
allShort: false,
expected: "ns",
},
{
name: "all namespaces",
namespace: "",
all: true,
allShort: false,
expected: "", // --all-namespaces | -A explicitly mean none specified
},
{
name: "all namespaces - short flag",
all: false,
allShort: true,
expected: "", // blank is implemented by lister as meaning all
},
{
name: "both flags error",
namespace: "ns",
all: true,
err: true,
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
// create a mock lister implementation which validates the expected
// value has been passed.
lister := mock.NewLister()
lister.ListFn = func(_ context.Context, namespace string) ([]fn.ListItem, error) {
if namespace != test.expected {
t.Fatalf("expected list namespace %q, got %q", test.expected, namespace)
}
return []fn.ListItem{}, nil
}
// Create an instance of the command which sets the flags
// according to the test case
cmd := NewListCmd(NewTestClient(fn.WithLister(lister)))
args := []string{}
if test.namespace != "" {
args = append(args, "--namespace", test.namespace)
}
if test.all {
args = append(args, "--all-namespaces")
}
if test.allShort {
args = append(args, "-A")
}
cmd.SetArgs(args)
// Execute
err := cmd.Execute()
// Check for expected error
if err != nil {
if !test.err {
t.Fatalf("unexpected error: %v", err)
}
// expected error received
return
} else if test.err {
t.Fatalf("did not receive expected error ")
}
// For tests which did not expect an error, ensure the lister
// was invoked
if !lister.ListInvoked {
t.Fatalf("%v: the lister was not invoked", test.name)
}
})
}
}

46
cmd/mcp.go Normal file
View File

@ -0,0 +1,46 @@
package cmd
import (
"log"
"github.com/spf13/cobra"
"knative.dev/func/pkg/mcp"
)
func NewMCPServerCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "mcp",
Short: "Start MCP server",
Long: `
NAME
{{rootCmdUse}} mcp - start a Model Context Protocol (MCP) server
SYNOPSIS
{{rootCmdUse}} mcp [flags]
DESCRIPTION
Starts a Model Context Protocol (MCP) server over standard input/output (stdio) transport.
This implementation aims to support tools for deploying and creating serverless functions.
Note: This command is still under development.
EXAMPLES
o Run an MCP server:
{{rootCmdUse}} mcp
`,
RunE: func(cmd *cobra.Command, args []string) error {
return runMCPServer(cmd, args)
},
}
return cmd
}
func runMCPServer(cmd *cobra.Command, args []string) error {
s := mcp.NewServer()
if err := s.Start(); err != nil {
log.Fatalf("Server error: %v", err)
return err
}
return nil
}

133
cmd/prompt/prompt.go Normal file
View File

@ -0,0 +1,133 @@
package prompt
import (
"bufio"
"fmt"
"io"
"os"
"strings"
"github.com/AlecAivazis/survey/v2"
"github.com/AlecAivazis/survey/v2/terminal"
"golang.org/x/term"
"knative.dev/func/pkg/docker"
"knative.dev/func/pkg/docker/creds"
)
func NewPromptForCredentials(in io.Reader, out, errOut io.Writer) func(repository string) (docker.Credentials, error) {
firstTime := true
return func(repository string) (docker.Credentials, error) {
var result docker.Credentials
if firstTime {
firstTime = false
fmt.Fprintf(out, "Please provide credentials for image repository '%s'.\n", repository)
} else {
fmt.Fprintf(out, "Incorrect credentials for repository '%s'. Please make sure the repository is correct and try again.\n", repository)
}
var qs = []*survey.Question{
{
Name: "username",
Prompt: &survey.Input{
Message: "Username:",
},
Validate: survey.Required,
},
{
Name: "password",
Prompt: &survey.Password{
Message: "Password:",
},
Validate: survey.Required,
},
}
var (
fr terminal.FileReader
ok bool
)
isTerm := false
if fr, ok = in.(terminal.FileReader); ok {
isTerm = term.IsTerminal(int(fr.Fd()))
}
if isTerm {
err := survey.Ask(qs, &result, survey.WithStdio(fr, out.(terminal.FileWriter), errOut))
if err != nil {
return docker.Credentials{}, err
}
} else {
reader := bufio.NewReader(in)
fmt.Fprintf(out, "Username: ")
u, err := reader.ReadString('\n')
if err != nil {
return docker.Credentials{}, err
}
u = strings.Trim(u, "\r\n")
fmt.Fprintf(out, "Password: ")
p, err := reader.ReadString('\n')
if err != nil {
return docker.Credentials{}, err
}
p = strings.Trim(p, "\r\n")
result = docker.Credentials{Username: u, Password: p}
}
return result, nil
}
}
func NewPromptForCredentialStore() creds.ChooseCredentialHelperCallback {
return func(availableHelpers []string) (string, error) {
if len(availableHelpers) < 1 {
fmt.Fprintf(os.Stderr, `Credentials will not be saved.
If you would like to save your credentials in the future,
you can install docker credential helper https://github.com/docker/docker-credential-helpers.
`)
return "", nil
}
isTerm := term.IsTerminal(int(os.Stdin.Fd()))
var resp string
if isTerm {
err := survey.AskOne(&survey.Select{
Message: "Choose credentials helper",
Options: append(availableHelpers, "None"),
}, &resp, survey.WithValidator(survey.Required))
if err != nil {
return "", err
}
if resp == "None" {
fmt.Fprintf(os.Stderr, "No helper selected. Credentials will not be saved.\n")
return "", nil
}
} else {
fmt.Fprintf(os.Stderr, "Available credential helpers:\n")
for _, helper := range availableHelpers {
fmt.Fprintf(os.Stderr, "%s\n", helper)
}
fmt.Fprintf(os.Stderr, "Choose credentials helper: ")
reader := bufio.NewReader(os.Stdin)
var err error
resp, err = reader.ReadString('\n')
if err != nil {
return "", err
}
resp = strings.Trim(resp, "\r\n")
if resp == "" {
fmt.Fprintf(os.Stderr, "No helper selected. Credentials will not be saved.\n")
}
}
return resp, nil
}
}

83
cmd/prompt/prompt_test.go Normal file
View File

@ -0,0 +1,83 @@
//go:build linux
// +build linux
package prompt
import (
"io"
"strings"
"testing"
"time"
"github.com/Netflix/go-expect"
"github.com/creack/pty"
"github.com/hinshun/vt10x"
"knative.dev/func/pkg/docker"
)
const (
enter = "\r"
)
func Test_NewPromptForCredentials(t *testing.T) {
expectedCreds := docker.Credentials{
Username: "testuser",
Password: "testpwd",
}
ptm, pts, err := pty.Open()
if err != nil {
t.Fatal(err)
}
term := vt10x.New(vt10x.WithWriter(pts))
console, err := expect.NewConsole(expect.WithStdin(ptm), expect.WithStdout(term), expect.WithCloser(ptm, pts))
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() { console.Close() })
go func() {
_, _ = console.ExpectEOF()
}()
go func() {
chars := expectedCreds.Username + enter + expectedCreds.Password + enter
for _, ch := range chars {
time.Sleep(time.Millisecond * 100)
_, _ = console.Send(string(ch))
}
}()
tests := []struct {
name string
in io.Reader
out io.Writer
errOut io.Writer
}{
{
name: "with non-tty",
in: strings.NewReader(expectedCreds.Username + "\r\n" + expectedCreds.Password + "\r\n"),
out: io.Discard,
errOut: io.Discard,
},
{
name: "with tty",
in: console.Tty(),
out: console.Tty(),
errOut: console.Tty(),
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
credPrompt := NewPromptForCredentials(tt.in, tt.out, tt.errOut)
cred, err := credPrompt("example.com")
if err != nil {
t.Fatal(err)
}
if cred != expectedCreds {
t.Errorf("bad credentials: %+v", cred)
}
})
}
}

664
cmd/repository.go Normal file
View File

@ -0,0 +1,664 @@
package cmd
import (
"errors"
"fmt"
"os"
"github.com/AlecAivazis/survey/v2"
"github.com/ory/viper"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
)
// command constructors
// --------------------
func NewRepositoryCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Short: "Manage installed template repositories",
Use: "repository",
Aliases: []string{"repo", "repositories"},
Long: `
NAME
{{rootCmdUse}} - Manage set of installed repositories.
SYNOPSIS
{{rootCmdUse}} repo [-c|--confirm] [-v|--verbose]
{{rootCmdUse}} repo list [-r|--repositories] [-c|--confirm] [-v|--verbose]
{{rootCmdUse}} repo add <name> <url>[-r|--repositories] [-c|--confirm] [-v|--verbose]
{{rootCmdUse}} repo rename <old> <new> [-r|--repositories] [-c|--confirm] [-v|--verbose]
{{rootCmdUse}} repo remove <name> [-r|--repositories] [-c|--confirm] [-v|--verbose]
DESCRIPTION
Manage template repositories installed on disk at either the default location
(~/.config/func/repositories) or the location specified by the --repository
flag. Once added, a template from the repository can be used when creating
a new function.
Interactive Prompts:
To complete these commands interactively, pass the --confirm (-c) flag to
the 'repository' command, or any of the inidivual subcommands.
The Default Repository:
The default repository is not stored on disk, but embedded in the binary and
can be used without explicitly specifying the name. The default repository
is always listed first, and is assumed when creating a new function without
specifying a repository name prefix.
For example, to create a new Go function using the 'http' template from the
default repository.
$ {{rootCmdUse}} create -l go -t http
The Repository Flag:
Installing repositories locally is optional. To use a template from a remote
repository directly, it is possible to use the --repository flag on create.
This leaves the local disk untouched. For example, To create a function using
the Boson Project Hello-World template without installing the template
repository locally, use the --repository (-r) flag on create:
$ {{rootCmdUse}} create -l go \
--template hello-world \
--repository https://github.com/boson-project/templates
Alternative Repositories Location:
Repositories are stored on disk in ~/.config/func/repositories by default.
This location can be altered by setting the FUNC_REPOSITORIES_PATH
environment variable.
COMMANDS
With no arguments, this help text is shown. To manage repositories with
an interactive prompt, use the use the --confirm (-c) flag.
$ {{rootCmdUse}} repository -c
add
Add a new repository to the installed set.
$ {{rootCmdUse}} repository add <name> <URL>
For Example, to add the Boson Project repository:
$ {{rootCmdUse}} repository add boson https://github.com/boson-project/templates
Once added, a function can be created with templates from the new repository
by prefixing the template name with the repository. For example, to create
a new function using the Go Hello World template:
$ {{rootCmdUse}} create -l go -t boson/hello-world
list
List all available repositories, including the installed default
repository. Repositories available are listed by name. To see the URL
which was used to install remotes, use --verbose (-v).
rename
Rename a previously installed repository from <old> to <new>. Only installed
repositories can be renamed.
$ {{rootCmdUse}} repository rename <name> <new name>
remove
Remove a repository by name. Removes the repository from local storage
entirely. When in confirm mode (--confirm) it will confirm before
deletion, but in regular mode this is done immediately, so please use
caution, especially when using an altered repositories location
(via the FUNC_REPOSITORIES_PATH environment variable).
$ {{rootCmdUse}} repository remove <name>
EXAMPLES
o Run in confirmation mode (interactive prompts) using the --confirm flag
$ {{rootCmdUse}} repository -c
o Add a repository and create a new function using a template from it:
$ {{rootCmdUse}} repository add functastic https://github.com/knative-extensions/func-tastic
$ {{rootCmdUse}} repository list
default
functastic
$ {{rootCmdUse}} create -l go -t functastic/hello-world
...
o Add a repository specifying the branch to use (metacontroller):
$ {{rootCmdUse}} repository add metacontroller https://github.com/knative-extensions/func-tastic#metacontroler
$ {{rootCmdUse}} repository list
default
metacontroller
$ {{rootCmdUse}} create -l node -t metacontroller/metacontroller
...
o List all repositories including the URL from which remotes were installed
$ {{rootCmdUse}} repository list -v
default
metacontroller https://github.com/knative-extensions/func-tastic#metacontroller
o Rename an installed repository
$ {{rootCmdUse}} repository list
default
boson
$ {{rootCmdUse}} repository rename boson functastic
$ {{rootCmdUse}} repository list
default
functastic
o Remove an installed repository
$ {{rootCmdUse}} repository list
default
functastic
$ {{rootCmdUse}} repository remove functastic
$ {{rootCmdUse}} repository list
default
`,
SuggestFor: []string{"repositories", "repos", "template", "templates", "pack", "packs"},
PreRunE: bindEnv("confirm", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runRepository(cmd, args, newClient)
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
addConfirmFlag(cmd, cfg.Confirm)
addVerboseFlag(cmd, cfg.Verbose)
cmd.AddCommand(NewRepositoryListCmd(newClient))
cmd.AddCommand(NewRepositoryAddCmd(newClient))
cmd.AddCommand(NewRepositoryRenameCmd(newClient))
cmd.AddCommand(NewRepositoryRemoveCmd(newClient))
return cmd
}
func NewRepositoryListCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Short: "List repositories",
Use: "list",
Aliases: []string{"ls"},
PreRunE: bindEnv("confirm", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runRepositoryList(cmd, newClient)
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
addConfirmFlag(cmd, cfg.Confirm)
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
func NewRepositoryAddCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Short: "Add a repository",
Use: "add <name> <url>",
SuggestFor: []string{"ad", "install"},
PreRunE: bindEnv("confirm", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runRepositoryAdd(cmd, args, newClient)
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
addConfirmFlag(cmd, cfg.Confirm)
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
func NewRepositoryRenameCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Short: "Rename a repository",
Use: "rename <old> <new>",
Aliases: []string{"mv"},
PreRunE: bindEnv("confirm", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runRepositoryRename(cmd, args, newClient)
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
addConfirmFlag(cmd, cfg.Confirm)
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
func NewRepositoryRemoveCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Short: "Remove a repository",
Use: "remove <name>",
Aliases: []string{"rm"},
SuggestFor: []string{"delete", "del"},
PreRunE: bindEnv("confirm", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runRepositoryRemove(cmd, args, newClient)
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
addConfirmFlag(cmd, cfg.Confirm)
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
// command implementations
// -----------------------
// Run
// (list by default or interactive with -c|--confirm)
func runRepository(cmd *cobra.Command, args []string, newClient ClientFactory) (err error) {
cfg, err := newRepositoryConfig()
if err != nil {
return
}
// If in noninteractive, normal mode the help text is shown
if !cfg.Confirm {
return cmd.Help()
}
// If in interactive mode, the user chan choose which subcommand to invoke
// Prompt for action to perform
question := &survey.Question{
Name: "Action",
Prompt: &survey.Select{
Message: "Operation to perform:",
Options: []string{"list", "add", "rename", "remove"},
Default: "list",
}}
answer := struct{ Action string }{}
if err = survey.Ask([]*survey.Question{question}, &answer); err != nil {
return
}
// Run the command indicated
switch answer.Action {
case "list":
return runRepositoryList(cmd, newClient)
case "add":
return runRepositoryAdd(cmd, args, newClient)
case "rename":
return runRepositoryRename(cmd, args, newClient)
case "remove":
return runRepositoryRemove(cmd, args, newClient)
}
return fmt.Errorf("invalid action '%v'", answer.Action) // Unreachable
}
// List
func runRepositoryList(_ *cobra.Command, newClient ClientFactory) (err error) {
cfg, err := newRepositoryConfig()
if err != nil {
return
}
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
// List all repositories given a client instantiated about config.
rr, err := client.Repositories().All()
if err != nil {
return
}
// Print repository names, or name plus url if verbose
// This follows the format of `git remote`, as it is likely familiar.
for _, r := range rr {
if cfg.Verbose {
fmt.Fprintln(os.Stdout, r.Name+"\t"+r.URL())
} else {
fmt.Fprintln(os.Stdout, r.Name)
}
}
return
}
// Add
func runRepositoryAdd(_ *cobra.Command, args []string, newClient ClientFactory) (err error) {
// Supports both composable, discrete CLI commands or prompt-based "config"
// by setting the argument values (name and ulr) to value of positional args,
// but only requires them if not prompting. If prompting, those values
// become the prompt defaults.
cfg, err := newRepositoryConfig()
if err != nil {
return
}
// Adding a repository requires there be a config path structure on disk
if err = config.CreatePaths(); err != nil {
return
}
// Create a client instance which utilizes the given repositories path.
// Note that this MAY not be in the config structure if the environment
// variable to override said path was provided explicitly.
// TODO: rectify this inconsitency: the config default path structure will
// be created in XDG_CONFIG_HOME/func even if the repo path environment
// was set to some other location on disk.
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
// Preconditions
// If not confirming/prompting, assert the args were both provided.
if len(args) != 2 && !cfg.Confirm {
return fmt.Errorf("usage: func repository add <name> <url>")
}
// Extract Params
// Populate a struct with the arguments (if provided)
params := struct {
Name string
URL string
}{}
if len(args) > 0 {
params.Name = args[0]
}
if len(args) > 1 {
params.URL = args[1]
}
// Prompt/Confirm
// If confirming/prompting, interactively populate the params from the user
// (using the current values as defaults)
//
// If terminal not interactive, effective values are echoed.
//
// Note that empty values can be passed to the final client's Add method if:
// Argument(s) not provided
// Confirming (-c|--confirm)
// Is a noninteractive terminal
// This is an expected case. The empty value will be echoed to stdout, the
// API will be invoked, and a helpful error message will indicate that the
// request is missing required parameters.
if cfg.Confirm && interactiveTerminal() {
questions := []*survey.Question{
{
Name: "Name",
Validate: survey.Required,
Prompt: &survey.Input{
Message: "Name for the new repository:",
Default: params.Name,
},
}, {
Name: "URL",
Validate: survey.Required,
Prompt: &survey.Input{
Message: "URL of the new repository:",
Default: params.URL,
},
},
}
if err = survey.Ask(questions, &params); err != nil {
return
// not checking for terminal.InterruptError because failure to complete,
// for whatever reason, should exit the program non-zero.
}
} else if cfg.Confirm {
fmt.Fprintf(os.Stdout, "Name: %v\n", params.Name)
fmt.Fprintf(os.Stdout, "URL: %v\n", params.URL)
}
// Add repository
var n string
if n, err = client.Repositories().Add(params.Name, params.URL); err != nil {
return
}
if cfg.Verbose {
fmt.Fprintf(os.Stdout, "Repository added: %s\n", n)
}
return
}
// Rename
func runRepositoryRename(_ *cobra.Command, args []string, newClient ClientFactory) (err error) {
cfg, err := newRepositoryConfig()
if err != nil {
return
}
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
// Preconditions
if len(args) != 2 && !cfg.Confirm {
return fmt.Errorf("usage: func repository rename <old> <new>")
}
// Extract Params
params := struct {
Old string
New string
}{}
if len(args) > 0 {
params.Old = args[0]
}
if len(args) > 1 {
params.New = args[1]
}
// Repositories installed according to the client
// (does not include the builtin default)
repositories, err := installedRepositories(client)
if err != nil {
return
}
// Confirm (interactive prompt mode)
if cfg.Confirm && interactiveTerminal() {
questions := []*survey.Question{
{
Name: "Old",
Validate: survey.Required,
Prompt: &survey.Select{
Message: "Repository to rename:",
Options: repositories,
},
}, {
Name: "New",
Validate: survey.Required,
Prompt: &survey.Input{
Message: "New name:",
Default: params.New,
},
},
}
if err = survey.Ask(questions, &params); err != nil {
return // for any reason, including interrupt, is an nonzero exit
}
} else if cfg.Confirm {
fmt.Fprintf(os.Stdout, "Old: %v\n", params.Old)
fmt.Fprintf(os.Stdout, "New: %v\n", params.New)
}
// Rename the repository
if err = client.Repositories().Rename(params.Old, params.New); err != nil {
return
}
if cfg.Verbose {
fmt.Fprintln(os.Stdout, "Repository renamed")
}
return
}
// Remove
func runRepositoryRemove(_ *cobra.Command, args []string, newClient ClientFactory) (err error) {
cfg, err := newRepositoryConfig()
if err != nil {
return
}
client, done := newClient(ClientConfig{Verbose: cfg.Verbose})
defer done()
// Preconditions
if len(args) != 1 && !cfg.Confirm {
return fmt.Errorf("usage: func repository remove <name>")
}
// Extract param(s)
params := struct {
Name string
Sure bool
}{}
if len(args) > 0 {
params.Name = args[0]
}
// "Are you sure" confirmation flag
// (not using name 'Confirm' to avoid confustion with cfg.Confirm)
// defaults to Yes. This is debatable, but I don't want to choose the repo
// to remove and then have to see a prompt and then have to hit 'y'. Just
// prompting once to make sure, which requires another press of enter, seems
// sufficient.
params.Sure = true
// Repositories installed according to the client
// (does not include the builtin default)
repositories, err := installedRepositories(client)
if err != nil {
return
}
if len(repositories) == 0 {
return errors.New("no repositories installed. use 'add' to install")
}
// Confirm (interactive prompt mode)
if cfg.Confirm && interactiveTerminal() {
questions := []*survey.Question{
{
Name: "Name",
Validate: survey.Required,
Prompt: &survey.Select{
Message: "Repository to remove:",
Options: repositories,
},
}, {
Name: "Sure",
Prompt: &survey.Confirm{
Message: "This will remove the repository from local disk. Are you sure?",
Default: params.Sure,
},
},
}
if err = survey.Ask(questions, &params); err != nil {
return // for any reason, including interrupt, is a nonzero exit
}
} else if cfg.Confirm {
fmt.Fprintf(os.Stdout, "Repository: %v\n", params.Name)
}
// Cancel if they got cold feet.
if !params.Sure {
// While an argument could be made to the contrary, I believe it is
// important than an abort by the user, either by answering no to the
// confirmation or by an os interrupt such as ^C be considered an error,
// and thus a non-zero program exit. This is because a user may have
// chained the command, and an abort (for whatever reason) should cancel
// the whole chain. For example, given the command:
// func repo rm -cv && doSomethingOnSuccess
// The trailing command 'doSomethignOnSuccess' should not be evaluated if
// the first, `func repo rm`, does not exit 0.
if cfg.Verbose {
fmt.Fprintln(os.Stdout, "Repository remove canceled")
}
return fmt.Errorf("repository removal canceled")
}
// Remove the repository
if err = client.Repositories().Remove(params.Name); err != nil {
return
}
if cfg.Verbose {
fmt.Fprintln(os.Stdout, "Repository removed")
}
return
}
// Installed repositories
// All repositories which have been installed (does not include builtin)
func installedRepositories(client *fn.Client) ([]string, error) {
// Client API contract stipulates the list always lists the defeault builtin
// repo, and always lists it at index 0
repositories, err := client.Repositories().List()
if err != nil {
return []string{}, err
}
return repositories[1:], nil
}
// client config
// -------------
// repositoryConfig used for instantiating a fn.Client
type repositoryConfig struct {
Verbose bool // Enables verbose logging
Confirm bool // Enables interactive confirmation/prompting mode
}
// newRepositoryConfig creates a configuration suitable for use instantiating the
// fn Client. Note that parameters for the individual commands (add, remove etc)
// are collected separately in their requisite run functions.
func newRepositoryConfig() (cfg repositoryConfig, err error) {
// initial config is populated based on flags, which are themselves
// first populated by static defaults, then environment variables,
// finally command flags.
cfg = repositoryConfig{
Verbose: viper.GetBool("verbose"),
Confirm: viper.GetBool("confirm"),
}
// If not in confirm (interactive prompting) mode,
// this struct is complete.
if !cfg.Confirm {
return
}
// Prompt the terminal for interactive input using the current values
// as defaults. (noninteractive terminals are a noop)
if interactiveTerminal() {
return cfg.prompt()
}
// Noninteractive terminals in confirm/prompt mode simply echo
// effective values to stdout.
fmt.Fprintf(os.Stdout, "Verbose logging: %v\n", cfg.Verbose)
return
}
// prompt returns a config with values populated from interactivly prompting
// the user.
func (c repositoryConfig) prompt() (repositoryConfig, error) {
// These prompts are overly verbose, as the user calling --confirm likely
// only cares about the individual command-specific values (for example
// "name" and "url" when calling "add". However, we want to provide the
// ability to interactively choose _all_ options if the user really wants
// to, therefore these prompts are only shown if the user is "confirming
// verbosely", for example `func repository add -cv`. (of course the
// associated flags, environment variables etc are still respected. Just
// no prompts unless verbose)
if !c.Verbose || !interactiveTerminal() {
return c, nil
}
qs := []*survey.Question{
{
Name: "Verbose",
Prompt: &survey.Confirm{
Message: "Enable verbose logging:",
Default: c.Verbose,
},
},
}
err := survey.Ask(qs, &c)
return c, err
}

166
cmd/repository_test.go Normal file
View File

@ -0,0 +1,166 @@
package cmd
import (
"testing"
. "knative.dev/func/pkg/testing"
)
// TestRepository_List ensures that the 'list' subcommand shows the client's
// set of repositories by name for builtin repositories, by explicitly
// setting the repositories' path to a new path which includes no others.
func TestRepository_List(t *testing.T) {
_ = FromTempDirectory(t)
cmd := NewRepositoryListCmd(NewClient)
cmd.SetArgs([]string{}) // Do not use test command args
// Execute the command, capturing the output sent to stdout
stdout := piped(t)
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Assert the output matches expectd (whitespace trimmed)
expect := "default"
output := stdout()
if output != expect {
t.Fatalf("expected:\n'%v'\ngot:\n'%v'\n", expect, output)
}
}
// TestRepository_Add ensures that the 'add' subcommand accepts its positional
// arguments, respects the repositories' path flag, and the expected name is echoed
// upon subsequent 'list'.
func TestRepository_Add(t *testing.T) {
url := ServeRepo("repository.git", t) + "#main"
_ = FromTempDirectory(t)
t.Log(url)
var (
add = NewRepositoryAddCmd(NewClient)
list = NewRepositoryListCmd(NewClient)
stdout = piped(t)
)
// Do not use test command args
add.SetArgs([]string{})
list.SetArgs([]string{})
// add [flags] <old> <new>
add.SetArgs([]string{
"newrepo",
url,
})
// Parse flags and args, performing action
if err := add.Execute(); err != nil {
t.Fatal(err)
}
// List post-add, capturing output from stdout
if err := list.Execute(); err != nil {
t.Fatal(err)
}
// Assert the list output now includes the name from args (whitespace trimmed)
expect := "default\nnewrepo"
output := stdout()
if output != expect {
t.Fatalf("expected:\n'%v'\ngot:\n'%v'\n", expect, output)
}
}
// TestRepository_Rename ensures that the 'rename' subcommand accepts its
// positional arguments, respects the repositories' path flag, and the name is
// reflected as having been renamed upon subsequent 'list'.
func TestRepository_Rename(t *testing.T) {
url := ServeRepo("repository.git", t)
_ = FromTempDirectory(t)
var (
add = NewRepositoryAddCmd(NewClient)
rename = NewRepositoryRenameCmd(NewClient)
list = NewRepositoryListCmd(NewClient)
stdout = piped(t)
)
// Do not use test command args
add.SetArgs([]string{})
rename.SetArgs([]string{})
list.SetArgs([]string{})
// add a repo which will be renamed
add.SetArgs([]string{"newrepo", url})
if err := add.Execute(); err != nil {
t.Fatal(err)
}
// rename [flags] <old> <new>
rename.SetArgs([]string{
"newrepo",
"renamed",
})
// Parse flags and args, performing action
if err := rename.Execute(); err != nil {
t.Fatal(err)
}
// List post-rename, capturing output from stdout
if err := list.Execute(); err != nil {
t.Fatal(err)
}
// Assert the list output now includes the name from args (whitespace trimmed)
expect := "default\nrenamed"
output := stdout()
if output != expect {
t.Fatalf("expected:\n'%v'\ngot:\n'%v'\n", expect, output)
}
}
// TestRepository_Remove ensures that the 'remove' subcommand accepts name as
// its argument, respects the repositories' flag, and the entry is removed upon
// subsequent 'list'.
func TestRepository_Remove(t *testing.T) {
url := ServeRepo("repository.git", t)
_ = FromTempDirectory(t)
var (
add = NewRepositoryAddCmd(NewClient)
remove = NewRepositoryRemoveCmd(NewClient)
list = NewRepositoryListCmd(NewClient)
stdout = piped(t)
)
// Do not use test command args
add.SetArgs([]string{})
remove.SetArgs([]string{})
list.SetArgs([]string{})
// add a repo which will be removed
add.SetArgs([]string{"newrepo", url})
if err := add.Execute(); err != nil {
t.Fatal(err)
}
// remove [flags] <name>
remove.SetArgs([]string{
"newrepo",
})
// Parse flags and args, performing action
if err := remove.Execute(); err != nil {
t.Fatal(err)
}
// List post-remove, capturing output from stdout
if err := list.Execute(); err != nil {
t.Fatal(err)
}
// Assert the list output now includes the name from args (whitespace trimmed)
expect := "default"
output := stdout()
if output != expect {
t.Fatalf("expected:\n'%v'\ngot:\n'%v'\n", expect, output)
}
}

View File

@ -1,135 +1,222 @@
package cmd
import (
"context"
"fmt"
"github.com/pkg/errors"
"io"
"os"
"path/filepath"
"strings"
"github.com/mitchellh/go-homedir"
"github.com/Masterminds/semver"
"github.com/ory/viper"
"github.com/spf13/cobra"
"github.com/spf13/pflag"
"golang.org/x/term"
"k8s.io/apimachinery/pkg/util/sets"
"knative.dev/client/pkg/util"
bosonFunc "github.com/boson-project/func"
"knative.dev/func/cmd/templates"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/k8s"
)
// The root of the command tree defines the command name, descriotion, globally
// DefaultVersion when building source directly (bypassing the Makefile)
const DefaultVersion = "v0.0.0+source"
// DefaultNamespace is the global static default namespace, and is equivalent
// to the Kubernetes default namespace.
const DefaultNamespace = "default"
type RootCommandConfig struct {
Name string // usually `func` or `kn func`
Version
NewClient ClientFactory
}
// NewRootCmd creates the root of the command tree defines the command name, description, globally
// available flags, etc. It has no action of its own, such that running the
// resultant binary with no arguments prints the help/usage text.
var root = &cobra.Command{
Use: "func",
Short: "Serverless functions",
SilenceErrors: true, // we explicitly handle errors in Execute()
SilenceUsage: true, // no usage dump on error
Long: `Serverless functions
func NewRootCmd(cfg RootCommandConfig) *cobra.Command {
cmd := &cobra.Command{
Use: cfg.Name,
Short: fmt.Sprintf("%s manages Knative Functions", cfg.Name),
Long: fmt.Sprintf(`%s is the command line interface for managing Knative Function resources
Create, build and deploy functions in serverless containers for multiple runtimes on Knative`,
Example: `
# Create a node function called "node-sample" and enter the directory
kn func create myfunc && cd myfunc
Create a new Node.js function in the current directory:
{{.Use}} create --language node myfunction
# Build the container image, push it to a registry and deploy it to the connected Knative cluster
# (replace <registry/user> with something like quay.io/user with an account that have you access to)
kn func deploy --registry <registry/user>
Deploy the function using Docker hub to host the image:
{{.Use}} deploy --registry docker.io/alice
# Curl the service with the service URL
curl $(kn service describe myfunc -o url)
`,
}
Learn more about Functions: https://knative.dev/docs/functions/
Learn more about Knative at: https://knative.dev`, cfg.Name),
// NewRootCmd is used to initialize func as kn plugin
func NewRootCmd() *cobra.Command {
return root
}
// When the code is loaded into memory upon invocation, the cobra/viper packages
// are invoked to gather system context. This includes reading the configuration
// file, environment variables, and parsing the command flags.
func init() {
// read in environment variables that match
viper.AutomaticEnv()
verbose := viper.GetBool("verbose")
// Populate the `verbose` flag with the value of --verbose, if provided,
// which thus overrides both the default and the value read in from the
// config file (i.e. flags always take highest precidence).
root.PersistentFlags().BoolVarP(&verbose, "verbose", "v", verbose, "print verbose logs")
err := viper.BindPFlag("verbose", root.PersistentFlags().Lookup("verbose"))
if err != nil {
panic(err)
DisableAutoGenTag: true, // no docs header
SilenceUsage: true, // no usage dump on error
SilenceErrors: true, // we explicitly handle errors in Execute()
}
// Override the --version template to match the output format from the
// version subcommand: nothing but the version.
root.SetVersionTemplate(`{{printf "%s\n" .Version}}`)
// Environment Variables
// Evaluated first after static defaults, set all flags to be associated with
// a version prefixed by "FUNC_"
viper.AutomaticEnv() // read in environment variables for FUNC_<flag>
viper.SetEnvPrefix("func") // ensure that all have the prefix
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
// Prefix all environment variables with "FUNC_" to avoid collisions with other apps.
viper.SetEnvPrefix("func")
}
// Execute the command tree by executing the root command, which runs
// according to the context defined by: the optional config file,
// Environment Variables, command arguments and flags.
func Execute(ctx context.Context) {
// Sets version to a string partially populated by compile-time flags.
root.Version = version.String()
// Execute the root of the command tree.
if err := root.ExecuteContext(ctx); err != nil {
if errors.Cause(err) == context.Canceled {
os.Exit(130)
return
}
// Errors are printed to STDERR output and the process exits with code of 1.
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
// check if permissions for FUNC HOME are sufficient; warn if otherwise
cp := config.File()
if _, err := os.ReadFile(cp); os.IsPermission(err) {
fmt.Fprintf(os.Stderr, "Warning: Insufficient permissions to read config file at '%s' - continuing without it\n", cp)
}
// Client
// Use the provided ClientFactory or default to NewClient
newClient := cfg.NewClient
if newClient == nil {
newClient = NewClient
}
// Grouped commands
groups := templates.CommandGroups{
{
Header: "Primary Commands:",
Commands: []*cobra.Command{
NewCreateCmd(newClient),
NewDescribeCmd(newClient),
NewDeployCmd(newClient),
NewDeleteCmd(newClient),
NewListCmd(newClient),
NewSubscribeCmd(),
},
},
{
Header: "Development Commands:",
Commands: []*cobra.Command{
NewRunCmd(newClient),
NewInvokeCmd(newClient),
NewBuildCmd(newClient),
},
},
{
Header: "System Commands:",
Commands: []*cobra.Command{
NewConfigCmd(defaultLoaderSaver, newClient),
NewLanguagesCmd(newClient),
NewTemplatesCmd(newClient),
NewRepositoryCmd(newClient),
NewEnvironmentCmd(newClient, &cfg.Version),
},
},
{
Header: "MCP Commands:",
Commands: []*cobra.Command{
NewMCPServerCmd(),
},
},
{
Header: "Other Commands:",
Commands: []*cobra.Command{
NewCompletionCmd(),
NewVersionCmd(cfg.Version),
NewTektonClusterTasksCmd(),
},
},
}
// Add all commands to the root command, and initialize
groups.AddTo(cmd)
groups.SetRootUsage(cmd, nil)
return cmd
}
// Helper functions used by multiple commands
// Helpers
// ------------------------------------------
// registry to use is that provided as --registry or FUNC_REGISTRY.
// If not provided, global configuration determines the default to use.
func registry() string {
if r := viper.GetString("registry"); r != "" {
return r
}
cfg, _ := config.NewDefault()
return cfg.RegistryDefault()
}
// effectivePath to use is that which was provided by --path or FUNC_PATH.
// Manually parses flags such that this can be used during (cobra/viper) flag
// definition (prior to parsing).
func effectivePath() (path string) {
var (
env = os.Getenv("FUNC_PATH")
fs = pflag.NewFlagSet("", pflag.ContinueOnError)
p = fs.StringP("path", "p", "", "")
)
fs.SetOutput(io.Discard)
fs.ParseErrorsWhitelist.UnknownFlags = true // wokeignore:rule=whitelist
// Preparsing flags intentionally ignores errors because this is intended
// to be an opportunistic parse of the path flags, with actual validation of
// flags taking place later in the instantiation process by the cobra pkg.
_ = fs.Parse(os.Args[1:])
if env != "" {
path = env
}
if *p != "" {
path = *p
}
return path
}
// defaultNamespace to use when none is provided explicitly.
// This requires a bit more logic than normal flag defaults, which rely
// on the order of precedence Static Config -> Global Config -> Current Func ->
// -> Environment Variables -> Flags. This default calculation adds the
// step of using the active Kubernetes namespace after Static Config and before
// the optional Global Config setting. The static default is "default"
func defaultNamespace(f fn.Function, verbose bool) string {
// Specifically-requested
if f.Namespace != "" {
return f.Namespace
}
// Last deployed
if f.Deploy.Namespace != "" {
return f.Deploy.Namespace
}
// Active K8S namespace
namespace, err := k8s.GetDefaultNamespace()
if err != nil {
if verbose {
fmt.Fprintf(os.Stderr, "Unable to get current active kubernetes namespace. Defaults will be used. %v", err)
}
} else if namespace != "" {
return namespace
}
// Globally-defined default in ~/.config/func/config.yaml is next
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(os.Stderr, "error loading global config at '%v'. %v\n", config.File(), err)
} else if cfg.Namespace != "" {
return cfg.Namespace
}
// Static Default is the standard Kubernetes default "default"
return DefaultNamespace
}
// interactiveTerminal returns whether or not the currently attached process
// terminal is interactive. Used for determining whether or not to
// interactively prompt the user to confirm default choices, etc.
func interactiveTerminal() bool {
fi, err := os.Stdin.Stat()
return err == nil && ((fi.Mode() & os.ModeCharDevice) != 0)
}
// cwd returns the current working directory or exits 1 printing the error.
func cwd() (cwd string) {
cwd, err := os.Getwd()
if err != nil {
fmt.Fprintf(os.Stderr, "Unable to determine current working directory: %v", err)
os.Exit(1)
}
return cwd
}
// configPath is the effective path to the optional config directory used for
// function defaults and extensible templates.
func configPath() (path string) {
if path = os.Getenv("XDG_CONFIG_HOME"); path != "" {
path = filepath.Join(path, "func")
return
}
home, err := homedir.Expand("~")
if err != nil {
fmt.Fprintf(os.Stderr, "could not derive home directory for use as default templates path: %v", err)
path = filepath.Join(".config", "func")
} else {
path = filepath.Join(home, ".config", "func")
}
return
return term.IsTerminal(int(os.Stdin.Fd()))
}
// bindFunc which conforms to the cobra PreRunE method signature
type bindFunc func(*cobra.Command, []string) error
// bindEnv returns a bindFunc that binds env vars to the namd flags.
// bindEnv returns a bindFunc that binds env vars to the named flags.
func bindEnv(flags ...string) bindFunc {
return func(cmd *cobra.Command, args []string) (err error) {
for _, flag := range flags {
@ -137,55 +224,24 @@ func bindEnv(flags ...string) bindFunc {
return
}
}
viper.AutomaticEnv() // read in environment variables for FUNC_<flag>
viper.SetEnvPrefix("func") // ensure that all have the prefix
viper.SetEnvKeyReplacer(strings.NewReplacer("-", "_"))
return
}
}
type functionOverrides struct {
Image string
Namespace string
Builder string
}
// functionWithOverrides sets the namespace and image strings for the
// Function project at root, if provided, and returns the Function
// configuration values.
// Please note that When this function is called, the overrides are not persisted.
func functionWithOverrides(root string, overrides functionOverrides) (f bosonFunc.Function, err error) {
f, err = bosonFunc.NewFunction(root)
if err != nil {
return
}
overrideMapping := []struct {
src string
dest *string
}{
{overrides.Builder, &f.Builder},
{overrides.Image, &f.Image},
{overrides.Namespace, &f.Namespace},
}
for _, m := range overrideMapping {
if m.src != "" {
*m.dest = m.src
}
}
return
}
// deriveName returns the explicit value (if provided) or attempts to derive
// from the given path. Path is defaulted to current working directory, where
// a Function configuration, if it exists and contains a name, is used.
// a function configuration, if it exists and contains a name, is used.
func deriveName(explicitName string, path string) string {
// If the name was explicitly provided, use it.
if explicitName != "" {
return explicitName
}
// If the directory at path contains an initialized Function, use the name therein
f, err := bosonFunc.NewFunction(path)
// If the directory at path contains an initialized function, use the name therein
f, err := fn.NewFunction(path)
if err == nil && f.Name != "" {
return f.Name
}
@ -193,101 +249,205 @@ func deriveName(explicitName string, path string) string {
return ""
}
// deriveNameAndAbsolutePathFromPath returns resolved Function name and absolute path
// to the Function project root. The input parameter path could be one of:
// 'relative/path/to/foo', '/absolute/path/to/foo', 'foo' or ''
// deriveNameAndAbsolutePathFromPath returns resolved function name and absolute path
// to the function project root. The input parameter path could be one of:
// 'relative/path/to/foo', '/absolute/path/to/foo', 'foo' or ”.
func deriveNameAndAbsolutePathFromPath(path string) (string, string) {
var absPath string
// If path is not specifed, we would like to use current working dir
// If path is not specified, we would like to use current working dir
if path == "" {
path = cwd()
}
// Expand the passed Function name to its absolute path
// Expand the passed function name to its absolute path
absPath, err := filepath.Abs(path)
if err != nil {
return "", ""
}
// Get the name of the Function, which equals to name of the current directory
// Get the name of the function, which equals to name of the current directory
pathParts := strings.Split(strings.TrimRight(path, string(os.PathSeparator)), string(os.PathSeparator))
return pathParts[len(pathParts)-1], absPath
}
// deriveImage returns the same image name which will be used if no explicit
// image is provided. I.e. derived from the configured registry (registry
// plus username) and the Function's name.
//
// This is calculated preemptively here in the CLI (prior to invoking the
// client), only in order to provide information to the user via the prompt.
// The client will calculate this same value if the image override is not
// provided.
//
// Derivation logic:
// deriveImage attempts to arrive at a final, full image name:
// format: [registry]/[username]/[FunctionName]:[tag]
// example: quay.io/myname/my.function.name:tag.
//
// Registry can optionally be omitted, in which case DefaultRegistry
// will be prepended.
//
// If the image flag is provided, this value is used directly (the user supplied
// --image or $FUNC_IMAGE). Otherwise, the Function at 'path' is loaded, and
// the Image name therein is used (i.e. it was previously calculated).
// Finally, the default registry is used, which is prepended to the Function
// name, and appended with ':latest':
func deriveImage(explicitImage, defaultRegistry, path string) string {
if explicitImage != "" {
return explicitImage // use the explicit value provided.
func mergeEnvs(envs []fn.Env, envToUpdate *util.OrderedMap, envToRemove []string) ([]fn.Env, int, error) {
updated := sets.NewString()
var counter int
for i := range envs {
if envs[i].Name != nil {
value, present := envToUpdate.GetString(*envs[i].Name)
if present {
envs[i].Value = &value
updated.Insert(*envs[i].Name)
counter++
}
}
}
f, err := bosonFunc.NewFunction(path)
it := envToUpdate.Iterator()
for name, value, ok := it.NextString(); ok; name, value, ok = it.NextString() {
if !updated.Has(name) {
n := name
v := value
envs = append(envs, fn.Env{Name: &n, Value: &v})
counter++
}
}
for _, name := range envToRemove {
for i, envVar := range envs {
if *envVar.Name == name {
envs = append(envs[:i], envs[i+1:]...)
counter++
break
}
}
}
errMsg := fn.ValidateEnvs(envs)
if len(errMsg) > 0 {
return []fn.Env{}, 0, fmt.Errorf("error(s) while validating envs: %s", strings.Join(errMsg, "\n"))
}
return envs, counter, nil
}
// addConfirmFlag ensures common text/wording when the --path flag is used
func addConfirmFlag(cmd *cobra.Command, dflt bool) {
cmd.Flags().BoolP("confirm", "c", dflt, "Prompt to confirm options interactively ($FUNC_CONFIRM)")
}
// addPathFlag ensures common text/wording when the --path flag is used
func addPathFlag(cmd *cobra.Command) {
cmd.Flags().StringP("path", "p", "", "Path to the function. Default is current directory ($FUNC_PATH)")
}
// addVerboseFlag ensures common text/wording when the --path flag is used
func addVerboseFlag(cmd *cobra.Command, dflt bool) {
cmd.Flags().BoolP("verbose", "v", dflt, "Print verbose logs ($FUNC_VERBOSE)")
}
// cwd returns the current working directory or exits 1 printing the error.
func cwd() (cwd string) {
cwd, err := os.Getwd()
if err != nil {
return "" // unable to derive due to load error (uninitialized?)
panic(fmt.Sprintf("Unable to determine current working directory: %v", err))
}
if f.Image != "" {
return f.Image // use value previously provided or derived.
}
derivedValue, _ := bosonFunc.DerivedImage(path, defaultRegistry)
return derivedValue // Use the func system's derivation logic.
return cwd
}
func envVarsFromCmd(cmd *cobra.Command) map[string]string {
envVarsM := make(map[string]string)
if cmd.Flags().Changed("env") {
envVarsA, err := cmd.Flags().GetStringArray("env")
if err == nil {
for _, s := range envVarsA {
kvp := strings.Split(s, "=")
if len(kvp) == 2 && kvp[0] != "" {
envVarsM[kvp[0]] = kvp[1]
} else if len(kvp) == 1 && kvp[0] != "" {
envVarsM[kvp[0]] = ""
}
}
// Version information populated on build.
type Version struct {
// Version tag of the git commit, or 'tip' if no tag.
Vers string
// Kver is the version of knative in which func was most recently
// If the build is not tagged as being released with a specific Knative
// build, this is the most recent version of knative along with a suffix
// consisting of the number of commits which have been added since it was
// included in Knative.
Kver string
// Hash of the currently active git commit on build.
Hash string
// Verbose printing enabled for the string representation.
Verbose bool
}
// Return the stringification of the Version struct.
func (v Version) String() string {
// Initialize the default value to the zero semver with a descriptive
// metadta tag indicating this must have been built from source if
// undefined:
if v.Vers == "" {
v.Vers = DefaultVersion
}
if v.Verbose {
return v.StringVerbose()
}
_ = semver.MustParse(v.Vers)
return v.Vers
}
// StringVerbose returns the version along with extended version metadata.
func (v Version) StringVerbose() string {
var (
vers = v.Vers
kver = v.Kver
hash = v.Hash
)
if strings.HasPrefix(kver, "knative-") {
kver = strings.Split(kver, "-")[1]
}
return fmt.Sprintf(
"Version: %s\n"+
"Knative: %s\n"+
"Commit: %s\n"+
"SocatImage: %s\n"+
"TarImage: %s\n",
vers,
kver,
hash,
k8s.SocatImage,
k8s.TarImage)
}
// surveySelectDefault returns 'value' if defined and exists in 'options'.
// Otherwise, options[0] is returned if it exists. Empty string otherwise.
//
// Usage Example:
//
// languages := []string{ "go", "node", "rust" },
// survey.Select{
// Options: options,
// Default: surveySelectDefaut(cfg.Language, languages),
// }
//
// Summary:
//
// This protects against an incorrectly initialized survey.Select when the user
// has provided a nonexistant option (validation is handled elsewhere) or
// when a value is required but there exists no defaults (no default value on
// the associated flag).
//
// Explanation:
//
// The above example chooses the default for the Survey (--confirm) question
// in a way that works with user-provided flag and environment variable values.
//
// `cfg.Language` is the current value set in the config struct, which is
// populated from (in ascending order of precedence):
// static flag default, associated environment variable, or command flag.
// `languages` are the options which are being used by the survey select.
//
// This cascade allows for the Survey questions to be properly pre-initialzed
// with their associated environment variables or flags. For example,
// A user whose default language is set to 'node' using the global environment
// variable FUNC_LANGUAGE will have that option pre-selected when running
// `func create -c`.
//
// The 'survey' package expects the value of the Default member to exist
// in the 'Options' member. This is not possible when user-provided data is
// allowed for the default, hence this logic is necessary.
//
// For example, when the user is using prompts (--confirm) to select from a set
// of options, but the associated flag either has an unrecognized value, or no
// value at all, without this logic the resulting select prompt would be
// initialized with this as the default value, and the act of what appears to
// be choose the first option displayed does not overwrite the invalid default.
// It could perhaps be argued this is a shortcoming in the survey package, but
// it is also clearly an error to provide invalid data for a default.
func surveySelectDefault(value string, options []string) string {
for _, v := range options {
if value == v {
return v // The provided value is acceptable
}
}
return envVarsM
}
func mergeEnvVarsMaps(dest, src map[string]string) map[string]string {
result := make(map[string]string, len(dest)+len(src))
for name, value := range dest {
if strings.HasSuffix(name, "-") {
if _, ok := src[strings.TrimSuffix(name, "-")]; !ok {
result[name] = value
}
} else {
if _, ok := src[name+"-"]; !ok {
result[name] = value
}
}
if len(options) > 0 {
return options[0] // Sync with the option which will be shown by the UX
}
for name, value := range src {
result[name] = value
}
return result
// Either the value is not an option or there are no options. Either of
// which should fail proper validation
return ""
}

366
cmd/root_test.go Normal file
View File

@ -0,0 +1,366 @@
package cmd
import (
"bytes"
"fmt"
"io"
"os"
"path/filepath"
"reflect"
"strings"
"testing"
"github.com/ory/viper"
"knative.dev/client/pkg/util"
fn "knative.dev/func/pkg/functions"
. "knative.dev/func/pkg/testing"
)
const TestRegistry = "example.com/alice"
func TestRoot_mergeEnvMaps(t *testing.T) {
a := "A"
b := "B"
v1 := "x"
v2 := "y"
type args struct {
envs []fn.Env
toUpdate *util.OrderedMap
toRemove []string
}
tests := []struct {
name string
args args
want []fn.Env
}{
{
"add new var to empty list",
args{
[]fn.Env{},
util.NewOrderedMapWithKVStrings([][]string{{a, v1}}),
[]string{},
},
[]fn.Env{{Name: &a, Value: &v1}},
},
{
"add new var",
args{
[]fn.Env{{Name: &b, Value: &v2}},
util.NewOrderedMapWithKVStrings([][]string{{a, v1}}),
[]string{},
},
[]fn.Env{{Name: &b, Value: &v2}, {Name: &a, Value: &v1}},
},
{
"update var",
args{
[]fn.Env{{Name: &a, Value: &v1}},
util.NewOrderedMapWithKVStrings([][]string{{a, v2}}),
[]string{},
},
[]fn.Env{{Name: &a, Value: &v2}},
},
{
"update multiple vars",
args{
[]fn.Env{{Name: &a, Value: &v1}, {Name: &b, Value: &v2}},
util.NewOrderedMapWithKVStrings([][]string{{a, v2}, {b, v1}}),
[]string{},
},
[]fn.Env{{Name: &a, Value: &v2}, {Name: &b, Value: &v1}},
},
{
"remove var",
args{
[]fn.Env{{Name: &a, Value: &v1}},
util.NewOrderedMap(),
[]string{a},
},
[]fn.Env{},
},
{
"remove multiple vars",
args{
[]fn.Env{{Name: &a, Value: &v1}, {Name: &b, Value: &v2}},
util.NewOrderedMap(),
[]string{a, b},
},
[]fn.Env{},
},
{
"update and remove vars",
args{
[]fn.Env{{Name: &a, Value: &v1}, {Name: &b, Value: &v2}},
util.NewOrderedMapWithKVStrings([][]string{{a, v2}}),
[]string{b},
},
[]fn.Env{{Name: &a, Value: &v2}},
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
got, _, err := mergeEnvs(tt.args.envs, tt.args.toUpdate, tt.args.toRemove)
if err != nil {
t.Errorf("mergeEnvs() for initial vars %v and toUpdate %v and toRemove %v got error %v",
tt.args.envs, tt.args.toUpdate, tt.args.toRemove, err)
}
if !reflect.DeepEqual(got, tt.want) {
gotString := "{ "
for _, e := range got {
gotString += fmt.Sprintf("{ %s: %s } ", *e.Name, *e.Value)
}
gotString += "}"
wantString := "{ "
for _, e := range tt.want {
wantString += fmt.Sprintf("{ %s: %s } ", *e.Name, *e.Value)
}
wantString += "}"
t.Errorf("mergeEnvs() = got: %s, want %s", gotString, wantString)
}
})
}
}
// TestRoot_CommandNameParameterized confirmst that the command name, as
// printed in help text, is parameterized based on the constructor parameters
// of the root command. This allows, for example, to have help text correct
// when both embedded as a plugin or standalone.
func TestRoot_CommandNameParameterized(t *testing.T) {
expectedSynopsis := "%v is the command line interface for"
tests := []string{
"func", // standalone
"kn func", // kn plugin
}
for _, testName := range tests {
var (
cmd = NewRootCmd(RootCommandConfig{Name: testName})
out = strings.Builder{}
)
cmd.SetArgs([]string{}) // Do not use test command args
cmd.SetOut(&out)
if err := cmd.Help(); err != nil {
t.Fatal(err)
}
if cmd.Use != testName {
t.Fatalf("expected command Use '%v', got '%v'", testName, cmd.Use)
}
if !strings.HasPrefix(out.String(), fmt.Sprintf(expectedSynopsis, testName)) {
t.Logf("Testing '%v'\n", testName)
t.Log(out.String())
t.Fatalf("Help text does not include substituted name '%v'", testName)
}
}
}
func TestVerbose(t *testing.T) {
tests := []struct {
name string
args []string
want string
wantLF int
}{
{
name: "verbose as version's flag",
args: []string{"version", "-v"},
want: "Version: v0.42.0",
wantLF: 6,
},
{
name: "no verbose",
args: []string{"version"},
want: "v0.42.0",
wantLF: 1,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
viper.Reset()
var out bytes.Buffer
cmd := NewRootCmd(RootCommandConfig{
Name: "func",
Version: Version{
Vers: "v0.42.0",
Hash: "cafe",
Kver: "v1.10.0",
}})
cmd.SetArgs(tt.args)
cmd.SetOut(&out)
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
outLines := strings.Split(out.String(), "\n")
if len(outLines)-1 != tt.wantLF {
t.Errorf("expected output with %v line breaks but got %v:", tt.wantLF, len(outLines)-1)
}
if outLines[0] != tt.want {
t.Errorf("expected output: %q but got: %q", tt.want, outLines[0])
}
})
}
}
// TestRoot_effectivePath ensures that the path method returns the effective path
// to use with the following precedence: empty by default, then FUNC_PATH
// environment variable, -p flag, or finally --path with the highest precedence.
func TestRoot_effectivePath(t *testing.T) {
args := os.Args
t.Cleanup(func() { os.Args = args })
t.Run("default", func(t *testing.T) {
if effectivePath() != "" {
t.Fatalf("the default path should be '.', got '%v'", effectivePath())
}
})
t.Run("FUNC_PATH", func(t *testing.T) {
t.Setenv("FUNC_PATH", "p1")
if effectivePath() != "p1" {
t.Fatalf("the effetive path did not load the environment variable. Expected 'p1', got '%v'", effectivePath())
}
})
t.Run("--path", func(t *testing.T) {
os.Args = []string{"test", "--path=p2"}
if effectivePath() != "p2" {
t.Fatalf("the effective path did not load the --path flag. Expected 'p2', got '%v'", effectivePath())
}
})
t.Run("-p", func(t *testing.T) {
os.Args = []string{"test", "-p=p3"}
if effectivePath() != "p3" {
t.Fatalf("the effective path did not load the -p flag. Expected 'p3', got '%v'", effectivePath())
}
})
t.Run("short flag precedence", func(t *testing.T) {
t.Setenv("FUNC_PATH", "p1")
os.Args = []string{"test", "-p=p3"}
if effectivePath() != "p3" {
t.Fatalf("the effective path did not load the -p flag with precedence over FUNC_PATH. Expected 'p3', got '%v'", effectivePath())
}
})
t.Run("-p highest precedence", func(t *testing.T) {
t.Setenv("FUNC_PATH", "p1")
os.Args = []string{"test", "--path=p2", "-p=p3"}
if effectivePath() != "p3" {
t.Fatalf("the effective path did not take -p with highest precedence over --path and FUNC_PATH. Expected 'p3', got '%v'", effectivePath())
}
})
t.Run("continues on unrecognized flags", func(t *testing.T) {
os.Args = []string{"test", "-r=repo.example.com/bob", "-p=p3"}
if effectivePath() != "p3" {
t.Fatalf("the effective path did not evaluate when unexpected flags were present")
}
})
}
// Test_defaultNamespace ensures that the order of precedence for
// determining the effective namespace is followed.
// to use for the next deployment.
func Test_defaultNamespace(t *testing.T) {
// Clear non-test envs and set the test KUBECONFIG to nonexistent, but
// save the current working directory for setting kube context in some
// test cases.
cwd := Cwd()
_ = FromTempDirectory(t) // clears non-test envs and enters a temp dir.
t.Setenv("KUBECONFIG", filepath.Join(t.TempDir(), "nonexistent"))
// also clear the test KUBECONFIG env
tests := []struct {
name string
context bool
global bool
expected string
}{
// TODO cases for function state f.Namespace and f.Deploy.Namespace
{
name: "static default",
context: false, // no active kube context
global: false, // no global
expected: DefaultNamespace, // expect static default
}, {
name: "global config",
context: false,
global: true, // see the global defined in FUNC_HOME testdata
expected: "globaldefault", // expect global to override static
}, {
name: "active context",
context: true, // see the config in KUBECONFIG testdata
global: true,
expected: "mynamespace", // active context overrides global default
},
}
for _, test := range tests {
t.Run(test.name, func(t *testing.T) {
if test.global { // enable a global config setting
t.Setenv("XDG_CONFIG_HOME", filepath.Join(cwd, "testdata", "Test_defaultNamespace"))
}
if test.context { // enable an active kube context
t.Setenv("KUBECONFIG", filepath.Join(cwd, "testdata", "Test_defaultNamespace", "kubeconfig"))
}
namespace := defaultNamespace(fn.Function{}, false)
if namespace != test.expected {
t.Fatalf("%v: expected namespace %q, got %q", test.name, test.expected, namespace)
}
})
}
}
// Helpers
// -------
// pipe the output of stdout to a buffer whose value is returned
// from the returned function. Call pipe() to start piping output
// to the buffer, call the returned function to access the data in
// the buffer.
func piped(t *testing.T) func() string {
t.Helper()
var (
o = os.Stdout
c = make(chan error, 1)
b strings.Builder
)
r, w, err := os.Pipe()
if err != nil {
t.Fatal(err)
}
os.Stdout = w
go func() {
_, err := io.Copy(&b, r)
r.Close()
c <- err
}()
return func() string {
os.Stdout = o
w.Close()
err := <-c
if err != nil {
t.Fatal(err)
}
return strings.TrimSpace(b.String())
}
}

View File

@ -1,87 +1,392 @@
package cmd
import (
"context"
"encoding/json"
"errors"
"fmt"
"net"
"os"
"strconv"
"time"
"github.com/ory/viper"
"github.com/spf13/cobra"
bosonFunc "github.com/boson-project/func"
"github.com/boson-project/func/docker"
"knative.dev/func/pkg/config"
"knative.dev/func/pkg/docker"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/oci"
)
func init() {
// Add the run command as a subcommand of root.
root.AddCommand(runCmd)
runCmd.Flags().StringArrayP("env", "e", []string{}, "Environment variable to set in the form NAME=VALUE. You may provide this flag multiple times for setting multiple environment variables.")
runCmd.Flags().StringP("path", "p", cwd(), "Path to the project directory (Env: $FUNC_PATH)")
}
func NewRunCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "run",
Short: "Run the function locally",
Long: `
NAME
{{rootCmdUse}} run - Run a function locally
var runCmd = &cobra.Command{
Use: "run",
Short: "Run the function locally",
Long: `Run the function locally
SYNOPSIS
{{rootCmdUse}} run [-r|--registry] [-i|--image] [-e|--env] [--build]
[-b|--builder] [--builder-image] [-c|--confirm]
[--address] [--json] [-v|--verbose]
Runs the function locally in the current directory or in the directory
specified by --path flag. The function must already have been built with the 'build' command.
DESCRIPTION
Run the function locally.
Values provided for flags are not persisted to the function's metadata.
Containerized Runs
You can build your function in a container using the Pack or S2i builders.
On the contrary, non-containerized run is achieved via Host builder which
will use your host OS' environment to build the function. This builder is
currently enabled for Go and Python. Building defaults to using the Host
builder when available. You can alter this by using the --builder flag
eg: --builder=s2i.
Process Scaffolding
This is an Experimental Feature currently available only to Go and Python
projects. When running a function with --builder=host, the function is
first wrapped with code which presents it as a process. This "scaffolding"
is transient, written for each build or run, and should in most cases be
transparent to a function author.
EXAMPLES
o Run the function locally from within its container.
$ {{rootCmdUse}} run
o Run the function locally from within its container, forcing a rebuild
of the container even if no filesystem changes are detected. There are 2
builders available for containerized build - 'pack' and 's2i'.
$ {{rootCmdUse}} run --build=<builder>
o Run the function locally on the host with no containerization (Go/Python only).
$ {{rootCmdUse}} run --builder=host
o Run the function locally on a specific address.
$ {{rootCmdUse}} run --address='[::]:8081'
o Run the function locally and output JSON with the service address.
$ {{rootCmdUse}} run --json
`,
Example: `
# Build function's image first
kn func build
SuggestFor: []string{"rnu"},
PreRunE: bindEnv("build", "builder", "builder-image", "base-image",
"confirm", "env", "image", "path", "registry",
"start-timeout", "verbose", "address", "json"),
RunE: func(cmd *cobra.Command, _ []string) error {
return runRun(cmd, newClient)
},
}
# Run it locally as a container
kn func run
`,
SuggestFor: []string{"rnu"},
PreRunE: bindEnv("path"),
RunE: runRun,
}
func runRun(cmd *cobra.Command, args []string) (err error) {
config := newRunConfig(cmd)
function, err := bosonFunc.NewFunction(config.Path)
// Global Config
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
// Function Context
f, _ := fn.NewFunction(effectivePath())
if f.Initialized() {
cfg = cfg.Apply(f)
}
// Flags
//
// Globally-Configurable Flags:
cmd.Flags().StringP("builder", "b", cfg.Builder,
fmt.Sprintf("Builder to use when creating the function's container. Currently supported builders are %s.", KnownBuilders()))
cmd.Flags().StringP("registry", "r", cfg.Registry,
"Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)")
// Function-Context Flags:
// Options whose value is available on the function with context only
// (persisted but not globally configurable)
builderImage := f.Build.BuilderImages[f.Build.Builder]
cmd.Flags().String("builder-image", builderImage,
"Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)")
cmd.Flags().StringP("base-image", "", f.Build.BaseImage,
"Override the base image for your function (host builder only)")
cmd.Flags().StringP("image", "i", f.Image,
"Full image name in the form [registry]/[namespace]/[name]:[tag]. This option takes precedence over --registry. Specifying tag is optional. ($FUNC_IMAGE)")
cmd.Flags().StringArrayP("env", "e", []string{},
"Environment variable to set in the form NAME=VALUE. "+
"You may provide this flag multiple times for setting multiple environment variables. "+
"To unset, specify the environment variable name followed by a \"-\" (e.g., NAME-).")
cmd.Flags().Duration("start-timeout", f.Run.StartTimeout, fmt.Sprintf("time this function needs in order to start. If not provided, the client default %v will be in effect. ($FUNC_START_TIMEOUT)", fn.DefaultStartTimeout))
// TODO: Without the "Host" builder enabled, this code-path is unreachable,
// so remove hidden flag when either the Host builder path is available,
// or when containerized runs support start-timeout (and ideally both).
// Also remember to add it to the command help text's synopsis section.
_ = cmd.Flags().MarkHidden("start-timeout")
// Static Flags:
// Options which have static defaults only
// (not globally configurable nor persisted as function metadata)
cmd.Flags().String("build", "auto",
"Build the function. [auto|true|false]. ($FUNC_BUILD)")
cmd.Flags().Lookup("build").NoOptDefVal = "true" // register `--build` as equivalient to `--build=true`
cmd.Flags().String("address", "",
"Interface and port on which to bind and listen. Default is 127.0.0.1:8080, or an available port if 8080 is not available. ($FUNC_ADDRESS)")
cmd.Flags().Bool("json", false, "Output as JSON. ($FUNC_JSON)")
// Oft-shared flags:
addConfirmFlag(cmd, cfg.Confirm)
addPathFlag(cmd)
addVerboseFlag(cmd, cfg.Verbose)
// Tab Completion
if err := cmd.RegisterFlagCompletionFunc("builder", CompleteBuilderList); err != nil {
fmt.Println("internal: error while calling RegisterFlagCompletionFunc: ", err)
}
if err := cmd.RegisterFlagCompletionFunc("builder-image", CompleteBuilderImageList); err != nil {
fmt.Println("internal: error while calling RegisterFlagCompletionFunc: ", err)
}
return cmd
}
func runRun(cmd *cobra.Command, newClient ClientFactory) (err error) {
var (
cfg runConfig
f fn.Function
)
cfg = newRunConfig(cmd) // Will add Prompt on upcoming UX refactor
if f, err = fn.NewFunction(cfg.Path); err != nil {
return
}
if !f.Initialized() {
return fn.NewErrNotInitialized(f.Root)
}
if err = cfg.Validate(cmd, f); err != nil {
return
}
function.EnvVars = mergeEnvVarsMaps(function.EnvVars, config.EnvVars)
err = function.WriteConfig()
if err != nil {
if f, err = cfg.Configure(f); err != nil { // Updates f with deploy cfg
return
}
// Check if the Function has been initialized
if !function.Initialized() {
return fmt.Errorf("the given path '%v' does not contain an initialized function", config.Path)
container := f.Build.Builder != "host"
// Ignore the verbose flag if JSON output
if cfg.JSON {
cfg.Verbose = false
}
runner := docker.NewRunner()
runner.Verbose = config.Verbose
// Client
clientOptions, err := cfg.clientOptions()
if err != nil {
return
}
if container {
clientOptions = append(clientOptions, fn.WithRunner(docker.NewRunner(cfg.Verbose, os.Stdout, os.Stderr)))
}
if cfg.StartTimeout != 0 {
clientOptions = append(clientOptions, fn.WithStartTimeout(cfg.StartTimeout))
}
client := bosonFunc.New(
bosonFunc.WithRunner(runner),
bosonFunc.WithVerbose(config.Verbose))
client, done := newClient(ClientConfig{Verbose: cfg.Verbose}, clientOptions...)
defer done()
err = client.Run(cmd.Context(), config.Path)
// Build
//
// If requesting to run via the container, build the container if it is
// either out-of-date or a build was explicitly requested.
if container {
var digested bool
buildOptions, err := cfg.buildOptions()
if err != nil {
return err
}
// if image was specified, check if its digested and do basic validation
if cfg.Image != "" {
digested, err = isDigested(cfg.Image)
if err != nil {
return err
}
// image was parsed and both digested AND undigested imgs are valid
f.Build.Image = cfg.Image
}
// actual build step
if !digested {
if f, _, err = build(cmd, cfg.Build, f, client, buildOptions); err != nil {
return err
}
}
} else { // if !container
// dont run digested image without a container
if cfg.Image != "" {
digested, err := isDigested(cfg.Image)
if err != nil {
return err
}
if digested {
return fmt.Errorf("cannot use digested image with non-containerized builds (--builder=host)")
}
}
}
// Run
//
// Runs the code either via a container or the default host-based runner.
// For the former, build is required and a container runtime. For the
// latter, scaffolding is first applied and the local host must be
// configured to build/run the language of the function.
job, err := client.Run(cmd.Context(), f, fn.RunWithAddress(cfg.Address))
if err != nil {
return
}
defer func() {
if err = job.Stop(); err != nil {
fmt.Fprintf(cmd.OutOrStderr(), "Job stop error. %v", err)
}
}()
// Output based on format
if cfg.JSON {
// Create JSON output structure
output := struct {
Address string `json:"address"`
Host string `json:"host"`
Port string `json:"port"`
}{
Address: fmt.Sprintf("http://%s:%s", job.Host, job.Port),
Host: job.Host,
Port: job.Port,
}
jsonData, err := json.Marshal(output)
if err != nil {
return fmt.Errorf("failed to marshal JSON output: %w", err)
}
fmt.Fprintln(cmd.OutOrStdout(), string(jsonData))
} else {
fmt.Fprintf(cmd.OutOrStderr(), "Function running on %s\n", net.JoinHostPort(job.Host, job.Port))
}
select {
case <-cmd.Context().Done():
if !errors.Is(cmd.Context().Err(), context.Canceled) {
err = cmd.Context().Err()
}
case err = <-job.Errors:
return
// Bubble up runtime errors on the optional channel used for async job
// such as docker containers.
}
// NOTE: we do not f.Write() here unlike deploy (and build).
// running is ephemeral: a run is not affecting the function itself,
// as opposed to deploy commands, which are actually mutating the current
// state of the function as it exists on the network.
// Another way to think of this is that runs are development-centric tests,
// and thus most likely values changed such as environment variables,
// builder, etc. would not be expected to persist and affect the next deploy.
// Run is ephemeral, deploy is persistent.
return
}
type runConfig struct {
// Path of the Function implementation on local disk. Defaults to current
// working directory of the process.
Path string
buildConfig // further embeds config.Global
// Verbose logging.
Verbose bool
// Built instructs building to happen or not
// Can be 'auto' or a truthy value.
Build string
EnvVars map[string]string
// Env variables. may include removals using a "-"
Env []string
// StartTimeout optionally adjusts the startup timeout from the client's
// default of fn.DefaultStartTimeout.
StartTimeout time.Duration
// Address is the interface and port to bind (e.g. "0.0.0.0:8081")
Address string
// JSON output format
JSON bool
}
func newRunConfig(cmd *cobra.Command) runConfig {
return runConfig{
Path: viper.GetString("path"),
Verbose: viper.GetBool("verbose"), // defined on root
EnvVars: envVarsFromCmd(cmd),
func newRunConfig(cmd *cobra.Command) (c runConfig) {
c = runConfig{
buildConfig: newBuildConfig(),
Build: viper.GetString("build"),
Env: viper.GetStringSlice("env"),
StartTimeout: viper.GetDuration("start-timeout"),
Address: viper.GetString("address"),
JSON: viper.GetBool("json"),
}
// NOTE: .Env should be viper.GetStringSlice, but this returns unparsed
// results and appears to be an open issue since 2017:
// https://github.com/spf13/viper/issues/380
var err error
if c.Env, err = cmd.Flags().GetStringArray("env"); err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error reading envs: %v", err)
}
return
}
// Configure the given function. Updates a function struct with all
// configurable values. Note that the config alrady includes function's
// current state, as they were passed through via flag defaults.
func (c runConfig) Configure(f fn.Function) (fn.Function, error) {
var err error
f = c.buildConfig.Configure(f)
f.Run.StartTimeout = c.StartTimeout
f.Run.Envs, err = applyEnvs(f.Run.Envs, c.Env)
// The other members; build and path; are not part of function
// state, so are not mentioned here in Configure.
return f, err
}
func (c runConfig) Prompt() (runConfig, error) {
var err error
if c.buildConfig, err = c.buildConfig.Prompt(); err != nil {
return c, err
}
if !interactiveTerminal() || !c.Confirm {
return c, nil
}
// TODO: prompt for additional settings here
return c, nil
}
func (c runConfig) Validate(cmd *cobra.Command, f fn.Function) (err error) {
// Bubble
if err = c.buildConfig.Validate(); err != nil {
return
}
// --build can be "auto"|true|false
if c.Build != "auto" {
if _, err := strconv.ParseBool(c.Build); err != nil {
return fmt.Errorf("unrecognized value for --build '%v'. Accepts 'auto', 'true' or 'false' (or similarly truthy value)", c.Build)
}
}
if f.Build.Builder == "host" && !oci.IsSupported(f.Runtime) {
return fmt.Errorf("the %q runtime currently requires being run in a container", f.Runtime)
}
// When the docker runner respects the StartTimeout, this validation check
// can be removed
if c.StartTimeout != 0 && f.Build.Builder != "host" {
return errors.New("the ability to specify the startup timeout for containerized runs is coming soon")
}
return
}

603
cmd/run_test.go Normal file
View File

@ -0,0 +1,603 @@
package cmd
import (
"context"
"fmt"
"testing"
"time"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/mock"
. "knative.dev/func/pkg/testing"
)
func TestRun_Run(t *testing.T) {
tests := []struct {
name string // name of the test
desc string // description of the test
setup func(fn.Function, *testing.T) error // Optionally mutate function
args []string // args for the test case
buildError error // Set the builder to yield this error
runError error // Set the runner to yield this error
buildInvoked bool // should Builder.Build be invoked?
runInvoked bool // should Runner.Run be invoked?
jsonOutput bool // expect JSON output format
}{
{
name: "run and build by default",
desc: "Should run and build when build flag is not specified",
args: []string{},
buildInvoked: true,
runInvoked: true,
},
{
name: "run and build flag",
desc: "Should run and build when build is merely provided (defaults to true on presence)",
args: []string{"--build"},
buildInvoked: true,
runInvoked: true,
},
{
name: "run and build",
desc: "Should run and build when build is specifically requested",
args: []string{"--build=true"},
buildInvoked: true,
runInvoked: true,
},
{
name: "run and build with builder pack",
desc: "Should run and build when build is specifically requested with builder pack",
args: []string{"--build=true", "--builder=pack"},
buildInvoked: true,
runInvoked: true,
},
{
name: "run and build with builder s2i",
desc: "Should run and build when build is specifically requested with builder s2i",
args: []string{"--build=true", "--builder=s2i"},
buildInvoked: true,
runInvoked: true,
},
{
name: "run and build with builder invalid",
desc: "Should run and build when build is specifically requested with builder invalid",
args: []string{"--build=true", "--builder=invalid"},
buildError: fmt.Errorf("\"invalid\" is not a known builder. Available builders are \"pack\" and \"s2i\""),
buildInvoked: true,
runInvoked: true,
},
{
name: "run without build when disabled",
desc: "Should run but not build when build is expressly disabled",
args: []string{"--build=false"}, // can be any truthy value: 0, 'false' etc.
buildInvoked: false,
runInvoked: true,
},
{
name: "run and build on auto",
desc: "Should run and buil when build flag set to auto",
args: []string{"--build=auto"}, // can be any truthy value: 0, 'false' etc.
buildInvoked: true,
runInvoked: true,
},
{
name: "image existence builds",
desc: "Should build when image tag exists",
// The existence of an image tag value does not mean the function
// is built; that is the purvew of the buld stamp staleness check.
setup: func(f fn.Function, t *testing.T) error {
f.Image = "exampleimage"
return f.Write()
},
args: []string{},
buildInvoked: true,
runInvoked: true,
},
{
name: "Build errors return",
desc: "Errors building cause an immediate return with error",
args: []string{},
buildError: fmt.Errorf("generic build error"),
buildInvoked: true,
runInvoked: false,
},
{
name: "run with json output",
desc: "Should output JSON format when --json flag is used",
args: []string{"--json"},
buildInvoked: true,
runInvoked: true,
jsonOutput: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
root := FromTempDirectory(t)
runner := mock.NewRunner()
if tt.runError != nil {
runner.RunFn = func(context.Context, fn.Function, string, time.Duration) (*fn.Job, error) { return nil, tt.runError }
}
builder := mock.NewBuilder()
if tt.buildError != nil {
builder.BuildFn = func(f fn.Function) error { return tt.buildError }
}
// using a command whose client will be populated with mock
// builder and mock runner, each of which may be set to error if the
// test has an error defined.
cmd := NewRunCmd(NewTestClient(
fn.WithRunner(runner),
fn.WithBuilder(builder),
fn.WithRegistry("ghcr.com/reg"),
))
cmd.SetArgs(tt.args) // Do not use test command args
// set test case's function instance
f, err := fn.New().Init(fn.Function{Root: root, Runtime: "go"})
if err != nil {
t.Fatal(err)
}
if tt.setup != nil {
if err := tt.setup(f, t); err != nil {
t.Fatal(err)
}
}
ctx, cancel := context.WithCancel(context.Background())
runErrCh := make(chan error, 1)
go func() {
t0 := tt // capture tt into closure
_, err := cmd.ExecuteContextC(ctx)
if err != nil && t0.buildError != nil {
// This is an expected error, so simply continue execution ignoring
// the error (send nil on the channel to release the parent routine
runErrCh <- nil
return
} else if err != nil {
runErrCh <- err // error not expected
return
}
// No errors, but an error was expected:
if t0.buildError != nil {
runErrCh <- fmt.Errorf("Expected error: %v but got %v\n", t0.buildError, err)
}
// Ensure invocations match expectations
if builder.BuildInvoked != tt.buildInvoked {
runErrCh <- fmt.Errorf("Function was expected to build is: %v but build execution was: %v", tt.buildInvoked, builder.BuildInvoked)
}
if runner.RunInvoked != tt.runInvoked {
runErrCh <- fmt.Errorf("Function was expected to run is: %v but run execution was: %v", tt.runInvoked, runner.RunInvoked)
}
close(runErrCh) // release the waiting parent process
}()
cancel() // trigger the return of cmd.ExecuteContextC in the routine
<-ctx.Done()
if err := <-runErrCh; err != nil { // wait for completion of assertions
t.Fatal(err)
}
})
}
}
// TestRun_Images ensures that runnning 'func run' with --image
// (and additional flags) works as intended
func TestRun_Images(t *testing.T) {
tests := []struct {
name string
args []string
buildInvoked bool
runInvoked bool
runError error
buildError error
}{
{
name: "image with digest",
args: []string{"--image", "exampleimage@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},
runInvoked: true,
buildInvoked: false,
},
{
name: "image with tag direct deploy",
args: []string{"--image", "username/exampleimage:latest", "--build=false"},
runInvoked: true,
buildInvoked: false,
},
{
name: "digested image without container should fail",
args: []string{"--container=false", "--image", "exampleimage@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},
runInvoked: false,
buildInvoked: false,
buildError: fmt.Errorf("cannot use digested image with --container=false"),
},
{
name: "image should build even with tagged image given",
args: []string{"--image", "username/exampleimage:latest"},
runInvoked: true,
buildInvoked: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
root := FromTempDirectory(t)
runner := mock.NewRunner()
if tt.runError != nil {
runner.RunFn = func(context.Context, fn.Function, string, time.Duration) (*fn.Job, error) { return nil, tt.runError }
}
builder := mock.NewBuilder()
if tt.buildError != nil {
builder.BuildFn = func(f fn.Function) error { return tt.buildError }
}
// using a command whose client will be populated with mock
// builder and mock runner, each of which may be set to error if the
// test has an error defined.
cmd := NewRunCmd(NewTestClient(
fn.WithRunner(runner),
fn.WithBuilder(builder),
fn.WithRegistry("ghcr.com/reg"),
))
cmd.SetArgs(tt.args) // Do not use test command args
// set test case's function instance
_, err := fn.New().Init(fn.Function{Root: root, Runtime: "go"})
if err != nil {
t.Fatal(err)
}
ctx, cancel := context.WithCancel(context.Background())
runErrCh := make(chan error, 1)
go func() {
t0 := tt // capture tt into closure
_, err := cmd.ExecuteContextC(ctx)
if err != nil && t0.buildError != nil {
// This is an expected error, so simply continue execution ignoring
// the error (send nil on the channel to release the parent routine
runErrCh <- nil
return
} else if err != nil {
runErrCh <- err // error not expected
return
}
// No errors, but an error was expected:
if t0.buildError != nil {
runErrCh <- fmt.Errorf("Expected error: %v but got %v\n", t0.buildError, err)
}
// Ensure invocations match expectations
if builder.BuildInvoked != tt.buildInvoked {
runErrCh <- fmt.Errorf("Function was expected to build is: %v but build execution was: %v", tt.buildInvoked, builder.BuildInvoked)
}
if runner.RunInvoked != tt.runInvoked {
runErrCh <- fmt.Errorf("Function was expected to run is: %v but run execution was: %v", tt.runInvoked, runner.RunInvoked)
}
close(runErrCh) // release the waiting parent process
}()
cancel() // trigger the return of cmd.ExecuteContextC in the routine
<-ctx.Done()
if err := <-runErrCh; err != nil { // wait for completion of assertions
t.Fatal(err)
}
})
}
}
// TestRun_CorrectImage enusures that correct image gets passed through to the
// runner.
func TestRun_CorrectImage(t *testing.T) {
tests := []struct {
name string
image string
args []string
buildInvoked bool
expectError bool
}{
{
name: "image with digest, auto build",
args: []string{"--image", "exampleimage@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},
image: "exampleimage@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef",
buildInvoked: false,
},
{
name: "image with tag direct deploy",
args: []string{"--image", "username/exampleimage:latest", "--build=false"},
image: "username/exampleimage:latest",
buildInvoked: false,
},
{
name: "digested image without container should fail",
args: []string{"--container=false", "--image", "exampleimage@sha256:1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"},
image: "",
buildInvoked: false,
expectError: true,
},
{
name: "image should build even with tagged image given",
args: []string{"--image", "username/exampleimage:latest"},
image: "username/exampleimage:latest",
buildInvoked: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
root := FromTempDirectory(t)
runner := mock.NewRunner()
runner.RunFn = func(_ context.Context, f fn.Function, _ string, _ time.Duration) (*fn.Job, error) {
// TODO: add if for empty image? -- should fail beforehand
if f.Build.Image != tt.image {
return nil, fmt.Errorf("Expected image: %v but got: %v", tt.image, f.Build.Image)
}
errs := make(chan error, 1)
stop := func() error { return nil }
return fn.NewJob(f, "127.0.0.1", "8080", errs, stop, false)
}
builder := mock.NewBuilder()
if tt.expectError {
builder.BuildFn = func(f fn.Function) error { return fmt.Errorf("expected error") }
}
cmd := NewRunCmd(NewTestClient(
fn.WithRunner(runner),
fn.WithBuilder(builder),
fn.WithRegistry("ghcr.com/reg"),
))
cmd.SetArgs(tt.args)
// set test case's function instance
_, err := fn.New().Init(fn.Function{Root: root, Runtime: "go"})
if err != nil {
t.Fatal(err)
}
ctx, cancel := context.WithCancel(context.Background())
runErrCh := make(chan error, 1)
go func() {
t0 := tt // capture tt into closure
_, err := cmd.ExecuteContextC(ctx)
if err != nil && t0.expectError {
// This is an expected error, so simply continue execution ignoring
// the error (send nil on the channel to release the parent routine
runErrCh <- nil
return
} else if err != nil {
runErrCh <- err // error not expected
return
}
// No errors, but an error was expected:
if t0.expectError {
runErrCh <- fmt.Errorf("Expected error but got '%v'\n", err)
}
// Ensure invocations match expectations
if builder.BuildInvoked != tt.buildInvoked {
runErrCh <- fmt.Errorf("Function was expected to build is: %v but build execution was: %v", tt.buildInvoked, builder.BuildInvoked)
}
close(runErrCh) // release the waiting parent process
}()
cancel() // trigger the return of cmd.ExecuteContextC in the routine
<-ctx.Done()
if err := <-runErrCh; err != nil { // wait for completion of assertions
t.Fatal(err)
}
})
}
}
// TestRun_DirectOverride tests that an --image passed after a function has
// already been build, the given --image with digest will override built function
func TestRun_DirectOverride(t *testing.T) {
const overrideImage = "registry/myrepo/myimage@sha256:0000000000000000000000000000000000000000000000000000000000000000"
root := FromTempDirectory(t)
runner := mock.NewRunner()
runner.RunFn = func(_ context.Context, f fn.Function, _ string, _ time.Duration) (*fn.Job, error) {
if f.Build.Image != overrideImage {
return nil, fmt.Errorf("Expected image to be overridden with '%v' but got: '%v'", overrideImage, f.Build.Image)
}
errs := make(chan error, 1)
stop := func() error { return nil }
return fn.NewJob(f, "127.0.0.1", "8080", errs, stop, false)
}
builder1 := mock.NewBuilder()
// SETUP THE ENVIRONMENT & SITUATION
// create function
_, err := fn.New().Init(fn.Function{Root: root, Runtime: "go"})
if err != nil {
t.Fatal(err)
}
// build function
cmdBuild := NewBuildCmd(NewTestClient(fn.WithBuilder(builder1), fn.WithRegistry("example.com/ns-to-override")))
if err := cmdBuild.Execute(); err != nil {
t.Fatal(err)
}
// fetch the functions state
_, err = fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
// builder for 'func run' -- shall not be invoked
builder2 := mock.NewBuilder()
builder2.BuildFn = func(f fn.Function) error {
return fmt.Errorf("should not be invoked")
}
// RUN THE ACTUAL TESTED COMMAND
cmd := NewRunCmd(NewTestClient(
fn.WithRunner(runner),
fn.WithBuilder(builder2),
fn.WithRegistry("ghcr.com/reg"),
))
cmd.SetArgs([]string{fmt.Sprintf("--image=%s", overrideImage)})
// run function with above argument
ctx, cancel := context.WithCancel(context.Background())
runErrCh := make(chan error, 1)
go func() {
_, err := cmd.ExecuteContextC(ctx)
if err != nil {
runErrCh <- err // error was not expected
return
}
// Ensure invocation doesnt happen for the second time as the image was
// provided with a digest (should not build)
if builder2.BuildInvoked {
runErrCh <- fmt.Errorf("Function was not expected to build again but it did")
}
close(runErrCh) // release the waiting parent process
}()
cancel() // trigger the return of cmd.ExecuteContextC in the routine
<-ctx.Done()
if err := <-runErrCh; err != nil { // wait for completion of assertions
t.Fatal(err)
}
}
// TestRun_Address ensures that the --address flag is passed to the runner.
func TestRun_Address(t *testing.T) {
root := FromTempDirectory(t)
_, err := fn.New().Init(fn.Function{Root: root, Runtime: "go"})
if err != nil {
t.Fatal(err)
}
testAddr := "0.0.0.0:1234"
runner := mock.NewRunner()
runner.RunFn = func(_ context.Context, f fn.Function, addr string, _ time.Duration) (*fn.Job, error) {
if addr != testAddr {
return nil, fmt.Errorf("Expected address '%v' but got: '%v'", testAddr, addr)
}
errs := make(chan error, 1)
stop := func() error { return nil }
return fn.NewJob(f, "127.0.0.1", "8080", errs, stop, false)
}
// RUN THE ACTUAL TESTED COMMAND
cmd := NewRunCmd(NewTestClient(
fn.WithRunner(runner),
fn.WithRegistry("ghcr.com/reg"),
))
cmd.SetArgs([]string{"--address", testAddr})
ctx, cancel := context.WithCancel(context.Background())
runErrCh := make(chan error, 1)
go func() {
_, err := cmd.ExecuteContextC(ctx)
if err != nil {
runErrCh <- err // error was not expected
return
}
close(runErrCh) // release the waiting parent process
}()
cancel() // trigger the return of cmd.ExecuteContextC in the routine
<-ctx.Done()
if err := <-runErrCh; err != nil { // wait for completion of assertions
t.Fatal(err)
}
}
// TestRun_BaseImage ensures that running func run --base-image with various
// other
func TestRun_BaseImage(t *testing.T) {
const baseImage = "example.com/repo/baseImage"
tests := []struct {
name string
runtime string
builder string
expectError bool
}{
{
name: "should-succeed: python-runtime with host-builder",
runtime: "python",
builder: "host",
},
{
name: "should-succeed: go-runtime with host-builder",
runtime: "go",
builder: "host",
},
{
name: "should-fail: python-runtime with pack-builder",
runtime: "python",
builder: "pack",
expectError: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
root := FromTempDirectory(t)
runner := mock.NewRunner()
runner.RunFn = func(_ context.Context, f fn.Function, _ string, _ time.Duration) (*fn.Job, error) {
errs := make(chan error, 1)
stop := func() error { return nil }
return fn.NewJob(f, "127.0.0.1", "8080", errs, stop, false)
}
builder := mock.NewBuilder()
//if tt.expectError {
// builder.BuildFn = func(f fn.Function) error { return fmt.Errorf("expected error") }
//}
cmd := NewRunCmd(NewTestClient(
fn.WithRunner(runner),
fn.WithBuilder(builder),
fn.WithRegistry(TestRegistry),
))
args := []string{"--build=true", fmt.Sprintf("--builder=%s", tt.builder), fmt.Sprintf("--base-image=%s", baseImage)}
cmd.SetArgs(args)
// set test case's function instance
_, err := fn.New().Init(fn.Function{Root: root, Runtime: tt.runtime})
if err != nil {
t.Fatal(err)
}
ctx, cancel := context.WithCancel(context.Background())
runErrCh := make(chan error, 1)
go func() {
t0 := tt // capture tt into closure
_, err := cmd.ExecuteContextC(ctx)
if err != nil && t0.expectError {
// This is an expected error, so simply continue execution ignoring
// the error (send nil on the channel to release the parent routine
runErrCh <- nil
return
} else if err != nil {
runErrCh <- err // error not expected
return
}
// No errors, but an error was expected:
if t0.expectError {
runErrCh <- fmt.Errorf("Expected error but got '%v'\n", err)
}
close(runErrCh) // release the waiting parent process
}()
cancel() // trigger the return of cmd.ExecuteContextC in the routine
<-ctx.Done()
if err := <-runErrCh; err != nil { // wait for completion of assertions
t.Fatal(err)
}
})
}
}

136
cmd/subscribe.go Normal file
View File

@ -0,0 +1,136 @@
package cmd
import (
"fmt"
"strings"
"github.com/ory/viper"
"github.com/spf13/cobra"
fn "knative.dev/func/pkg/functions"
)
func NewSubscribeCmd() *cobra.Command {
cmd := &cobra.Command{
Use: "subscribe",
Short: "Subscribe a function to events",
Long: `Subscribe a function to events
Subscribe the function to a set of events, matching a set of filters for Cloud Event metadata
and a Knative Broker from where the events are consumed.
`,
Example: `
# Subscribe the function to the 'default' broker where events have 'type' of 'com.example'
and an 'extension' attribute for the value 'my-extension-value'.
{{rootCmdUse}} subscribe --filter type=com.example --filter extension=my-extension-value
# Subscribe the function to the 'my-broker' broker where events have 'type' of 'com.example'
and an 'extension' attribute for the value 'my-extension-value'.
{{rootCmdUse}} subscribe --filter type=com.example --filter extension=my-extension-value --source my-broker
`,
SuggestFor: []string{"subcsribe"}, //nolint:misspell
PreRunE: bindEnv("filter", "source"),
RunE: func(cmd *cobra.Command, _ []string) error {
return runSubscribe(cmd)
},
}
cmd.Flags().StringArrayP("filter", "f", []string{}, "Filter for the Cloud Event metadata")
cmd.Flags().StringP("source", "s", "default", "The source, like a Knative Broker")
addPathFlag(cmd)
return cmd
}
func runSubscribe(cmd *cobra.Command) (err error) {
var (
cfg subscibeConfig
f fn.Function
)
cfg = newSubscribeConfig(cmd)
if f, err = fn.NewFunction(effectivePath()); err != nil {
return
}
if !f.Initialized() {
return fn.NewErrNotInitialized(f.Root)
}
if !f.Initialized() {
return fn.NewErrNotInitialized(f.Root)
}
// add subscription to function
f.Deploy.Subscriptions = updateOrAddSubscription(f.Deploy.Subscriptions, cfg)
// pump it
return f.Write()
}
func extractFilterMap(filters []string) map[string]string {
subscriptionFilters := make(map[string]string)
for _, filter := range filters {
kv := strings.Split(filter, "=")
if len(kv) != 2 {
fmt.Println("Invalid pair:", filter)
continue
}
key := kv[0]
value := kv[1]
subscriptionFilters[key] = value
}
return subscriptionFilters
}
type subscibeConfig struct {
Filter []string
Source string
}
func updateOrAddSubscription(subscriptions []fn.KnativeSubscription, cfg subscibeConfig) []fn.KnativeSubscription {
found := false
newFilters := extractFilterMap(cfg.Filter)
// Iterate over subscriptions to find if one with the same source already exists
for i, subscription := range subscriptions {
if subscription.Source == cfg.Source {
found = true
if subscription.Filters == nil {
subscription.Filters = make(map[string]string)
}
// Update filters. Override if the key already exists.
for newKey, newValue := range newFilters {
subscription.Filters[newKey] = newValue
}
subscriptions[i] = subscription // Reassign the updated subscription
break
}
}
// If a subscription with the source was not found, add a new one
if !found {
subscriptions = append(subscriptions, fn.KnativeSubscription{
Source: cfg.Source,
Filters: newFilters,
})
}
return subscriptions
}
func newSubscribeConfig(cmd *cobra.Command) (c subscibeConfig) {
c = subscibeConfig{
Filter: viper.GetStringSlice("filter"),
Source: viper.GetString("source"),
}
// NOTE: .Filter should be viper.GetStringSlice, but this returns unparsed
// results and appears to be an open issue since 2017:
// https://github.com/spf13/viper/issues/380
var err error
if c.Filter, err = cmd.Flags().GetStringArray("filter"); err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error reading filter arguments: %v", err)
}
return
}

288
cmd/subscribe_test.go Normal file
View File

@ -0,0 +1,288 @@
package cmd
import (
"testing"
fn "knative.dev/func/pkg/functions"
. "knative.dev/func/pkg/testing"
)
func TestSubscribeWithAll(t *testing.T) {
root := FromTempDirectory(t)
_, err := fn.New().Init(fn.Function{Runtime: "go", Root: root})
if err != nil {
t.Fatal(err)
}
cmd := NewSubscribeCmd()
cmd.SetArgs([]string{"--source", "my-broker", "--filter", "foo=go"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err := fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if f.Deploy.Subscriptions == nil {
t.Fatal("Expected subscription to be present ")
}
if f.Deploy.Subscriptions[0].Source != "my-broker" {
t.Fatalf("Expected subscription for broker to be 'my-broker', but got '%v'", f.Deploy.Subscriptions[0].Source)
}
if f.Deploy.Subscriptions[0].Filters["foo"] != "go" {
t.Fatalf("Expected subscription filter for 'foo' to be 'go', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
}
func TestSubscribeWithMultiple(t *testing.T) {
root := FromTempDirectory(t)
_, err := fn.New().Init(fn.Function{Runtime: "go", Root: root})
if err != nil {
t.Fatal(err)
}
cmd := NewSubscribeCmd()
cmd.SetArgs([]string{"--source", "my-broker", "--filter", "foo=go"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err := fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if f.Deploy.Subscriptions == nil {
t.Fatal("Expected subscription to be present ")
}
if f.Deploy.Subscriptions[0].Source != "my-broker" {
t.Fatalf("Expected subscription for broker to be 'my-broker', but got '%v'", f.Deploy.Subscriptions[0].Source)
}
if f.Deploy.Subscriptions[0].Filters["foo"] != "go" {
t.Fatalf("Expected subscription filter for 'foo' to be 'go', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
cmd = NewSubscribeCmd()
cmd.SetArgs([]string{"--source", "my-broker", "--filter", "bar=foo"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err = fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if f.Deploy.Subscriptions == nil {
t.Fatal("Expected subscription to be present ")
}
if f.Deploy.Subscriptions[0].Source != "my-broker" {
t.Fatalf("Expected subscription for broker to be 'my-broker', but got '%v'", f.Deploy.Subscriptions[0].Source)
}
if f.Deploy.Subscriptions[0].Filters["foo"] != "go" {
t.Fatalf("Expected subscription filter for 'foo' to be 'go', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
if f.Deploy.Subscriptions[0].Filters["bar"] != "foo" {
t.Fatalf("Expected subscription filter for 'bar' to be 'foo', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
}
func TestSubscribeWithMultipleBrokersAndOverride(t *testing.T) {
root := FromTempDirectory(t)
_, err := fn.New().Init(fn.Function{Runtime: "go", Root: root})
if err != nil {
t.Fatal(err)
}
cmd := NewSubscribeCmd()
cmd.SetArgs([]string{"--source", "my-broker", "--filter", "foo=go"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err := fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if f.Deploy.Subscriptions == nil {
t.Fatal("Expected subscription to be present ")
}
if f.Deploy.Subscriptions[0].Source != "my-broker" {
t.Fatalf("Expected subscription for broker to be 'my-broker', but got '%v'", f.Deploy.Subscriptions[0].Source)
}
if f.Deploy.Subscriptions[0].Filters["foo"] != "go" {
t.Fatalf("Expected subscription filter for 'foo' to be 'go', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
cmd = NewSubscribeCmd()
cmd.SetArgs([]string{"--filter", "bar=foo"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err = fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if f.Deploy.Subscriptions == nil {
t.Fatal("Expected subscription to be present ")
}
if f.Deploy.Subscriptions[1].Source != "default" {
t.Fatalf("Expected subscription for broker to be 'default', but got '%v'", f.Deploy.Subscriptions[0].Source)
}
if f.Deploy.Subscriptions[1].Filters["bar"] != "foo" {
t.Fatalf("Expected subscription filter for 'bar' to be 'foo', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
cmd = NewSubscribeCmd()
cmd.SetArgs([]string{"--source", "my-broker", "--filter", "foo=golang"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err = fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if f.Deploy.Subscriptions == nil {
t.Fatal("Expected subscription to be present ")
}
if f.Deploy.Subscriptions[0].Source != "my-broker" {
t.Fatalf("Expected subscription for broker to be 'my-broker', but got '%v'", f.Deploy.Subscriptions[0].Source)
}
if f.Deploy.Subscriptions[0].Filters["foo"] != "golang" {
t.Fatalf("Expected subscription filter for 'foo' to be 'golang', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
}
func TestSubscribeWithNoExplicitSourceAll(t *testing.T) {
root := FromTempDirectory(t)
_, err := fn.New().Init(fn.Function{Runtime: "go", Root: root})
if err != nil {
t.Fatal(err)
}
cmd := NewSubscribeCmd()
cmd.SetArgs([]string{"--filter", "foo=go"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err := fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if f.Deploy.Subscriptions == nil {
t.Fatal("Expected subscription to be present ")
}
if f.Deploy.Subscriptions[0].Source != "default" {
t.Fatalf("Expected subscription for broker to be 'default', but got '%v'", f.Deploy.Subscriptions[0].Source)
}
if f.Deploy.Subscriptions[0].Filters["foo"] != "go" {
t.Fatalf("Expected subscription filter for 'foo' to be 'go', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
}
func TestSubscribeWithDuplicated(t *testing.T) {
root := FromTempDirectory(t)
_, err := fn.New().Init(fn.Function{Runtime: "go", Root: root})
if err != nil {
t.Fatal(err)
}
cmd := NewSubscribeCmd()
cmd.SetArgs([]string{"--source", "my-broker", "--filter", "foo=go"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err := fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if f.Deploy.Subscriptions == nil {
t.Fatal("Expected subscription to be present ")
}
if f.Deploy.Subscriptions[0].Source != "my-broker" {
t.Fatalf("Expected subscription for broker to be 'my-broker', but got '%v'", f.Deploy.Subscriptions[0].Source)
}
if f.Deploy.Subscriptions[0].Filters["foo"] != "go" {
t.Fatalf("Expected subscription filter for 'foo' to be 'go', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
// call it again with same
cmd = NewSubscribeCmd()
cmd.SetArgs([]string{"--source", "my-broker", "--filter", "foo=go"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err = fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if len(f.Deploy.Subscriptions) > 1 {
t.Fatal("Expected only one subscription to be present ")
}
// call it again and override
cmd = NewSubscribeCmd()
cmd.SetArgs([]string{"--source", "my-broker", "--filter", "foo=gogo"})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
}
// Now load the function and ensure that the subscription is set correctly.
f, err = fn.NewFunction(root)
if err != nil {
t.Fatal(err)
}
if len(f.Deploy.Subscriptions) > 1 {
t.Fatal("Expected only one subscription to be present ")
}
if f.Deploy.Subscriptions[0].Filters["foo"] != "gogo" {
t.Fatalf("Expected subscription filter for 'foo' to be 'gogo', but got '%v'", f.Deploy.Subscriptions[0].Filters["foo"])
}
}

180
cmd/templates.go Normal file
View File

@ -0,0 +1,180 @@
package cmd
import (
"encoding/json"
"errors"
"fmt"
"net/http"
"strings"
"text/tabwriter"
"github.com/ory/viper"
"github.com/spf13/cobra"
"knative.dev/func/pkg/config"
fn "knative.dev/func/pkg/functions"
)
// ErrTemplateRepoDoesNotExist is a sentinel error if a template repository responds with 404 status code
var ErrTemplateRepoDoesNotExist = errors.New("template repo does not exist")
func NewTemplatesCmd(newClient ClientFactory) *cobra.Command {
cmd := &cobra.Command{
Use: "templates",
Short: "List available function source templates",
Long: `
NAME
{{rootCmdUse}} templates - list available function source templates
SYNOPSIS
{{rootCmdUse}} templates [language] [--json] [-r|--repository]
DESCRIPTION
List all templates available, optionally for a specific language runtime.
To specify a URI of a single, specific repository for which templates
should be displayed, use the --repository flag.
Installed repositories are by default located at ~/.func/repositories
($XDG_CONFIG_HOME/.func/repositories). This can be overridden with
$FUNC_REPOSITORIES_PATH.
To see all available language runtimes, see the 'languages' command.
EXAMPLES
o Show a list of all available templates grouped by language runtime
$ {{rootCmdUse}} templates
o Show a list of all templates for the Go runtime
$ {{rootCmdUse}} templates go
o Return a list of all template runtimes in JSON output format
$ {{rootCmdUse}} templates --json
o Return Go templates in a specific repository
$ {{rootCmdUse}} templates go --repository=https://github.com/boson-project/templates
`,
PreRunE: bindEnv("json", "repository", "verbose"),
RunE: func(cmd *cobra.Command, args []string) error {
return runTemplates(cmd, args, newClient)
},
}
cfg, err := config.NewDefault()
if err != nil {
fmt.Fprintf(cmd.OutOrStdout(), "error loading config at '%v'. %v\n", config.File(), err)
}
cmd.Flags().Bool("json", false, "Set output to JSON format. (Env: $FUNC_JSON)")
cmd.Flags().StringP("repository", "r", "", "URI to a specific repository to consider ($FUNC_REPOSITORY)")
addVerboseFlag(cmd, cfg.Verbose)
return cmd
}
func runTemplates(cmd *cobra.Command, args []string, newClient ClientFactory) (err error) {
// Gather config
cfg, err := newTemplatesConfig()
if err != nil {
return
}
// Simple ping to the repo to avoid subsequent errors from http package if it does not exist
if cfg.Repository != "" {
res, err := http.Get(cfg.Repository)
if err != nil {
return err
}
defer res.Body.Close()
if res.StatusCode == http.StatusNotFound {
return ErrTemplateRepoDoesNotExist
}
}
// Client which will provide data
client, done := newClient(
ClientConfig{Verbose: cfg.Verbose},
fn.WithRepository(cfg.Repository))
defer done()
// For a single language runtime
// -------------------
if len(args) == 1 {
templates, err := client.Templates().List(args[0])
if err != nil {
return err
}
if cfg.JSON {
s, err := json.MarshalIndent(templates, "", " ")
if err != nil {
return err
}
fmt.Fprintln(cmd.OutOrStdout(), string(s))
} else {
for _, template := range templates {
fmt.Fprintln(cmd.OutOrStdout(), template)
}
}
return nil
} else if len(args) > 1 {
return errors.New("unexpected extra arguments")
}
// All language runtimes
// ------------
runtimes, err := client.Runtimes()
if err != nil {
return
}
if cfg.JSON {
// Gather into a single data structure for printing as json
templateMap := make(map[string][]string)
for _, runtime := range runtimes {
templates, err := client.Templates().List(runtime)
if err != nil {
return err
}
templateMap[runtime] = templates
}
s, err := json.MarshalIndent(templateMap, "", " ")
if err != nil {
return err
}
fmt.Fprintln(cmd.OutOrStdout(), string(s))
} else {
// print using a formatted writer (sorted)
builder := strings.Builder{}
writer := tabwriter.NewWriter(&builder, 0, 0, 3, ' ', 0)
fmt.Fprint(writer, "LANGUAGE\tTEMPLATE\n")
for _, runtime := range runtimes {
templates, err := client.Templates().List(runtime)
if err != nil {
return err
}
for _, template := range templates {
fmt.Fprintf(writer, "%v\t%v\n", runtime, template)
}
}
writer.Flush()
fmt.Fprint(cmd.OutOrStdout(), builder.String())
}
return
}
type templatesConfig struct {
Verbose bool
Repository string // Consider only a specific repository (URI)
JSON bool // output as JSON
}
func newTemplatesConfig() (cfg templatesConfig, err error) {
cfg = templatesConfig{
Verbose: viper.GetBool("verbose"),
Repository: viper.GetString("repository"),
JSON: viper.GetBool("json"),
}
return
}

View File

@ -0,0 +1,59 @@
// Copyright © 2020 The Knative Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package templates
import (
"text/template"
"github.com/spf13/cobra"
)
// CommandGroup is for grouping together commands
type CommandGroup struct {
// Title for command group shown in help/usage messages
Header string
// List of commands for this group
Commands []*cobra.Command
}
type CommandGroups []CommandGroup
// AddTo adds all commands from this group slice to the given command
func (g CommandGroups) AddTo(cmd *cobra.Command) {
for _, group := range g {
for _, sub := range group.Commands {
cmd.AddCommand(sub)
}
}
}
// SetRootUsage sets our own help and usage function messages to the root command
func (g CommandGroups) SetRootUsage(rootCmd *cobra.Command, extraTemplateFunctions *template.FuncMap) {
engine := newTemplateEngine(rootCmd, g, extraTemplateFunctions)
setHelpFlagsToSubCommands(rootCmd)
rootCmd.SetUsageFunc(engine.usageFunc())
rootCmd.SetHelpFunc(engine.helpFunc())
}
func setHelpFlagsToSubCommands(parent *cobra.Command) {
for _, cmd := range parent.Commands() {
if cmd.HasSubCommands() {
setHelpFlagsToSubCommands(cmd)
}
cmd.DisableFlagsInUseLine = true
}
}

View File

@ -0,0 +1,69 @@
// Copyright © 2020 The Knative Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package templates
import (
"fmt"
"testing"
"github.com/spf13/cobra"
"gotest.tools/v3/assert"
"knative.dev/client/pkg/util"
"knative.dev/client/pkg/util/test"
)
var groups = CommandGroups{
{
"header-1",
[]*cobra.Command{{Use: "c0"}, {Use: "c1"}},
},
{
"header-2",
[]*cobra.Command{{Use: "c2"}},
},
}
func TestAddTo(t *testing.T) {
rootCmd := &cobra.Command{Use: "root"}
groups.AddTo(rootCmd)
for idx, cmd := range rootCmd.Commands() {
assert.Equal(t, cmd.Name(), fmt.Sprintf("c%d", idx))
}
}
func TestSetUsage(t *testing.T) {
rootCmd := &cobra.Command{Use: "root", Short: "root", Run: func(cmd *cobra.Command, args []string) {}}
groups.AddTo(rootCmd)
groups.SetRootUsage(rootCmd, nil)
for _, cmd := range rootCmd.Commands() {
assert.Assert(t, cmd.DisableFlagsInUseLine)
}
capture := test.CaptureOutput(t)
err := (rootCmd.UsageFunc())(rootCmd)
assert.NilError(t, err)
stdOut, stdErr := capture.Close()
assert.Equal(t, stdErr, "")
assert.Assert(t, util.ContainsAll(stdOut, "header-1", "header-2"))
capture = test.CaptureOutput(t)
(rootCmd.HelpFunc())(rootCmd, nil)
stdOut, stdErr = capture.Close()
assert.Equal(t, stdErr, "")
assert.Assert(t, util.ContainsAll(stdOut, "root", "header-1", "header-2"))
}

View File

@ -0,0 +1,212 @@
// Copyright © 2020 The Knative Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package templates
import (
"bytes"
"fmt"
"os"
"strings"
"text/template"
"unicode"
"github.com/spf13/cobra"
flag "github.com/spf13/pflag"
"golang.org/x/term"
)
type templateEngine struct {
RootCmd *cobra.Command
CommandGroups
functions template.FuncMap
}
// Create new template engine
func newTemplateEngine(rootCmd *cobra.Command, g CommandGroups, extraFunctions *template.FuncMap) templateEngine {
engine := templateEngine{
RootCmd: rootCmd,
CommandGroups: g,
}
engine.functions = engine.templateFunctions()
if extraFunctions != nil {
for name, function := range *extraFunctions {
engine.functions[name] = function
}
}
return engine
}
func (e templateEngine) usageFunc() func(*cobra.Command) error {
return func(c *cobra.Command) error {
return e.fillTemplate("usage", c, usageTemplate())
}
}
func (e templateEngine) helpFunc() func(*cobra.Command, []string) {
return func(c *cobra.Command, s []string) {
err := e.fillTemplate("help", c, helpTemplate(c.Long))
if err != nil {
c.Println(err)
}
}
}
func (e templateEngine) fillTemplate(name string, c *cobra.Command, templ string) error {
t := template.New(name)
t.Funcs(e.functions)
_, err := t.Parse(templ)
if err != nil {
fmt.Fprintf(c.ErrOrStderr(), "\nINTERNAL: >>>>> %v\n", err)
return err
}
return t.Execute(c.OutOrStdout(), c)
}
// ======================================================================================
// Template helper functions
func (e templateEngine) templateFunctions() template.FuncMap {
return template.FuncMap{
"cmdGroupsString": e.cmdGroupsString,
"subCommandsString": e.subCommandsString,
"useLine": useLine,
"visibleFlags": visibleFlags,
"rpad": rpad,
"rootCmdName": e.rootCmdName,
"rootCmdUse": e.rootCmdUse,
"isRootCmd": e.isRootCmd,
"flagsUsages": flagsUsagesCobra, // or use flagsUsagesKubectl for kubectl like flag styles
"trim": strings.TrimSpace,
"trimRight": func(s string) string { return strings.TrimRightFunc(s, unicode.IsSpace) },
"trimLeft": func(s string) string { return strings.TrimLeftFunc(s, unicode.IsSpace) },
"execTemplate": e.executeTemplate,
}
}
func (e templateEngine) executeTemplate(tbody string, data any) (string, error) {
t, err := template.New("").Funcs(e.templateFunctions()).Parse(tbody)
if err != nil {
return "", err
}
buf := &strings.Builder{}
err = t.Execute(buf, data)
return buf.String(), err
}
func (e templateEngine) cmdGroupsString() string {
groups := make([]string, 0, len(e.CommandGroups))
for _, cmdGroup := range e.CommandGroups {
groups = append(groups, formatCommandGroup(cmdGroup))
}
return strings.Join(groups, "\n\n")
}
func (e templateEngine) subCommandsString(c *cobra.Command) string {
return formatCommandGroup(CommandGroup{
Header: "Available Commands:",
Commands: c.Commands(),
})
}
func (e templateEngine) rootCmdName() string {
return e.RootCmd.CommandPath()
}
func (e templateEngine) rootCmdUse() string {
return e.RootCmd.Use
}
func (e templateEngine) isRootCmd(c *cobra.Command) bool {
return e.RootCmd == c
}
func visibleFlags(c *cobra.Command) *flag.FlagSet {
ret := flag.NewFlagSet("filtered", flag.ContinueOnError)
local := c.LocalFlags()
persistent := c.PersistentFlags()
local.VisitAll(func(flag *flag.Flag) {
if flag.Name != "help" && persistent.Lookup(flag.Name) == nil {
ret.AddFlag(flag)
}
})
return ret
}
func useLine(c *cobra.Command) string {
var useLine string
var suffix string
if c.HasParent() {
useLine = c.Parent().CommandPath() + " " + c.Use
suffix = "[flags]"
} else {
useLine = c.Use
suffix = "[command]"
}
if c.HasFlags() && !strings.Contains(useLine, suffix) {
useLine += " " + suffix
}
return useLine
}
func formatCommandGroup(cmdGroup CommandGroup) string {
cmds := []string{cmdGroup.Header}
for _, cmd := range cmdGroup.Commands {
if cmd.IsAvailableCommand() {
cmds = append(cmds, " "+rpad(cmd.Name(), cmd.NamePadding())+" "+cmd.Short)
}
}
return strings.Join(cmds, "\n")
}
func rpad(s string, padding int) string {
t := fmt.Sprintf("%%-%ds", padding)
return fmt.Sprintf(t, s)
}
// flagsUsagesCobra formats flags in Cobra style
func flagsUsagesCobra(f *flag.FlagSet) string {
width, _, err := term.GetSize(int(os.Stdout.Fd()))
if err == nil {
return f.FlagUsagesWrapped(width)
} else {
return f.FlagUsages()
}
}
// flagsUsagesKubectl formats the flags like kubectl does
func flagsUsagesKubectl(f *flag.FlagSet) string {
x := new(bytes.Buffer)
f.VisitAll(func(flag *flag.Flag) {
if flag.Hidden {
return
}
format := "--%s=%s: %s\n"
if flag.Value.Type() == "string" {
format = "--%s='%s': %s\n"
}
if len(flag.Shorthand) > 0 {
format = " -%s, " + format
} else {
format = " %s " + format
}
fmt.Fprintf(x, format, flag.Shorthand, flag.Name, flag.DefValue, flag.Usage)
})
return x.String()
}

View File

@ -0,0 +1,172 @@
// Copyright © 2020 The Knative Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package templates
import (
"strings"
"testing"
flag "github.com/spf13/pflag"
"github.com/spf13/cobra"
"gotest.tools/v3/assert"
"knative.dev/client/pkg/util"
"knative.dev/client/pkg/util/test"
)
type testData struct {
cmd *cobra.Command
validate func(*testing.T, string, *cobra.Command)
}
func TestUsageFunc(t *testing.T) {
rootCmd, engine := newTestTemplateEngine()
subCmdWithSubs, _, _ := rootCmd.Find([]string{"g1.1"})
subCmd, _, _ := rootCmd.Find([]string{"g2.1"})
data := []testData{
{
rootCmd,
func(t *testing.T, out string, command *cobra.Command) {
validateRootUsageOutput(t, out)
},
},
{
subCmd,
func(t *testing.T, out string, command *cobra.Command) {
validateSubUsageOutput(t, out, command)
},
},
{
subCmdWithSubs,
func(t *testing.T, out string, command *cobra.Command) {
validateSubUsageOutput(t, out, command)
subsub := command.Commands()[0]
assert.Assert(t, util.ContainsAll(out, subsub.Name(), subsub.Short, "Available Commands:"))
},
},
}
for _, d := range data {
capture := test.CaptureOutput(t)
err := (engine.usageFunc())(d.cmd)
assert.NilError(t, err)
stdOut, stdErr := capture.Close()
assert.Equal(t, stdErr, "")
d.validate(t, stdOut, d.cmd)
}
}
func TestHelpFunc(t *testing.T) {
rootCmd, engine := newTestTemplateEngine()
subCmd := rootCmd.Commands()[0]
data := []testData{
{
rootCmd,
func(t *testing.T, out string, command *cobra.Command) {
validateRootUsageOutput(t, out)
assert.Assert(t, strings.Contains(out, command.Long))
},
},
{
subCmd,
func(t *testing.T, out string, command *cobra.Command) {
validateSubUsageOutput(t, out, command)
assert.Assert(t, strings.Contains(out, command.Long))
},
},
}
for _, d := range data {
capture := test.CaptureOutput(t)
(engine.helpFunc())(d.cmd, []string{})
stdOut, stdErr := capture.Close()
assert.Equal(t, stdErr, "")
d.validate(t, stdOut, d.cmd)
}
}
func TestUsageFlags(t *testing.T) {
f := flag.NewFlagSet("test", flag.ContinueOnError)
f.StringP("test", "t", "default", "test-option")
usage := flagsUsagesKubectl(f)
assert.Equal(t, usage, " -t, --test='default': test-option\n")
usage = flagsUsagesCobra(f)
assert.Equal(t, usage, " -t, --test string test-option (default \"default\")\n")
// test for flag with no shorthand
fl := f.Lookup("test")
assert.Assert(t, fl != nil)
fl.Shorthand = ""
usage = flagsUsagesKubectl(f)
assert.Equal(t, usage, " --test='default': test-option\n")
// test for hidden flag
err := f.MarkHidden("test")
assert.NilError(t, err)
usage = flagsUsagesKubectl(f)
assert.Equal(t, usage, "")
}
func validateRootUsageOutput(t *testing.T, stdOut string) {
assert.Assert(t, util.ContainsAll(stdOut, "root"))
assert.Assert(t, util.ContainsAll(stdOut, "header-1", "g1.1", "desc-g1.1", "g1.2", "desc-g1.2"))
assert.Assert(t, util.ContainsAll(stdOut, "header-2", "g2.1", "desc-g2.1", "g2.2", "desc-g2.2", "g2.3", "desc-g2.3"))
assert.Assert(t, util.ContainsAll(stdOut, "Use", "root", "--help"))
assert.Assert(t, util.ContainsAll(stdOut, "Use", "root", "<command>"))
}
func validateSubUsageOutput(t *testing.T, stdOut string, cmd *cobra.Command) {
assert.Assert(t, util.ContainsAll(stdOut, "Usage", cmd.CommandPath()+" [flags]"))
assert.Assert(t, util.ContainsAll(stdOut, "Flags", "--local-opt", "local option"))
assert.Assert(t, util.ContainsAll(stdOut, "Aliases", "alias"))
}
func newTestTemplateEngine() (*cobra.Command, templateEngine) {
rootCmd := &cobra.Command{Use: "root", Short: "desc-root", Long: "longdesc-root"}
rootCmd.PersistentFlags().String("global-opt", "", "global option")
cmdGroups := CommandGroups{
{
"header-1",
[]*cobra.Command{newCmd("g1.1"), newCmd("g1.2")},
},
{
"header-2",
[]*cobra.Command{newCmd("g2.1"), newCmd("g2.2"), newCmd("g2.3")},
},
}
engine := newTemplateEngine(rootCmd, cmdGroups, nil)
cmdGroups.AddTo(rootCmd)
// Add a sub-command to first command
cmd, _, _ := rootCmd.Find([]string{"g1.1"})
cmd.AddCommand(newCmd("g1.1.1"))
rootCmd.SetUsageFunc(engine.usageFunc())
return rootCmd, engine
}
func newCmd(name string) *cobra.Command {
ret := &cobra.Command{
Use: name,
Short: "desc-" + name,
Long: "longdesc-" + name,
Run: func(cmd *cobra.Command, args []string) {},
Aliases: []string{"alias"},
}
ret.Flags().String("local-opt", "", "local option")
return ret
}

View File

@ -0,0 +1,93 @@
// Copyright © 2020 The Knative Authors
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
package templates
import (
"strings"
"unicode"
)
// Templates for help & usage messages. These have been initially taken over from
// https://github.com/kubernetes/kubectl/blob/f9e4fa6b9cff11b6e2949b76680b8cd5b8192eab/pkg/util/templates/templates.go
// and adapted to the specific needs of `kn`
const (
// sectionUsage is the help template section that displays the command's usage.
sectionUsage = `{{if and .Runnable (ne .UseLine "") (not (isRootCmd .))}}Usage:
{{useLine .}}
{{end}}`
// sectionAliases is the help template section that displays the command's aliases.
sectionAliases = `{{if ne (len .Aliases) 0}}Aliases:
{{.NameAndAliases}}
{{end}}`
// sectionExamples is the help template section that displays command examples.
sectionExamples = `{{if .HasExample}}Examples:
{{trimRight (execTemplate .Example .)}}
{{end}}`
// sectionCommandGroups is the grouped help message
sectionCommandGroups = `{{if isRootCmd .}}{{cmdGroupsString}}
{{end}}`
// sectionSubCommands is the help template section that displays the command's subcommands.
sectionSubCommands = `{{if and (not (isRootCmd .)) .HasAvailableSubCommands}}{{subCommandsString .}}
{{end}}`
// sectionFlags is the help template section that displays the command's flags.
sectionFlags = `{{$visibleFlags := visibleFlags .}}{{ if $visibleFlags.HasFlags}}Flags:
{{trimRight (flagsUsages $visibleFlags)}}
{{end}}`
// sectionGlobalFlags is the help template section that displays inherited flags.
sectionGlobalFlags = `{{if .HasInheritedFlags}}Global Flags:
{{trimRight (flagsUsages .InheritedFlags)}}
{{end}}`
// sectionTipsHelp is the help template section that displays the '--help' hint.
sectionTipsHelp = `{{if .HasSubCommands}}Use "{{rootCmdName}} <command> --help" for more information about a given command.
{{end}}`
)
// usageTemplate if the template for 'usage' used by most commands.
func usageTemplate() string {
sections := []string{
sectionUsage,
sectionAliases,
sectionExamples,
sectionCommandGroups,
sectionSubCommands,
sectionFlags,
sectionGlobalFlags,
sectionTipsHelp,
}
return strings.TrimRightFunc(strings.Join(sections, ""), unicode.IsSpace) + "\n"
}
// helpTemplate is the template for 'help' used by most commands.
func helpTemplate(message string) string {
if len(message) == 0 {
message = `{{with or .Long .Short }}{{. | trim}}{{end}}`
}
return message + "\n\n" + `{{if or .Runnable .HasSubCommands}}{{.UsageString}}{{end}}`
}

Some files were not shown because too many files have changed in this diff Show More