Commit Graph

8 Commits

Author SHA1 Message Date
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 e2ea83ca8e
chore: update docker to v25 (#2160)
* chore: update docker to v25

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

* chore: update pack dep

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

* chore: unpin moby/buildkit

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

* fixup: use upstream source-to-image

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

---------

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

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

* new .deploy.image field

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

* building

* building

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

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

* base tests fixes for compile

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

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

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

* new generated schema

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

* fix some tests using .Image and create new test

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

* remove nested .func

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

* get rid of test

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

* remove my debug test

* fix namespace change test

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

* fix pipeline run to use .Deploy.Image

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

* fix TestDeploy_ConfigApplied and change pipelines image being used

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

* fix some tests

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

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

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

* update empty image in tests issue

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

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

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

* openshift override on namespace change forced, remove useless print

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

* printing fixes, reviewdog, buildConfig return

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

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

* update more tests

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

* fix

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

* new test, comment

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

* misspell

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

* remove unnecessary comments

* fix from review

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

* remove k8s service host var in test

* error definition; fix client tests; cli delete fixup

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

* new schema

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

* namespace fixes; remover arguments fix

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

* delete_test cmd

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

* schema, new local remote flag instead of deploy

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

* fix test to have now required namespace

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

* add namespace check, test action

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

* fix integration deploy test, comments

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

* fix wrongly removed namespace

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

* small changes to remover and ns added to its tests

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

* test moving logic to client

* fix deploy bug, remove verbose for better logs

* pipelines, clean remover

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

* newline

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

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

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

* fix integ test for pipelines.Run

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

* cleanup

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

* registry update change on deploy, some prints

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

* new deploy tests and mock update

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

* new tests, ns determination in mocks

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

* deploy digested img doesnt populate build

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

* comments

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

* remove todo

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

---------

Signed-off-by: gauron99 <fridrich.david19@gmail.com>
2024-02-27 10:44:20 +00:00
Matej Vasek 5948cf4a07
Update docker client dependency (#1877)
* chore: update docker client lib

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

* fixup: "host" OCI pusher

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

* fixup: downgrade github.com/containers/image/v5

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

* fixup: platform tests

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

---------

Signed-off-by: Matej Vasek <mvasek@redhat.com>
2023-07-20 10:50:12 +00:00
Luke Kingland cabba3f9d3
feat: start timeout for host runs (#1782)
* feat: start timeout for host runs

* refactor timeout function

* hide flag until a valid path
2023-06-16 19:57:49 +00:00
Luke Kingland b82a5a4eac
feat: host-based scaffolded function runner (#1733)
* feat: host runner

* improve error message wording
2023-05-24 21:26:25 +00:00
Luke Kingland 89b599df24
feat: job scaffolding (#1697)
* feat: job scaffolding

- Local jobs use a directory rather than filename
  This sets up for upcoming scaffolding to use as a space for job
  scaffolding code.
- Places all jobs within a 'runs' directory in ./func rather than
  'instances' to further differentiate between an instance and a local
  run task invoked via .Run
- Updates Jobs' stop handler to have an error return.
- Adds tests which ensure creating and stopping a job are reflected in
  the client's .Instances().Local() accessor.
- Adds verbose logging support to the Job implementation.
- Adds a cleanup task which will remove orphaned jobs by, in addition to
  previous logic, checking that there is no longer a process listening
  on the port indicated by the job.

* fix spelling errors

* fix lint errors

* log job stop errors

* use temp dir for tests

* add back docker build tags and wait
2023-05-04 20:53:57 +00:00
Zbynek Roubalik 5a4803bf95
chore: refactor repository layout (#1554)
Signed-off-by: Zbynek Roubalik <zroubalik@gmail.com>
2023-02-15 08:46:52 +00:00