Compare commits

...

280 Commits

Author SHA1 Message Date
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
253 changed files with 24304 additions and 19384 deletions

View File

@ -16,9 +16,12 @@ comment:
behavior: default
ignore:
- "testdata"
- "**/zz_*generated*.go"
- "**/zz*_generated.go"
- "templates"
- "hack"
- "test"
- "generate"
- "docs"
- "plugin"
- "schema"
- "third_party"

View File

@ -1,10 +0,0 @@
name: "Golang setup"
description: "Golang setup"
runs:
using: "composite"
steps:
- uses: actions/setup-go@v5
with:
go-version: 1.22.x
check-latest: true

View File

@ -9,7 +9,7 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- name: Lint
run: make check && make check-templates
- name: Check that 'func.yaml schema' is up-to-date
@ -26,7 +26,7 @@ jobs:
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
@ -38,10 +38,10 @@ jobs:
run: make test
- name: Template Unit Tests
run: make test-templates
- uses: codecov/codecov-action@v4
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: unit-tests-${{ matrix.os }}
flags: unit-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
@ -54,18 +54,35 @@ jobs:
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: ./hack/allocate.sh
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@v4
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: integration-tests
@ -84,19 +101,36 @@ jobs:
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: ./hack/allocate.sh
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@v4
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: e2e-test
flags: e2e-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
@ -112,26 +146,41 @@ jobs:
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- uses: imjasonh/setup-ko@v0.6
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: ./hack/allocate.sh
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 Tekton
run: ./hack/install-tekton.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@v4
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: e2e-test-oncluster
flags: e2e-tests
fail_ci_if_error: true
verbose: true
token: ${{ secrets.CODECOV_TOKEN }}
@ -141,7 +190,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
# Standard build tasks
- name: Build
run: make cross-platform
@ -180,6 +229,8 @@ jobs:
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:
@ -188,11 +239,14 @@ jobs:
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push
run: |
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:latest" \
-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" \
@ -203,6 +257,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- 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

View File

@ -11,6 +11,6 @@ jobs:
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- name: Check that 'func.yaml schema' is up-to-date
run: make schema-check

View File

@ -17,16 +17,31 @@ jobs:
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- uses: imjasonh/setup-ko@v0.6
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: ./hack/allocate.sh
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 Tekton
run: ./hack/install-tekton.sh
- name: Deploy Test Git Server
run: ./hack/install-git-server.sh
- name: E2E On Cluster Test (Runtimes)
@ -47,7 +62,3 @@ jobs:
echo "::group::cluster containers logs"
stern '.*' --all-namespaces --no-follow
echo "::endgroup::"
- uses: codecov/codecov-action@v4
with:
files: ./coverage.txt
flags: e2e-test-oncluster-runtime

View File

@ -15,25 +15,41 @@ jobs:
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- uses: imjasonh/setup-ko@v0.6
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: ./hack/allocate.sh
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 Tekton
run: ./hack/install-tekton.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@v4
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: e2e-test-oncluster
flags: e2e-tests

View File

