Repository navigation
Conversation
|
Skipping CI for Draft Pull Request. |
|
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: aliok The full list of commands accepted by this bot can be found here. The pull request process is described here DetailsNeeds approval from an approver in each of these files:
Approvers can indicate their approval by writing |
aliok
force-pushed
the
test-kafka-quarkus-delivery
branch
from
October 30, 2026 12:58
e4a22b6 to
66a8867
Compare
Mirror the Python delivery test for Quarkus/Java, proving a plain Funqy cloudevents function receives Kafka records through the injected runtime sidecar as CloudEvents over HTTP, with no Kafka code in the function itself. Quarkus binds event data by type, unlike Python's untyped get_data(), so the handler fixture declares two @FunQ methods routed by CloudEvent type and the test exercises both shapes the sidecar emits: a plain record wrapped as dev.knative.kafka.event with octet-stream data (bound as raw bytes), and a record carrying ce_* headers with a JSON body (passed through and bound to the Input POJO). Each echoes its payload so a unique per-shape token can be asserted in the function log, and the consumer group must drain to lag 0. The handler, its application.properties (dropping the single-function export so the two methods route by type), and a placeholder unit test (keeping src/test compiling after the handler swap) live as committed fixtures. Deploy forces the pack builder since the host builder does not support Quarkus, and the timeout is widened for the Maven build.
Same fix as the Python delivery test: func create derives the function name from the directory basename, and t.TempDir()'s numeric leaf is not a valid function name. Nest the function in a validly named subdirectory.
The Quarkus delivery test deploys through func into the slim Kafka integration cluster, which skips serving and so has no Contour ingress; registry.localtest.me is therefore unreachable for the host-side push. Push to localhost:5001 instead, matching the serving-less registry mapping that hack/cluster.sh now sets up (host port 5001 -> the node's registry, chosen over 5000 to dodge the macOS AirPlay receiver). This branch is stacked on that cluster.sh change; rebase onto main once it lands.
aliok
force-pushed
the
test-kafka-quarkus-delivery
branch
from
October 30, 2026 14:03
66a8867 to
3e157bc
Compare
aliok
marked this pull request as ready for review
October 30, 2026 14:03
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Changes
cloudeventsfunction, built and deployed throughfuncon the keda deployer, receives Kafka records via the injected sidecar as CloudEvents over HTTP — the function itself contains no Kafka code.@Funqmethods routed by CloudEvent type, and the test produces two records: a plain record (wrapped by the sidecar asdev.knative.kafka.eventwithapplication/octet-streamdata, bound as raw bytes) and a record carryingce_*headers with a JSON body (passed through and bound to the typedInputPOJO). Each echoes its payload so a unique per-shape token can be asserted in the function log, and the consumer group must drain to lag 0.This mirrors the Python delivery test (#4111) and reuses its helpers. The handler, its
application.properties(dropping the single-function export so the two methods route by type), and a placeholder unit test (keepingsrc/testcompiling after the handler swap) live as committed fixtures underpkg/keda/testdata/kafka_quarkus_delivery. Deploy forces thepackbuilder since thehostbuilder does not support Quarkus, and the timeout is widened for the Maven build. No template or runtime changes are needed; the stockquarkus/cloudeventstemplate is already a plain CloudEvents-over-HTTP receiver.It runs against the same Strimzi broker the Kafka integration job already provisions and is picked up by the existing
test-integration-kafkatarget, so no CI changes are needed./kind enhancement
Fixes #
Release Note
Docs