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

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

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

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 (1f69bc7).
⚠️ Report is 4 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    25645     +214     
==========================================
+ Hits        13119    13200      +81     
- Misses      11509    11632     +123     
- Partials      803      813      +10     

☔ 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 <[email protected]>
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

}
}

func (ks *AESKeyStore) processKeyFile(path string) {
Copy link
Member

@matzew matzew Sep 4, 2025

Choose a reason for hiding this comment

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

these are called by the goroutine. Should the handleEvent be atomic to prevent races when processing filesystem calls?

- 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?

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. 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