@ -12,26 +12,67 @@ jobs:
continue-on-error: true
strategy:
matrix:
runtime: ["node", "go", "python", "quarkus", "springboot", "typescript", "rust"]
runs-on: ubuntu-latest
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: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- name: Install Binaries
env:
ARCH: ${{ matrix.arch }}
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: ./hack/allocate.sh
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: make test-e2e-runtime runtime=${{ matrix.runtime }}
- uses: codecov/codecov-action@v4
with:
files: ./coverage.txt
flags: e2e-test-runtime-${{ 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 ------------------"

View File

@ -15,16 +15,33 @@ jobs:
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: ./hack/allocate.sh
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@v4
- uses: codecov/codecov-action@v5
with:
files: ./coverage.txt
flags: e2e-test
flags: e2e-tests

View File

@ -1,20 +1,20 @@
name: Func Embedded FS Test
name: Func Check Embedded FS
on: [pull_request]
jobs:
test:
name: Func Embedded FS Test
name: Func Check Embedded FS
strategy:
matrix:
os: ["ubuntu-latest"]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- name: Check embedded templates content
run: |
if ! go test -run "^\QTestFileSystems\E$/^\Qembedded\E$" ./pkg/filesystem; then
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

View File

@ -21,24 +21,37 @@ jobs:
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.127.0.0.1.sslip.io" >> "$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.127.0.0.1.sslip.io" >> "$GITHUB_ENV"
echo "PAC_CONTROLLER_HOSTNAME=pac-ctr.localtest.me" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- 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: Allocate Cluster
run: ./hack/allocate.sh
- name: Setup testing images
run: ./hack/setup-testing-images.sh
- name: Install Tekton
run: ./hack/install-tekton.sh
- name: Install Pipelines as Code
run: ./hack/install-pac.sh
- name: Install Gitlab
run: ./hack/install-gitlab.sh
- name: Patch Hosts
@ -65,7 +78,7 @@ jobs:
name: cluster-logs
path: ./cluster_log.txt
retention-days: 7
- uses: codecov/codecov-action@v4
- 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

View File

@ -15,26 +15,33 @@ jobs:
echo "KUBECONFIG=${{ github.workspace }}/hack/bin/kubeconfig.yaml" >> "$GITHUB_ENV"
echo "PATH=${{ github.workspace }}/hack/bin:$PATH" >> "$GITHUB_ENV"
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- name: Install Podman
run: |
# TODO uncomment following once https:.github.com/containers/podman/pull/16781 is in the kubic repository
#. /etc/os-release
#sudo mkdir -p /etc/apt/keyrings
#curl -fsSL https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_${VERSION_ID}/Release.key \
# | gpg --dearmor \
# | sudo tee /etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg > /dev/null
#echo \
# "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/devel_kubic_libcontainers_unstable.gpg]\
# https://download.opensuse.org/repositories/devel:kubic:libcontainers:unstable/xUbuntu_${VERSION_ID}/ /" \
# | sudo tee /etc/apt/sources.list.d/devel:kubic:libcontainers:unstable.list > /dev/null
#sudo apt-get update -qq
sudo apt-get -qq -y install podman
sudo apt update
sudo apt install podman -y
podman info
- name: Install Binaries
run: ./hack/install-binaries.sh
- name: Allocate Cluster
run: ./hack/allocate.sh
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

View File

@ -24,7 +24,7 @@ jobs:
echo "$(brew --prefix)/opt/gnu-sed/libexec/gnubin" >> $GITHUB_PATH
- run: git config --global core.autocrlf false
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: knative/actions/setup-go@main
- uses: actions/setup-java@v4
with:
java-version: ${{ matrix.java }}
@ -44,24 +44,7 @@ jobs:
- name: Template Unit Tests
if: matrix.os != 'ubuntu-latest'
run: make test-templates
- name: "Archive code coverage results"
uses: actions/upload-artifact@v4
- uses: codecov/codecov-action@v5
with:
name: coverage-${{ matrix.os }}
path: ./coverage.txt
retention-days: 1
upload-coverage:
needs: [test]
name: "Upload coverage"
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- name: Download Coverage
run: |
gh run download -R ${{ github.repository }} ${{ github.run_id }}
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: codecov/codecov-action@v4
with:
files: ./coverage-ubuntu-latest/coverage.txt,./coverage-windows-latest/coverage.txt,./coverage-macos-latest/coverage.txt
files: ./coverage.txt
flags: unit-tests

View File

@ -2,7 +2,7 @@ name: Update builder-jammy-full image
on:
schedule:
- cron: '0 */4 * * *'
- cron: '0 * * * *'
jobs:
build-and-push-image:
@ -12,8 +12,20 @@ jobs:
runs-on: "ubuntu-latest"
steps:
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- 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: go run ./hack/update-builder.go
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 wf-update-builder

View File

@ -14,7 +14,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v3
- uses: actions/setup-node@v4
with:
node-version: 18
- name: Install NPM deps.

View File

@ -0,0 +1,24 @@
name: Update Kn components in hack/ scripts
permissions:
contents: write
pull-requests: write
on:
schedule:
# every 4 hours
- cron: '0 */4 * * *'
jobs:
update:
name: Update components
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.23.0
- name: Run script
env:
GITHUB_TOKEN: ${{ github.token }}
run: make wf-generate-kn-components

View File

@ -14,8 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: actions/setup-node@v3
- uses: knative/actions/setup-go@main
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-java@v4

View File

@ -14,8 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/composite/go-setup
- uses: actions/setup-node@v3
- uses: knative/actions/setup-go@main
- uses: actions/setup-node@v4
with:
node-version: 18
- uses: actions/setup-java@v4

26
.gitignore vendored
View File

@ -2,30 +2,38 @@
/func
/func_*
/cmd/func.yaml
/templates/typescript/cloudevents/build
/templates/typescript/http/build
/coverage.out
/coverage.txt
/.coverage
/bin
/target
/hack/bin
/e2e/testdata/default_home/go
/e2e/testdata/default_home/.cache
/.artifacts
/pkg/functions/testdata/migrations/*/.gitignore
/pkg/functions/testdata/default_home/go
/pkg/functions/testdata/default_home/.cache
/pkg/functions/testdata/migrations/*/.gitignore
# Nodejs
# Go
/templates/go/cloudevents/go.sum
# JS
node_modules
/templates/typescript/cloudevents/build
/templates/typescript/http/build
# Python
__pycache__
/templates/python/cloudevents/.venv
/templates/python/http/.venv
# VSCode
# E2E Tests
/e2e/testdata/default_home/go
/e2e/testdata/default_home/.cache
# Editors
.vscode
# IntelliJ
.idea
# Operating system temporary files

View File

@ -1,31 +1,37 @@
#
# golangci-lint
#
# For defaults, see:
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml
#
#
#
run:
timeout: 5m
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$

View File

@ -1,29 +1,13 @@
FROM --platform=$BUILDPLATFORM index.docker.io/library/golang:1.22.1-alpine3.19 AS builder
FROM scratch
ARG BUILDPLATFORM
ARG TARGETPLATFORM
ARG TARGETARCH
ARG FUNC_UTIL_BINARY=func-util-$TARGETARCH
WORKDIR /workspace
ENV PATH=/
COPY go.mod go.sum ./
RUN go mod download -x
COPY $FUNC_UTIL_BINARY /func-util
COPY . .
RUN GOARCH=$TARGETARCH go build -o func-util -trimpath -ldflags '-w -s' ./cmd/func-util
#########################
FROM index.docker.io/library/alpine:latest
RUN apk add --no-cache tar
COPY --from=builder /workspace/func-util /usr/local/bin/
RUN ln -s /usr/local/bin/func-util /usr/local/bin/deploy && \
ln -s /usr/local/bin/func-util /usr/local/bin/scaffold && \
ln -s /usr/local/bin/func-util /usr/local/bin/s2i && \
ln -s /usr/local/bin/func-util /usr/local/bin/socat
ADD func-util-symlinks.tgz /
LABEL \
org.opencontainers.image.description="Knative Func Utils Image" \

107
Makefile
View File

@ -28,27 +28,27 @@ VTAG := $(shell [ -z $(VTAG) ] && echo $(ETAG) || echo $(VTAG))
VERS ?= $(shell git describe --tags --match 'v*')
KVER ?= $(shell git describe --tags --match 'knative-*')
LDFLAGS := -X knative.dev/func/pkg/app.vers=$(VERS) -X knative.dev/func/pkg/app.kver=$(KVER) -X knative.dev/func/pkg/app.hash=$(HASH)
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)
FUNC_UTILS_IMG ?= ghcr.io/knative/func-utils:latest
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.DeployerImage=$(FUNC_UTILS_IMG)
LDFLAGS += -X knative.dev/func/pkg/pipelines/tekton.FuncUtilImage=$(FUNC_UTILS_IMG)
GOFLAGS := "-ldflags=$(LDFLAGS)"
export GOFLAGS
MAKEFILE_DIR := $(dir $(abspath $(lastword $(MAKEFILE_LIST))))
.PHONY: test docs
# Default Targets
.PHONY: all
all: build docs
@echo '🎉 Build process completed!'
# Help Text
# Headings: lines with `##$` comment prefix
# Targets: printed if their line includes a `##` comment
.PHONY: help
help:
@echo 'Usage: make <OPTIONS> ... <TARGETS>'
@echo ''
@ -60,6 +60,7 @@ help:
##@ Development
###############
.PHONY: build
build: $(BIN) ## (default) Build binary for current OS
.PHONY: $(BIN)
@ -76,30 +77,36 @@ check: $(BIN_GOLANGCI_LINT) ## Check code quality (lint)
cd test && $(BIN_GOLANGCI_LINT) run --timeout 300s
$(BIN_GOLANGCI_LINT):
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v1.59.1
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b ./bin v2.0.2
.PHONY: generate/zz_filesystem_generated.go
generate/zz_filesystem_generated.go: clean_templates templates/certs/ca-certificates.crt
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/__pycache__
@rm -rf templates/python/http/__pycache__
@rm -rf templates/typescript/cloudevents/node_modules
@rm -rf templates/typescript/http/node_modules
@rm -rf templates/typescript/cloudevents/build
@rm -rf templates/typescript/http/build
@rm -rf templates/rust/cloudevents/target
@rm -rf templates/rust/http/target
@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 -f templates/**/.DS_Store
@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
@ -117,6 +124,7 @@ docs:
##@ 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'
@ -125,6 +133,10 @@ presubmit-unit-tests: ## Run prow presubmit unit tests locally
##@ 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
@ -141,32 +153,39 @@ 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: ## Test Python templates
cd templates/python/cloudevents && pip3 install -r requirements.txt && python3 test_func.py && rm -rf __pycache__
cd templates/python/http && python3 test_func.py && rm -rf __pycache__
.PHONY: test-python
test-python: ## Test Python templates and Scaffolding
test/test_python.sh
.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
.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
.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
.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
@ -176,15 +195,18 @@ test-typescript: ## Test Typescript templates
###############
# Pulls runtimes then rebuilds the embedded filesystem
update-runtimes: pull-runtimes generate/zz_filesystem_generated.go ## Update Scaffolding Runtimes
.PHONY: update-runtimes
update-runtimes: update-runtime-go generate/zz_filesystem_generated.go ## Update Scaffolding Runtimes
pull-runtimes:
.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
.PHONY: cert
.PHONY: certs
certs: templates/certs/ca-certificates.crt ## Update root certificates
.PHONY: templates/certs/ca-certificates.crt
@ -196,20 +218,23 @@ templates/certs/ca-certificates.crt:
##@ 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 that is instrumented for e2e tests
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
@ -217,38 +242,46 @@ test-e2e-on-cluster: func-instrumented ## Run end-to-end on-cluster build tests
##@ 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
@ -258,10 +291,12 @@ $(BIN_WINDOWS): generate/zz_filesystem_generated.go
##@ 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
@ -269,3 +304,27 @@ schema-check: ## Check that func.yaml schema is up-to-date
(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
######################
### Local section - Can be run locally!
.PHONY: generate-kn-components-local
generate-kn-components-local: ## Generate knative components locally
cd hack && go run ./cmd/update-knative-components "local"
.PHONY: test-hack
test-hack:
cd hack && go test ./... -v
### Automated section - This gets run in workflows, scripts etc.
.PHONY: wf-generate-kn-components
wf-generate-kn-components: # Generate kn components - used in automation
cd hack && go run ./cmd/update-knative-components
.PHONY: update-builder
wf-update-builder: # Used in automation
cd hack && go run ./cmd/update-builder
### end of automation section

View File

@ -6,18 +6,14 @@ aliases:
- itsmurugappan
client-wg-leads:
- dsimansk
- rhuss
client-writers:
- dsimansk
- rhuss
- vyasgun
docs-reviewers:
- nainaz
- retocode
- skonto
docs-writers:
- csantanapr
- retocode
- skonto
eventing-reviewers:
- Leo6Leo
@ -25,6 +21,7 @@ aliases:
- cali0707
- creydr
eventing-wg-leads:
- creydr
- pierDipi
eventing-writers:
- Leo6Leo
@ -51,24 +48,23 @@ aliases:
knative-admin:
- aliok
- cardil
- davidhadas
- dprotaso
- dsimansk
- evankanderson
- gauron99
- knative-automation
- knative-prow-releaser-robot
- knative-prow-robot
- knative-prow-updater-robot
- knative-test-reporter-robot
- nainaz
- psschwei
- retocode
- salaboy
- matzew
- nrrso
- skonto
- upodroid
knative-release-leads:
- dprotaso
- dsimansk
- retocode
- gauron99
- skonto
knative-robots:
- knative-automation
@ -105,32 +101,24 @@ aliases:
- davidhadas
- evankanderson
serving-approvers:
- ReToCode
- dsimansk
- skonto
serving-reviewers:
- izabelacg
- retocode
- skonto
serving-triage:
- izabelacg
- retocode
- skonto
serving-wg-leads:
- dprotaso
serving-writers:
- ReToCode
- dprotaso
- dsimansk
- skonto
steering-committee:
- aliok
- davidhadas
- dprotaso
- dsimansk
- evankanderson
- nainaz
- psschwei
- salaboy
technical-oversight-committee: []
- matzew
- nrrso
ux-wg-leads:
- cali0707
- leo6leo

View File

@ -25,3 +25,7 @@ We are always looking for contributions from the Function Developer community.
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

View File

@ -69,8 +69,8 @@ EXAMPLES
`,
SuggestFor: []string{"biuld", "buidl", "built"},
PreRunE: bindEnv("image", "path", "builder", "registry", "confirm",
"push", "builder-image", "platform", "verbose", "build-timestamp",
"registry-insecure", "username", "password", "token"),
"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)
},
@ -110,6 +110,8 @@ EXAMPLES
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)")
@ -130,10 +132,7 @@ EXAMPLES
// Temporarily Hidden Basic Auth Flags
// Username, Password and Token flags, which plumb through basic auth, are
// currently only available on the experimental "host" builder, which is
// itself behind a feature flag FUNC_ENABLE_HOST_BUILDER. So set these
// flags to hidden until it's out of preview and they are plumbed through
// the docker pusher as well.
// currently only available on the "host" builder.
_ = cmd.Flags().MarkHidden("username")
_ = cmd.Flags().MarkHidden("password")
_ = cmd.Flags().MarkHidden("token")
@ -165,13 +164,13 @@ func runBuild(cmd *cobra.Command, _ []string, newClient ClientFactory) (err erro
if err = cfg.Validate(); err != nil { // Perform any pre-validation
return
}
if f, err = fn.NewFunction(cfg.Path); err != nil {
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) // Updates f at path to include build request values
f = cfg.Configure(f) // Returns an f updated with values from the config (flags, envs, etc)
cmd.SetContext(cfg.WithValues(cmd.Context())) // Some optional settings are passed via context
@ -184,7 +183,7 @@ func runBuild(cmd *cobra.Command, _ []string, newClient ClientFactory) (err erro
defer done()
// Build
buildOptions, err := cfg.buildOptions()
buildOptions, err := cfg.buildOptions() // build-specific options from the finalized cfg
if err != nil {
return
}
@ -226,6 +225,10 @@ type buildConfig struct {
// image name derivation based on registry and function name)
Image string
// 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
@ -263,6 +266,7 @@ func newBuildConfig() buildConfig {
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"),
@ -284,6 +288,7 @@ func (c buildConfig) Configure(f fn.Function) fn.Function {
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
}
@ -359,10 +364,14 @@ func (c buildConfig) Validate() (err error) {
// 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")
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
}
@ -383,22 +392,23 @@ func (c buildConfig) Validate() (err error) {
// deployment is not the contiainer, but rather the running service.
func (c buildConfig) clientOptions() ([]fn.Option, error) {
o := []fn.Option{fn.WithRegistry(c.Registry)}
if c.Builder == builders.Host {
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)))
} else if c.Builder == builders.Pack {
case builders.Pack:
o = append(o,
fn.WithBuilder(pack.NewBuilder(
pack.WithName(builders.Pack),
pack.WithTimestamp(c.WithTimestamp),
pack.WithVerbose(c.Verbose))))
} else if c.Builder == builders.S2I {
case builders.S2I:
o = append(o,
fn.WithBuilder(s2i.NewBuilder(
s2i.WithName(builders.S2I),
s2i.WithVerbose(c.Verbose))))
} else {
default:
return o, builders.ErrUnknownBuilder{Name: c.Builder, Known: KnownBuilders()}
}
return o, nil

View File

@ -95,6 +95,12 @@ 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

View File

@ -111,33 +111,36 @@ func runConfigCmd(cmd *cobra.Command, args []string) (err error) {
switch answers.SelectedOperation {
case "Add":
if answers.SelectedConfig == "Volumes" {
switch answers.SelectedConfig {
case "Volumes":
err = runAddVolumesPrompt(cmd.Context(), function)
} else if answers.SelectedConfig == "Environment variables" {
case "Environment variables":
err = runAddEnvsPrompt(cmd.Context(), function)
} else if answers.SelectedConfig == "Labels" {
case "Labels":
err = runAddLabelsPrompt(cmd.Context(), function, defaultLoaderSaver)
} else if answers.SelectedConfig == "Git" {
case "Git":
err = runConfigGitSetCmd(cmd, NewClient)
}
case "Remove":
if answers.SelectedConfig == "Volumes" {
switch answers.SelectedConfig {
case "Volumes":
err = runRemoveVolumesPrompt(function)
} else if answers.SelectedConfig == "Environment variables" {
case "Environment variables":
err = runRemoveEnvsPrompt(function)
} else if answers.SelectedConfig == "Labels" {
case "Labels":
err = runRemoveLabelsPrompt(function, defaultLoaderSaver)
} else if answers.SelectedConfig == "Git" {
case "Git":
err = runConfigGitRemoveCmd(cmd, NewClient)
}
case "List":
if answers.SelectedConfig == "Volumes" {
switch answers.SelectedConfig {
case "Volumes":
listVolumes(function)
} else if answers.SelectedConfig == "Environment variables" {
case "Environment variables":
err = listEnvs(function, cmd.OutOrStdout(), Human)
} else if answers.SelectedConfig == "Labels" {
listLabels(function)
} else if answers.SelectedConfig == "Git" {
case "Labels":
err = listLabels(function, cmd.OutOrStdout(), Human)
case "Git":
err = runConfigGitCmd(cmd, NewClient)
}
}

View File

@ -48,7 +48,7 @@ the current directory or from the directory specified with --path.
cmd.Flags().StringP("output", "o", "human", "Output format (human|json) ($FUNC_OUTPUT)")
configEnvsAddCmd := NewConfigEnvsAddCmd(loadSaver)
configEnvsRemoveCmd := NewConfigEnvsRemoveCmd()
configEnvsRemoveCmd := NewConfigEnvsRemoveCmd(loadSaver)
addPathFlag(cmd)
addPathFlag(configEnvsAddCmd)
@ -139,8 +139,8 @@ set environment variable from a secret
return cmd
}
func NewConfigEnvsRemoveCmd() *cobra.Command {
return &cobra.Command{
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
@ -150,17 +150,40 @@ in the current directory or from the directory specified with --path.
`,
Aliases: []string{"rm"},
SuggestFor: []string{"del", "delete", "rmeove"},
PreRunE: bindEnv("path", "verbose"),
PreRunE: bindEnv("path", "name", "verbose"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(defaultLoaderSaver)
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 {

View File

@ -2,10 +2,13 @@ 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"
@ -24,16 +27,14 @@ the current directory or from the directory specified with --path.
`,
Aliases: []string{"label"},
SuggestFor: []string{"albels", "abels"},
PreRunE: bindEnv("path", "verbose"),
PreRunE: bindEnv("path", "output", "verbose"),
RunE: func(cmd *cobra.Command, args []string) (err error) {
function, err := initConfigCommand(loaderSaver)
if err != nil {
return
}
listLabels(function)
return
return listLabels(function, cmd.OutOrStdout(), Format(viper.GetString("output")))
},
}
@ -42,20 +43,54 @@ the current directory or from the directory specified with --path.
Short: "Add labels to the function configuration",
Long: `Add labels to the function configuration
Interactive prompt to add labels to the function project in the current
directory or from the directory specified with --path.
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", "verbose"),
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)
},
}
@ -70,13 +105,33 @@ directory or from the directory specified with --path.
`,
Aliases: []string{"rm"},
SuggestFor: []string{"del", "delete", "rmeove"},
PreRunE: bindEnv("path", "verbose"),
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)
},
}
@ -86,6 +141,12 @@ directory or from the directory specified with --path.
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)
@ -99,15 +160,27 @@ directory or from the directory specified with --path.
return configLabelsCmd
}
func listLabels(f fn.Function) {
if len(f.Deploy.Labels) == 0 {
fmt.Println("There aren't any configured labels")
return
}
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.Println("Configured labels:")
for _, e := range f.Deploy.Labels {
fmt.Println(" - ", e.String())
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)
}
}

View File

@ -172,9 +172,9 @@ func TestListLabels(t *testing.T) {
}()
expected := []string{
`Configured labels:`,
`- Label with key "a" and value "b"`,
`- Label with key "c" and value "d"`,
`Labels:`,
` - Label with key "a" and value "b"`,
` - Label with key "c" and value "d"`,
}
// prevents the ExpectString() function from waiting indefinitely

View File

@ -66,19 +66,49 @@ func NewConfigVolumesAddCmd() *cobra.Command {
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"),
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
}
@ -90,20 +120,34 @@ func NewConfigVolumesRemoveCmd() *cobra.Command {
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"),
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
}
@ -286,3 +330,104 @@ func runRemoveVolumesPrompt(f fn.Function) (err error) {
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

@ -534,7 +534,7 @@ func newHelpTemplate(cmd *cobra.Command) *template.Template {
fm := template.FuncMap{
"indent": func(i int, c string, v string) string {
indentation := strings.Repeat(c, i)
return indentation + strings.Replace(v, "\n", "\n"+indentation, -1)
return indentation + strings.ReplaceAll(v, "\n", "\n"+indentation)
},
}
t.Funcs(fm)

View File

@ -105,7 +105,7 @@ func newDeleteConfig(cmd *cobra.Command, args []string) (cfg deleteConfig, err e
// 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.")
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.

View File

@ -5,6 +5,7 @@ import (
"fmt"
"io"
"os"
"os/exec"
"strconv"
"strings"
@ -35,7 +36,7 @@ SYNOPSIS
[-b|--build] [--builder] [--builder-image] [-p|--push]
[--domain] [--platform] [--build-timestamp] [--pvc-size]
[--service-account] [-c|--confirm] [-v|--verbose]
[--registry-insecure]
[--registry-insecure] [--remote-storage-class]
DESCRIPTION
@ -127,7 +128,11 @@ EXAMPLES
`,
SuggestFor: []string{"delpoy", "deplyo"},
PreRunE: bindEnv("build", "build-timestamp", "builder", "builder-image", "confirm", "domain", "env", "git-branch", "git-dir", "git-url", "image", "namespace", "path", "platform", "push", "pvc-size", "service-account", "registry", "registry-insecure", "remote", "username", "password", "token", "verbose"),
PreRunE: bindEnv("build", "build-timestamp", "builder", "builder-image",
"base-image", "confirm", "domain", "env", "git-branch", "git-dir",
"git-url", "image", "namespace", "path", "platform", "push", "pvc-size",
"service-account", "registry", "registry-insecure", "remote",
"username", "password", "token", "verbose", "remote-storage-class"),
RunE: func(cmd *cobra.Command, args []string) error {
return runDeploy(cmd, newClient)
},
@ -162,6 +167,8 @@ EXAMPLES
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]@[digest]. This option takes precedence over --registry. Specifying digest is optional, but if it is given, 'build' and 'push' phases are disabled. ($FUNC_IMAGE)")
@ -179,6 +186,8 @@ EXAMPLES
"Directory in the Git repository containing the function (default is the root) ($FUNC_GIT_DIR)")
cmd.Flags().BoolP("remote", "R", f.Local.Remote,
"Trigger a remote deployment. Default is to deploy and build from the local system ($FUNC_REMOTE)")
cmd.Flags().StringP("remote-storage-class", "", f.Build.RemoteStorageClass,
"Specify a storage class to use for the volume on-cluster during remote builds")
cmd.Flags().String("pvc-size", f.Build.PVCSize,
"When triggering a remote deployment, set a custom volume size to allocate for the build operation ($FUNC_PVC_SIZE)")
cmd.Flags().String("service-account", f.Deploy.ServiceAccountName,
@ -205,10 +214,7 @@ EXAMPLES
// Temporarily Hidden Basic Auth Flags
// Username, Password and Token flags, which plumb through basic auth, are
// currently only available on the experimental "host" builder, which is
// itself behind a feature flag FUNC_ENABLE_HOST_BUILDER. So set these
// flags to hidden until it's out of preview and they are plumbed through
// the docker pusher as well.
// currently only available on "host" builder.
_ = cmd.Flags().MarkHidden("username")
_ = cmd.Flags().MarkHidden("password")
_ = cmd.Flags().MarkHidden("token")
@ -244,14 +250,24 @@ func runDeploy(cmd *cobra.Command, newClient ClientFactory) (err error) {
if f, err = fn.NewFunction(cfg.Path); err != nil {
return
}
if !f.Initialized() {
return fn.NewErrNotInitialized(f.Root)
}
if f, err = cfg.Configure(f); err != nil { // Updates f with deploy cfg
return
}
cmd.SetContext(cfg.WithValues(cmd.Context())) // Some optional settings are passed via context
if !f.Initialized() {
if !cfg.Remote || f.Build.Git.URL == "" {
// Only error if this is not a fully remote build
return fn.NewErrNotInitialized(f.Root)
} else {
// TODO: this case is not supported because the pipeline
// implementation requires the function's name, which is in the
// remote repository. We should inspect the remote repository.
// For now, give a more helpful error.
return errors.New("please ensure the function's source is also available locally")
}
}
changingNamespace := func(f fn.Function) bool {
// We're changing namespace if:
return f.Deploy.Namespace != "" && // it's already deployed
@ -380,7 +396,7 @@ func build(cmd *cobra.Command, flag string, f fn.Function, client *fn.Client, bu
return f, false, err
}
} else if _, err = strconv.ParseBool(flag); err != nil {
return f, false, fmt.Errorf("--build ($FUNC_BUILD) %q not recognized. Should be 'auto' or a truthy value such as 'true', 'false', '0', or '1'.", flag)
return f, false, fmt.Errorf("invalid value for the build flag (%q), valid value is either 'auto' or a boolean", flag)
} else if !build {
return f, false, nil
}
@ -431,18 +447,7 @@ func KnownBuilders() builders.Known {
// However, future third-party integrations may support less than, or more
// builders, and certain environmental considerations may alter this list.
// Also a good place to stick feature-flags; to wit:
enable_host, _ := strconv.ParseBool(os.Getenv("FUNC_ENABLE_HOST_BUILDER"))
if !enable_host {
bb := []string{}
for _, b := range builders.All() {
if b != builders.Host {
bb = append(bb, b)
}
}
return bb
}
// Also a good place to stick feature-flags.
return builders.All()
}
@ -517,6 +522,10 @@ type deployConfig struct {
// be triggered in a remote environment rather than run locally.
Remote bool
// RemoteStorageClass defines the storage class to use for the remote
// volume when building on-cluster.
RemoteStorageClass string
// PVCSize configures the PVC size used by the pipeline if --remote flag is set.
PVCSize string
@ -538,6 +547,7 @@ func newDeployConfig(cmd *cobra.Command) deployConfig {
GitURL: viper.GetString("git-url"),
Namespace: viper.GetString("namespace"),
Remote: viper.GetBool("remote"),
RemoteStorageClass: viper.GetString("remote-storage-class"),
PVCSize: viper.GetString("pvc-size"),
Timestamp: viper.GetBool("build-timestamp"),
ServiceAccountName: viper.GetString("service-account"),
@ -573,6 +583,7 @@ func (c deployConfig) Configure(f fn.Function) (fn.Function, error) {
f.Build.Git.URL = c.GitURL
f.Build.Git.ContextDir = c.GitDir
f.Build.Git.Revision = c.GitBranch // TODO: should match; perhaps "refSpec"
f.Build.RemoteStorageClass = c.RemoteStorageClass
f.Deploy.ServiceAccountName = c.ServiceAccountName
f.Local.Remote = c.Remote
@ -784,6 +795,36 @@ func printDeployMessages(out io.Writer, f fn.Function) {
if !f.Local.Remote && (f.Build.Git.URL != "" || f.Build.Git.Revision != "" || f.Build.Git.ContextDir != "") {
fmt.Fprintf(out, "Warning: git settings are only applicable when running with --remote. Local source code will be used.")
}
// Git Branch Mismatch
// -------------------
// When doing a remote build with --git-branch, warn if the local branch
// doesn't match, as this can lead to confusion about which func.yaml is used.
if f.Local.Remote && f.Build.Git.URL != "" && f.Build.Git.Revision != "" {
// Doing a remote build, specified a git repository to pull from, and
// specified a reference within that remote.
currentBranch, err := getCurrentGitBranch()
if err != nil {
fmt.Fprintf(out, "Warning: unable to verify local and remote references match. %v\n", err)
} else if currentBranch != f.Build.Git.Revision {
fmt.Fprintf(out, "Warning: Local git branch '%s' does not match --git-branch '%s'. The local func.yaml will be used for function metadata (name, runtime, etc). Ensure your local branch matches the remote branch to avoid deployment issues.\n", currentBranch, f.Build.Git.Revision)
}
}
}
// getCurrentGitBranch returns the current git branch name
func getCurrentGitBranch() (string, error) {
gitCmd := os.Getenv("FUNC_GIT")
if gitCmd == "" {
gitCmd = "git"
}
cmd := exec.Command(gitCmd, "rev-parse", "--abbrev-ref", "HEAD")
output, err := cmd.Output()
if err != nil {
return "", err
}
return strings.TrimSpace(string(output)), nil
}
// isDigested checks that the given image reference has a digest. Invalid

View File

@ -842,7 +842,7 @@ func TestDeploy_ImageWithDigestErrors(t *testing.T) {
func TestDeploy_ImageWithDigestDoesntPopulateBuild(t *testing.T) {
root := FromTempDirectory(t)
// image with digest (well almost, atleast in length and syntax)
const img = "docker.io/4141gauron3268@sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
const img = "example.com/username@sha256:e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
// Create a new Function in the temp directory
_, err := fn.New().Init(fn.Function{Runtime: "go", Root: root})
if err != nil {
@ -1531,7 +1531,6 @@ func testAuthentication(cmdFn commandConstructor, t *testing.T) {
}
cmd := cmdFn(NewTestClient(fn.WithPusher(pusher)))
t.Setenv("FUNC_ENABLE_HOST_BUILDER", "true") // host builder is currently behind this feature flag
cmd.SetArgs([]string{"--builder", "host", "--username", testUser, "--password", testPass})
if err := cmd.Execute(); err != nil {
t.Fatal(err)
@ -2171,3 +2170,75 @@ func Test_isDigested(t *testing.T) {
t.Fatal("did not report image reference has digest")
}
}
func TestDeploy_BaseImage(t *testing.T) {
testBaseImage(NewDeployCmd, t)
}
func testBaseImage(cmdFn commandConstructor, t *testing.T) {
const baseImage = "example.com/repo/baseImage"
tests := []struct {
name string
runtime string
builder string
expErr 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",
expErr: true,
},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
root := FromTempDirectory(t)
// func init
f := fn.Function{Runtime: tt.runtime, Root: root}
_, err := fn.New().Init(f)
if err != nil {
t.Fatal(err)
}
//create cmd
cmd := cmdFn(NewTestClient(
fn.WithBuilder(mock.NewBuilder()),
fn.WithDeployer(mock.NewDeployer()),
fn.WithRegistry(TestRegistry),
))
// create flags for cmd
args := []string{
fmt.Sprintf("--builder=%s", tt.builder),
fmt.Sprintf("--base-image=%s", baseImage),
}
cmd.SetArgs(args)
err = cmd.Execute()
// ASSERT
// got error but expected success
if err != nil && !tt.expErr {
err = fmt.Errorf("Expected the test to succeed but instead got: %w", err)
t.Fatal(err)
}
// succeeded but expected fail
if err == nil && tt.expErr {
t.Fatal(fmt.Errorf("Expected error but test succeeded"))
}
})
}
}

View File

@ -3,6 +3,7 @@ package cmd
import (
"encoding/json"
"encoding/xml"
"errors"
"fmt"
"io"
"os"
@ -81,6 +82,9 @@ func runDescribe(cmd *cobra.Command, args []string, newClient ClientFactory) (er
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
@ -118,7 +122,7 @@ func newDescribeConfig(cmd *cobra.Command, args []string) (cfg describeConfig, e
// 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.")
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.
@ -153,6 +157,13 @@ func (i info) Human(w io.Writer) error {
fmt.Fprintf(w, " %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
}
@ -170,6 +181,12 @@ func (i info) Plain(w io.Writer) error {
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
}

View File

@ -2,6 +2,7 @@ package cmd
import (
"context"
"strings"
"testing"
fn "knative.dev/func/pkg/functions"
@ -9,6 +10,58 @@ import (
. "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) {

View File

@ -16,6 +16,7 @@ import (
"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"
@ -60,6 +61,10 @@ type Environment struct {
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
@ -128,6 +133,10 @@ func runEnvironment(cmd *cobra.Command, newClient ClientFactory, v *Version) (er
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,

View File

@ -44,7 +44,7 @@ func write(out io.Writer, s Formatter, formatName string) {
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 {
panic(err)

View File

@ -10,8 +10,11 @@ import (
"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"
@ -20,6 +23,7 @@ import (
"knative.dev/func/pkg/k8s"
"knative.dev/func/pkg/knative"
"knative.dev/func/pkg/scaffolding"
"knative.dev/func/pkg/tar"
)
func main() {
@ -35,7 +39,7 @@ func main() {
os.Exit(137)
}()
var cmd func(context.Context) error = unknown
var cmd = unknown
switch filepath.Base(os.Args[0]) {
case "deploy":
@ -46,6 +50,10 @@ func main() {
cmd = s2iCmd
case "socat":
cmd = socat
case "sh":
cmd = sh
case "s2i-generate":
cmd = s2iGenerate
}
err := cmd(ctx)
@ -56,7 +64,7 @@ func main() {
}
func unknown(_ context.Context) error {
return fmt.Errorf("unknown command: " + os.Args[0])
return fmt.Errorf("unknown command: %q", os.Args[0])
}
func socat(ctx context.Context) error {
@ -78,7 +86,7 @@ func scaffold(ctx context.Context) error {
return fmt.Errorf("cannot load func project: %w", err)
}
if f.Runtime != "go" {
if f.Runtime != "go" && f.Runtime != "python" {
// Scaffolding is for now supported/needed only for Go.
return nil
}
@ -100,7 +108,17 @@ func scaffold(ctx context.Context) error {
return fmt.Errorf("unable to create .s2i bin dir. %w", err)
}
if err := os.WriteFile(filepath.Join(f.Root, ".s2i", "bin", "assemble"), []byte(s2i.GoAssembler), 0755); err != nil {
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)
}
@ -167,3 +185,18 @@ func (d deployDecorator) UpdateLabels(function fn.Function, labels map[string]st
}
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
}

View File

@ -1,7 +1,6 @@
package cmd
import (
"encoding/base64"
"fmt"
"os"
"strings"
@ -173,7 +172,7 @@ func runInvoke(cmd *cobra.Command, _ []string, newClient ClientFactory) (err err
if err != nil {
return err
}
m.Data = base64.StdEncoding.EncodeToString(content)
m.Data = content
}
// Invoke
@ -218,7 +217,7 @@ type invokeConfig struct {
ID string
Source string
Type string
Data string
Data []byte
ContentType string
File string
Confirm bool
@ -234,7 +233,7 @@ func newInvokeConfig() (cfg invokeConfig, err error) {
ID: viper.GetString("id"),
Source: viper.GetString("source"),
Type: viper.GetString("type"),
Data: viper.GetString("data"),
Data: []byte(viper.GetString("data")),
ContentType: viper.GetString("content-type"),
File: viper.GetString("file"),
Confirm: viper.GetBool("confirm"),
@ -248,7 +247,7 @@ func newInvokeConfig() (cfg invokeConfig, err error) {
if err != nil {
return cfg, err
}
cfg.Data = string(b)
cfg.Data = b
}
// if not in confirm/prompting mode, the cfg structure is complete.
@ -369,7 +368,7 @@ func (c invokeConfig) prompt() (invokeConfig, error) {
Name: "Data",
Prompt: &survey.Input{
Message: "Data Content",
Default: c.Data,
Default: string(c.Data),
},
},
}
@ -390,7 +389,8 @@ func (c invokeConfig) prompt() (invokeConfig, error) {
Message: contentTypeMessage,
Default: c.ContentType,
},
}}
},
}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}
@ -402,7 +402,8 @@ func (c invokeConfig) prompt() (invokeConfig, error) {
Message: "Allow insecure server connections when using SSL",
Default: c.Insecure,
},
}}
},
}
if err := survey.Ask(qs, &c); err != nil {
return c, err
}

View File

@ -30,7 +30,7 @@ func TestInvoke(t *testing.T) {
// Mock Runner
// Starts a service which sets invoked=1 on any request
runner := mock.NewRunner()
runner.RunFn = func(ctx context.Context, f fn.Function, _ time.Duration) (job *fn.Job, err error) {
runner.RunFn = func(ctx context.Context, f fn.Function, _ string, _ time.Duration) (job *fn.Job, err error) {
var (
l net.Listener
h = http.NewServeMux()

View File

@ -130,7 +130,7 @@ func newListConfig(cmd *cobra.Command) (cfg listConfig, err error) {
// 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.")
err = errors.New("both --namespace and --all-namespaces specified")
}
return

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
}

View File

@ -15,16 +15,15 @@ import (
"knative.dev/func/pkg/docker/creds"
)
func NewPromptForCredentials(in io.Reader, out, errOut io.Writer) func(registry string) (docker.Credentials, error) {
func NewPromptForCredentials(in io.Reader, out, errOut io.Writer) func(repository string) (docker.Credentials, error) {
firstTime := true
return func(registry string) (docker.Credentials, error) {
return func(repository string) (docker.Credentials, error) {
var result docker.Credentials
if firstTime {
firstTime = false
fmt.Fprintf(out, "Please provide credentials for image registry (%s).\n", registry)
fmt.Fprintf(out, "Please provide credentials for image repository '%s'.\n", repository)
} else {
fmt.Fprintln(out, "Incorrect credentials, please try again.")
fmt.Fprintf(out, "Incorrect credentials for repository '%s'. Please make sure the repository is correct and try again.\n", repository)
}
var qs = []*survey.Question{

View File

@ -529,7 +529,7 @@ func runRepositoryRemove(_ *cobra.Command, args []string, newClient ClientFactor
}
if len(repositories) == 0 {
return errors.New("No repositories installed. use 'add' to install")
return errors.New("no repositories installed. use 'add' to install")
}
// Confirm (interactive prompt mode)

View File

@ -107,6 +107,12 @@ Learn more about Knative at: https://knative.dev`, cfg.Name),
NewEnvironmentCmd(newClient, &cfg.Version),
},
},
{
Header: "MCP Commands:",
Commands: []*cobra.Command{
NewMCPServerCmd(),
},
},
{
Header: "Other Commands:",
Commands: []*cobra.Command{
@ -303,7 +309,7 @@ func mergeEnvs(envs []fn.Env, envToUpdate *util.OrderedMap, envToRemove []string
errMsg := fn.ValidateEnvs(envs)
if len(errMsg) > 0 {
return []fn.Env{}, 0, fmt.Errorf(strings.Join(errMsg, "\n"))
return []fn.Env{}, 0, fmt.Errorf("error(s) while validating envs: %s", strings.Join(errMsg, "\n"))
}
return envs, counter, nil

View File

@ -2,6 +2,7 @@ package cmd
import (
"context"
"encoding/json"
"errors"
"fmt"
"os"
@ -14,6 +15,7 @@ import (
"knative.dev/func/pkg/config"
"knative.dev/func/pkg/docker"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/oci"
)
func NewRunCmd(newClient ClientFactory) *cobra.Command {
@ -27,7 +29,7 @@ NAME
SYNOPSIS
{{rootCmdUse}} run [-t|--container] [-r|--registry] [-i|--image] [-e|--env]
[--build] [-b|--builder] [--builder-image] [-c|--confirm]
[-v|--verbose]
[--address] [--json] [-v|--verbose]
DESCRIPTION
Run the function locally.
@ -38,9 +40,14 @@ DESCRIPTION
The --container flag indicates that the function's container should be
run rather than running the source code directly. This may require that
the function's container first be rebuilt. Building the container on or
off can be altered using the --build flag. The default value --build=auto
indicates the system should automatically build the container only if
necessary.
off can be altered using the --build flag. The value --build=auto
can be used to indicate the function should be run in a container, with
the container automatically built if necessary.
The --container flag defaults to true if the builder defined for the
function is a containerized builder such as Pack or S2I, and in the case
where the function's runtime requires containerized builds (is not yet
supported by the Host builder.
Process Scaffolding
This is an Experimental Feature currently available only to Go projects.
@ -62,9 +69,17 @@ EXAMPLES
o Run the function locally on the host with no containerization (Go only).
$ {{rootCmdUse}} run --container=false
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
`,
SuggestFor: []string{"rnu"},
PreRunE: bindEnv("build", "builder", "builder-image", "confirm", "container", "env", "image", "path", "registry", "start-timeout", "verbose"),
PreRunE: bindEnv("build", "builder", "builder-image", "base-image",
"confirm", "container", "env", "image", "path", "registry",
"start-timeout", "verbose", "address", "json"),
RunE: func(cmd *cobra.Command, _ []string) error {
return runRun(cmd, newClient)
},
@ -96,6 +111,8 @@ EXAMPLES
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{},
@ -103,6 +120,8 @@ EXAMPLES
"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))
cmd.Flags().BoolP("container", "t", runContainerizedByDefault(f),
"Run the function in a container. ($FUNC_CONTAINER)")
// TODO: Without the "Host" builder enabled, this code-path is unreachable,
// so remove hidden flag when either the Host builder path is available,
@ -116,8 +135,9 @@ EXAMPLES
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().BoolP("container", "t", true,
"Run the function in a container. ($FUNC_CONTAINER)")
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)
@ -136,14 +156,17 @@ EXAMPLES
return cmd
}
func runContainerizedByDefault(f fn.Function) bool {
return f.Build.Builder == "pack" || f.Build.Builder == "s2i" || !oci.IsSupported(f.Runtime)
}
func runRun(cmd *cobra.Command, newClient ClientFactory) (err error) {
var (
cfg runConfig
f fn.Function
)
if cfg, err = newRunConfig(cmd).Prompt(); err != nil {
return
}
cfg = newRunConfig(cmd) // Will add Prompt on upcoming UX refactor
if f, err = fn.NewFunction(cfg.Path); err != nil {
return
}
@ -157,6 +180,11 @@ func runRun(cmd *cobra.Command, newClient ClientFactory) (err error) {
return
}
// Ignore the verbose flag if JSON output
if cfg.JSON {
cfg.Verbose = false
}
// Client
clientOptions, err := cfg.clientOptions()
if err != nil {
@ -225,7 +253,7 @@ func runRun(cmd *cobra.Command, newClient ClientFactory) (err error) {
// 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)
job, err := client.Run(cmd.Context(), f, fn.RunWithAddress(cfg.Address))
if err != nil {
return
}
@ -235,7 +263,27 @@ func runRun(cmd *cobra.Command, newClient ClientFactory) (err error) {
}
}()
fmt.Fprintf(cmd.OutOrStderr(), "Running on host port %v\n", job.Port)
// 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(), "Running on host port %v\n", job.Port)
}
select {
case <-cmd.Context().Done():
@ -276,6 +324,12 @@ type runConfig struct {
// 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) (c runConfig) {
@ -285,6 +339,8 @@ func newRunConfig(cmd *cobra.Command) (c runConfig) {
Env: viper.GetStringSlice("env"),
Container: viper.GetBool("container"),
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:
@ -340,15 +396,8 @@ func (c runConfig) Validate(cmd *cobra.Command, f fn.Function) (err error) {
}
}
// There is currently no local host runner implemented, so specifying
// --container=false should return an informative error for runtimes other
// than Go that is more helpful than the cryptic, though correct, error
// from the Client that it was instantated without a runner.
// TODO: modify this check when the local host runner is available to
// only generate this error when --container==false && the --language is
// not yet implemented.
if !c.Container && f.Runtime != "go" {
return errors.New("the ability to run functions outside of a container via 'func run' is coming soon.")
if !c.Container && !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

View File

@ -21,6 +21,7 @@ func TestRun_Run(t *testing.T) {
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",
@ -100,6 +101,14 @@ func TestRun_Run(t *testing.T) {
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) {
@ -107,7 +116,7 @@ func TestRun_Run(t *testing.T) {
runner := mock.NewRunner()
if tt.runError != nil {
runner.RunFn = func(context.Context, fn.Function, time.Duration) (*fn.Job, error) { return nil, tt.runError }
runner.RunFn = func(context.Context, fn.Function, string, time.Duration) (*fn.Job, error) { return nil, tt.runError }
}
builder := mock.NewBuilder()
@ -220,7 +229,7 @@ func TestRun_Images(t *testing.T) {
runner := mock.NewRunner()
if tt.runError != nil {
runner.RunFn = func(context.Context, fn.Function, time.Duration) (*fn.Job, error) { return nil, tt.runError }
runner.RunFn = func(context.Context, fn.Function, string, time.Duration) (*fn.Job, error) { return nil, tt.runError }
}
builder := mock.NewBuilder()
@ -324,7 +333,7 @@ func TestRun_CorrectImage(t *testing.T) {
root := FromTempDirectory(t)
runner := mock.NewRunner()
runner.RunFn = func(_ context.Context, f fn.Function, _ time.Duration) (*fn.Job, error) {
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)
@ -386,3 +395,209 @@ func TestRun_CorrectImage(t *testing.T) {
})
}
}
// 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)
}
})
}
}

View File

@ -95,6 +95,11 @@ func updateOrAddSubscription(subscriptions []fn.KnativeSubscription, cfg subscib
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

View File

@ -27,9 +27,7 @@ go http
node cloudevents
node http
python cloudevents
python flask
python http
python wsgi
quarkus cloudevents
quarkus http
rust cloudevents
@ -67,9 +65,7 @@ func TestTemplates_JSON(t *testing.T) {
],
"python": [
"cloudevents",
"flask",
"http",
"wsgi"
"http"
],
"quarkus": [
"cloudevents",

View File

@ -29,7 +29,7 @@ The source of these templates is `./templates`; a directory subdivided by langua
For example, the Go HTTP template is located in `./templates/go/http`.
The client library and CLI are self-contained
by encoding this directory as a ZIP byte array in the `./generate/zz_filesystem_generated.go` file.
Therefore, any updates to templates requires re-generating this file.
Therefore, any updates to templates require re-generating this file.
When changes are made to files in the `./templates` directory,
regenerate `./generate/zz_filesystem_generated.go` by running `make generate/zz_filesystem_generated.go`.
@ -76,7 +76,7 @@ exit 0
If you would like to run integration tests prior to opening a pull request against origin, you can enable Actions in your fork of this repository and create a pull request to your own main branch.
If you would like to run integraiton tests locally, or would like to use the CLI / Client Library directly against a local cluster, the cluster allocation script can be used locally as well, by following the steps below.
If you would like to run integration tests locally, or would like to use the CLI / Client Library directly against a local cluster, the cluster allocation script can be used locally as well, by following the steps below.
### Prerequisites
@ -93,16 +93,16 @@ Allocate a new local cluster by running `hack/allocate.sh`.
### Registry
The allocation script sets up a local container registry and connects it to the cluster. This registry must be set as trusted and its address entered in the local hosts file. This is a one-time configuration and on Linux can be accomplished by running `hack/registry.sh`.
The allocation script sets up a local container registry and connects it to the cluster. This registry must be set as trusted and its address entered in the local `hosts` file. This is a one-time configuration and on Linux can be accomplished by running `hack/registry.sh`.
On other systems, add `127.0.0.1 kind-registry` to your local hosts file and `"insecure-registries" = ["kind-registry:50000"]` to your docker daemon config (`docker/daemon.json`).
On other systems, add `127.0.0.1 kind-registry` to your local `hosts` file and `"insecure-registries" = ["kind-registry:50000"]` to your docker daemon config (`docker/daemon.json`).
### Using the Cluster
Once the cluster has been allocated, the `func` CLI (or client library) will automatically use it (see the [Kubeconfig Docs](https://kubernetes.io/docs/concepts/configuration/organize-cluster-access-kubeconfig/) for more)
Functions will be available at the address `[Function Name].default.127.0.0.1.sslip.io`
Functions will be available at the address `[Function Name].default.localtest.me`
To run integration tests, use `make test-integration`.

View File

@ -3,7 +3,11 @@
This guide describes how you can build a Function on Cluster with Tekton Pipelines. The on cluster build is enabled by fetching Function source code from a remote Git repository. Buildpacks or S2I builder strategy can be used to build the Function image.
## Prerequisite
1. Install Tekton Pipelines on the cluster. Please refer to [Tekton Pipelines documentation](https://github.com/tektoncd/pipeline/blob/main/docs/install.md) or run the following command:
1. Install Tekton Pipelines on the cluster.
**Note:** If you're using `./hack/allocate.sh` for development/testing, Tekton and PAC are automatically installed.
For production environments, please refer to [Tekton Pipelines documentation](https://github.com/tektoncd/pipeline/blob/main/docs/install.md) or run the following command:
```bash
kubectl apply -f https://storage.googleapis.com/tekton-releases/pipeline/previous/v0.49.0/release.yaml
```

View File

@ -21,7 +21,7 @@ var (
fm = template.FuncMap{
"indent": func(i int, c string, v string) string {
indentation := strings.Repeat(c, i)
return indentation + strings.Replace(v, "\n", "\n"+indentation, -1)
return indentation + strings.ReplaceAll(v, "\n", "\n"+indentation)
},
"rootCmdUse": func() string {
return rootName

View File

@ -34,6 +34,7 @@ Learn more about Knative at: https://knative.dev
* [func invoke](func_invoke.md) - Invoke a local or remote function
* [func languages](func_languages.md) - List available function language runtimes
* [func list](func_list.md) - List deployed functions
* [func mcp](func_mcp.md) - Start MCP server
* [func repository](func_repository.md) - Manage installed template repositories
* [func run](func_run.md) - Run the function locally
* [func subscribe](func_subscribe.md) - Subscribe a function to events

View File

@ -57,8 +57,9 @@ func build
### Options
```
--base-image string Override the base image for your function (host builder only)
--build-timestamp Use the actual time as the created time for the docker image. This is only useful for buildpacks builder.
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "pack" and "s2i". ($FUNC_BUILDER) (default "pack")
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "host", "pack" and "s2i". ($FUNC_BUILDER) (default "pack")
--builder-image string Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)
-c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM)
-h, --help help for build

View File

@ -18,6 +18,7 @@ func config envs remove
```
-h, --help help for remove
--name string Name of the environment variable.
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```

View File

@ -17,7 +17,7 @@ func config git set
### Options
```
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "pack" and "s2i". (default "pack")
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "host", "pack" and "s2i". (default "pack")
--builder-image string Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)
--config-cluster Configure cluster resources (credentials and config on the cluster).
--config-local Configure local resources (pipeline templates).

View File

@ -17,9 +17,10 @@ func config labels
### Options
```
-h, --help help for labels
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-h, --help help for labels
-o, --output string Output format (human|json) (default "human")
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -6,8 +6,7 @@ Add labels to the function configuration
Add labels to the function configuration
Interactive prompt to add labels to the function project in the current
directory or from the directory specified with --path.
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.
@ -17,12 +16,24 @@ the local machine.
func config labels add
```
### Examples
```
# set label directly
func config labels add --name=Foo --value=Bar
# set label from local env $FOO
func config labels add --name=Foo --value='{{ env:FOO }}'
```
### Options
```
-h, --help help for add
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-h, --help help for add
--name string Name of the label.
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
--value string Value of the label.
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -18,6 +18,7 @@ func config labels remove
```
-h, --help help for remove
--name string Name of the label.
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```

View File

@ -9,17 +9,43 @@ 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.
```
func config volumes add
```
### Examples
```
# Add a ConfigMap volume
func config volumes add --type=configmap --source=my-config --path=/etc/config
# Add a Secret volume
func config volumes add --type=secret --source=my-secret --path=/etc/secret
# Add a PersistentVolumeClaim volume
func config volumes add --type=pvc --source=my-pvc --path=/data
func config volumes add --type=pvc --source=my-pvc --path=/data --read-only
# Add an EmptyDir volume
func config volumes add --type=emptydir --path=/tmp/cache
func config volumes add --type=emptydir --path=/tmp/cache --size=1Gi --medium=Memory
```
### Options
```
-h, --help help for add
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-h, --help help for add
--medium string Storage medium for EmptyDir volume: 'Memory' or '' (default)
-m, --mount-path string Path where the volume should be mounted in the container
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-r, --read-only Mount volume as read-only (only for PVC)
--size string Maximum size limit for EmptyDir volume (e.g., 1Gi)
-s, --source string Name of the ConfigMap, Secret, or PVC to mount (not used for emptydir)
-t, --type string Volume type: configmap, secret, pvc, or emptydir
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -9,17 +9,27 @@ 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.
```
func config volumes remove
```
### Examples
```
# Remove a volume by its mount path
func config volumes remove --mount-path=/etc/config
```
### Options
```
-h, --help help for remove
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
-h, --help help for remove
-m, --mount-path string Path of the volume mount to remove
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -34,9 +34,7 @@ DESCRIPTION
node cloudevents
node http
python cloudevents
python flask
python http
python wsgi
quarkus cloudevents
quarkus http
rust cloudevents

View File

@ -14,7 +14,7 @@ SYNOPSIS
[-b|--build] [--builder] [--builder-image] [-p|--push]
[--domain] [--platform] [--build-timestamp] [--pvc-size]
[--service-account] [-c|--confirm] [-v|--verbose]
[--registry-insecure]
[--registry-insecure] [--remote-storage-class]
DESCRIPTION
@ -113,28 +113,30 @@ func deploy
### Options
```
--build string[="true"] Build the function. [auto|true|false]. ($FUNC_BUILD) (default "auto")
--build-timestamp Use the actual time as the created time for the docker image. This is only useful for buildpacks builder.
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "pack" and "s2i". (default "pack")
--builder-image string Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)
-c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM)
--domain string Domain to use for the function's route. Cluster must be configured with domain matching for the given domain (ignored if unrecognized) ($FUNC_DOMAIN)
-e, --env stringArray 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-).
-t, --git-branch string Git revision (branch) to be used when deploying via the Git repository ($FUNC_GIT_BRANCH)
-d, --git-dir string Directory in the Git repository containing the function (default is the root) ($FUNC_GIT_DIR)
-g, --git-url string Repository url containing the function to build ($FUNC_GIT_URL)
-h, --help help for deploy
-i, --image string 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)
-n, --namespace string Deploy into a specific namespace. Will use the function's current namespace by default if already deployed, and the currently active context if it can be determined. ($FUNC_NAMESPACE) (default "default")
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
--platform string Optionally specify a specific platform to build for (e.g. linux/amd64). ($FUNC_PLATFORM)
-u, --push Push the function image to registry before deploying. ($FUNC_PUSH) (default true)
--pvc-size string When triggering a remote deployment, set a custom volume size to allocate for the build operation ($FUNC_PVC_SIZE)
-r, --registry string Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)
--registry-insecure Skip TLS certificate verification when communicating in HTTPS with the registry ($FUNC_REGISTRY_INSECURE)
-R, --remote Trigger a remote deployment. Default is to deploy and build from the local system ($FUNC_REMOTE)
--service-account string Service account to be used in the deployed function ($FUNC_SERVICE_ACCOUNT)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
--base-image string Override the base image for your function (host builder only)
--build string[="true"] Build the function. [auto|true|false]. ($FUNC_BUILD) (default "auto")
--build-timestamp Use the actual time as the created time for the docker image. This is only useful for buildpacks builder.
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "host", "pack" and "s2i". (default "pack")
--builder-image string Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)
-c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM)
--domain string Domain to use for the function's route. Cluster must be configured with domain matching for the given domain (ignored if unrecognized) ($FUNC_DOMAIN)
-e, --env stringArray 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-).
-t, --git-branch string Git revision (branch) to be used when deploying via the Git repository ($FUNC_GIT_BRANCH)
-d, --git-dir string Directory in the Git repository containing the function (default is the root) ($FUNC_GIT_DIR)
-g, --git-url string Repository url containing the function to build ($FUNC_GIT_URL)
-h, --help help for deploy
-i, --image string 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)
-n, --namespace string Deploy into a specific namespace. Will use the function's current namespace by default if already deployed, and the currently active context if it can be determined. ($FUNC_NAMESPACE) (default "default")
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
--platform string Optionally specify a specific platform to build for (e.g. linux/amd64). ($FUNC_PLATFORM)
-u, --push Push the function image to registry before deploying. ($FUNC_PUSH) (default true)
--pvc-size string When triggering a remote deployment, set a custom volume size to allocate for the build operation ($FUNC_PVC_SIZE)
-r, --registry string Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)
--registry-insecure Skip TLS certificate verification when communicating in HTTPS with the registry ($FUNC_REGISTRY_INSECURE)
-R, --remote Trigger a remote deployment. Default is to deploy and build from the local system ($FUNC_REMOTE)
--remote-storage-class string Specify a storage class to use for the volume on-cluster during remote builds
--service-account string Service account to be used in the deployed function ($FUNC_SERVICE_ACCOUNT)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)
```
### SEE ALSO

View File

@ -0,0 +1,39 @@
## func mcp
Start MCP server
### Synopsis
NAME
func mcp - start a Model Context Protocol (MCP) server
SYNOPSIS
func 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:
func mcp
```
func mcp
```
### Options
```
-h, --help help for mcp
```
### SEE ALSO
* [func](func.md) - func manages Knative Functions

View File

@ -11,7 +11,7 @@ NAME
SYNOPSIS
func run [-t|--container] [-r|--registry] [-i|--image] [-e|--env]
[--build] [-b|--builder] [--builder-image] [-c|--confirm]
[-v|--verbose]
[--address] [--json] [-v|--verbose]
DESCRIPTION
Run the function locally.
@ -22,9 +22,14 @@ DESCRIPTION
The --container flag indicates that the function's container should be
run rather than running the source code directly. This may require that
the function's container first be rebuilt. Building the container on or
off can be altered using the --build flag. The default value --build=auto
indicates the system should automatically build the container only if
necessary.
off can be altered using the --build flag. The value --build=auto
can be used to indicate the function should be run in a container, with
the container automatically built if necessary.
The --container flag defaults to true if the builder defined for the
function is a containerized builder such as Pack or S2I, and in the case
where the function's runtime requires containerized builds (is not yet
supported by the Host builder.
Process Scaffolding
This is an Experimental Feature currently available only to Go projects.
@ -47,6 +52,12 @@ EXAMPLES
o Run the function locally on the host with no containerization (Go only).
$ func run --container=false
o Run the function locally on a specific address.
$ func run --address='[::]:8081'
o Run the function locally and output JSON with the service address.
$ func run --json
```
func run
@ -55,14 +66,17 @@ func run
### Options
```
--address string 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)
--base-image string Override the base image for your function (host builder only)
--build string[="true"] Build the function. [auto|true|false]. ($FUNC_BUILD) (default "auto")
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "pack" and "s2i". (default "pack")
-b, --builder string Builder to use when creating the function's container. Currently supported builders are "host", "pack" and "s2i". (default "pack")
--builder-image string Specify a custom builder image for use by the builder other than its default. ($FUNC_BUILDER_IMAGE)
-c, --confirm Prompt to confirm options interactively ($FUNC_CONFIRM)
-t, --container Run the function in a container. ($FUNC_CONTAINER) (default true)
-e, --env stringArray 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-).
-h, --help help for run
-i, --image string Full image name in the form [registry]/[namespace]/[name]:[tag]. This option takes precedence over --registry. Specifying tag is optional. ($FUNC_IMAGE)
--json Output as JSON. ($FUNC_JSON)
-p, --path string Path to the function. Default is current directory ($FUNC_PATH)
-r, --registry string Container registry + registry namespace. (ex 'ghcr.io/myuser'). The full image name is automatically determined using this along with function name. ($FUNC_REGISTRY)
-v, --verbose Print verbose logs ($FUNC_VERBOSE)

BIN
func-util-symlinks.tgz Normal file

Binary file not shown.

File diff suppressed because it is too large Load Diff

275
go.mod
View File

@ -1,9 +1,9 @@
module knative.dev/func
go 1.22.0
go 1.24.0
// this is required bacause of bad dep in github.com/openshift-pipelines/pipelines-as-code
replace k8s.io/client-go => k8s.io/client-go v0.29.3
replace github.com/imdario/mergo => dario.cat/mergo v1.0.1
require (
github.com/AlecAivazis/survey/v2 v2.3.7
@ -11,122 +11,127 @@ require (
github.com/Microsoft/go-winio v0.6.2
github.com/Netflix/go-expect v0.0.0-20220104043353-73e0943537d2
github.com/alecthomas/jsonschema v0.0.0-20220216202328-9eeeec9d044b
github.com/buildpacks/pack v0.34.2
github.com/blang/semver/v4 v4.0.0
github.com/buildpacks/pack v0.36.4
github.com/chainguard-dev/git-urls v1.0.2
github.com/cloudevents/sdk-go/v2 v2.15.2
github.com/containerd/containerd v1.7.17
github.com/containers/image/v5 v5.31.0
github.com/containerd/errdefs v0.3.0
github.com/containerd/platforms v0.2.1
github.com/containers/image/v5 v5.31.1
github.com/coreos/go-semver v0.3.1
github.com/creack/pty v1.1.21
github.com/docker/cli v26.1.3+incompatible
github.com/docker/docker v26.1.5+incompatible
github.com/docker/docker-credential-helpers v0.8.1
github.com/docker/cli v27.5.1+incompatible
github.com/docker/docker v27.5.0+incompatible
github.com/docker/docker-credential-helpers v0.8.2
github.com/docker/go-connections v0.5.0
github.com/go-git/go-billy/v5 v5.5.0
github.com/go-git/go-git/v5 v5.12.0
github.com/google/go-cmp v0.6.0
github.com/google/go-containerregistry v0.19.1
github.com/google/go-github/v49 v49.1.0
github.com/go-git/go-billy/v5 v5.6.1
github.com/go-git/go-git/v5 v5.13.1
github.com/google/go-cmp v0.7.0
github.com/google/go-containerregistry v0.20.3
github.com/google/go-github/v68 v68.0.0
github.com/google/uuid v1.6.0
github.com/hectane/go-acl v0.0.0-20190604041725-da78bae5fc95
github.com/heroku/color v0.0.6
github.com/hinshun/vt10x v0.0.0-20220228203356-1ab2cad5fd82
github.com/manifestival/client-go-client v0.5.0
github.com/manifestival/client-go-client v0.6.0
github.com/manifestival/manifestival v0.7.2
github.com/mark3labs/mcp-go v0.30.0
github.com/opencontainers/image-spec v1.1.0
github.com/openshift-pipelines/pipelines-as-code v0.27.0
github.com/openshift/source-to-image v1.4.1-0.20240605122348-f94ff357628b
github.com/openshift-pipelines/pipelines-as-code v0.31.0
github.com/openshift/source-to-image v1.5.0
github.com/ory/viper v1.7.5
github.com/paketo-buildpacks/libpak v1.70.0
github.com/pelletier/go-toml v1.9.5
github.com/pkg/errors v0.9.1
github.com/sabhiram/go-gitignore v0.0.0-20210923224102-525f6e181f06
github.com/schollz/progressbar/v3 v3.13.1
github.com/spf13/cobra v1.8.0
github.com/spf13/pflag v1.0.5
github.com/spf13/cobra v1.8.1
github.com/spf13/pflag v1.0.6
github.com/tektoncd/cli v0.37.0
github.com/tektoncd/pipeline v0.60.1
github.com/tektoncd/pipeline v0.65.1
github.com/xanzy/go-gitlab v0.102.0
golang.org/x/crypto v0.28.0
golang.org/x/exp v0.0.0-20240808152545-0cdaa3abc0fa
golang.org/x/net v0.30.0
golang.org/x/oauth2 v0.22.0
golang.org/x/sync v0.8.0
golang.org/x/term v0.25.0
golang.org/x/crypto v0.39.0
golang.org/x/net v0.41.0
golang.org/x/oauth2 v0.30.0
golang.org/x/sync v0.15.0
golang.org/x/sys v0.33.0
golang.org/x/term v0.32.0
gopkg.in/yaml.v2 v2.4.0
gopkg.in/yaml.v3 v3.0.1
gotest.tools/v3 v3.5.1
k8s.io/api v0.30.3
k8s.io/apimachinery v0.30.3
k8s.io/client-go v1.5.2
k8s.io/api v0.33.1
k8s.io/apimachinery v0.33.1
k8s.io/client-go v0.33.1
k8s.io/klog/v2 v2.130.1
knative.dev/client/pkg v0.0.0-20241022160900-b3b6b8603082
knative.dev/eventing v0.43.0
knative.dev/hack v0.0.0-20241010131451-05b2fb30cb4d
knative.dev/pkg v0.0.0-20241021183759-9b9d535af5ad
knative.dev/serving v0.43.0
knative.dev/client/pkg v0.0.0-20250617200959-1c3b47ce739a
knative.dev/eventing v0.45.1-0.20250625134405-5bcf8011acc8
knative.dev/hack v0.0.0-20250514121446-f525e187efdc
knative.dev/pkg v0.0.0-20250627014006-8481e7eef7f6
knative.dev/serving v0.45.1-0.20250627133507-aa58baffad69
)
require (
cloud.google.com/go/compute/metadata v0.5.0 // indirect
cel.dev/expr v0.23.0 // indirect
cloud.google.com/go/compute/metadata v0.6.0 // indirect
contrib.go.opencensus.io/exporter/ocagent v0.7.1-0.20200907061046-05415f1de66d // indirect
contrib.go.opencensus.io/exporter/prometheus v0.4.2 // indirect
dario.cat/mergo v1.0.0 // indirect
github.com/Azure/azure-sdk-for-go v68.0.0+incompatible // indirect
github.com/Azure/go-ansiterm v0.0.0-20230124172434-306776ec8161 // indirect
github.com/Azure/go-autorest v14.2.0+incompatible // indirect
github.com/Azure/go-autorest/autorest v0.11.29 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.23 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.12 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.6 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.0 // indirect
github.com/Azure/go-autorest/logger v0.2.1 // indirect
github.com/Azure/go-autorest/tracing v0.6.0 // indirect
github.com/BurntSushi/toml v1.3.2 // indirect
github.com/Azure/go-autorest/autorest v0.11.30 // indirect
github.com/Azure/go-autorest/autorest/adal v0.9.24 // indirect
github.com/Azure/go-autorest/autorest/azure/auth v0.5.13 // indirect
github.com/Azure/go-autorest/autorest/azure/cli v0.4.7 // indirect
github.com/Azure/go-autorest/autorest/date v0.3.1 // indirect
github.com/Azure/go-autorest/logger v0.2.2 // indirect
github.com/Azure/go-autorest/tracing v0.6.1 // indirect
github.com/BurntSushi/toml v1.4.0 // indirect
github.com/GoogleContainerTools/kaniko v1.23.2 // indirect
github.com/Masterminds/semver/v3 v3.2.1 // indirect
github.com/Microsoft/hcsshim v0.12.3 // indirect
github.com/ProtonMail/go-crypto v1.0.0 // indirect
github.com/Microsoft/hcsshim v0.12.7 // indirect
github.com/ProtonMail/go-crypto v1.1.3 // indirect
github.com/agext/levenshtein v1.2.3 // indirect
github.com/antlr/antlr4/runtime/Go/antlr v1.4.10 // indirect
github.com/antlr4-go/antlr/v4 v4.13.0 // indirect
github.com/antlr4-go/antlr/v4 v4.13.1 // indirect
github.com/apex/log v1.9.0 // indirect
github.com/aws/aws-sdk-go-v2 v1.26.0 // indirect
github.com/aws/aws-sdk-go-v2/config v1.27.9 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.9 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.0 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.4 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.0 // indirect
github.com/aws/aws-sdk-go-v2/service/ecr v1.24.5 // indirect
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.21.5 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.11.1 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.11.6 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.20.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.23.3 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.28.5 // indirect
github.com/aws/smithy-go v1.20.1 // indirect
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20231213181459-b0fcec718dc6 // indirect
github.com/aws/aws-sdk-go-v2 v1.36.1 // indirect
github.com/aws/aws-sdk-go-v2/config v1.29.6 // indirect
github.com/aws/aws-sdk-go-v2/credentials v1.17.59 // indirect
github.com/aws/aws-sdk-go-v2/feature/ec2/imds v1.16.28 // indirect
github.com/aws/aws-sdk-go-v2/internal/configsources v1.3.32 // indirect
github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.6.32 // indirect
github.com/aws/aws-sdk-go-v2/internal/ini v1.8.2 // indirect
github.com/aws/aws-sdk-go-v2/service/ecr v1.40.3 // indirect
github.com/aws/aws-sdk-go-v2/service/ecrpublic v1.31.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/accept-encoding v1.12.2 // indirect
github.com/aws/aws-sdk-go-v2/service/internal/presigned-url v1.12.13 // indirect
github.com/aws/aws-sdk-go-v2/service/sso v1.24.15 // indirect
github.com/aws/aws-sdk-go-v2/service/ssooidc v1.28.14 // indirect
github.com/aws/aws-sdk-go-v2/service/sts v1.33.14 // indirect
github.com/aws/smithy-go v1.22.2 // indirect
github.com/awslabs/amazon-ecr-credential-helper/ecr-login v0.0.0-20250205235911-d2398ba46815 // indirect
github.com/beorn7/perks v1.0.1 // indirect
github.com/blendle/zapdriver v1.3.1 // indirect
github.com/buildpacks/imgutil v0.0.0-20240605145725-186f89b2d168 // indirect
github.com/buildpacks/libcnb v1.30.3 // indirect
github.com/buildpacks/lifecycle v0.19.6 // indirect
github.com/buildpacks/lifecycle v0.20.4 // indirect
github.com/census-instrumentation/opencensus-proto v0.4.1 // indirect
github.com/cert-manager/cert-manager v1.16.3 // indirect
github.com/cespare/xxhash v1.1.0 // indirect
github.com/cespare/xxhash/v2 v2.3.0 // indirect
github.com/chrismellard/docker-credential-acr-env v0.0.0-20230304212654-82a0ddb27589 // indirect
github.com/cloudevents/sdk-go/sql/v2 v2.15.2 // indirect
github.com/cloudflare/circl v1.3.7 // indirect
github.com/containerd/cgroups/v3 v3.0.3 // indirect
github.com/containerd/errdefs v0.1.0 // indirect
github.com/containerd/log v0.1.0 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.15.1 // indirect
github.com/containerd/typeurl/v2 v2.1.1 // indirect
github.com/containerd/stargz-snapshotter/estargz v0.16.3 // indirect
github.com/containerd/typeurl/v2 v2.2.0 // indirect
github.com/containers/libtrust v0.0.0-20230121012942-c1716e8a8d01 // indirect
github.com/containers/ocicrypt v1.1.10 // indirect
github.com/containers/ocicrypt v1.2.0 // indirect
github.com/containers/storage v1.54.0 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.3 // indirect
github.com/cyphar/filepath-securejoin v0.2.5 // indirect
github.com/cpuguy83/go-md2man/v2 v2.0.6 // indirect
github.com/cyphar/filepath-securejoin v0.3.6 // indirect
github.com/davecgh/go-spew v1.1.2-0.20180830191138-d8f796af33cc // indirect
github.com/dgraph-io/ristretto v0.0.1 // indirect
github.com/dimchansky/utfbom v1.1.1 // indirect
@ -135,39 +140,37 @@ require (
github.com/docker/go-metrics v0.0.1 // indirect
github.com/docker/go-units v0.5.0 // indirect
github.com/dustin/go-humanize v1.0.1 // indirect
github.com/emicklei/go-restful/v3 v3.12.1 // indirect
github.com/emicklei/go-restful/v3 v3.12.2 // indirect
github.com/emirpasic/gods v1.18.1 // indirect
github.com/evanphx/json-patch v5.9.0+incompatible // indirect
github.com/evanphx/json-patch/v5 v5.9.0 // indirect
github.com/evanphx/json-patch/v5 v5.9.11 // indirect
github.com/fatih/color v1.16.0 // indirect
github.com/felixge/httpsnoop v1.0.4 // indirect
github.com/fsnotify/fsnotify v1.7.0 // indirect
github.com/gdamore/encoding v1.0.0 // indirect
github.com/gdamore/tcell/v2 v2.7.4 // indirect
github.com/fxamacker/cbor/v2 v2.8.0 // indirect
github.com/gdamore/encoding v1.0.1 // indirect
github.com/gdamore/tcell/v2 v2.8.0 // indirect
github.com/go-errors/errors v1.4.2 // indirect
github.com/go-git/gcfg v1.5.1-0.20230307220236-3a3c6141e376 // indirect
github.com/go-kit/log v0.2.1 // indirect
github.com/go-logfmt/logfmt v0.6.0 // indirect
github.com/go-logr/logr v1.4.2 // indirect
github.com/go-logr/logr v1.4.3 // indirect
github.com/go-logr/stdr v1.2.2 // indirect
github.com/go-openapi/jsonpointer v0.21.0 // indirect
github.com/go-openapi/jsonpointer v0.21.1 // indirect
github.com/go-openapi/jsonreference v0.21.0 // indirect
github.com/go-openapi/swag v0.23.0 // indirect
github.com/go-openapi/swag v0.23.1 // indirect
github.com/go-viper/mapstructure/v2 v2.2.1 // indirect
github.com/gogo/protobuf v1.3.2 // indirect
github.com/golang-jwt/jwt/v4 v4.5.0 // indirect
github.com/golang-jwt/jwt/v4 v4.5.2 // indirect
github.com/golang/groupcache v0.0.0-20210331224755-41bb18bfe9da // indirect
github.com/golang/protobuf v1.5.4 // indirect
github.com/google/btree v1.1.2 // indirect
github.com/google/cel-go v0.20.1 // indirect
github.com/google/gnostic-models v0.6.9-0.20230804172637-c7be7c783f49 // indirect
github.com/google/btree v1.1.3 // indirect
github.com/google/cel-go v0.23.2 // indirect
github.com/google/gnostic-models v0.6.9 // indirect
github.com/google/go-intervals v0.0.2 // indirect
github.com/google/go-querystring v1.1.0 // indirect
github.com/google/gofuzz v1.2.0 // indirect
github.com/google/shlex v0.0.0-20191202100458-e7afc7fbc510 // indirect
github.com/gorilla/mux v1.8.1 // indirect
github.com/gorilla/websocket v1.5.3 // indirect
github.com/gorilla/websocket v1.5.4-0.20250319132907-e064f32e3674 // indirect
github.com/gregjones/httpcache v0.0.0-20190611155906-901d90724c79 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.21.0 // indirect
github.com/grpc-ecosystem/grpc-gateway/v2 v2.27.1 // indirect
github.com/hako/durafmt v0.0.0-20210608085754-5c1018a4e16b // indirect
github.com/hashicorp/errwrap v1.1.0 // indirect
github.com/hashicorp/go-cleanhttp v0.5.2 // indirect
@ -176,25 +179,24 @@ require (
github.com/hashicorp/golang-lru v1.0.2 // indirect
github.com/hashicorp/hcl v1.0.1-vault-5 // indirect
github.com/iancoleman/orderedmap v0.0.0-20190318233801-ac98e3ecb4b0 // indirect
github.com/imdario/mergo v0.3.16 // indirect
github.com/imdario/mergo v1.0.1 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/jbenet/go-context v0.0.0-20150711004518-d14ea06fba99 // indirect
github.com/jmespath/go-jmespath v0.4.1-0.20220621161143-b0104c826a24 // indirect
github.com/jonboulle/clockwork v0.4.0 // indirect
github.com/josharian/intern v1.0.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/kballard/go-shellquote v0.0.0-20180428030007-95032a82bc51 // indirect
github.com/kelseyhightower/envconfig v1.4.0 // indirect
github.com/kevinburke/ssh_config v1.2.0 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/compress v1.18.0 // indirect
github.com/klauspost/pgzip v1.2.6 // indirect
github.com/liggitt/tabwriter v0.0.0-20181228230101-89fcab3d43de // indirect
github.com/lucasb-eyer/go-colorful v1.2.0 // indirect
github.com/magiconair/properties v1.8.7 // indirect
github.com/mailru/easyjson v0.7.7 // indirect
github.com/mailru/easyjson v0.9.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/mattn/go-runewidth v0.0.16 // indirect
github.com/mgutz/ansi v0.0.0-20200706080929-d51e80ef957d // indirect
github.com/mistifyio/go-zfs/v3 v3.0.1 // indirect
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db // indirect
@ -202,13 +204,14 @@ require (
github.com/mitchellh/hashstructure/v2 v2.0.2 // indirect
github.com/mitchellh/ioprogress v0.0.0-20180201004757-6a23b12fa88e // indirect
github.com/mitchellh/mapstructure v1.5.0 // indirect
github.com/moby/buildkit v0.13.2 // indirect
github.com/moby/buildkit v0.16.0 // indirect
github.com/moby/docker-image-spec v1.3.1 // indirect
github.com/moby/patternmatcher v0.6.0 // indirect
github.com/moby/spdystream v0.2.0 // indirect
github.com/moby/sys/mountinfo v0.7.1 // indirect
github.com/moby/spdystream v0.5.0 // indirect
github.com/moby/sys/mountinfo v0.7.2 // indirect
github.com/moby/sys/sequential v0.5.0 // indirect
github.com/moby/sys/user v0.1.0 // indirect
github.com/moby/sys/user v0.3.0 // indirect
github.com/moby/sys/userns v0.1.0 // indirect
github.com/moby/term v0.5.0 // indirect
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
@ -216,20 +219,20 @@ require (
github.com/morikuni/aec v1.0.0 // indirect
github.com/munnerz/goautoneg v0.0.0-20191010083416-a7dc8b61c822 // indirect
github.com/mxk/go-flowrate v0.0.0-20140419014527-cca7078d478f // indirect
github.com/onsi/gomega v1.34.1 // indirect
github.com/onsi/gomega v1.36.2 // indirect
github.com/opencontainers/go-digest v1.0.0 // indirect
github.com/opencontainers/runtime-spec v1.2.0 // indirect
github.com/opencontainers/selinux v1.11.0 // indirect
github.com/openzipkin/zipkin-go v0.4.3 // indirect
github.com/ostreedev/ostree-go v0.0.0-20210805093236-719684c64e4f // indirect
github.com/pelletier/go-toml/v2 v2.1.0 // indirect
github.com/pelletier/go-toml/v2 v2.2.1 // indirect
github.com/peterbourgon/diskv v2.0.1+incompatible // indirect
github.com/pjbgf/sha1cd v0.3.0 // indirect
github.com/prometheus/client_golang v1.19.1 // indirect
github.com/prometheus/client_model v0.6.1 // indirect
github.com/prometheus/common v0.55.0 // indirect
github.com/prometheus/procfs v0.15.1 // indirect
github.com/prometheus/statsd_exporter v0.26.1 // indirect
github.com/prometheus/client_golang v1.22.0 // indirect
github.com/prometheus/client_model v0.6.2 // indirect
github.com/prometheus/common v0.65.0 // indirect
github.com/prometheus/procfs v0.16.1 // indirect
github.com/prometheus/statsd_exporter v0.28.0 // indirect
github.com/rickb777/date v1.20.2 // indirect
github.com/rickb777/plural v1.4.1 // indirect
github.com/rivo/tview v0.0.0-20220307222120-9994674d60a8 // indirect
@ -240,57 +243,65 @@ require (
github.com/sagikazarmark/slog-shim v0.1.0 // indirect
github.com/sergi/go-diff v1.3.2-0.20230802210424-5b0b94c5c0d3 // indirect
github.com/sirupsen/logrus v1.9.3 // indirect
github.com/skeema/knownhosts v1.2.2 // indirect
github.com/skeema/knownhosts v1.3.0 // indirect
github.com/sourcegraph/conc v0.3.0 // indirect
github.com/spf13/afero v1.11.0 // indirect
github.com/spf13/cast v1.6.0 // indirect
github.com/spf13/cast v1.7.1 // indirect
github.com/spf13/jwalterweatherman v1.1.0 // indirect
github.com/spf13/viper v1.18.2 // indirect
github.com/stoewer/go-strcase v1.3.0 // indirect
github.com/subosito/gotenv v1.6.0 // indirect
github.com/sylabs/sif/v2 v2.16.0 // indirect
github.com/sylabs/sif/v2 v2.18.0 // indirect
github.com/syndtr/gocapability v0.0.0-20200815063812-42c35b437635 // indirect
github.com/tchap/go-patricia/v2 v2.3.1 // indirect
github.com/tektoncd/triggers v0.27.0 // indirect
github.com/tonistiigi/go-csvvalue v0.0.0-20240710180619-ddb21b71c0b4 // indirect
github.com/ulikunitz/xz v0.5.12 // indirect
github.com/vbatts/tar-split v0.11.5 // indirect
github.com/vbatts/tar-split v0.11.6 // indirect
github.com/x448/float16 v0.8.4 // indirect
github.com/xanzy/ssh-agent v0.3.3 // indirect
github.com/xeipuuv/gojsonpointer v0.0.0-20190905194746-02993c407bfb // indirect
github.com/xeipuuv/gojsonreference v0.0.0-20180127040603-bd5ef7bd5415 // indirect
github.com/xeipuuv/gojsonschema v1.2.0 // indirect
github.com/xlab/treeprint v1.2.0 // indirect
github.com/yosida95/uritemplate/v3 v3.0.2 // indirect
go.opencensus.io v0.24.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.50.0 // indirect
go.opentelemetry.io/otel v1.27.0 // indirect
go.opentelemetry.io/otel/metric v1.27.0 // indirect
go.opentelemetry.io/otel/trace v1.27.0 // indirect
go.opentelemetry.io/auto/sdk v1.1.0 // indirect
go.opentelemetry.io/contrib/instrumentation/net/http/otelhttp v0.58.0 // indirect
go.opentelemetry.io/otel v1.37.0 // indirect
go.opentelemetry.io/otel/metric v1.37.0 // indirect
go.opentelemetry.io/otel/trace v1.37.0 // indirect
go.starlark.net v0.0.0-20230525235612-a134d8f9ddca // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.27.0 // indirect
golang.org/x/mod v0.21.0 // indirect
golang.org/x/sys v0.26.0 // indirect
golang.org/x/text v0.19.0 // indirect
golang.org/x/time v0.6.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.4.0 // indirect
google.golang.org/api v0.183.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20240814211410-ddb44dafa142 // indirect
google.golang.org/grpc v1.67.1 // indirect
google.golang.org/protobuf v1.35.1 // indirect
go.yaml.in/yaml/v2 v2.4.2 // indirect
go.yaml.in/yaml/v3 v3.0.3 // indirect
golang.org/x/exp v0.0.0-20250210185358-939b2ce775ac // indirect
golang.org/x/mod v0.25.0 // indirect
golang.org/x/text v0.26.0 // indirect
golang.org/x/time v0.11.0 // indirect
gomodules.xyz/jsonpatch/v2 v2.5.0 // indirect
google.golang.org/api v0.204.0 // indirect
google.golang.org/genproto/googleapis/api v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/genproto/googleapis/rpc v0.0.0-20250603155806-513f23925822 // indirect
google.golang.org/grpc v1.73.0 // indirect
google.golang.org/protobuf v1.36.6 // indirect
gopkg.in/evanphx/json-patch.v4 v4.12.0 // indirect
gopkg.in/inf.v0 v0.9.1 // indirect
gopkg.in/ini.v1 v1.67.0 // indirect
gopkg.in/warnings.v0 v0.1.2 // indirect
k8s.io/apiextensions-apiserver v0.30.3 // indirect
k8s.io/apiserver v0.30.3 // indirect
k8s.io/cli-runtime v0.29.2 // indirect
k8s.io/kube-openapi v0.0.0-20240808142205-8e686545bdb8 // indirect
k8s.io/utils v0.0.0-20240711033017-18e509b52bc8 // indirect
knative.dev/client-pkg v0.0.0-20241022130700-7b4bb48ac250 // indirect
knative.dev/networking v0.0.0-20241022012959-60e29ff520dc // indirect
sigs.k8s.io/controller-runtime v0.7.2 // indirect
sigs.k8s.io/json v0.0.0-20221116044647-bc3834ca7abd // indirect
sigs.k8s.io/kustomize/api v0.13.5-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/kustomize/kyaml v0.14.3-0.20230601165947-6ce0bf390ce3 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.4.1 // indirect
sigs.k8s.io/yaml v1.4.0 // indirect
k8s.io/apiextensions-apiserver v0.33.1 // indirect
k8s.io/apiserver v0.33.1 // indirect
k8s.io/cli-runtime v0.31.4 // indirect
k8s.io/kube-openapi v0.0.0-20250318190949-c8a335a9a2ff // indirect
k8s.io/utils v0.0.0-20250321185631-1f6e0b77f77e // indirect
knative.dev/networking v0.0.0-20250616174156-f950c0c1a0a8 // indirect
sigs.k8s.io/controller-runtime v0.20.4 // indirect
sigs.k8s.io/gateway-api v1.1.0 // indirect
sigs.k8s.io/json v0.0.0-20241014173422-cfa47c3a1cc8 // indirect
sigs.k8s.io/kustomize/api v0.17.2 // indirect
sigs.k8s.io/kustomize/kyaml v0.17.1 // indirect
sigs.k8s.io/randfill v1.0.0 // indirect
sigs.k8s.io/structured-merge-diff/v4 v4.6.0 // indirect
sigs.k8s.io/yaml v1.5.0 // indirect
)

1918
go.sum

File diff suppressed because it is too large Load Diff

View File

@ -20,17 +20,9 @@ set -o errexit
set -o nounset
set -o pipefail
source "$(dirname "$(realpath "$0")")/common.sh"
set_versions() {
# Note: Kubernetes Version node image per Kind releases (full hash is suggested):
# https://github.com/kubernetes-sigs/kind/releases
kind_node_version=v1.29.2@sha256:51a1434a5397193442f0be2a297b488b6c919ce8a3931be0ce822606ea5ca245
knative_serving_version="v$(get_latest_release_version "knative" "serving")"
knative_eventing_version="v$(get_latest_release_version "knative" "eventing")"
contour_version="v$(get_latest_release_version "knative-extensions" "net-contour")"
}
source "$(cd "$(dirname "$0")" && pwd)/common.sh"
# this is where versions of common components are (like knative)
source "$(cd "$(dirname "$0")" && pwd)/component-versions.sh"
main() {
echo "${blue}Allocating${reset}"
@ -45,12 +37,14 @@ main() {
echo "evt: Eventing and Namespace"
echo "reg: Local Registry"
echo "dpr: Dapr Runtime"
echo "tkt: Tekton Pipelines"
echo ""
( set -o pipefail; (serving && dns && networking) 2>&1 | sed -e 's/^/svr /')&
( set -o pipefail; (eventing && namespace) 2>&1 | sed -e 's/^/evt /')&
( set -o pipefail; registry 2>&1 | sed -e 's/^/reg /') &
( set -o pipefail; dapr_runtime 2>&1 | sed -e 's/^/dpr /')&
( set -o pipefail; (tekton && pac) 2>&1 | sed -e 's/^/tkt /')&
local job
for job in $(jobs -p); do
@ -62,46 +56,6 @@ main() {
echo -e "\n${green}🎉 DONE${reset}\n"
}
# Retrieve latest version from given Knative repository tags
# On 'main' branch the latest released version is returned
# On 'release-x.y' branch the latest patch version for 'x.y.*' is returned
# Similar to hack/library.sh get_latest_knative_yaml_source()
function get_latest_release_version() {
local org_name="$1"
local repo_name="$2"
local major_minor=""
if is_release_branch; then
local branch_name
branch_name="$(current_branch)"
major_minor="${branch_name##release-}"
fi
local version
version="$(git ls-remote --tags --ref https://github.com/"${org_name}"/"${repo_name}".git \
| grep "${major_minor}" \
| cut -d '-' -f2 \
| cut -d 'v' -f2 \
| sort -Vr \
| head -n 1)"
echo "${version}"
}
# Returns whether the current branch is a release branch.
function is_release_branch() {
[[ $(current_branch) =~ ^release-[0-9\.]+$ ]]
}
# Returns the current branch.
# Taken from knative/hack. The function covers Knative CI use cases and local variant.
function current_branch() {
local branch_name=""
# Get the branch name from Prow's env var, see https://github.com/kubernetes/test-infra/blob/master/prow/jobs.md.
# Otherwise, try getting the current branch from git.
(( ${IS_PROW:-} )) && branch_name="${PULL_BASE_REF:-}"
[[ -z "${branch_name}" ]] && branch_name="${GITHUB_BASE_REF:-}"
[[ -z "${branch_name}" ]] && branch_name="$(git rev-parse --abbrev-ref HEAD)"
echo "${branch_name}"
}
kubernetes() {
cat <<EOF | $KIND create cluster --name=func --kubeconfig="${KUBECONFIG}" --wait=60s --config=-
kind: Cluster
@ -113,7 +67,7 @@ nodes:
- containerPort: 80
hostPort: 80
listenAddress: "127.0.0.1"
- containerPort: 433
- containerPort: 443
hostPort: 443
listenAddress: "127.0.0.1"
- containerPort: 30022
@ -161,7 +115,7 @@ dns() {
$KUBECTL patch configmap/config-domain \
--namespace knative-serving \
--type merge \
--patch '{"data":{"127.0.0.1.sslip.io":""}}' && break
--patch '{"data":{"localtest.me":""}}' && break
(( i+=1 ))
if (( i>=n )); then
@ -174,6 +128,17 @@ dns() {
echo "${green}✅ DNS${reset}"
}
arr2yaml() {
echo -n '['
local e
local s=""
for e in "$@"; do
printf '%s"%s"' "$s" "$e";
s=", "
done
echo -n ']'
}
loadbalancer() {
echo "${blue}Installing Load Balancer (Metallb)${reset}"
$KUBECTL apply -f "https://raw.githubusercontent.com/metallb/metallb/v0.13.7/config/manifests/metallb-native.yaml"
@ -184,7 +149,22 @@ loadbalancer() {
--timeout=300s
local kind_addr
local kind_addr6
local addr_array
kind_addr="$($CONTAINER_ENGINE container inspect func-control-plane | jq '.[0].NetworkSettings.Networks.kind.IPAddress' -r)"
kind_addr6="$($CONTAINER_ENGINE container inspect func-control-plane | jq '.[0].NetworkSettings.Networks.kind.GlobalIPv6Address' -r)"
addr_array=()
if [[ -n "$kind_addr" ]]; then
addr_array+=("$kind_addr/32");
fi
if [[ -n "$kind_addr6" ]]; then
addr_array+=("$kind_addr6/128");
fi
echo "Setting up address pool."
$KUBECTL apply -f - <<EOF
@ -194,8 +174,7 @@ metadata:
name: example
namespace: metallb-system
spec:
addresses:
- ${kind_addr}-${kind_addr}
addresses: $(arr2yaml "${addr_array[@]}")
---
apiVersion: metallb.io/v1beta1
kind: L2Advertisement
@ -226,6 +205,9 @@ networking() {
--type merge \
--patch '{"data":{"ingress-class":"contour.ingress.networking.knative.dev"}}'
echo "Patching contour to prefer duals-tack"
kubectl patch -n contour-external svc/envoy --type merge --patch '{"spec":{"ipFamilyPolicy":"PreferDualStack"}}'
$KUBECTL wait pod --for=condition=Ready -l '!job-name' -n contour-external --timeout=10m
$KUBECTL wait pod --for=condition=Ready -l '!job-name' -n knative-serving --timeout=10m
echo "${green}✅ Ingress${reset}"
@ -305,7 +287,7 @@ namespace() {
# Default Broker
$KUBECTL apply -f - <<EOF
apiVersion: eventing.knative.dev/v1
kind: broker
kind: Broker
metadata:
name: func-broker
namespace: func
@ -416,6 +398,70 @@ EOF
echo "${green}✅ Dapr Runtime${reset}"
}
tekton() {
echo "${blue}Installing Tekton ${tekton_version} ${reset}"
tekton_release="previous/${tekton_version}"
namespace="${NAMESPACE:-default}"
$KUBECTL apply -f "https://storage.googleapis.com/tekton-releases/pipeline/${tekton_release}/release.yaml"
sleep 10
$KUBECTL wait pod --for=condition=Ready --timeout=180s -n tekton-pipelines -l "app=tekton-pipelines-controller"
$KUBECTL wait pod --for=condition=Ready --timeout=180s -n tekton-pipelines -l "app=tekton-pipelines-webhook"
sleep 10
$KUBECTL create clusterrolebinding "${namespace}:knative-serving-namespaced-admin" --clusterrole=knative-serving-namespaced-admin --serviceaccount="${namespace}:default"
# TEMPORARY WORKAROUND: Disable affinity assistant to prevent pod scheduling issues
# This is a workaround for issues where affinity assistant pod names don't match
# what's expected by task pods, causing them to fail scheduling.
# Related issues:
# - https://github.com/tektoncd/pipeline/issues/6740
# - https://github.com/tektoncd/pipeline/issues/7503
# TODO: Remove this workaround once the underlying Tekton issue is resolved
echo "${blue}- Disabling affinity assistant (temporary workaround)${reset}"
$KUBECTL patch configmap feature-flags -n tekton-pipelines \
-p '{"data":{"disable-affinity-assistant":"true", "coschedule":"disabled"}}' \
--type=merge
echo "${green}✅ Tekton${reset}"
}
pac() {
echo "${blue}Installing PAC (Pipelines-as-Code) ${pac_version} ${reset}"
local -r pac_ctr_host="${PAC_CONTROLLER_HOSTNAME:-pac-ctr.localtest.me}"
# Install Pipelines as Code
$KUBECTL apply -f "https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code/release-${pac_version}/release.k8s.yaml"
sleep 5
$KUBECTL wait pod --for=condition=Ready -l '!job-name' -n pipelines-as-code --timeout=5m
# Install ingress for the PaC controller. This is used by VCS Webhooks.
$KUBECTL apply -f - << EOF
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pipelines-as-code
namespace: pipelines-as-code
spec:
ingressClassName: contour-external
rules:
- host: ${pac_ctr_host}
http:
paths:
- backend:
service:
name: pipelines-as-code-controller
port:
number: 8080
pathType: Prefix
path: /
EOF
echo "the Pipeline as Code controller is available at: http://${pac_ctr_host}"
echo "${green}✅ PAC${reset}"
}
next_steps() {
echo -e ""
echo -e "${blue}Next Steps${reset}"
@ -424,7 +470,10 @@ next_steps() {
echo -e "${grey}REGISTRY"
echo -e "Before using the cluster for integration and E2E tests, please run \"${reset}registry.sh${grey}\" (Linux systems) which will configure podman or docker to communicate with the standalone container registry without TLS."
echo -e ""
echo -e "For other operating systems, or to do this manually, edit the docker daemon config (/etc/docker/daemon.json on linux and ~/.docker/daemon.json on OSX), add:"
echo -e "For other operating systems, or to do this manually, edit the docker daemon config:"
echo -e " - Linux: /etc/docker/daemon.json"
echo -e " - macOS: ~/.docker/daemon.json (or via Docker Desktop settings)"
echo -e "Add the following configuration:"
echo -e "${reset}{ \"insecure-registries\": [ \"localhost:50000\" ] }"
echo -e ""
echo -e "${grey}For podman, edit /etc/container/registries.conf to include:"

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,384 @@
// Package main implements a tool for automatically updating component
// versions for use in the hack/* scripts.
//
// Files interacted with:
// 1. The source-of-truth file at hack/component-versions.json
// 2. Autogenerated script at hack/component-versions.sh
//
// Usage:
//
// Most of the time this file will be used in a workflow that will run
// on scheduled basis checking if a new latest version of corresponding
// components exists (check components in 'Versions' struct). Please note that
// KindNode is NOT being updated programmatically at this time.
// When new latest version is detected, the program will create a PR in
// knative/func repository with the latest changes allowing the CI/CD workflows
// to run automatically before using the latest in main branch.
//
// Alternative use: You can run this file from hack/ directory to locally
// regenerate 2 files mentioned above (if you made some changes etc.) - you can
// use the root Makefile for your convenience -- 'make regenerate-kn-components'
package main
import (
"context"
"encoding/json"
"fmt"
"html/template"
"os"
"os/exec"
"os/signal"
"syscall"
"time"
github "github.com/google/go-github/v68/github"
)
const (
fileScript string = "component-versions.sh"
fileJson string = "component-versions.json"
versionsScriptTemplate string = `#!/usr/bin/env bash
# AUTOGENERATED FILE - edit versions in ./component-versions.json.
# If you are adding components, modify this scripts' template in
# ./cmd/update-knative-components/main.go.
# You can regenerate locally with "make generate-kn-components-local".
set_versions() {
# Note: Kubernetes Version node image per Kind releases (full hash is suggested):
# https://github.com/kubernetes-sigs/kind/releases
kind_node_version={{.KindNode}}
# gets updated programatically via workflow -> PR creation
knative_serving_version="{{.Serving}}"
knative_eventing_version="{{.Eventing}}"
contour_version="{{.Contour}}"
tekton_version="{{.Tekton}}"
pac_version="{{.Pac}}"
}
`
)
// all the components that are kept up to date
type Versions struct {
KindNode string
Serving string
Eventing string
Contour string
Tekton string
Pac string
}
func main() {
// there is an optional "local" argument
if len(os.Args) == 2 && os.Args[1] == "local" { //leveraging lazy evals
fmt.Println("Generate argument received! Regenerating files locally...")
err := generateComponentVersions()
if err != nil {
fmt.Fprintf(os.Stderr, "error: %v", err)
os.Exit(1)
}
fmt.Println("done")
os.Exit(0)
}
// Set up context for possible signal inputs to not disrupt cleanup process.
// This is not gonna do much for workflows since they finish and shutdown
// but in case of local testing - dont leave left over resources on disk/RAM.
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
os.Exit(130)
}()
const prTitle = "chore: Update components' versions to latest"
client := github.NewClient(nil).WithAuthToken(os.Getenv("GITHUB_TOKEN"))
e, err := prExists(ctx, client, prTitle)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
if e {
fmt.Printf("PR already exists, nothing to do, exiting")
os.Exit(0)
}
projects := []struct {
owner, repo string
}{
{
owner: "knative",
repo: "serving",
},
{
owner: "knative",
repo: "eventing",
},
{
owner: "knative-extensions",
repo: "net-contour",
},
}
// Get current versions used.
v, err := readVersions(fileJson)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
updated := false
// cycle through all versions of components listed above, fetch their
// latest from github releases - cmp them - create PR for update if necessary
for _, p := range projects {
newV, err := getLatestVersion(ctx, client, p.owner, p.repo)
if err != nil {
err = fmt.Errorf("error while getting latest v of %s/%s: %v", p.owner, p.repo, err)
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
// try to overwrite with possibly new versions
if updateVersion(&v, p.repo, newV) {
// if any of the files are updated, set true
updated = true
}
}
if !updated {
// nothing was updated, nothing to do
fmt.Printf("all good, no newer component releases, exiting\n")
os.Exit(0)
}
if err := writeFiles(v, fileScript, fileJson); err != nil {
err = fmt.Errorf("failed to write files: %v", err)
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
fmt.Println("files updated!")
branchName := "update-components" + time.Now().Format(time.DateOnly)
err = prepareBranch(branchName)
if err != nil {
err = fmt.Errorf("failed to prep the branch: %v", err)
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
err = createPR(ctx, client, prTitle, branchName)
if err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
// read (unmarshal) component versions from .json
func readVersions(file string) (v Versions, err error) {
fmt.Print("> Reading versions from file...")
data, err := os.ReadFile(file)
if err != nil {
return
}
err = json.Unmarshal(data, &v)
if err != nil {
return v, err
}
fmt.Println("done")
return v, nil
}
// attempt to update 'v' Versions to new 'val' for specific 'repo'
// 'v' - structure that holds versions of components
// 'repo' - points to a component repo that is being updated (example: serving)
// 'val' - value of the latest release of that repo (pulled via GH API)
func updateVersion(v *Versions, repo, val string) (updated bool) {
fmt.Printf("check for %s update...", repo)
if repo == "serving" && v.Serving != val {
v.Serving = val
updated = true
} else if repo == "eventing" && v.Eventing != val {
v.Eventing = val
updated = true
} else if repo == "net-contour" && v.Contour != val {
v.Contour = val
updated = true
}
if updated {
fmt.Printf("found! new:'%s'\n", val)
} else {
fmt.Println("nothing to do")
}
return
}
// Overwrite the 'source of truth' file - .json and regenerate new script
// with new versions from 'v'.
// Arguments 'script' & 'json' are paths to files for autogenerated script and
// source (json) file respectively.
func writeFiles(v Versions, script, json string) error {
fmt.Print("> Writing into files...")
// write to json
err := writeVersionsSource(v, json)
if err != nil {
return fmt.Errorf("failed to write to json: %v", err)
}
// write to script file
err = writeVersionsScript(v, script)
if err != nil {
return fmt.Errorf("failed to generate script: %v", err)
}
fmt.Println("done")
return nil
}
// write to 'source of truth' file (json) with updated versions
func writeVersionsSource(v Versions, file string) error {
vB, err := json.MarshalIndent(v, "", " ")
if err != nil {
return fmt.Errorf("cant Marshal versions: %v", err)
}
f, err := os.Create(file)
if err != nil {
return err
}
defer f.Close()
_, err = f.Write(append(vB, '\n')) // append newline for reviewdog
return err
}
// write to autogenerated script file with newest Versions via templates pkg
func writeVersionsScript(v Versions, file string) error {
tmpl, err := template.New("versions").Parse(versionsScriptTemplate)
if err != nil {
return err
}
f, err := os.Create(file)
if err != nil {
return err
}
defer f.Close()
if err := tmpl.Execute(f, v); err != nil {
return err
}
return nil
}
// get latest version of owner/repo via GH API
func getLatestVersion(ctx context.Context, client *github.Client, owner string, repo string) (v string, err error) {
fmt.Printf("> get latest '%s/%s'...", owner, repo)
rr, res, err := client.Repositories.GetLatestRelease(ctx, owner, repo)
if err != nil {
err = fmt.Errorf("error: request for latest %s release: %v", owner+"/"+repo, err)
return
}
if res.StatusCode < 200 && res.StatusCode > 299 {
err = fmt.Errorf("error: Return status code of request for latest %s release is %d", owner+"/"+repo, res.StatusCode)
return
}
v = *rr.Name
if v == "" {
return "", fmt.Errorf("internal error: returned latest release name is empty for '%s'", repo)
}
fmt.Println("done")
return v, nil
}
// prepare branch for PR via git commands
// config user as knative bot -> create branch -> add changes -> commit -> push
func prepareBranch(branchName string) error {
fmt.Println("> preparing branch")
cmd := exec.Command("bash", "-c", fmt.Sprintf(`
git config --local user.email "automation@knative.team" &&
git config --local user.name "Knative Automation" &&
git switch -c %s &&
git add %s %s &&
git commit -m "update components" &&
git push origin %s
`, branchName, fileScript, fileJson, branchName))
cmd.Stderr = os.Stderr
cmd.Stdout = os.Stdout
return cmd.Run()
}
// create a PR via GH API on the func repo with those new versions
func createPR(ctx context.Context, client *github.Client, title string, branchName string) error {
fmt.Print("> creating PR...")
bodyText := "You might need to close & open this PR so all tests can run"
body := fmt.Sprintf("%s\n%s\n/assign @gauron99", title, bodyText)
newPR := github.NewPullRequest{
Title: github.Ptr(title),
Base: github.Ptr("main"),
Head: github.Ptr(branchName),
Body: github.Ptr(body),
MaintainerCanModify: github.Ptr(true),
}
pr, _, err := client.PullRequests.Create(ctx, "knative", "func", &newPR)
if err != nil {
fmt.Printf("PR looks like this:\n%#v\n", pr)
fmt.Printf("err: %s\n", err)
return err
}
fmt.Println("ready")
return nil
}
// Returns true when PR with given title already exists in knative/func repo
// otherwise false.
// Returns an error if occurred, otherwise nil.
func prExists(ctx context.Context, c *github.Client, title string) (bool, error) {
perPage := 10
opt := &github.PullRequestListOptions{State: "open", ListOptions: github.ListOptions{PerPage: perPage}}
for {
list, resp, err := c.PullRequests.List(ctx, "knative", "func", opt)
if err != nil {
return false, fmt.Errorf("errror pulling PRs in knative/func: %s", err)
}
for _, pr := range list {
if pr.GetTitle() == title {
// gauron99 - currently cannot update already existing PR
return true, nil
}
}
if resp.NextPage == 0 {
// hit end of list
return false, nil
}
// otherwise, continue to the next page
opt.Page = resp.NextPage
}
}
// -------------------------------------------------------------------------- \\
// -------------------------------------------------------------------------- \\
// -------------------------------------------------------------------------- \\
// -------------------------------------------------------------------------- \\
// This is used when running this file with 1st argument "local".
// Regenerate written files (source (.json) & autogenerated .sh file)
// Generally you wont use this, but in case you make local changes to the
// files, you can simply regenerate them with this
func generateComponentVersions() error {
v, err := readVersions(fileJson)
if err != nil {
return fmt.Errorf("failed to read Versions from json: %v", err)
}
// generate
err = writeFiles(v, fileScript, fileJson)
if err != nil {
return fmt.Errorf("failed to write Versions: %v", err)
}
return nil
}

View File

@ -0,0 +1,109 @@
package main
import (
"io/fs"
"os"
"path"
"testing"
"gotest.tools/v3/assert"
)
const expectedScript string = `#!/usr/bin/env bash
# AUTOGENERATED FILE - edit versions in ./component-versions.json.
# If you are adding components, modify this scripts' template in
# ./cmd/update-knative-components/main.go.
# You can regenerate locally with "make generate-kn-components-local".
set_versions() {
# Note: Kubernetes Version node image per Kind releases (full hash is suggested):
# https://github.com/kubernetes-sigs/kind/releases
kind_node_version=v1.30
# gets updated programatically via workflow -> PR creation
knative_serving_version="v1.2.3"
knative_eventing_version="v1.4.5"
contour_version="v1.4.6"
tekton_version="v0.56.4"
pac_version="v0.24.6"
}
`
const expectedJson string = `{
"KindNode": "v1.30",
"Serving": "v1.2.3",
"Eventing": "v1.4.5",
"Contour": "v1.4.6",
"Tekton": "v0.56.4",
"Pac": "v0.24.6"
}
`
// TestRead should just successfully unmarshal ('v' struct & json compatibility)
func TestRead(t *testing.T) {
dir := t.TempDir()
const jsonContent string = `{
"Serving": "v1.14",
"Eventing": "v1.15",
"Contour": "v1.61",
"KindNode": "1.3456",
"Tekton": "v0.50.0",
"Pac": "v0.20.0"
}
`
tmpJson := path.Join(dir, "json.json")
err := os.WriteFile(tmpJson, []byte(jsonContent), fs.ModePerm)
if err != nil {
t.Fatal(err)
}
_, err = readVersions(tmpJson)
if err != nil {
t.Fatalf("failed to read json: %v", err)
}
}
// TestWrite ensures that writing both files succeeds with the correct file
// contents
func TestWrite(t *testing.T) {
dir := t.TempDir()
tmpJson := path.Join(dir, "f.json")
tmpSh := path.Join(dir, "f.sh")
v := Versions{
Serving: "v1.2.3",
Eventing: "v1.4.5",
Contour: "v1.4.6",
KindNode: "v1.30",
Tekton: "v0.56.4",
Pac: "v0.24.6",
}
// write to script (generate it)
err := writeVersionsScript(v, tmpSh)
if err != nil {
t.Fatalf("failed to generate script: %v", err)
}
// assert
fsh, err := os.ReadFile(tmpSh)
if err != nil {
t.Fatalf("failed to read file: %v", err)
}
assert.Equal(t, string(fsh), expectedScript)
// write to json
err = writeVersionsSource(v, tmpJson)
if err != nil {
t.Fatalf("failed to write json: %v", err)
}
// assert
fjson, err := os.ReadFile(tmpJson)
if err != nil {
t.Fatalf("failed to read json: %v", err)
}
assert.Equal(t, string(fjson), expectedJson)
}

View File

@ -29,11 +29,25 @@ find_executables() {
}
populate_environment() {
export ARCH="${ARCH:-amd64}"
# User's KUBECOFNIG and that used by these scripts should be isolated:
export KUBECONFIG="$(cd "$(dirname "$0")" && pwd)/bin/kubeconfig.yaml"
# Detect architecture, default to amd64 if unable to detect
if [[ -z "${ARCH:-}" ]]; then
local machine_arch=$(uname -m)
case $machine_arch in
x86_64) export ARCH="amd64" ;;
aarch64|arm64) export ARCH="arm64" ;;
*) export ARCH="amd64" ;;
esac
else
export ARCH="$ARCH"
fi
export CONTAINER_ENGINE=${CONTAINER_ENGINE:-docker}
export KUBECONFIG="${KUBECONFIG:-$(dirname "$(realpath "$0")")/bin/kubeconfig.yaml}"
export TERM="${TERM:-dumb}"
echo "KUBECONFIG=${KUBECONFIG}"
echo "CONTAINER_ENGINE=${CONTAINER_ENGINE}"
echo "TERM=${TERM}"
}
define_colors() {
@ -75,7 +89,7 @@ find_executable() {
# Use the binary installed into hack/bin/ by allocate.sh if
# it exists.
path=$(dirname "$(realpath "$0")")"/bin/$name"
path=$(cd "$(dirname "$0")" && pwd)"/bin/$name"
if [[ -x "$path" ]]; then
echo "$path" & return 0
fi

View File

@ -0,0 +1,8 @@
{
"KindNode": "v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027",
"Serving": "v1.18.1",
"Eventing": "v1.18.2",
"Contour": "v1.18.0",
"Tekton": "v1.1.0",
"Pac": "v0.35.2"
}

View File

@ -0,0 +1,19 @@
#!/usr/bin/env bash
# AUTOGENERATED FILE - edit versions in ./component-versions.json.
# If you are adding components, modify this scripts' template in
# ./cmd/update-knative-components/main.go.
# You can regenerate locally with "make generate-kn-components-local".
set_versions() {
# Note: Kubernetes Version node image per Kind releases (full hash is suggested):
# https://github.com/kubernetes-sigs/kind/releases
kind_node_version=v1.32.0@sha256:c48c62eac5da28cdadcf560d1d8616cfa6783b58f0d94cf63ad1bf49600cb027
# gets updated programatically via workflow -> PR creation
knative_serving_version="v1.18.1"
knative_eventing_version="v1.18.2"
contour_version="v1.18.0"
tekton_version="v1.1.0"
pac_version="v0.35.2"
}

View File

@ -19,21 +19,23 @@
source "$(dirname "$(realpath "$0")")/common.sh"
install_binaries() {
assert_linux
assert_supported_os
set_os_arch_vars
warn_architecture
local root="$(dirname "$(realpath "$0")")"
local bin="${root}/bin"
local kubectl_version=1.29.2
local kind_version=0.22.0
local dapr_version=1.11.0
local helm_version=3.12.0
local stern_version=1.25.0
local kn_version=1.13.0
local kubectl_version=1.33.1
local kind_version=0.29.0
local dapr_version=1.14.1
local helm_version=3.18.0
local stern_version=1.32.0
local kn_version=1.18.0
local jq_version=1.7.1
echo "${blue}Installing binaries${reset}"
echo " OS: ${OS}"
echo " Architecture: ${ARCH}"
echo " Destination: ${bin}"
@ -51,71 +53,97 @@ install_binaries() {
}
assert_linux() {
assert_supported_os() {
os_name=$(uname -s)
if [ "$os_name" != "Linux" ]; then
if [ "$os_name" != "Linux" ] && [ "$os_name" != "Darwin" ]; then
echo "${yellow}----------------------------------------------------------------------${reset}"
echo "${yellow}This script currently only supports Linux${reset}"
echo "${yellow}This script only supports Linux and Darwin (macOS)${reset}"
echo "Please install the dependencies manually"
echo "${yellow}----------------------------------------------------------------------${reset}"
exit 1
fi
}
set_os_arch_vars() {
OS=$(uname -s | tr '[:upper:]' '[:lower:]')
ARCH_RAW=$(uname -m)
# Map architecture names
case "${ARCH_RAW}" in
x86_64)
ARCH="amd64"
;;
aarch64|arm64)
ARCH="arm64"
;;
*)
ARCH="${ARCH_RAW}"
;;
esac
# Override with environment variable if set
ARCH="${ARCH:-$ARCH}"
}
warn_architecture() {
arch=$(uname -m)
if [ "$arch" != "x86_64" ]; then
echo -e "${yellow}Detected untested architecture ${arch}.${reset}\n This script is only tested with amd64, but you can use the ARCH env variable to specify an architecture to be interpolated in download links."
if [ "$arch" != "x86_64" ] && [ "$arch" != "arm64" ] && [ "$arch" != "aarch64" ]; then
echo -e "${yellow}Detected untested architecture ${arch}.${reset}\n This script is tested with amd64 and arm64, but you can use the ARCH env variable to specify an architecture to be interpolated in download links."
fi
}
install_kubectl() {
echo '=== kubectl'
curl -sSLo "${bin}"/kubectl "https://storage.googleapis.com/kubernetes-release/release/v$kubectl_version/bin/linux/${ARCH}/kubectl"
curl -sSLo "${bin}"/kubectl "https://dl.k8s.io/v${kubectl_version}/bin/${OS}/${ARCH}/kubectl"
chmod +x "${bin}"/kubectl
"${bin}"/kubectl version --client=true
}
install_kind() {
echo '=== kind'
curl -sSLo "${bin}"/kind "https://github.com/kubernetes-sigs/kind/releases/download/v$kind_version/kind-linux-${ARCH}"
curl -sSLo "${bin}"/kind "https://github.com/kubernetes-sigs/kind/releases/download/v$kind_version/kind-${OS}-${ARCH}"
chmod +x "${bin}"/kind
"${bin}"/kind version
}
install_dapr() {
echo '=== dapr'
curl -sSL "https://github.com/dapr/cli/releases/download/v$dapr_version/dapr_linux_${ARCH}.tar.gz" | \
curl -sSL "https://github.com/dapr/cli/releases/download/v$dapr_version/dapr_${OS}_${ARCH}.tar.gz" | \
tar fxz - -C "${bin}" dapr
"${bin}"/dapr version
}
install_helm() {
echo '=== helm'
curl -sSL "https://get.helm.sh/helm-v$helm_version-linux-${ARCH}.tar.gz" | \
tar fxz - -C "${bin}" linux-"${ARCH}"/helm
mv "${bin}/linux-${ARCH}"/helm "${bin}" && rmdir "${bin}/linux-${ARCH}"
curl -sSL "https://get.helm.sh/helm-v$helm_version-${OS}-${ARCH}.tar.gz" | \
tar fxz - -C "${bin}" ${OS}-"${ARCH}"/helm
mv "${bin}/${OS}-${ARCH}"/helm "${bin}" && rmdir "${bin}/${OS}-${ARCH}"
"${bin}"/helm version
}
install_stern() {
echo '=== stern'
curl -sSL "https://github.com/stern/stern/releases/download/v${stern_version}/stern_${stern_version}_linux_${ARCH}.tar.gz" | \
curl -sSL "https://github.com/stern/stern/releases/download/v${stern_version}/stern_${stern_version}_${OS}_${ARCH}.tar.gz" | \
tar fxz - -C "${bin}" stern
"${bin}"/stern -v
}
install_kn() {
echo '=== kn'
curl -sSLo "${bin}"/kn "https://github.com/knative/client/releases/download/knative-v${kn_version}/kn-linux-${ARCH}"
curl -sSLo "${bin}"/kn "https://github.com/knative/client/releases/download/knative-v${kn_version}/kn-${OS}-${ARCH}"
chmod +x "${bin}"/kn
"${bin}"/kn version
}
install_jq() {
echo '=== jq'
# "https://github.com/jqlang/jq/releases/download/jq-1.7.1/jq-linux-amd64"
curl -sSLo "${bin}"/jq "https://github.com/jqlang/jq/releases/download/jq-${jq_version}/jq-linux-${ARCH}"
# jq uses different naming conventions for macOS
if [ "$OS" = "darwin" ]; then
JQ_OS="macos"
else
JQ_OS="linux"
fi
curl -sSLo "${bin}"/jq "https://github.com/jqlang/jq/releases/download/jq-${jq_version}/jq-${JQ_OS}-${ARCH}"
chmod +x "${bin}"/jq
"${bin}"/jq --version
}

View File

@ -17,31 +17,79 @@ set -o nounset
set -o pipefail
git_server() {
echo "Creating Git Server Knative service..."
cat << EOF | kubectl apply -f -
apiVersion: serving.knative.dev/v1
echo "Creating Git Server"
local name="func-git"
local namespace
namespace="$(kubectl config view --minify --output 'jsonpath={..namespace}')"
namespace="${namespace:-"default"}"
local ingress_class="contour-external"
local cluster_domain="localtest.me"
if kubectl api-versions | grep -q openshift.io; then
cluster_domain="$(kubectl get ingresses.config/cluster -o jsonpath='{.spec.domain}')"
ingress_class="openshift-default"
fi
local -r func_git_host="${name}.${namespace}.${cluster_domain}"
kubectl apply -f - <<EOF
apiVersion: v1
kind: Pod
metadata:
name: "${name}"
namespace: "${namespace}"
labels:
app.kubernetes.io/name: "${name}"
spec:
containers:
- name: "${name}"
image: ghcr.io/matejvasek/func/gitserver:latest
ports:
- containerPort: 8080
name: http
---
apiVersion: v1
kind: Service
metadata:
name: func-git
labels:
app: git
name: "${name}"
namespace: "${namespace}"
spec:
template:
metadata:
annotations:
autoscaling.knative.dev/max-scale: "1"
autoscaling.knative.dev/min-scale: "1"
client.knative.dev/user-image: quay.io/mvasek/gitserver
spec:
containers:
- image: quay.io/mvasek/gitserver
ports:
- containerPort: 80
resources: {}
status: {}
selector:
app.kubernetes.io/name: "${name}"
ports:
- name: http
protocol: TCP
port: 80
targetPort: http
type: ClusterIP
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: "${name}"
namespace: "${namespace}"
spec:
ingressClassName: "${ingress_class}"
rules:
- host: "${func_git_host}"
http:
paths:
- backend:
service:
name: "${name}"
port:
number: 80
pathType: Prefix
path: /
EOF
kubectl wait ksvc --for=condition=RoutesReady --timeout=30s -l "app=git"
echo "starting func-git service at: ${func_git_host}"
kubectl wait --for=condition=Ready "pod/${name}" --timeout=30s
}
git_server

View File

@ -21,7 +21,7 @@ source "$(dirname "$(realpath "$0")")/common.sh"
function install_gitlab() {
echo "${blue}Installing GitLab${reset}"
local -r gitlab_host="${GITLAB_HOSTNAME:-gitlab.127.0.0.1.sslip.io}"
local -r gitlab_host="${GITLAB_HOSTNAME:-gitlab.localtest.me}"
$KUBECTL apply -f - <<EOF
kind: Namespace
@ -70,6 +70,7 @@ spec:
- name: GITLAB_OMNIBUS_CONFIG
value: |
external_url 'http://${gitlab_host}'
nginx['listen_addresses'] = ["0.0.0.0", "[::]"]
gitlab_rails['gitlab_shell_ssh_port'] = 30022
gitlab_rails['gitlab_email_enabled'] = false
puma['worker_processes'] = 0

View File

@ -1,66 +0,0 @@
#!/usr/bin/env bash
# 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
#
# https://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.
#
# Installs the Pipelines-as-code controller
#
source "$(dirname "$(realpath "$0")")/common.sh"
function install_pac() {
echo "${blue}Installing the Pipelines-as-Code Controller${reset}"
local -r pac_ctr_host="${PAC_CONTROLLER_HOSTNAME:-pac-ctr.127.0.0.1.sslip.io}"
local -r pac_version="v0.24.6"
# Install Pipelines as Code
$KUBECTL apply -f "https://raw.githubusercontent.com/openshift-pipelines/pipelines-as-code/release-${pac_version}/release.k8s.yaml"
sleep 5
$KUBECTL wait pod --for=condition=Ready -l '!job-name' -n pipelines-as-code --timeout=5m
# Install ingress for the PaC controller. This is used by VCS Webhooks.
$KUBECTL apply -f - << EOF
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: pipelines-as-code
namespace: pipelines-as-code
spec:
ingressClassName: contour-external
rules:
- host: ${pac_ctr_host}
http:
paths:
- backend:
service:
name: pipelines-as-code-controller
port:
number: 8080
pathType: Prefix
path: /
EOF
echo "the Pipeline as Code controller is available at: http://${pac_ctr_host}"
echo "${green}✅ PAC${reset}"
}
if [ "$0" = "${BASH_SOURCE[0]}" ]; then
set -o errexit
set -o nounset
set -o pipefail
function main() {
install_pac
}
main "$@"
fi

View File

@ -1,50 +0,0 @@
#!/usr/bin/env bash
# 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
#
# https://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.
#
# Install Tekton and required tasks in the cluster
#
source "$(dirname "$(realpath "$0")")/common.sh"
install_tekton() {
echo "${blue}Installing Tekton${reset}"
tekton_release="previous/v0.56.4"
namespace="${NAMESPACE:-default}"
$KUBECTL apply -f "https://storage.googleapis.com/tekton-releases/pipeline/${tekton_release}/release.yaml"
$KUBECTL patch cm/feature-flags -n tekton-pipelines --patch '{"data":{"disable-affinity-assistant":"true"}}'
sleep 10
$KUBECTL wait pod --for=condition=Ready --timeout=180s -n tekton-pipelines -l "app=tekton-pipelines-controller"
$KUBECTL wait pod --for=condition=Ready --timeout=180s -n tekton-pipelines -l "app=tekton-pipelines-webhook"
sleep 10
$KUBECTL create clusterrolebinding "${namespace}:knative-serving-namespaced-admin" --clusterrole=knative-serving-namespaced-admin --serviceaccount="${namespace}:default"
echo "${green}✅ Tekton${reset}"
}
# Invoke only when run directly
# Be a library when sourced
if [ "$0" = "${BASH_SOURCE[0]}" ]; then
set -o errexit
set -o nounset
set -o pipefail
function main() {
install_tekton
}
main "$@"
fi

View File

@ -13,7 +13,7 @@
# limitations under the License.
#
# Create DNS A records for '127.0.0.1.sslip.io' and '*.127.0.0.1.sslip.io' pointing to the cluster node.
# Create DNS A records for 'localtest.me' and '*.localtest.me' pointing to the cluster node.
#
source "$(dirname "$(realpath "$0")")/common.sh"
@ -22,14 +22,34 @@ function patch_hosts() {
echo "${blue}Configuring Magic DNS${reset}"
local cluster_node_addr
local cluster_node_addr6
cluster_node_addr="$(docker container inspect func-control-plane | jq ".[0].NetworkSettings.Networks.kind.IPAddress" -r)"
cluster_node_addr6="$(docker container inspect func-control-plane | jq ".[0].NetworkSettings.Networks.kind.GlobalIPv6Address" -r)"
local a_recs=""
local aaaa_recs=""
if [[ -n $cluster_node_addr ]]; then
a_recs="\
localtest.me. IN A ${cluster_node_addr}\n\
*.localtest.me. IN A ${cluster_node_addr}\n";
fi
if [[ -n $cluster_node_addr6 ]]; then
aaaa_recs="\
localtest.me. IN AAAA ${cluster_node_addr6}\n\
*.localtest.me. IN AAAA ${cluster_node_addr6}\n";
fi
$KUBECTL patch cm/coredns -n kube-system --patch-file /dev/stdin <<EOF
{
"data": {
"Corefile": ".:53 {\n errors\n health {\n lameduck 5s\n }\n ready\n kubernetes cluster.local in-addr.arpa ip6.arpa {\n pods insecure\n fallthrough in-addr.arpa ip6.arpa\n ttl 30\n }\n file /etc/coredns/example.db 127.0.0.1.sslip.io\n prometheus :9153\n forward . /etc/resolv.conf {\n max_concurrent 1000\n }\n cache 30\n loop\n reload\n loadbalance\n}\n",
"example.db": "; 127.0.0.1.sslip.io test file\n127.0.0.1.sslip.io. IN SOA sns.dns.icann.org. noc.dns.icann.org. 2015082541 7200 3600 1209600 3600\n127.0.0.1.sslip.io. IN A ${cluster_node_addr}\n*.127.0.0.1.sslip.io. IN A ${cluster_node_addr}\n"
"Corefile": ".:53 {\n errors\n health {\n lameduck 5s\n }\n ready\n kubernetes cluster.local in-addr.arpa ip6.arpa {\n pods insecure\n fallthrough in-addr.arpa ip6.arpa\n ttl 30\n }\n file /etc/coredns/example.db localtest.me\n prometheus :9153\n forward . /etc/resolv.conf {\n max_concurrent 1000\n }\n cache 30\n loop\n reload\n loadbalance\n}\n",
"example.db": "; localtest.me test file\n\
localtest.me. IN SOA sns.dns.icann.org. noc.dns.icann.org. 2015082541 7200 3600 1209600 3600\n\
$a_recs\
$aaaa_recs"
}
}
EOF

View File

@ -13,7 +13,7 @@
# limitations under the License.
#
# - Registers registry with Docker as trusted (linux only)
# - Registers registry with Docker as trusted (Linux and macOS)
#
set -o errexit
@ -42,11 +42,16 @@ warn_nix() {
if [[ -x $(command -v "nix") || -x $(command -v "nixos-rebuild") ]]; then
if [ "$CONTAINER_ENGINE" == "docker" ]; then
echo "${yellow}Warning: Nix detected${reset}"
echo "If Docker was configured using nix, this command will fail to find daemon.json. please configure the insecure registry by modifying your nix config:"
echo " virtualisation.docker = {"
echo " enable = true;"
echo " daemon.settings.insecure-registries = [ \"localhost:50000\" ];"
echo " };"
if [[ "$(uname)" == "Darwin" ]]; then
echo "If Docker Desktop was installed via Nix on macOS, you may need to manually configure the insecure registry."
echo "Please confirm \"localhost:50000\" is specified as an insecure registry in the docker config file."
else
echo "If Docker was configured using nix, this command will fail to find daemon.json. please configure the insecure registry by modifying your nix config:"
echo " virtualisation.docker = {"
echo " enable = true;"
echo " daemon.settings.insecure-registries = [ \"localhost:50000\" ];"
echo " };"
fi
elif [ "$CONTAINER_ENGINE" == "podman" ]; then
echo "${yellow}Warning: Nix detected${reset}"
echo "If podman was configured via Nix, this command will likely fail. At time of this writing, podman configured via the nix option 'virtualisation.podman' does not have an option for configuring insecure registries."
@ -57,9 +62,35 @@ warn_nix() {
}
set_registry_insecure() {
patch=".\"insecure-registries\" = [\"localhost:50000\""]
sudo jq "$patch" /etc/docker/daemon.json > /tmp/daemon.json.tmp && sudo mv /tmp/daemon.json.tmp /etc/docker/daemon.json
sudo service docker restart
# Determine the daemon.json location based on OS
if [[ "$(uname)" == "Darwin" ]]; then
# macOS: Docker Desktop stores daemon.json in ~/.docker/
DAEMON_JSON="$HOME/.docker/daemon.json"
USE_SUDO=""
else
# Linux: daemon.json is in /etc/docker/
DAEMON_JSON="/etc/docker/daemon.json"
USE_SUDO="sudo"
fi
# Create daemon.json if it doesn't exist
if [ ! -f "$DAEMON_JSON" ]; then
echo "{}" | $USE_SUDO tee "$DAEMON_JSON" > /dev/null
fi
# Update daemon.json with insecure registry
patch=".\"insecure-registries\" = [\"localhost:50000\"]"
$USE_SUDO jq "$patch" "$DAEMON_JSON" > /tmp/daemon.json.tmp && $USE_SUDO mv /tmp/daemon.json.tmp "$DAEMON_JSON"
echo "OK $DAEMON_JSON"
# Restart Docker based on OS
if [[ "$(uname)" == "Darwin" ]]; then
# macOS: Restart Docker Desktop
echo "${yellow}*** If Docker Desktop is running, please restart it via the menu bar icon ***${reset}"
else
# Linux: Use service command
sudo service docker restart
fi
}
set_registry_insecure_podman() {
@ -70,6 +101,12 @@ set_registry_insecure_podman() {
# Append the new section to the file
echo -e "\n[[registry-insecure-local]]\nlocation = \"localhost:50000\"\ninsecure = true" | sudo tee -a "$FILE" > /dev/null
fi
# On macOS, set up SSH port forwarding so Podman VM can access host's localhost:50000
if [[ "$(uname)" == "Darwin" ]]; then
echo "Setting up port forwarding for Podman VM to access registry..."
podman machine ssh -- -L 50000:localhost:50000 -N -f
fi
}
if [ "$0" = "${BASH_SOURCE[0]}" ]; then

View File

@ -4,9 +4,11 @@ set -o errexit
set -o nounset
set -o pipefail
FUNC_UTILS_IMG="localhost:50000/knative/func-utils:latest"
FUNC_UTILS_IMG="localhost:50000/knative/func-utils:v2"
docker build . -f Dockerfile.utils -t "${FUNC_UTILS_IMG}"
CGO_ENABLED=0 go build -o "func-util" -trimpath -ldflags '-w -s' ./cmd/func-util
docker build . -f Dockerfile.utils -t "${FUNC_UTILS_IMG}" --build-arg FUNC_UTIL_BINARY=func-util
docker push "${FUNC_UTILS_IMG}"
# Build custom buildah image for tests.

View File

@ -43,7 +43,7 @@ EOF
kubectl wait --for=condition=Ready route echo -n func --timeout=600s
echo "${blue}Invoking echo server${reset}"
curl http://echo.func.127.0.0.1.sslip.io/
curl http://echo.func.localtest.me/
echo "${green}✅ Echo succeeded${reset}"
}

View File

@ -1,612 +0,0 @@
package main
import (
"archive/tar"
"compress/gzip"
"context"
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"io"
"net/http"
"os"
"os/signal"
"path/filepath"
"slices"
"strings"
"syscall"
"golang.org/x/oauth2"
"golang.org/x/term"
"github.com/buildpacks/pack/builder"
"github.com/buildpacks/pack/buildpackage"
pack "github.com/buildpacks/pack/pkg/client"
"github.com/buildpacks/pack/pkg/dist"
bpimage "github.com/buildpacks/pack/pkg/image"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/registry"
docker "github.com/docker/docker/client"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/google/go-containerregistry/pkg/authn"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/google/go-github/v49/github"
"github.com/paketo-buildpacks/libpak/carton"
"github.com/pelletier/go-toml"
)
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
os.Exit(130)
}()
var hadError bool
for _, variant := range []string{"tiny", "base", "full"} {
fmt.Println("::group::" + variant)
err := buildBuilderImage(ctx, variant)
if err != nil {
_, _ = fmt.Fprintf(os.Stderr, "ERROR: %v\n", err)
hadError = true
}
fmt.Println("::endgroup::")
}
if hadError {
os.Exit(1)
}
}
func buildBuilderImage(ctx context.Context, variant string) error {
buildDir, err := os.MkdirTemp("", "")
if err != nil {
return fmt.Errorf("cannot create temporary build directory: %w", err)
}
defer func(path string) {
_ = os.RemoveAll(path)
}(buildDir)
ghClient := newGHClient(ctx)
listOpts := &github.ListOptions{Page: 0, PerPage: 1}
releases, ghResp, err := ghClient.Repositories.ListReleases(ctx, "paketo-buildpacks", "builder-jammy-"+variant, listOpts)
if err != nil {
return fmt.Errorf("cannot get upstream builder release: %w", err)
}
defer func(Body io.ReadCloser) {
_ = Body.Close()
}(ghResp.Body)
if len(releases) <= 0 {
return fmt.Errorf("cannot get latest release")
}
release := releases[0]
if release.Name == nil {
return fmt.Errorf("the name of the release is not defined")
}
if release.TarballURL == nil {
return fmt.Errorf("the tarball url of the release is not defined")
}
newBuilderImage := "ghcr.io/knative/builder-jammy-" + variant
newBuilderImageTagged := newBuilderImage + ":" + *release.Name
newBuilderImageLatest := newBuilderImage + ":latest"
dockerUser := "gh-action"
dockerPassword := os.Getenv("GITHUB_TOKEN")
ref, err := name.ParseReference(newBuilderImageTagged)
if err != nil {
return fmt.Errorf("cannot parse reference to builder target: %w", err)
}
_, err = remote.Head(ref, remote.WithAuth(auth{dockerUser, dockerPassword}))
if err == nil {
fmt.Fprintln(os.Stderr, "The image has been already built.")
return nil
}
builderTomlPath := filepath.Join(buildDir, "builder.toml")
err = downloadBuilderToml(ctx, *release.TarballURL, builderTomlPath)
if err != nil {
return fmt.Errorf("cannot download builder toml: %w", err)
}
builderConfig, _, err := builder.ReadConfig(builderTomlPath)
if err != nil {
return fmt.Errorf("cannot parse builder.toml: %w", err)
}
err = updateJavaBuildpacks(ctx, &builderConfig)
if err != nil {
return fmt.Errorf("cannot patch java buildpacks: %w", err)
}
addGoAndRustBuildpacks(&builderConfig)
packClient, err := pack.NewClient()
if err != nil {
return fmt.Errorf("cannot create pack client: %w", err)
}
createBuilderOpts := pack.CreateBuilderOptions{
RelativeBaseDir: buildDir,
BuilderName: newBuilderImageTagged,
Config: builderConfig,
Publish: false,
PullPolicy: bpimage.PullIfNotPresent,
Labels: map[string]string{
"org.opencontainers.image.description": "Paketo Jammy builder enriched with Rust and Func-Go buildpacks.",
"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/builder-jammy-" + variant,
"org.opencontainers.image.version": *release.Name,
},
}
err = packClient.CreateBuilder(ctx, createBuilderOpts)
if err != nil {
return fmt.Errorf("canont create builder: %w", err)
}
dockerClient, err := docker.NewClientWithOpts(docker.FromEnv, docker.WithAPIVersionNegotiation())
if err != nil {
return fmt.Errorf("cannot create docker client")
}
err = dockerClient.ImageTag(ctx, newBuilderImageTagged, newBuilderImageLatest)
if err != nil {
return fmt.Errorf("cannot tag latest: %w", err)
}
authConfig := registry.AuthConfig{
Username: dockerUser,
Password: dockerPassword,
}
bs, err := json.Marshal(&authConfig)
if err != nil {
return fmt.Errorf("cannot marshal credentials: %w", err)
}
imagePushOptions := image.PushOptions{
All: false,
RegistryAuth: base64.StdEncoding.EncodeToString(bs),
}
pushImage := func(image string) error {
rc, err := dockerClient.ImagePush(ctx, image, imagePushOptions)
if err != nil {
return fmt.Errorf("cannot initialize image push: %w", err)
}
defer func(rc io.ReadCloser) {
_ = rc.Close()
}(rc)
fd := os.Stdout.Fd()
isTerminal := term.IsTerminal(int(os.Stdout.Fd()))
err = jsonmessage.DisplayJSONMessagesStream(rc, os.Stderr, fd, isTerminal, nil)
if err != nil {
return err
}
return nil
}
err = pushImage(newBuilderImageTagged)
if err != nil {
return fmt.Errorf("cannot push the image: %w", err)
}
err = pushImage(newBuilderImageLatest)
if err != nil {
return fmt.Errorf("cannot push the image: %w", err)
}
return nil
}
type buildpack struct {
repo string
version string
image string
patchFunc func(packageDesc *buildpackage.Config, bpDesc *dist.BuildpackDescriptor)
}
func buildBuildpackImage(ctx context.Context, bp buildpack) error {
ghClient := newGHClient(ctx)
var (
release *github.RepositoryRelease
ghResp *github.Response
err error
)
if bp.version == "" {
release, ghResp, err = ghClient.Repositories.GetLatestRelease(ctx, "paketo-buildpacks", bp.repo)
} else {
release, ghResp, err = ghClient.Repositories.GetReleaseByTag(ctx, "paketo-buildpacks", bp.repo, "v"+bp.version)
}
if err != nil {
return fmt.Errorf("cannot get upstream builder release: %w", err)
}
defer func(Body io.ReadCloser) {
_ = Body.Close()
}(ghResp.Body)
if release.TarballURL == nil {
return fmt.Errorf("tarball url is nil")
}
if release.TagName == nil {
return fmt.Errorf("tag name is nil")
}
version := strings.TrimPrefix(*release.TagName, "v")
fmt.Println("src tar url:", *release.TarballURL)
imageNameTagged := bp.image + ":" + version
srcDir, err := os.MkdirTemp("", "src-*")
if err != nil {
return fmt.Errorf("cannot create temp dir: %w", err)
}
fmt.Println("imageNameTagged:", imageNameTagged)
fmt.Println("srcDir:", srcDir)
err = downloadTarball(*release.TarballURL, srcDir)
if err != nil {
return fmt.Errorf("cannot download source code: %w", err)
}
packageDir := filepath.Join(srcDir, "out")
p := carton.Package{
CacheLocation: "",
DependencyFilters: nil,
StrictDependencyFilters: false,
IncludeDependencies: false,
Destination: packageDir,
Source: srcDir,
Version: version,
}
eh := exitHandler{}
p.Create(carton.WithExitHandler(&eh))
if eh.err != nil {
return fmt.Errorf("cannot create package: %w", eh.err)
}
if eh.fail {
return fmt.Errorf("cannot create package")
}
// set URI and OS in package.toml
f, err := os.OpenFile(filepath.Join(srcDir, "package.toml"), os.O_CREATE|os.O_WRONLY|os.O_APPEND, 0644)
if err != nil {
return fmt.Errorf("cannot open package.toml: %w", err)
}
defer func(f *os.File) {
_ = f.Close()
}(f)
_, err = fmt.Fprintf(f, "[buildpack]\nuri = \"%s\"\n\n[platform]\nos = \"%s\"\n", packageDir, "linux")
_ = f.Close()
if err != nil {
return fmt.Errorf("cannot apped to package.toml: %w", err)
}
cfgReader := buildpackage.NewConfigReader()
cfg, err := cfgReader.Read(filepath.Join(srcDir, "package.toml"))
if err != nil {
return fmt.Errorf("cannot read buildpack config: %w", err)
}
if bp.patchFunc != nil {
var bpDesc dist.BuildpackDescriptor
var bs []byte
bpDescPath := filepath.Join(packageDir, "buildpack.toml")
bs, err = os.ReadFile(bpDescPath)
if err != nil {
return fmt.Errorf("cannot read buildpack.toml: %w", err)
}
err = toml.Unmarshal(bs, &bpDesc)
if err != nil {
return fmt.Errorf("cannot unmarshall buildpack descriptor: %w", err)
}
bp.patchFunc(&cfg, &bpDesc)
bs, err = toml.Marshal(&bpDesc)
if err != nil {
return fmt.Errorf("cannot marshal buildpack descriptor: %w", err)
}
err = os.WriteFile(bpDescPath, bs, 0644)
if err != nil {
return fmt.Errorf("cannot write buildpack.toml: %w", err)
}
}
pbo := pack.PackageBuildpackOptions{
RelativeBaseDir: packageDir,
Name: imageNameTagged,
Format: pack.FormatImage,
Config: cfg,
Publish: false,
PullPolicy: bpimage.PullIfNotPresent,
Registry: "",
Flatten: false,
FlattenExclude: nil,
}
packClient, err := pack.NewClient()
if err != nil {
return fmt.Errorf("cannot create pack client: %w", err)
}
err = packClient.PackageBuildpack(ctx, pbo)
if err != nil {
return fmt.Errorf("cannot package buildpack: %w", err)
}
return nil
}
type exitHandler struct {
err error
fail bool
}
func (e *exitHandler) Error(err error) {
e.err = err
}
func (e *exitHandler) Fail() {
e.fail = true
}
func (e *exitHandler) Pass() {
}
type auth struct {
uname, pwd string
}
func (a auth) Authorization() (*authn.AuthConfig, error) {
return &authn.AuthConfig{
Username: a.uname,
Password: a.pwd,
}, nil
}
func downloadBuilderToml(ctx context.Context, tarballUrl, builderTomlPath string) error {
req, err := http.NewRequestWithContext(ctx, http.MethodGet, tarballUrl, nil)
if err != nil {
return fmt.Errorf("cannot create request for release tarball: %w", err)
}
//nolint:bodyclose
resp, err := http.DefaultClient.Do(req)
if err != nil {
return fmt.Errorf("cannot get release tarball: %w", err)
}
defer func(Body io.ReadCloser) {
_ = Body.Close()
}(resp.Body)
gr, err := gzip.NewReader(resp.Body)
if err != nil {
return fmt.Errorf("cannot create gzip stream from release tarball: %w", err)
}
defer func(gr *gzip.Reader) {
_ = gr.Close()
}(gr)
tr := tar.NewReader(gr)
for {
hdr, err := tr.Next()
if err != nil {
if errors.Is(err, io.EOF) {
break
}
return fmt.Errorf("error while processing release tarball: %w", err)
}
if hdr.FileInfo().Mode().Type() != 0 || !strings.HasSuffix(hdr.Name, "/builder.toml") {
continue
}
builderToml, err := os.OpenFile(builderTomlPath, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
if err != nil {
return fmt.Errorf("cannot create builder.toml file: %w", err)
}
_, err = io.CopyN(builderToml, tr, hdr.Size)
if err != nil {
return fmt.Errorf("cannot copy data to builder.toml file: %w", err)
}
break
}
return nil
}
// Adds custom Rust and Go-Function buildpacks to the builder.
func addGoAndRustBuildpacks(config *builder.Config) {
config.Description += "\nAddendum: this is modified builder that also contains Rust and Func-Go buildpacks."
additionalBuildpacks := []builder.ModuleConfig{
{
ModuleInfo: dist.ModuleInfo{
ID: "paketo-community/rust",
Version: "0.47.0",
},
ImageOrURI: dist.ImageOrURI{
BuildpackURI: dist.BuildpackURI{URI: "docker://docker.io/paketocommunity/rust:0.47.0"},
},
},
{
ModuleInfo: dist.ModuleInfo{
ID: "dev.knative-extensions.go",
Version: "0.0.6",
},
ImageOrURI: dist.ImageOrURI{
BuildpackURI: dist.BuildpackURI{URI: "ghcr.io/boson-project/go-function-buildpack:0.0.6"},
},
},
}
additionalGroups := []dist.OrderEntry{
{
Group: []dist.ModuleRef{
{
ModuleInfo: dist.ModuleInfo{
ID: "paketo-community/rust",
},
},
},
},
{
Group: []dist.ModuleRef{
{
ModuleInfo: dist.ModuleInfo{
ID: "paketo-buildpacks/go-dist",
},
},
{
ModuleInfo: dist.ModuleInfo{
ID: "dev.knative-extensions.go",
},
},
},
},
}
config.Buildpacks = append(additionalBuildpacks, config.Buildpacks...)
config.Order = append(additionalGroups, config.Order...)
}
// updated java and java-native-image buildpack to include quarkus buildpack
func updateJavaBuildpacks(ctx context.Context, builderConfig *builder.Config) error {
var err error
for _, entry := range builderConfig.Order {
bp := strings.TrimPrefix(entry.Group[0].ID, "paketo-buildpacks/")
if bp == "java" || bp == "java-native-image" {
img := "ghcr.io/knative/buildpacks/" + bp
err = buildBuildpackImage(ctx, buildpack{
repo: bp,
version: entry.Group[0].Version,
image: img,
patchFunc: addQuarkusBuildpack,
})
// TODO we might want to push these images to registry
// but it's not absolutely necessary since they are included in builder
if err != nil {
return fmt.Errorf("cannot build %q buildpack: %w", bp, err)
}
for i := range builderConfig.Buildpacks {
if strings.HasPrefix(builderConfig.Buildpacks[i].URI, "docker://gcr.io/paketo-buildpacks/"+bp+":") {
builderConfig.Buildpacks[i].URI = "docker://ghcr.io/knative/buildpacks/" + bp + ":" + entry.Group[0].Version
}
}
}
}
return nil
}
// patches "Java" or "Java Native Image" buildpacks to include Quarkus BP just before Maven BP
func addQuarkusBuildpack(packageDesc *buildpackage.Config, bpDesc *dist.BuildpackDescriptor) {
ghClient := newGHClient(context.Background())
rr, resp, err := ghClient.Repositories.GetLatestRelease(context.TODO(), "paketo-buildpacks", "quarkus")
if err != nil {
panic(err)
}
defer func(Body io.ReadCloser) {
_ = Body.Close()
}(resp.Body)
latestQuarkusVersion := strings.TrimPrefix(*rr.TagName, "v")
packageDesc.Dependencies = append(packageDesc.Dependencies, dist.ImageOrURI{
BuildpackURI: dist.BuildpackURI{
URI: "docker://gcr.io/paketo-buildpacks/quarkus:" + latestQuarkusVersion,
},
})
quarkusBP := dist.ModuleRef{
ModuleInfo: dist.ModuleInfo{
ID: "paketo-buildpacks/quarkus",
Version: latestQuarkusVersion,
},
Optional: true,
}
idx := slices.IndexFunc(bpDesc.WithOrder[0].Group, func(ref dist.ModuleRef) bool {
return ref.ID == "paketo-buildpacks/maven"
})
bpDesc.WithOrder[0].Group = slices.Insert(bpDesc.WithOrder[0].Group, idx, quarkusBP)
}
func downloadTarball(tarballUrl, destDir string) error {
//nolint:bodyclose
resp, err := http.Get(tarballUrl)
if err != nil {
return fmt.Errorf("cannot get tarball: %w", err)
}
defer func(Body io.ReadCloser) {
_ = Body.Close()
}(resp.Body)
if resp.StatusCode != 200 {
return fmt.Errorf("cannot get tarball: %s", resp.Status)
}
defer func(Body io.ReadCloser) {
_ = Body.Close()
}(resp.Body)
gzipReader, err := gzip.NewReader(resp.Body)
if err != nil {
return fmt.Errorf("cannot create gzip reader: %w", err)
}
defer func(gzipReader *gzip.Reader) {
_ = gzipReader.Close()
}(gzipReader)
tarReader := tar.NewReader(gzipReader)
var hdr *tar.Header
for {
hdr, err = tarReader.Next()
if err != nil {
if errors.Is(err, io.EOF) {
break
}
return fmt.Errorf("cannot read tar header: %w", err)
}
if strings.Contains(hdr.Name, "..") {
return fmt.Errorf("file name in tar header contains '..'")
}
n := filepath.Clean(filepath.Join(strings.Split(hdr.Name, "/")[1:]...))
if strings.HasPrefix(n, "..") {
return fmt.Errorf("path in tar header escapes")
}
dest := filepath.Join(destDir, n)
switch hdr.Typeflag {
case tar.TypeReg:
var f *os.File
f, err = os.OpenFile(dest, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, os.FileMode(hdr.Mode&0777))
if err != nil {
return fmt.Errorf("cannot create a file: %w", err)
}
_, err = io.Copy(f, tarReader)
_ = f.Close()
if err != nil {
return fmt.Errorf("cannot read from tar reader: %w", err)
}
case tar.TypeSymlink:
return fmt.Errorf("symlinks are not supported yet")
case tar.TypeDir:
err = os.MkdirAll(dest, 0755)
if err != nil {
return fmt.Errorf("cannmot create a directory: %w", err)
}
case tar.TypeXGlobalHeader:
// ignore this type
default:
return fmt.Errorf("unknown type: %x", hdr.Typeflag)
}
}
return nil
}
func newGHClient(ctx context.Context) *github.Client {
return github.NewClient(oauth2.NewClient(ctx, oauth2.StaticTokenSource(&oauth2.Token{
AccessToken: os.Getenv("GITHUB_TOKEN"),
})))
}

View File

@ -10,12 +10,12 @@ import (
"syscall"
"github.com/AlecAivazis/survey/v2/terminal"
"knative.dev/func/cmd"
"knative.dev/func/pkg/docker"
"knative.dev/func/pkg/version"
)
var vers, kver, hash string
func Main() {
ctx, cancel := context.WithCancel(context.Background())
defer cancel()
@ -32,9 +32,9 @@ func Main() {
cfg := cmd.RootCommandConfig{
Name: "func",
Version: cmd.Version{
Vers: vers,
Kver: kver,
Hash: hash,
Vers: version.Vers,
Kver: version.Kver,
Hash: version.Hash,
}}
if err := cmd.NewRootCmd(cfg).ExecuteContext(ctx); err != nil {

View File

@ -0,0 +1,473 @@
//go:build integration
package builders_test
import (
"archive/tar"
"bytes"
"context"
"crypto/rand"
"crypto/rsa"
"crypto/sha1"
"crypto/x509"
"crypto/x509/pkix"
"encoding/pem"
"math/big"
"os"
"os/signal"
"path/filepath"
"syscall"
"testing"
"time"
"golang.org/x/term"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/client"
"github.com/docker/docker/pkg/jsonmessage"
coreV1 "k8s.io/api/core/v1"
v1 "k8s.io/api/networking/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/util/intstr"
"knative.dev/func/pkg/builders/buildpacks"
"knative.dev/func/pkg/builders/s2i"
fn "knative.dev/func/pkg/functions"
"knative.dev/func/pkg/k8s"
)
func TestPrivateGitRepository(t *testing.T) {
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)
}()
certDir := createCertificate(t)
t.Log("certDir:", certDir)
servePrivateGit(ctx, t, certDir)
t.Log("git server initiated")
select {
case <-time.After(time.Second * 5):
break
case <-ctx.Done():
t.Fatal(ctx.Err())
}
gitCredsDir := t.TempDir()
err := os.WriteFile(filepath.Join(gitCredsDir, "type"), []byte(`git-credentials`), 0644)
if err != nil {
t.Fatal(err)
}
gitCred := `url=https://git-private.localtest.me
username=developer
password=nbusr123
`
err = os.WriteFile(filepath.Join(gitCredsDir, "credentials"), []byte(gitCred), 0644)
if err != nil {
t.Fatal(err)
}
netrc := filepath.Join(t.TempDir(), ".netrc")
netrcContent := `machine git-private.localtest.me login developer password nbusr123`
err = os.WriteFile(netrc, []byte(netrcContent), 0644)
if err != nil {
t.Fatal(err)
}
f, err := fn.NewFunction(filepath.Join("testdata", "go-fn-with-private-deps"))
if err != nil {
t.Fatal(err)
}
f.Build.BuildEnvs = []fn.Env{
{
Name: ptr("GOPRIVATE"),
Value: ptr("*.localtest.me"),
},
}
testCases := []struct {
Name string
Builder fn.Builder
BuilderImage func(ctx context.Context, t *testing.T, certDir string) string
Envs []fn.Env
Mounts []fn.MountSpec
}{
{
Name: "s2i",
Builder: s2i.NewBuilder(s2i.WithVerbose(true)),
BuilderImage: buildPatchedS2IBuilder,
Mounts: []fn.MountSpec{
{
Source: netrc,
Destination: "/opt/app-root/src/.netrc",
}},
},
{
Name: "pack",
Builder: buildpacks.NewBuilder(buildpacks.WithVerbose(true)),
BuilderImage: buildPatcheBuildpackBuilder,
Envs: []fn.Env{
{
Name: ptr("SERVICE_BINDING_ROOT"),
Value: ptr("/bindings"),
},
},
Mounts: []fn.MountSpec{
{
Source: gitCredsDir,
Destination: "/bindings/git-binding",
},
},
},
}
for _, tt := range testCases {
var f = f
t.Run(tt.Name, func(t *testing.T) {
f.Build.Image = "localhost:50000/go-app:test-" + tt.Name
f.Build.Builder = tt.Name
f.Build.BuilderImages = map[string]string{
tt.Name: tt.BuilderImage(ctx, t, certDir),
}
f.Build.Mounts = append(f.Build.Mounts, tt.Mounts...)
f.Build.BuildEnvs = append(f.Build.BuildEnvs, tt.Envs...)
err = tt.Builder.Build(ctx, f, nil)
if err != nil {
t.Fatal(err)
}
})
}
}
// Generates self-signed certificate used for our private git repository.
func createCertificate(t *testing.T) string {
dir := t.TempDir()
certPrivKey, err := rsa.GenerateKey(rand.Reader, 2048)
if err != nil {
t.Fatal(err)
}
ski := sha1.Sum(x509.MarshalPKCS1PublicKey(&certPrivKey.PublicKey))
cert := &x509.Certificate{
BasicConstraintsValid: true,
IsCA: true,
SerialNumber: randSN(),
// openssl hash of this subject is 85c05568
// do not update the subject without also updating the hash referred from another places (e.g. Dockerfile)
// See also: https://github.com/paketo-buildpacks/ca-certificates/blob/v1.0.1/cacerts/certs.go#L132
Subject: pkix.Name{
CommonName: "git-private.localtest.me",
},
DNSNames: []string{"git-private.localtest.me"},
NotBefore: time.Now(),
NotAfter: time.Now().AddDate(0, 0, 1),
SubjectKeyId: ski[:],
ExtKeyUsage: []x509.ExtKeyUsage{x509.ExtKeyUsageClientAuth, x509.ExtKeyUsageServerAuth},
KeyUsage: x509.KeyUsageDigitalSignature | x509.KeyUsageKeyEncipherment,
}
certBytes, err := x509.CreateCertificate(rand.Reader, cert, cert, &certPrivKey.PublicKey, certPrivKey)
if err != nil {
t.Fatal(err)
}
certPEM := new(bytes.Buffer)
err = pem.Encode(certPEM, &pem.Block{
Type: "CERTIFICATE",
Bytes: certBytes,
})
if err != nil {
t.Fatal(err)
}
certPrivKeyPEM := new(bytes.Buffer)
err = pem.Encode(certPrivKeyPEM, &pem.Block{
Type: "RSA PRIVATE KEY",
Bytes: x509.MarshalPKCS1PrivateKey(certPrivKey),
})
if err != nil {
t.Fatal(err)
}
err = os.WriteFile(filepath.Join(dir, "cert.pem"), certPEM.Bytes(), 0444)
if err != nil {
t.Fatal(err)
}
err = os.WriteFile(filepath.Join(dir, "key.pem"), certPrivKeyPEM.Bytes(), 0400)
if err != nil {
t.Fatal(err)
}
return dir
}
var maxSN *big.Int = new(big.Int).Lsh(big.NewInt(1), 159)
func randSN() *big.Int {
i, err := rand.Int(rand.Reader, maxSN)
if err != nil {
panic(err)
}
return i
}
// Builds a s2i Golang builder that trusts to our self-signed certificate (see createCertificate).
func buildPatchedS2IBuilder(ctx context.Context, t *testing.T, certDir string) string {
tag := "localhost:50000/go-toolset:test"
dockerfile := `FROM registry.access.redhat.com/ubi8/go-toolset:latest
COPY 85c05568.0 /etc/pki/ca-trust/source/anchors/
USER 0:0
RUN update-ca-trust
USER 1001:0
`
return buildPatchedBuilder(ctx, t, tag, dockerfile, certDir)
}
// Builds a tiny paketo builder that trusts to our self-signed certificate (see createCertificate).
func buildPatcheBuildpackBuilder(ctx context.Context, t *testing.T, certDir string) string {
tag := "localhost:50000/builder-jammy-tin:test"
dockerfile := `FROM ghcr.io/knative/builder-jammy-tiny:latest
COPY 85c05568.0 /etc/ssl/certs/
`
return buildPatchedBuilder(ctx, t, tag, dockerfile, certDir)
}
// Builds an image with specified tag from specified dockerfile.
// This function also injects self-signed as "85c05568.0" into the build context.
func buildPatchedBuilder(ctx context.Context, t *testing.T, tag, dockerfile, certDir string) string {
cli, err := client.NewClientWithOpts(client.FromEnv, client.WithAPIVersionNegotiation())
if err != nil {
t.Fatal(err)
}
var buff bytes.Buffer
tw := tar.NewWriter(&buff)
err = tw.WriteHeader(&tar.Header{
Name: "Dockerfile",
Size: int64(len(dockerfile)),
Mode: 0644,
})
if err != nil {
t.Fatal(err)
}
_, err = tw.Write([]byte(dockerfile))
if err != nil {
t.Fatal(err)
}
cb, err := os.ReadFile(filepath.Join(certDir, "cert.pem"))
if err != nil {
t.Fatal(err)
}
err = tw.WriteHeader(&tar.Header{
Name: "85c05568.0",
Size: int64(len(cb)),
Mode: 0644,
})
if err != nil {
t.Fatal(err)
}
_, err = tw.Write(cb)
if err != nil {
t.Fatal(err)
}
err = tw.Close()
if err != nil {
t.Fatal(err)
}
ibo := types.ImageBuildOptions{
Tags: []string{tag},
}
ibr, err := cli.ImageBuild(ctx, &buff, ibo)
if err != nil {
t.Fatal(err)
}
defer ibr.Body.Close()
fd := os.Stderr.Fd()
isTerminal := term.IsTerminal(int(fd))
err = jsonmessage.DisplayJSONMessagesStream(ibr.Body, os.Stderr, fd, isTerminal, nil)
if err != nil {
t.Fatal(err)
}
rc, err := cli.ImagePush(ctx, tag, image.PushOptions{RegistryAuth: "e30="})
if err != nil {
t.Fatal(err)
}
defer rc.Close()
return tag
}
// This sets up a private git repository for testing.
// The repository url is https://git-private.localtest.me/foo.git, and it is protected by basic authentication.
// The credentials are developer:nbusr123.
func servePrivateGit(ctx context.Context, t *testing.T, certDir string) {
const (
name = "git-private"
host = "git-private.localtest.me"
image = "ghcr.io/matejvasek/git-private:latest"
)
k8sClient, err := k8s.NewKubernetesClientset()
if err != nil {
t.Fatal(err)
}
ns := coreV1.Namespace{
ObjectMeta: metav1.ObjectMeta{
Name: name,
},
}
_, err = k8sClient.CoreV1().Namespaces().Create(ctx, &ns, metav1.CreateOptions{})
if err != nil {
t.Fatal(err)
}
t.Cleanup(func() {
_ = k8sClient.CoreV1().Namespaces().Delete(context.Background(), name, metav1.DeleteOptions{})
})
cert, err := os.ReadFile(filepath.Join(certDir, "cert.pem"))
if err != nil {
t.Fatal(err)
}
key, err := os.ReadFile(filepath.Join(certDir, "key.pem"))
if err != nil {
t.Fatal(err)
}
secret := coreV1.Secret{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: name,
},
Immutable: ptr(true),
Data: map[string][]byte{
coreV1.TLSCertKey: cert,
coreV1.TLSPrivateKeyKey: key,
},
Type: coreV1.SecretTypeTLS,
}
_, err = k8sClient.CoreV1().Secrets(name).Create(ctx, &secret, metav1.CreateOptions{})
if err != nil {
t.Fatal(err)
}
pod := coreV1.Pod{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: name,
Labels: map[string]string{"app.kubernetes.io/name": name},
},
Spec: coreV1.PodSpec{
Containers: []coreV1.Container{
{
Name: name,
Image: image,
Ports: []coreV1.ContainerPort{
{
Name: "http",
ContainerPort: 8080,
},
},
},
},
},
}
_, err = k8sClient.CoreV1().Pods(name).Create(ctx, &pod, metav1.CreateOptions{})
if err != nil {
t.Fatal(err)
}
svc := coreV1.Service{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: name,
},
Spec: coreV1.ServiceSpec{
Selector: map[string]string{
"app.kubernetes.io/name": name,
},
Ports: []coreV1.ServicePort{
{
Name: "http",
Protocol: "TCP",
Port: 80,
TargetPort: intstr.FromString("http"),
},
},
Type: coreV1.ServiceTypeClusterIP,
},
}
_, err = k8sClient.CoreV1().Services(name).Create(ctx, &svc, metav1.CreateOptions{})
if err != nil {
t.Fatal(err)
}
ingress := v1.Ingress{
ObjectMeta: metav1.ObjectMeta{
Name: name,
Namespace: name,
},
Spec: v1.IngressSpec{
IngressClassName: ptr("contour-external"),
DefaultBackend: nil,
TLS: []v1.IngressTLS{
{
Hosts: []string{host},
SecretName: name,
},
},
Rules: []v1.IngressRule{
{
Host: host,
IngressRuleValue: v1.IngressRuleValue{
HTTP: &v1.HTTPIngressRuleValue{Paths: []v1.HTTPIngressPath{
{
Path: "/",
PathType: ptr(v1.PathTypePrefix),
Backend: v1.IngressBackend{
Service: &v1.IngressServiceBackend{
Name: name,
Port: v1.ServiceBackendPort{
Name: "http",
},
},
},
},
}},
},
},
},
},
}
_, err = k8sClient.NetworkingV1().Ingresses(name).Create(ctx, &ingress, metav1.CreateOptions{})
if err != nil {
t.Fatal(err)
}
}
func ptr[T any](val T) *T {
return &val
}

View File

@ -8,6 +8,7 @@ import (
"io"
"os"
"path/filepath"
"regexp"
"runtime"
"strings"
"time"
@ -50,6 +51,7 @@ var (
"docker.io/paketobuildpacks/",
"gcr.io/buildpacks/",
"ghcr.io/knative/",
"docker.io/heroku/",
}
defaultBuildpacks = map[string][]string{}
@ -119,7 +121,7 @@ var DefaultLifecycleImage = "docker.io/buildpacksio/lifecycle:553c041"
// Build the Function at path.
func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platform) (err error) {
if len(platforms) != 0 {
return errors.New("the pack builder does not support specifying target platforms directly.")
return errors.New("the pack builder does not support specifying target platforms directly")
}
// Builder image from the function if defined, default otherwise.
@ -152,6 +154,8 @@ func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platf
}
// Pack build options
opts := pack.BuildOptions{
GroupID: -1,
UserID: -1,
AppPath: f.Root,
Image: f.Build.Image,
LifecycleImage: DefaultLifecycleImage,
@ -178,6 +182,16 @@ func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platf
opts.ContainerConfig.Network = "host"
}
if _, ok := opts.Env["BPE_DEFAULT_LISTEN_ADDRESS"]; !ok {
opts.Env["BPE_DEFAULT_LISTEN_ADDRESS"] = "[::]:8080"
}
var bindings = make([]string, 0, len(f.Build.Mounts))
for _, m := range f.Build.Mounts {
bindings = append(bindings, fmt.Sprintf("%s:%s", m.Source, m.Destination))
}
opts.ContainerConfig.Volumes = bindings
// only trust our known builders
opts.TrustBuilder = TrustBuilder
@ -201,6 +215,10 @@ func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platf
return fmt.Errorf("podman 4.3 is not supported, use podman 4.2 or 4.4")
}
if f.Runtime == "python" {
cli = pyScaffoldInjector{cli}
}
// Client with a logger which is enabled if in Verbose mode and a dockerClient that supports SSH docker daemon connection.
if impl, err = pack.NewClient(pack.WithLogger(b.logger), pack.WithDockerClient(cli)); err != nil {
return fmt.Errorf("cannot create pack client: %w", err)
@ -242,6 +260,9 @@ func isPodmanV43(ctx context.Context, cli client.CommonAPIClient) (b bool, err e
// TrustBuilder determines whether the builder image should be trusted
// based on a set of trusted builder image registry prefixes.
func TrustBuilder(b string) bool {
if isLocalhost(b) {
return true
}
for _, v := range trustedBuilderImagePrefixes {
// Ensure that all entries in this list are terminated with a trailing "/"
if !strings.HasSuffix(v, "/") {
@ -254,6 +275,14 @@ func TrustBuilder(b string) bool {
return false
}
func isLocalhost(img string) bool {
// Parsing logic is broken for localhost in go-containerregistry.
// See: https://github.com/google/go-containerregistry/issues/2048
// So I went for regex.
localhostRE := regexp.MustCompile(`^(localhost|127\.0\.0\.1|\[::1\])(:\d+)?/.+$`)
return localhostRE.MatchString(img)
}
// Builder Image chooses the correct builder image or defaults.
func BuilderImage(f fn.Function, builderName string) (string, error) {
return builders.Image(f, builderName, DefaultBuilderImages)

View File

@ -40,6 +40,22 @@ func TestBuild_BuilderImageTrusted(t *testing.T) {
}
}
func TestBuild_BuilderImageTrustedLocalhost(t *testing.T) {
for _, reg := range []string{
"localhost",
"localhost:5000",
"127.0.0.1",
"127.0.0.1:5000",
"[::1]",
"[::1]:5000"} {
t.Run(reg, func(t *testing.T) {
if !TrustBuilder(reg + "/project/builder:latest") {
t.Errorf("expected to be trusted: %q", reg)
}
})
}
}
// TestBuild_BuilderImageDefault ensures that a Function bing built which does not
// define a Builder Image will get the internally-defined default.
func TestBuild_BuilderImageDefault(t *testing.T) {

View File

@ -0,0 +1,163 @@
package buildpacks
import (
"archive/tar"
"context"
"errors"
"io"
"runtime"
"strings"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/client"
)
// Hack implementation of DockerClient that overrides CopyToContainer method.
// The CopyToContainer method hijacks the uploaded project stream and injects function scaffolding to it.
// It basically moves content of /workspace to /workspace/fn and then setup scaffolding code directly in /workspace.
type pyScaffoldInjector struct {
client.CommonAPIClient
}
func (s pyScaffoldInjector) CopyToContainer(ctx context.Context, ctr, p string, r io.Reader, opts container.CopyToContainerOptions) error {
if pc, _, _, ok := runtime.Caller(1); ok &&
!strings.Contains(runtime.FuncForPC(pc).Name(), "build.copyDir") {
// We are not called by "project dir copy" so we do simple direct forward call.
return s.CommonAPIClient.CopyToContainer(ctx, ctr, p, r, opts)
}
pr, pw := io.Pipe()
go func() {
var err error
defer func() {
_ = pw.CloseWithError(err)
}()
tr := tar.NewReader(r)
tw := tar.NewWriter(pw)
for {
var hdr *tar.Header
hdr, err = tr.Next()
if err != nil {
if errors.Is(err, io.EOF) {
err = nil
break
}
return
}
if strings.HasPrefix(hdr.Name, "/workspace/") {
hdr.Name = strings.Replace(hdr.Name, "/workspace/", "/workspace/fn/", 1)
}
err = tw.WriteHeader(hdr)
if err != nil {
return
}
_, err = io.Copy(tw, tr)
if err != nil {
return
}
}
err = writePythonScaffolding(tw)
if err != nil {
return
}
err = tw.Close()
}()
return s.CommonAPIClient.CopyToContainer(ctx, ctr, p, pr, opts)
}
func writePythonScaffolding(tw *tar.Writer) error {
for _, f := range []struct {
path string
content string
}{
{
path: "pyproject.toml",
content: pyprojectToml,
},
{
path: "service/main.py",
content: serviceMain,
},
{
path: "service/__init__.py",
content: "",
},
} {
err := tw.WriteHeader(&tar.Header{
Name: "/workspace/" + f.path,
Size: int64(len(f.content)),
Mode: 0644,
})
if err != nil {
return err
}
_, err = tw.Write([]byte(f.content))
if err != nil {
return err
}
}
return nil
}
const pyprojectToml = `[project]
name = "service"
description = "an autogenerated service which runs a Function"
version = "0.1.0"
requires-python = ">=3.9"
license = "MIT"
dependencies = [
"func-python",
"function @ ./fn"
]
authors = [
{ name="The Knative Authors", email="knative-dev@googlegroups.com"},
]
[build-system]
requires = ["hatchling"]
build-backend = "hatchling.build"
[tool.hatch.metadata]
allow-direct-references = true
[tool.poetry.dependencies]
python = ">=3.9,<4.0"
[tool.poetry.scripts]
script = "service.main:main"
`
const serviceMain = `"""
This code is glue between a user's Function and the middleware which will
expose it as a network service. This code is written on-demand when a
Function is being built, deployed or run. This will be included in the
final container.
"""
import logging
from func_python.cloudevent import serve
logging.basicConfig(level=logging.INFO)
try:
from function import new as handler # type: ignore[import]
except ImportError:
try:
from function import handle as handler # type: ignore[import]
except ImportError:
logging.error("Function must export either 'new' or 'handle'")
raise
def main():
logging.info("Functions middleware invoking user function")
serve(handler)
if __name__ == "__main__":
main()
`

View File

@ -6,15 +6,43 @@ import (
fn "knative.dev/func/pkg/functions"
)
/*
Assemble Scripts Patched for Functions Support
These are minimally patched assemblers taken from the S2I builders. For
example the Python assemble script can be extracted with:
docker run --rm registry.access.redhat.com/ubi8/python-39 \
cat /usr/libexec/s2i/assemble > bin/assemble
The scripts are modified slightly to support Functions as explained by
their individual constants below.
While there is unlikely to be incompatibilities going forward, this is still
a support burden as these scripts should be updated periodically, at least
once per major version of their underlying toolchain.
Once Functions is stable and post 1.0, it would be worth exploring adding
Functions support in the upstream base scripts themselves via environment
variable.
*/
func assembler(f fn.Function) (string, error) {
switch f.Runtime {
case "go":
return GoAssembler, nil
case "python":
return PythonAssembler, nil
default:
return "", fmt.Errorf("no assembler defined for runtime %q", f.Runtime)
}
}
// GoAssembler
//
// Adapted from /usr/libexec/s2i/assemble within the UBI-8 go-toolchain
// such that the "go build" command builds subdirectory .s2i/builds/last
// (where main resides) rather than the root.
// TODO: many apps use the pattern of having main in a subdirectory, for
// example the idiomatic "./cmd/myapp/main.go". It would therefore be
// beneficial to submit a patch to the go-toolchain source allowing this
// path to be customized with an environment variable instead
const GoAssembler = `
#!/bin/bash
set -e
@ -25,8 +53,7 @@ if [[ $(go list -f {{.Incomplete}}) == "true" ]]; then
popd
echo "Assembling GOPATH"
export GOPATH=$(realpath $HOME/go)
mkdir -p $GOPATH/src/$IMPORT_URL
mv /tmp/src/* $GOPATH/src/$IMPORT_URL
mkdir -p $GOPATH/src/$IMPORT_URL mv /tmp/src/* $GOPATH/src/$IMPORT_URL
if [[ -d /tmp/artifacts/pkg ]]; then
echo "Restoring previous build artifacts"
mv /tmp/artifacts/pkg $GOPATH
@ -46,20 +73,167 @@ if [[ $(go list -f {{.Incomplete}}) == "true" ]]; then
popd
exit
fi
exec /$STI_SCRIPTS_PATH/usage
/$STI_SCRIPTS_PATH/usage
exit 1
else
pushd .s2i/builds/last
go mod tidy
go build -o /opt/app-root/gobinary
popd
popd
fi
`
func assembler(f fn.Function) (string, error) {
switch f.Runtime {
case "go":
return GoAssembler, nil
default:
return "", fmt.Errorf("no assembler defined for runtime %q", f.Runtime)
}
// PythonAssembler
//
// Adapted from /usr/libexec/s2i/assemble within the UBI-8 python-toolchain
// such that the the script executes from subdirectory .s2i/builds/last
// (where main resides) rather than the root, and indicates the main is
// likewise in .s2i/builds/last/service/main.py via Procfile. See the comment
// inline on line 50 of the script for where the directory change instruction
// was added.
const PythonAssembler = `
#!/bin/bash
function is_django_installed() {
python -c "import django" &>/dev/null
}
function should_collectstatic() {
is_django_installed && [[ -z "$DISABLE_COLLECTSTATIC" ]]
}
function virtualenv_bin() {
# New versions of Python (>3.6) should use venv module
# from stdlib instead of virtualenv package
python3.9 -m venv $1
}
# Install pipenv or micropipenv to the separate virtualenv to isolate it
# from system Python packages and packages in the main
# virtualenv. Executable is simlinked into ~/.local/bin
# to be accessible. This approach is inspired by pipsi
# (pip script installer).
function install_tool() {
echo "---> Installing $1 packaging tool ..."
VENV_DIR=$HOME/.local/venvs/$1
virtualenv_bin "$VENV_DIR"
# First, try to install the tool without --isolated which means that if you
# have your own PyPI mirror, it will take it from there. If this try fails, try it
# again with --isolated which ignores external pip settings (env vars, config file)
# and installs the tool from PyPI (needs internet connetion)
# $1$2 combines package name with [extras] or version specifier if is defined as $2
if ! $VENV_DIR/bin/pip install -U $1$2; then
echo "WARNING: Installation of $1 failed, trying again from official PyPI with pip --isolated install"
$VENV_DIR/bin/pip install --isolated -U $1$2 # Combines package name with [extras] or version specifier if is defined as $2
fi
mkdir -p $HOME/.local/bin
ln -s $VENV_DIR/bin/$1 $HOME/.local/bin/$1
}
set -e
# First of all, check that we don't have disallowed combination of ENVs
if [[ ! -z "$ENABLE_PIPENV" && ! -z "$ENABLE_MICROPIPENV" ]]; then
echo "ERROR: Pipenv and micropipenv cannot be enabled at the same time!"
# podman/buildah does not relay this exit code but it will be fixed hopefully
# https://github.com/containers/buildah/issues/2305
exit 3
fi
shopt -s dotglob
echo "---> Installing application source ..."
mv /tmp/src/* "$HOME"
# ---------------------------
# MODIFICATIONS FOR FUNCTIONS
echo "---> (Functions) Writing app.sh ..."
cat << 'EOF' > app.sh
#!/bin/bash
set -e
exec python .s2i/builds/last/service/main.py
EOF
chmod +x app.sh
echo "---> (Functions) Changing directory to .s2i/builds/last ..."
cd .s2i/builds/last
# END MODIFICATION FOR FUNCTIONS
# ------------------------------
# set permissions for any installed artifacts
fix-permissions /opt/app-root -P
if [[ ! -z "$UPGRADE_PIP_TO_LATEST" ]]; then
echo "---> Upgrading pip, setuptools and wheel to latest version ..."
if ! pip install -U pip setuptools wheel; then
echo "WARNING: Installation of the latest pip, setuptools and wheel failed, trying again from official PyPI with pip --isolated install"
pip install --isolated -U pip setuptools wheel
fi
fi
if [[ ! -z "$ENABLE_PIPENV" ]]; then
if [[ ! -z "$PIN_PIPENV_VERSION" ]]; then
# Add == as a prefix to pipenv version, if defined
PIN_PIPENV_VERSION="==$PIN_PIPENV_VERSION"
fi
install_tool "pipenv" "$PIN_PIPENV_VERSION"
echo "---> Installing dependencies via pipenv ..."
if [[ -f Pipfile ]]; then
pipenv install --deploy
elif [[ -f requirements.txt ]]; then
pipenv install -r requirements.txt
fi
# pipenv check
elif [[ ! -z "$ENABLE_MICROPIPENV" ]]; then
install_tool "micropipenv" "[toml]"
echo "---> Installing dependencies via micropipenv ..."
# micropipenv detects Pipfile.lock and requirements.txt in this order
micropipenv install --deploy
elif [[ -f requirements.txt ]]; then
echo "---> Installing dependencies ..."
pip install -r requirements.txt
fi
if [[ ( -f setup.py || -f setup.cfg ) && -z "$DISABLE_SETUP_PY_PROCESSING" ]]; then
echo "---> Installing application (via setup.{py,cfg})..."
pip install .
fi
if [[ -f pyproject.toml && -z "$DISABLE_PYPROJECT_TOML_PROCESSING" ]]; then
echo "---> Installing application (via pyproject.toml)..."
pip install .
fi
if should_collectstatic; then
(
echo "---> Collecting Django static files ..."
APP_HOME=$(readlink -f "${APP_HOME:-.}")
# Change the working directory to APP_HOME
PYTHONPATH="$(pwd)${PYTHONPATH:+:$PYTHONPATH}"
cd "$APP_HOME"
# Look for 'manage.py' in the current directory
manage_file=./manage.py
if [[ ! -f "$manage_file" ]]; then
echo "WARNING: seems that you're using Django, but we could not find a 'manage.py' file."
echo "'manage.py collectstatic' ignored."
exit
fi
if ! python $manage_file collectstatic --dry-run --noinput &> /dev/null; then
echo "WARNING: could not run 'manage.py collectstatic'. To debug, run:"
echo " $ python $manage_file collectstatic --noinput"
echo "Ignore this warning if you're not serving static files with Django."
exit
fi
python $manage_file collectstatic --noinput
)
fi
# set permissions for any installed artifacts
fix-permissions /opt/app-root -P
`

View File

@ -1,35 +1,22 @@
package s2i
import (
"archive/tar"
"context"
"errors"
"fmt"
"io"
"io/fs"
"net/url"
"os"
"path/filepath"
"regexp"
"runtime"
"slices"
"strings"
"github.com/docker/docker/api/types"
dockerClient "github.com/docker/docker/client"
"github.com/docker/docker/pkg/jsonmessage"
"github.com/google/go-containerregistry/pkg/name"
v1 "github.com/google/go-containerregistry/pkg/v1"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/openshift/source-to-image/pkg/api"
"github.com/openshift/source-to-image/pkg/api/validation"
"github.com/openshift/source-to-image/pkg/build"
"github.com/openshift/source-to-image/pkg/build/strategies"
s2idocker "github.com/openshift/source-to-image/pkg/docker"
"github.com/openshift/source-to-image/pkg/scm/git"
"golang.org/x/exp/maps"
"golang.org/x/term"
"knative.dev/func/pkg/builders"
"knative.dev/func/pkg/docker"
fn "knative.dev/func/pkg/functions"
@ -54,18 +41,12 @@ var DefaultBuilderImages = map[string]string{
"typescript": DefaultNodeBuilder,
}
// DockerClient is subset of dockerClient.CommonAPIClient required by this package
type DockerClient interface {
ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error)
}
// Builder of functions using the s2i subsystem.
type Builder struct {
name string
verbose bool
impl build.Builder // S2I builder implementation (aka "Strategy")
cli DockerClient
cli s2idocker.Client
}
type Option func(*Builder)
@ -92,7 +73,7 @@ func WithImpl(s build.Builder) Option {
}
}
func WithDockerClient(cli DockerClient) Option {
func WithDockerClient(cli s2idocker.Client) Option {
return func(b *Builder) {
b.cli = cli
}
@ -163,13 +144,6 @@ func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platf
}
}
// Build directory
tmp, err := os.MkdirTemp("", "func-s2i-build")
if err != nil {
return fmt.Errorf("cannot create temporary dir for s2i build: %w", err)
}
defer os.RemoveAll(tmp)
// Build Config
cfg := &api.Config{
Source: &git.URL{
@ -183,7 +157,6 @@ func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platf
PreviousImagePullPolicy: api.DefaultPreviousImagePullPolicy,
RuntimeImagePullPolicy: api.DefaultRuntimeImagePullPolicy,
DockerConfig: s2idocker.GetDefaultDockerConfig(),
AsDockerfile: filepath.Join(tmp, "Dockerfile"),
}
// Scaffold
@ -191,19 +164,6 @@ func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platf
return
}
// Extract a an S2I script url from the image if provided and use
// this in the build config.
scriptURL, err := s2iScriptURL(ctx, client, cfg.BuilderImage)
if err != nil {
return fmt.Errorf("cannot get s2i script url: %w", err)
} else if scriptURL != "image:///usr/libexec/s2i" {
// Only set if the label found on the image is NOT the default.
// Otherwise this label, which is essentially a default fallback, will
// take precidence over any scripts provided in ./.s2i/bin, which are
// supposed to be the override to that default.
cfg.ScriptsURL = scriptURL
}
// Excludes
// Do not include .git, .env, .func or any language-specific cache directories
// (node_modules, etc) in the tar file sent to the builder, as this both
@ -218,22 +178,32 @@ func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platf
if err != nil {
return err
}
buildEnvs["LISTEN_ADDRESS"] = "[::]:8080"
for k, v := range buildEnvs {
cfg.Environment = append(cfg.Environment, api.EnvironmentSpec{Name: k, Value: v})
}
for _, m := range f.Build.Mounts {
cfg.BuildVolumes = append(cfg.BuildVolumes, fmt.Sprintf("%s:%s:ro,Z", m.Source, m.Destination))
}
if runtime.GOOS == "linux" {
cfg.DockerNetworkMode = "host"
}
// Validate the config
if errs := validation.ValidateConfig(cfg); len(errs) > 0 {
for _, e := range errs {
fmt.Fprintf(os.Stderr, "ERROR: %s\n", e)
}
return errors.New("Unable to build via the s2i builder.")
return errors.New("unable to build via the s2i builder")
}
// Create the S2I builder instance if not overridden
var impl = b.impl
if impl == nil {
impl, _, err = strategies.Strategy(nil, cfg, build.Overrides{})
impl, _, err = strategies.Strategy(client, cfg, build.Overrides{})
if err != nil {
return fmt.Errorf("cannot create s2i builder: %w", err)
}
@ -250,161 +220,7 @@ func (b *Builder) Build(ctx context.Context, f fn.Function, platforms []fn.Platf
fmt.Fprintln(os.Stderr, message)
}
}
pr, pw := io.Pipe()
// s2i apparently is not excluding the files in --as-dockerfile mode
exclude := regexp.MustCompile(cfg.ExcludeRegExp)
const up = ".." + string(os.PathSeparator)
go func() {
tw := tar.NewWriter(pw)
err := filepath.Walk(tmp, func(path string, fi fs.FileInfo, err error) error {
if err != nil {
return err
}
p, err := filepath.Rel(tmp, path)
if err != nil {
return fmt.Errorf("cannot get relative path: %w", err)
}
if p == "." {
return nil
}
p = filepath.ToSlash(p)
if exclude.MatchString(p) {
return nil
}
lnk := ""
if fi.Mode()&fs.ModeSymlink != 0 {
lnk, err = os.Readlink(path)
if err != nil {
return fmt.Errorf("cannot read link: %w", err)
}
if filepath.IsAbs(lnk) {
lnk, err = filepath.Rel(tmp, lnk)
if err != nil {
return fmt.Errorf("cannot get relative path for symlink: %w", err)
}
if strings.HasPrefix(lnk, up) || lnk == ".." {
return fmt.Errorf("link %q points outside source root", p)
}
}
}
hdr, err := tar.FileInfoHeader(fi, filepath.ToSlash(lnk))
if err != nil {
return fmt.Errorf("cannot create tar header: %w", err)
}
hdr.Name = p
if runtime.GOOS == "windows" {
// Windows does not have execute permission, we assume that all files are executable.
hdr.Mode |= 0111
}
err = tw.WriteHeader(hdr)
if err != nil {
return fmt.Errorf("cannot write header to thar stream: %w", err)
}
if fi.Mode().IsRegular() {
var r io.ReadCloser
r, err = os.Open(path)
if err != nil {
return fmt.Errorf("cannot open source file: %w", err)
}
defer r.Close()
_, err = io.Copy(tw, r)
if err != nil {
return fmt.Errorf("cannot copy file to tar stream :%w", err)
}
}
return nil
})
_ = tw.Close()
_ = pw.CloseWithError(err)
}()
opts := types.ImageBuildOptions{
Tags: []string{f.Build.Image},
PullParent: true,
}
resp, err := client.ImageBuild(ctx, pr, opts)
if err != nil {
return fmt.Errorf("cannot build the app image: %w", err)
}
defer resp.Body.Close()
var out io.Writer = io.Discard
if b.verbose {
out = os.Stderr
}
var isTerminal bool
var fd uintptr
if outF, ok := out.(*os.File); ok {
fd = outF.Fd()
isTerminal = term.IsTerminal(int(outF.Fd()))
}
return jsonmessage.DisplayJSONMessagesStream(resp.Body, out, fd, isTerminal, nil)
}
func s2iScriptURL(ctx context.Context, cli DockerClient, image string) (string, error) {
img, _, err := cli.ImageInspectWithRaw(ctx, image)
if err != nil {
if dockerClient.IsErrNotFound(err) { // image is not in the daemon, get info directly from registry
var (
ref name.Reference
img v1.Image
cfg *v1.ConfigFile
)
ref, err = name.ParseReference(image)
if err != nil {
return "", fmt.Errorf("cannot parse image name: %w", err)
}
if _, ok := ref.(name.Tag); ok && !slices.Contains(maps.Values(DefaultBuilderImages), image) {
fmt.Fprintln(os.Stderr, "image referenced by tag which is discouraged: Tags are mutable and can point to a different artifact than the expected one")
}
img, err = remote.Image(ref)
if err != nil {
return "", fmt.Errorf("cannot get image from registry: %w", err)
}
cfg, err = img.ConfigFile()
if err != nil {
return "", fmt.Errorf("cannot get config for image: %w", err)
}
if cfg.Config.Labels != nil {
if u, ok := cfg.Config.Labels["io.openshift.s2i.scripts-url"]; ok {
return u, nil
}
}
}
return "", err
}
if img.Config != nil && img.Config.Labels != nil {
if u, ok := img.Config.Labels["io.openshift.s2i.scripts-url"]; ok {
return u, nil
}
}
//nolint:staticcheck
if img.ContainerConfig != nil && img.ContainerConfig.Labels != nil {
if u, ok := img.ContainerConfig.Labels["io.openshift.s2i.scripts-url"]; ok {
return u, nil
}
}
return "", nil
return nil
}
// Builder Image chooses the correct builder image or defaults.
@ -417,8 +233,8 @@ func BuilderImage(f fn.Function, builderName string) (string, error) {
// Returns a config with settings suitable for building runtimes which
// support scaffolding.
func scaffold(cfg *api.Config, f fn.Function) (*api.Config, error) {
// Scafffolding is currently only supported by the Go runtime
if f.Runtime != "go" {
// Scafffolding is currently only supported by the Go and Python runtimes
if f.Runtime != "go" && f.Runtime != "python" {
return cfg, nil
}

View File

@ -1,28 +1,17 @@
package s2i_test
import (
"archive/tar"
"bytes"
"context"
"errors"
"fmt"
"io"
"log"
"net"
"net/http"
"os"
"path/filepath"
"strings"
"testing"
"github.com/google/go-containerregistry/pkg/name"
"github.com/google/go-containerregistry/pkg/registry"
"github.com/google/go-containerregistry/pkg/v1/remote"
"github.com/google/go-containerregistry/pkg/v1/tarball"
"github.com/docker/docker/api/types"
"github.com/docker/docker/api/types/container"
"github.com/docker/docker/api/types/image"
"github.com/docker/docker/api/types/network"
"github.com/docker/docker/errdefs"
ocispec "github.com/opencontainers/image-spec/specs-go/v1"
"github.com/openshift/source-to-image/pkg/api"
@ -165,70 +154,6 @@ func Test_BuilderImageConfigurable(t *testing.T) {
}
}
// Test_BuildImageWithFuncIgnore ensures that ignored files are not added to
// the func image
func Test_BuildImageWithFuncIgnore(t *testing.T) {
funcIgnoreContent := []byte(`#testing Comments
#testingComments.txt
hello.txt
`)
f := fn.Function{
Runtime: "node",
}
tempdir := t.TempDir()
f.Root = tempdir
//create a .funcignore file containing the details of the files to be ignored
err := os.WriteFile(filepath.Join(f.Root, ".funcignore"), funcIgnoreContent, 0644)
if err != nil {
t.Fatal(err)
}
// creating test files which should be ignored
err = os.WriteFile(filepath.Join(f.Root, "hello.txt"), []byte(""), 0644)
if err != nil {
t.Fatal(err)
}
err = os.WriteFile(filepath.Join(f.Root, "#testingComments.txt"), []byte(""), 0644)
if err != nil {
t.Fatal(err)
}
cli := mockDocker{
build: func(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) {
tr := tar.NewReader(context)
for {
hdr, err := tr.Next()
if err != nil {
if errors.Is(err, io.EOF) {
break
}
return types.ImageBuildResponse{}, err
}
// If we find the undesired file, return an error
if filepath.Base(hdr.Name) == "hello.txt" {
return types.ImageBuildResponse{}, fmt.Errorf("test failed, found ignonered file %s:", filepath.Base(hdr.Name))
}
// If we find the undesired file, return an error
if filepath.Base(hdr.Name) == "#tesingComments.txt" {
return types.ImageBuildResponse{}, fmt.Errorf("test failed, found ignonered file %s:", filepath.Base(hdr.Name))
}
}
return types.ImageBuildResponse{
Body: io.NopCloser(strings.NewReader(`{"stream": "OK!"}`)),
OSType: "linux",
}, nil
},
}
b := s2i.NewBuilder(s2i.WithName(builders.S2I), s2i.WithDockerClient(cli))
if err := b.Build(context.Background(), f, nil); err != nil {
t.Fatal(err)
}
}
// Test_Verbose ensures that the verbosity flag is propagated to the
// S2I builder implementation.
func Test_BuilderVerbose(t *testing.T) {
@ -284,192 +209,15 @@ func Test_BuildEnvs(t *testing.T) {
}
}
func TestS2IScriptURL(t *testing.T) {
testRegistry := startRegistry(t)
// builder that is only in registry not in daemon
remoteBuilder := testRegistry + "/default/builder:remote"
// builder that is in daemon
localBuilder := "example.com/default/builder:local"
// begin push testing builder to registry
tag, err := name.NewTag(remoteBuilder)
if err != nil {
t.Fatal(err)
}
img, err := tarball.ImageFromPath(filepath.Join("testdata", "builder.tar"), nil)
if err != nil {
t.Fatal(err)
}
err = remote.Write(&tag, img)
if err != nil {
t.Fatal(err)
}
// end push testing builder to registry
scriptURL := "image:///usr/local/s2i"
cli := mockDocker{
inspect: func(ctx context.Context, image string) (types.ImageInspect, []byte, error) {
if image != localBuilder {
return types.ImageInspect{}, nil, notFoundErr{}
}
return types.ImageInspect{
Config: &container.Config{Labels: map[string]string{"io.openshift.s2i.scripts-url": scriptURL}},
}, nil, nil
},
}
impl := &mockImpl{
BuildFn: func(config *api.Config) (*api.Result, error) {
if config.ScriptsURL != scriptURL {
return nil, fmt.Errorf("unexepeted ScriptURL: %q", config.ScriptsURL)
}
return nil, nil
},
}
tests := []struct {
name string
builderImage string
}{
{name: "builder in daemon", builderImage: localBuilder},
{name: "builder not in daemon", builderImage: remoteBuilder},
}
for _, tt := range tests {
t.Run(tt.name, func(t *testing.T) {
f := fn.Function{
Runtime: "node",
Build: fn.BuildSpec{
BuilderImages: map[string]string{
builders.S2I: tt.builderImage,
},
},
}
b := s2i.NewBuilder(s2i.WithName(builders.S2I), s2i.WithImpl(impl), s2i.WithDockerClient(cli))
err = b.Build(context.Background(), f, nil)
if err != nil {
t.Error(err)
}
})
}
}
func startRegistry(t *testing.T) (addr string) {
s := http.Server{
Handler: registry.New(registry.Logger(log.New(io.Discard, "", 0))),
}
t.Cleanup(func() { s.Close() })
l, err := net.Listen("tcp", "localhost:0")
if err != nil {
t.Fatal(err)
}
addr = l.Addr().String()
go func() {
err = s.Serve(l)
if err != nil && !errors.Is(err, net.ErrClosed) {
fmt.Fprintln(os.Stderr, "ERROR: ", err)
}
}()
return addr
}
func TestBuildContextUpload(t *testing.T) {
dockerfileContent := []byte("FROM scratch\nLABEL A=42")
atxtContent := []byte("hello world!\n")
cli := mockDocker{
build: func(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) {
tr := tar.NewReader(context)
for {
hdr, err := tr.Next()
if err != nil {
if errors.Is(err, io.EOF) {
break
}
return types.ImageBuildResponse{}, err
}
switch hdr.Name {
case ".":
case "Dockerfile":
bs, err := io.ReadAll(tr)
if err != nil {
return types.ImageBuildResponse{}, err
}
if !bytes.Equal(bs, dockerfileContent) {
return types.ImageBuildResponse{}, errors.New("bad content for Dockerfile")
}
case "a.txt":
bs, err := io.ReadAll(tr)
if err != nil {
return types.ImageBuildResponse{}, err
}
if !bytes.Equal(bs, atxtContent) {
return types.ImageBuildResponse{}, errors.New("bad content for a.txt")
}
default:
return types.ImageBuildResponse{}, fmt.Errorf("unexpected file or directory: %q", hdr.Name)
}
}
return types.ImageBuildResponse{
Body: io.NopCloser(strings.NewReader(`{"stream": "OK!"}`)),
OSType: "linux",
}, nil
},
}
impl := &mockImpl{
BuildFn: func(config *api.Config) (*api.Result, error) {
err := os.WriteFile(config.AsDockerfile, dockerfileContent, 0644)
if err != nil {
return nil, err
}
err = os.WriteFile(filepath.Join(filepath.Dir(config.AsDockerfile), "a.txt"), atxtContent, 0644)
if err != nil {
return nil, err
}
err = os.Mkdir(filepath.Join(filepath.Dir(config.AsDockerfile), "node_modules"), 0755)
if err != nil {
return nil, err
}
return nil, nil
},
}
f := fn.Function{
Runtime: "node",
}
b := s2i.NewBuilder(s2i.WithImpl(impl), s2i.WithDockerClient(cli))
err := b.Build(context.Background(), f, nil)
if err != nil {
t.Error(err)
}
}
func TestBuildFail(t *testing.T) {
cli := mockDocker{
build: func(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) {
return types.ImageBuildResponse{
Body: io.NopCloser(strings.NewReader(`{"errorDetail": {"message": "Error: this is expected"}}`)),
OSType: "linux",
}, nil
inspect: func(ctx context.Context, image string) (types.ImageInspect, []byte, error) {
return types.ImageInspect{}, nil, errors.New("this is expected")
},
}
impl := &mockImpl{
BuildFn: func(config *api.Config) (*api.Result, error) {
return &api.Result{Success: true}, nil
},
}
b := s2i.NewBuilder(s2i.WithImpl(impl), s2i.WithDockerClient(cli))
b := s2i.NewBuilder(s2i.WithDockerClient(cli))
err := b.Build(context.Background(), fn.Function{Runtime: "node"}, nil)
if err == nil || !strings.Contains(err.Error(), "Error: this is expected") {
if err == nil {
t.Error("didn't get expected error")
}
}
@ -485,7 +233,6 @@ func (i *mockImpl) Build(cfg *api.Config) (*api.Result, error) {
type mockDocker struct {
inspect func(ctx context.Context, image string) (types.ImageInspect, []byte, error)
build func(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error)
}
func (m mockDocker) ImageInspectWithRaw(ctx context.Context, image string) (types.ImageInspect, []byte, error) {
@ -497,15 +244,60 @@ func (m mockDocker) ImageInspectWithRaw(ctx context.Context, image string) (type
}
func (m mockDocker) ImageBuild(ctx context.Context, context io.Reader, options types.ImageBuildOptions) (types.ImageBuildResponse, error) {
if m.build != nil {
return m.build(ctx, context, options)
}
panic("implement me")
}
_, _ = io.Copy(io.Discard, context)
return types.ImageBuildResponse{
Body: io.NopCloser(strings.NewReader("")),
OSType: "linux",
}, nil
func (m mockDocker) ContainerAttach(ctx context.Context, container string, options container.AttachOptions) (types.HijackedResponse, error) {
panic("implement me")
}
func (m mockDocker) ContainerCommit(ctx context.Context, container string, options container.CommitOptions) (types.IDResponse, error) {
panic("implement me")
}
func (m mockDocker) ContainerCreate(ctx context.Context, config *container.Config, hostConfig *container.HostConfig, networkingConfig *network.NetworkingConfig, platform *ocispec.Platform, containerName string) (container.CreateResponse, error) {
panic("implement me")
}
func (m mockDocker) ContainerInspect(ctx context.Context, container string) (types.ContainerJSON, error) {
panic("implement me")
}
func (m mockDocker) ContainerRemove(ctx context.Context, container string, options container.RemoveOptions) error {
panic("implement me")
}
func (m mockDocker) ContainerStart(ctx context.Context, container string, options container.StartOptions) error {
panic("implement me")
}
func (m mockDocker) ContainerKill(ctx context.Context, container, signal string) error {
panic("implement me")
}
func (m mockDocker) ContainerWait(ctx context.Context, container string, condition container.WaitCondition) (<-chan container.WaitResponse, <-chan error) {
panic("implement me")
}
func (m mockDocker) CopyToContainer(ctx context.Context, container, path string, content io.Reader, opts container.CopyToContainerOptions) error {
panic("implement me")
}
func (m mockDocker) CopyFromContainer(ctx context.Context, container, srcPath string) (io.ReadCloser, container.PathStat, error) {
panic("implement me")
}
func (m mockDocker) ImagePull(ctx context.Context, ref string, options image.PullOptions) (io.ReadCloser, error) {
panic("implement me")
}
func (m mockDocker) ImageRemove(ctx context.Context, image string, options image.RemoveOptions) ([]image.DeleteResponse, error) {
panic("implement me")
}
func (m mockDocker) ServerVersion(ctx context.Context) (types.Version, error) {
panic("implement me")
}
type notFoundErr struct {

View File

@ -0,0 +1,5 @@
# Use the .funcignore file to exclude files which should not be
# tracked in the image build. To instruct the system not to track
# files in the image build, add the regex pattern or file information
# to this file.

View File

@ -0,0 +1,5 @@
# Functions use the .func directory for local runtime data which should
# generally not be tracked in source control. To instruct the system to track
# .func in source control, comment the following line (prefix it with '# ').
/.func

View File

@ -0,0 +1,20 @@
# Go HTTP Function
Welcome to your new Go Function! The boilerplate function code can be found in
[`handle.go`](handle.go). This Function responds to HTTP requests.
## Development
Develop new features by adding a test to [`handle_test.go`](handle_test.go) for
each feature, and confirm it works with `go test`.
Update the running analog of the function using the `func` CLI or client
library, and it can be invoked from your browser or from the command line:
```console
curl http://myfunction.example.com/
```
For more, see [the complete documentation]('https://github.com/knative/func/tree/main/docs')

Some files were not shown because too many files have changed in this diff Show More