Commit Graph
492 Commits
Author SHA1 Message Date
soharab-icandGitHub 90d781ca2d Fixed mqtrigger scaling issue (#2986)
* Fixed mqtrigger scaling issue

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Resolve review comments

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Set goreleaser version to v1
Remove armv7 references from goreleaser file

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-08-09 11:58:44 +05:30
soharab-icandGitHub 8de5a5b0f3 Fix: Storage leak in Builder and Fetcher (#2979)
* Fix storage leak in builder
```
builder pod keeps old src and deployment packages irrespective of build status.
delete src package after every build request is completed.
delete deployment package after package is uploaded.
```
* Optimized src/deploy cleanup pkg code
* Fix high severity security issue
* Add a test for builder's Clean API
* Resolve review comments

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-07-15 18:28:42 +05:30
soharab-icandGitHub c6c811ea76 Show warning that --yolo, --concurrency and --rpp fields are valid for executortype poolmgr only (#2971)
* yolo, concurrency and rpp are specifically introduced for executortype poolmgr
```
Show warning if these fields are used with other executortype.
Update CLI with this information.
```

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Add warning for fn update too

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Show warning while updating `--yolo`, `--con` and `--rpp` to an already created newdeploy function.

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Fixed a minor bug

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Optmize and increase code readability

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Rename function to checkExecutorPoolManager

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-07-08 12:04:43 +05:30
soharab-icandGitHub a34840b0a7 Set OwnerReferences to K8s resources created by Fission (#2964)
* Poolmanager deployment is created based on environment.
Set environment as owner to poolmanager deployment.

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Set OwnerReferences to K8s resources created by fission resources.
```
Set OwnerReferences to deployment, service and HPA created by newdeploy function.
Set OwnerReferences to builderManager deployment and service created by environment.
Set OwnerReferences to deployment, service and HPA created by container function.
```

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

* Use ControllerRef

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-06-25 12:25:12 +05:30
jaynisandGitHub 19858521fd added http status code error handling to DownloadUrl function (#2959)
Signed-off-by: jaynis <kranz.jannis@googlemail.com>
2024-06-20 18:43:46 +05:30
soharab-icandGitHub 4c4b574d07 Fix fission-cli cmd pkg getdeploy (#2960)
```
If deployment archive is empty then command will return source archive.
Deployment can be empty if pkg build failed or in running state.
```

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-06-20 18:36:35 +05:30
waitstoryandGitHub 9b978cf2fd Fixed an error when using the command to download src (#2940)
* Fixed an error when using the command to download src

issue: #2938

Signed-off-by: waitstory <waitstory@163.com>

* Fixed an error when using the command to download src

issue: #2938

Signed-off-by: waitstory <waitstory@163.com>

---------

Signed-off-by: waitstory <waitstory@163.com>
2024-06-10 10:00:31 +05:30
pengpengfuandGitHub ef05e242e4 fetcher when call uploadHandler ,archive zip, Use newZip instead of the default DefaultZip to improve the fetcher to accept more upload requests. (#2955) 2024-06-10 09:01:26 +05:30
soharab-icandGitHub 156c1ac2e6 Pin goreleaser version to v1 in github actions (#2956)
```
Latest goreleaser version v2 has some breaking changes.
Due to this CI tests failed.
Therefore, setting goreleaser version to v1.
```

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-06-06 19:49:04 +05:30
soharab-icandGitHub c126298db4 Revert "Remove deprecated mqtrigger with kind fission (#2875)" (#2946)
* Revert "Remove deprecated mqtrigger with kind fission (#2875)"

This reverts commit f44174debc.

* Upgrade sarama version to v1.43.2

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-27 10:21:51 +05:30
soharab-icandGitHub f7e9e71ee1 Set latest envVersion 3 as default (#2945)
Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-22 14:06:36 +05:30
eveneastandGitHub 3e43c07e5a Fix code comments function names (#2927)
Signed-off-by: eveneast <qcqs@foxmail.com>
2024-05-20 19:22:22 +05:30
robbellMFandGitHub 932be4eb38 Fix fission spec apply --delete deleting environments (#2943) 2024-05-17 22:22:50 +05:30
soharab-icandGitHub 8bfe2d0ed1 Fix CLI pkg getsrc returns deploy archive instead of source archive (#2941)
* CLI command `pkg getsrc` returns deploy archive

```
Fix CLI command to return source archive instead of deploy archive.
If source archive is not available then return deploy archive.
```

* Add e2e tests for `fission package` CLI commands
* Cleanup environments created for pkg test
* Fix unit test failures


---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-16 18:29:58 +05:30
soharab-icandGitHub 9cea0d2b32 Upgrade kind version to v0.23.0 (#2937)
* Upgrade kind version to v0.23.0
```
Upgraded kind version to github workflow push_pr.yaml
Upgraded kind version to github workflow release.yaml
Upgraded kind version to github workflow upgrade_test.yaml
```
* Minor change to trigger CI
* Upgrade kind node image to v1.25.16

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-15 13:21:46 +05:30
guangwuandGitHub 08c662bc11 fix: close tmp file (#2931) 2024-05-07 12:51:43 +05:30
soharab-icandGitHub 241983d2f7 Fix fission check command doesnt work for namespace other than fission (#2932)
* Fix `fission check` command which does not work outside of `fission` namespace

If user provide namespace then use it for running `fission check` command.
If user does not provide namespace then use `fission` as default namespace.

* Update go version to 1.22.2

---------

Signed-off-by: Md Soharab Ansari <soharab.ansari@infracloud.io>
2024-05-07 11:18:22 +05:30
Sanket SudakeandGitHub 579d46cc1b Use code-generator v1.29.1 for code-generation (#2908)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2024-02-06 14:00:16 +05:30
Sanket SudakeandGitHub b801c77432 Add kubernetes QPS and Burst limit configuration (#2899)
Added configurable kubernetes client limits burst and QPS
Default QPS 200 and burst 500. Configurable via helm chart values.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2024-01-12 22:21:12 +05:30
Sanket SudakeandGitHub 82b2848eb7 Set default package status to none if deployment exists (#2894)
If package has deployment already, we should set package status to none instead of pending.
If we have package has source, we set status to pending.
If both source and deployment are empty, package marked as failure.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2024-01-05 18:31:13 +05:30
Sanket SudakeandGitHub 0c8573467b Make common cache typed with generics (#2896)
Making typed common cache so that we don't use wrong types
across set/get methods and more higher-level methods can be
defined for cache.
Currently, we are not able to operate over all keys of the cache
due to generic types.
I also removed code comments around the cache.

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2024-01-04 10:46:32 +05:30
Vardhaman SuranaandGitHub 12f8017d9b added fetcher test cases (#2893)
* added fetcher test cases

* error message formatting fix

* error message formatting fix for e2e framework
2023-12-21 17:02:39 +05:30
Sanket SudakeandGitHub 62f729727a Change container base image to cgr.dev/chainguard/static (#2881)
* Change container base image to cgr.dev/chainguard/static
* Lint fixes
* fix test failure
* Add router deployment wait
* add check command in upgrade script

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-24 19:01:31 +05:30
Sanket SudakeandGitHub f44174debc Remove deprecated mqtrigger with kind fission (#2875)
* Remove deprecated mqtrigger with kind fission
* Remove unused deps

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-21 17:52:37 +05:30
Sanket SudakeandGitHub efeb6951dc Update Go dependencies (#2878)
* Update Go dependencies
* Pin all github workflows dependencies

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-21 16:15:49 +05:30
Sanket SudakeandGitHub b85ba9e419 Use concurrency in poolmanager as per old behaviour (#2876)
* Use concurrency in poolmanager as per old behaviour
* Update code comments

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-21 13:34:17 +05:30
Sanket SudakeandGitHub d23ed572f9 Add tests for preupgradchecks and spec/archive CLI (#2874)
* Add tests for preupgradchecks
* Add spec tests
* Add package archive tests
* Wait for cleanup
* Fix test and coverage

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-17 14:08:38 +05:30
Sanket SudakeandGitHub e7d6381876 Add webhook server to tests (#2873)
* Add webhook server to tests
* fix config for webhoook service
* Fix logger in webhook manager
* Use interface for webhook manager
* single reference for router url
* Cleanup token code

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-16 14:16:28 +05:30
Sanket SudakeandGitHub 2e4825def0 Add function test CLI tests (#2871)
* Add function test CLI tests
* Add few more services to tests

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-13 14:34:56 +05:30
Vardhaman SuranaandGitHub 3fabf64b3c Add informers and internal go routines in manager (#2870)
* used manager's Add function in more places
* exit when ctx.Done is received in archivePruner go routines
* fix manager tests
* fix data race
* added more gpm function in manager and removed manager from a util function
* closed unused channel and stopped ticker after context is done
* added log statements
* used context.Done inside function instead of stopper channel
2023-11-10 12:42:21 +05:30
Vardhaman SuranaandGitHub 2a40b4538c added manger to keep track of go routines in the services (#2869)
- added manager to wait for all go routines to end before exit
- code refactor
- renamed Manafer to Interface and GoRoutineManager to GroupManager
- replaced some go routine calls with manager Add func
- added unit tests for manager
2023-11-07 15:30:48 +05:30
Sanket SudakeandGitHub 27132975c4 Add interfaces for executor/fetcher/storagesvc clients (#2867)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-11-06 16:09:51 +05:30
Sanket SudakeandGitHub 267f7faf18 Add cause for all context timeouts (#2862) 2023-10-29 13:19:06 +05:30
Sanket SudakeandGitHub 2223081c80 Test for httptrigger and functions container/newdeploy (#2861)
* Test for httptrigger and functions
* Fixes with multierror
* review changes

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-27 15:05:20 +05:30
8a17d391c5 Envtest based integration tests for Fission (#2858)
* skeleton for envtest fission
* Refactor code and add CLI test
* hack
* Update server test
* remove skip-ci for lint tests
* Pass client go storagesvc
* Add clientGen interface across code
* Fix storagesvc test
* Fix cmd client
* add retry in server test
* Fix concurrenct access to pool deployment
* Remove old executor test
* get rid of ginkgo/gomega
* disable flaky test
* flaky test
* revert ci change
* handle err from ParseBool

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
2023-10-26 12:09:11 +05:30
Vardhaman SuranaandGitHub fc97b7609b added client generator inteface (#2854)
* added client generator inteface
* start router service asynchronously

Signed-off-by: Vardhaman Surana <vardhaman.surana@infracloud.io>
2023-10-18 18:59:28 +05:30
Sanket SudakeandGitHub c6329ee3db Switch to google/uuid from satori/go.uuid (#2852)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-17 12:19:17 +05:30
Sanket SudakeandGitHub 7b21fbc199 Remove unused generator package (#2851)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-17 10:50:58 +05:30
Sanket SudakeandGitHub 703d757c29 Remove controller component from Fission (#2850)
* Remove controller component from Fission
* Cleanup at few more places

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-17 09:29:13 +05:30
Guillaume MARTINEZandGitHub 3762ff80f2 Update the Kubernetes autoscaling API to v2 (#2722) (#2842)
* Update the Kubernetes autoscaling API to v2 (#2722)
  - k8s.io/api/autoscaling/v2
* generate all files
* fix missing v2beta ref

---------

Signed-off-by: Lunik <lunik@tiwabbit.fr>
2023-10-11 11:04:45 +05:30
Sanket SudakeandGitHub b43b31884a Update kubernetes versions in CI verification (#2844)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-10-10 13:11:43 +05:30
56b49dcee8 Ability to retain specialised pods for poolmanager functions (#2830)
- added retainPods flag to take in the number of specialized pods to retain
- add retainPods in both the create function and update function command
- modify crd keys to be typed instead of string
- keep track of function generation in case of update function operation
- add delete handler function to make sure specialized pods are deleted in case function is deleted

---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Signed-off-by: Pranoy Kundu <pranoy1998k@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
2023-09-27 13:33:19 +05:30
Sanket SudakeandGitHub 657aee7cc2 Update go deps across project (#2837)
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-09-24 11:14:43 +05:30
Sanket SudakeandGitHub 3bcda55aa8 Update kubernetes libs to latest (#2834)
- k8s.io/api v0.28.1
- k8s.io/apiextensions-apiserver v0.28.1
- k8s.io/apimachinery v0.28.1
- k8s.io/client-go v0.28.1
- k8s.io/metrics v0.28.1
- sigs.k8s.io/controller-runtime v0.16.1
- sigs.k8s.io/controller-tools v0.13.0

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
2023-09-23 09:10:51 +05:30
AmborandGitHub 1cbc0ba9ff fix: passthrough the build log error (#2795)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-05-18 13:47:54 +05:30
f99f10134c Executor: Dump function service cache for pool manager functions (#2789)
* dump function service cache for executor
* fix lint issue
* code refactor and lint fixes

---------

Signed-off-by: Shubham Bansal <shubhambansaliimtgn@gmail.com>
Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Sanket Sudake <sanketsudake@gmail.com>
2023-05-12 09:49:54 +05:30
6c431e4d9b Ensure handling for specialization failure in pool manager (#2788)
* Add fixes for failure in specialization
* reduce specialization in progress and remove expired requests from queue when specialization is timed out
* rename markSpecializationFailure and remove logger from the queue
* refactor clean up code in api.go and add test case for queue

Details:

- Cleanup svc waiting for the counter in the pool manager if specialization fails
- Cleanup active requests counter in pool manager if client exists the demand for function service while we have allocated function service
- Consider specialization timeout if pod ready timeout > specialization timeout in waiting for ready pod. We also consider if the request to choosePod is cancelled.
- We ensure if we have requests waiting for service requests but if there is no pod in the specialization we clean up those.
---------

Signed-off-by: Sanket Sudake <sanketsudake@gmail.com>
Co-authored-by: Pranoy Kundu <pranoy1998k@gmail.com>
2023-05-11 21:03:57 +05:30
31c81e132e fix: lose cold start error counter for the poolmgr functions (#2755)
* fix: lose cold start error counter for the poolmgr functions

Co-authored-by: ZhengHe-MD <ranchardzheng@gmail.com>
Co-authored-by: gw123 <iamakillerforyou@gmail.com>
Signed-off-by: saltbo <saltbo@foxmail.com>

* fix: miss code for the metric

Signed-off-by: saltbo <saltbo@foxmail.com>

---------

Signed-off-by: saltbo <saltbo@foxmail.com>
Co-authored-by: ZhengHe-MD <ranchardzheng@gmail.com>
Co-authored-by: gw123 <iamakillerforyou@gmail.com>
2023-05-09 12:37:58 +05:30
Nikhil SharmaandGitHub a5f3402dbc add functionality to update spec of fission custom resources (#2701)
Signed-off-by: Nikhil Sharma <nikhilsharma230303@gmail.com>
2023-05-08 13:36:05 +05:30
AmborandGitHub 784bd82ec7 fix: panic for the builder/client (#2780)
Signed-off-by: saltbo <saltbo@foxmail.com>
2023-04-13 10:40:45 +05:30