Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add wasm filter-chain entity support #987

Merged
merged 11 commits into from
Jun 14, 2024
Merged

feat: add wasm filter-chain entity support #987

merged 11 commits into from
Jun 14, 2024

Conversation

hishamhm
Copy link
Collaborator

@hishamhm hishamhm commented Jul 28, 2023

This brings support for wasm filter chains to deck.

Most of the groundwork for this was laid in the other repos:

Wasm filters were added in 3.4 and are an optional feature. Feature detection in deck works by fetching the root admin API endpoint and inspecting the configuration to see if wasm is enabled (this works for versions <3.4 and versions >=3.4 with wasm disabled). Feature detection does not run in Konnect mode; therefore Konnect is not yet supported, only Kong gateway OSS/EE EDIT: Feature detection works by calling GET /filter-chains and inspecting the response code (link).

For the sake of keeping things reasonable in size (we're at >3k new lines of code if you include the other 2 PRs), there are some validation steps that have been left out:

  • validating filter chain names against those that the admin API tells us are installed/available
  • validating filter configurations against the JSON schema from the admin API

These things are of course still validated by the Kong admin API, but at a later date it will be possible to validate them client-side for better UX.


KAG-4005
KOKO-1275

@CLAassistant
Copy link

CLAassistant commented Mar 14, 2024

CLA assistant check
All committers have signed the CLA.

@flrgh flrgh force-pushed the feat/filter-chains branch 2 times, most recently from a84e1ea to f9c3ca5 Compare March 20, 2024 01:52
@flrgh
Copy link
Contributor

flrgh commented Mar 20, 2024

See also: Kong/go-database-reconciler#72

@flrgh flrgh force-pushed the feat/filter-chains branch 2 times, most recently from fc9da65 to 071d975 Compare May 13, 2024 21:53
@flrgh
Copy link
Contributor

flrgh commented May 13, 2024

Kong/go-database-reconciler#72 has been merged. Awaiting the merge of Kong/go-database-reconciler#90 and for a new release of go-database-reconciler now.

Edit: both of these are done.

@flrgh flrgh changed the title feat: WebAssembly filter chains, coming in Kong Gateway 3.4 feat: add wasm filter-chain entity support May 13, 2024
@flrgh flrgh self-assigned this May 13, 2024
@flrgh flrgh force-pushed the feat/filter-chains branch 4 times, most recently from 907e29f to b6dbadd Compare May 14, 2024 20:53
cmd/common.go Outdated Show resolved Hide resolved
@flrgh flrgh force-pushed the feat/filter-chains branch 2 times, most recently from f88707c to 9f2c566 Compare May 20, 2024 20:51
@flrgh flrgh marked this pull request as ready for review May 21, 2024 20:58
@flrgh flrgh requested a review from a team May 21, 2024 20:58
@flrgh
Copy link
Contributor

flrgh commented May 21, 2024

re: CI Test / test (pull_request) Failing after 4m, this is due to us getting ratelimited by Codecov:

[2024-05-21T16:04:17.142Z] ['error'] There was an error running the uploader: Error uploading to https://codecov.io: Error: There was an error fetching the storage URL during POST: 429 - {'detail': ErrorDetail(string='Rate limit reached. Please upload with the Codecov repository upload token to resolve issue. Expected time to availability: 2452s.', code='throttled')}
Error: Codecov: Failed to properly upload: The process '/home/runner/work/_actions/codecov/codecov-action/v3/dist/codecov' failed with exit code 255

@flrgh flrgh requested review from rainest and GGabriele May 21, 2024 21:27
go.mod Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented May 28, 2024

Codecov Report

Attention: Patch coverage is 0% with 6 lines in your changes missing coverage. Please review.

Project coverage is 22.39%. Comparing base (526baa3) to head (f3b6505).

Files Patch % Lines
cmd/gateway_validate.go 0.00% 2 Missing ⚠️
validate/validate.go 0.00% 2 Missing ⚠️
cmd/common.go 0.00% 1 Missing ⚠️
tests/integration/test_utils.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #987      +/-   ##
==========================================
- Coverage   22.49%   22.39%   -0.10%     
==========================================
  Files          54       54              
  Lines        4508     4514       +6     
==========================================
- Hits         1014     1011       -3     
- Misses       3395     3403       +8     
- Partials       99      100       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@flrgh
Copy link
Contributor

flrgh commented Jun 3, 2024

👋 @GGabriele do you think you could review or help source a reviewer for this PR?

cmd/common.go Outdated Show resolved Hide resolved
Copy link
Collaborator

@GGabriele GGabriele left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we please add some integration tests too?

@flrgh
Copy link
Contributor

flrgh commented Jun 11, 2024

Okay, found another wart in testing. PR for fixage his here:
Kong/go-database-reconciler#103

.ci/lib.sh Show resolved Hide resolved
@flrgh
Copy link
Contributor

flrgh commented Jun 12, 2024

Okay, Kong/go-database-reconciler#101 has been merged, but we're blocked on getting a version bump.

I've also submitted a semi-related bugfix PR to gdr (link). I think it would be wise to merge this before the version bump so that it is included with filter chain support from the get-go.

@flrgh
Copy link
Contributor

flrgh commented Jun 12, 2024

@GGabriele sorry for the turnaround time. This is ready for another round of review. Let me know what you think of the integration tests--anything else that you think would particularly benefit from more coverage?

@GGabriele
Copy link
Collaborator

@flrgh a new version of go-database-reconciler has been released now.

@flrgh
Copy link
Contributor

flrgh commented Jun 13, 2024

@flrgh a new version of go-database-reconciler has been released now.

@GGabriele Awesome! Bumped and added test coverage.

@flrgh flrgh merged commit f15a894 into main Jun 14, 2024
41 checks passed
@flrgh flrgh deleted the feat/filter-chains branch June 14, 2024 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants