Skip to content

Conversation

@Cali0707
Copy link
Member

@Cali0707 Cali0707 commented Sep 3, 2025

This adds the request reply data plane and associated k8s config to run it. The control plane is responsible for:

  1. Setting up triggers back to each pod (using the CESQL filter defined here)
  2. Setting the AES keys in the mounted secret so that the data plane can sign the correlation ids

Note: TLS/Authn/Authz/observability are out of scope for this first pass implementation. I will work to add these as follow ups

Proposed Changes

  • Update CESQL function for verifying correlation ids
  • Add file watcher to keep track of AES keys
  • Add main.go file to be the data plane entry point

Pre-review Checklist

  • At least 80% unit test coverage
  • E2E tests for any new behavior
  • Docs PR for any user-facing impact
  • Spec PR for any new API feature
  • Conformance test for any change to the spec

Release Note

feat: Added complete request reply data plane

Docs

Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
@knative-prow
Copy link

knative-prow bot commented Sep 3, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Cali0707

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@knative-prow knative-prow bot added approved Indicates a PR has been approved by an approver from all required OWNERS files. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. labels Sep 3, 2025
@Cali0707
Copy link
Member Author

Cali0707 commented Sep 3, 2025

/cc @matzew @creydr

Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
@codecov
Copy link

codecov bot commented Sep 3, 2025

Codecov Report

❌ Patch coverage is 49.16388% with 152 lines in your changes missing coverage. Please review.
✅ Project coverage is 51.47%. Comparing base (54ff928) to head (fa42e46).
⚠️ Report is 13 commits behind head on main.

Files with missing lines Patch % Lines
cmd/requestreply/main.go 0.00% 87 Missing ⚠️
pkg/requestreply/key_store.go 73.71% 30 Missing and 11 partials ⚠️
pkg/requestreply/cesql.go 65.62% 8 Missing and 3 partials ⚠️
pkg/requestreply/ingress_handler.go 45.00% 9 Missing and 2 partials ⚠️
pkg/requestreply/correlation_id.go 50.00% 1 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8699      +/-   ##
==========================================
- Coverage   51.58%   51.47%   -0.12%     
==========================================
  Files         401      403       +2     
  Lines       25431    25660     +229     
==========================================
+ Hits        13119    13208      +89     
- Misses      11509    11638     +129     
- Partials      803      814      +11     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Signed-off-by: Calum Murray <cmurray@redhat.com>
logger.Warnf("failed to get secret %s in namespace %s: %s", secretName.(string), namespace, err.Error())
continue
}
replyId, name, namespace, secretName, podIdx, replicaCount := args[0].(string), args[1].(string), args[2].(string), args[3].(string), args[4].(int32), args[5].(int32)
Copy link
Member

Choose a reason for hiding this comment

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

The comment above says correlationId. In your gist/example I saw both in the response: ce-replyid and ce-correlationid.

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point - it is worth clarifying this. The idea is that users will set the correlationid for all cloudevents associated with a request, and only set the replyid on the final event for the request (the one that should be treated as the "reply")

I think I was calling it correlationid here since technically this CESQL is generic, and at runtime this variable has the value of the extension attribute. Happy to align to either all correlationid or all replyid

- eventing.knative.dev
resources:
- requestreplies
- requestreplies/status
Copy link
Member

Choose a reason for hiding this comment

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

should we add a separate one for finalizers and patch/update - like other roles?

Copy link
Member Author

Choose a reason for hiding this comment

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

I don't think so? We only need this for the data plane to be able to see which resources exist/we should be handling - we don't touch the finalizers in this code afaik

Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

Cali0707 commented Sep 9, 2025

/cc @matzew @creydr

Could you take another look?

@knative-prow knative-prow bot requested review from creydr and matzew September 9, 2025 18:14
@creydr
Copy link
Member

creydr commented Sep 10, 2025

/test upgrade-tests

Co-authored-by: Christoph Stäbler <cstabler@redhat.com>
Signed-off-by: Calum Murray <cmurray@redhat.com>
@Cali0707
Copy link
Member Author

/cc @creydr

@knative-prow knative-prow bot requested a review from creydr September 10, 2025 12:34
@creydr
Copy link
Member

creydr commented Sep 10, 2025

/test reconciler-tests

Copy link
Member

@creydr creydr left a comment

Choose a reason for hiding this comment

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

/lgtm

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Sep 10, 2025
@knative-prow knative-prow bot merged commit d5e9973 into knative:main Sep 10, 2025
34 of 36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants