Commit Graph

260 Commits

Author SHA1 Message Date
Kapil Sareen 0157893d8e
mcp: adds labels and envs config tools and resources (#2931)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-07-24 01:22:09 +00:00
Luke Kingland 837988484f
Remove deprecated DSA support (#2941) 2025-07-22 20:55:07 +00:00
David Fridrich 4c0fa017b7
feat: func invoke get requests (#2942) 2025-07-22 13:18:07 +00:00
Kapil Sareen f096936c98
mcp: refactors pkg for easy maintainability (#2928)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-07-14 05:56:08 +00:00
David Fridrich 211df1657f
base builder flag (#2935) 2025-07-11 19:58:06 +00:00
Matej Vašek 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
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 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 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
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
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 9c992c9409
feat: add LISTEN_ADDRESS to Python default runner (#2880) 2025-06-30 08:37:11 +00:00
Luke Kingland ec66c1a496
feat: support FUNC_GO env in Host builder (#2877) 2025-06-30 07:50:10 +00:00
Luke Kingland e8ccb1bdcf
feat: add --address option to func run (#2887) 2025-06-27 09:17:07 +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
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
Kapil Sareen e9e88e5264
mcp: adds build tool (#2865)
Signed-off-by: kapil <kapilsareen584@gmail.com>
2025-06-17 01:28:56 +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
Kapil Sareen 0ed0efbe27
mcp: adds func mcp command (#2836)
Signed-off-by: KapilSareen <kapilsareen584@gmail.com>
2025-06-09 01:41:30 +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 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
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
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
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
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
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 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 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
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
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