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

Add EventTransform Jsonata reconciler and CRD #8456

Merged
merged 7 commits into from
Feb 12, 2025

Conversation

pierDipi
Copy link
Member

@pierDipi pierDipi commented Feb 12, 2025

Related to:

Proposed Changes

  • Add EventTransform CRD
  • Add EventTransform Jsonata reconciler

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

Add EventTransform API CRD.

Docs

Signed-off-by: Pierangelo Di Pilato <[email protected]>
Signed-off-by: Pierangelo Di Pilato <[email protected]>
Signed-off-by: Pierangelo Di Pilato <[email protected]>
@knative-prow knative-prow bot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Feb 12, 2025
@knative-prow knative-prow bot requested review from creydr and Leo6Leo February 12, 2025 09:46
@knative-prow knative-prow bot added the size/XL Denotes a PR that changes 500-999 lines, ignoring generated files. label Feb 12, 2025
Copy link

codecov bot commented Feb 12, 2025

Codecov Report

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

Project coverage is 63.00%. Comparing base (a228d2b) to head (27fe8da).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
pkg/reconciler/eventtransform/eventtransform.go 0.00% 147 Missing ⚠️
pkg/reconciler/eventtransform/resources_jsonata.go 0.00% 134 Missing ⚠️
pkg/reconciler/eventtransform/controller.go 0.00% 49 Missing ⚠️
cmd/controller/main.go 0.00% 8 Missing ⚠️
cmd/schema/main.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8456      +/-   ##
==========================================
- Coverage   63.91%   63.00%   -0.91%     
==========================================
  Files         391      394       +3     
  Lines       23543    23882     +339     
==========================================
  Hits        15048    15048              
- Misses       7691     8030     +339     
  Partials      804      804              

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

@@ -49,6 +49,7 @@ func main() {
registry.Register(&flowsv1.Sequence{})
registry.Register(&flowsv1.Parallel{})
registry.Register(&eventingv1alpha1.EventPolicy{})
registry.Register(&eventingv1alpha1.EventTransform{})
Copy link
Member

Choose a reason for hiding this comment

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

was this used to generate the actual CRD?

Asking because other new CRDs (e.g. JobSink or Integration source/sink are missing.
(I can add them in a separate PR)

Copy link
Member Author

Choose a reason for hiding this comment

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

Partially, this is to generate the schema part of the CRD

Copy link
Member Author

Choose a reason for hiding this comment

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

but it's only for bootstrapping it to give an head start

go run ./cmd/schema/ dump EventTransform

Copy link
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 12, 2025
sourceslisters "knative.dev/eventing/pkg/client/listers/sources/v1"
)

type Reconciler struct {
Copy link
Member

Choose a reason for hiding this comment

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

nit: we could include a _test.go file. But can be done on separate PR

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, I'll follow up with unit and e2e tests

@@ -0,0 +1,176 @@
package eventtransform
Copy link
Member

Choose a reason for hiding this comment

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

nit: we could license header? and perhaps stash that file in a separate resources folder? Like others do?

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

Signed-off-by: Pierangelo Di Pilato <[email protected]>
Signed-off-by: Pierangelo Di Pilato <[email protected]>
@knative-prow knative-prow bot removed the lgtm Indicates that a PR is ready to be merged. label Feb 12, 2025
Signed-off-by: Pierangelo Di Pilato <[email protected]>
Signed-off-by: Pierangelo Di Pilato <[email protected]>
@pierDipi pierDipi requested a review from matzew February 12, 2025 13:24
Copy link
Member

@matzew matzew left a comment

Choose a reason for hiding this comment

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

/lgtm
/approve

@knative-prow knative-prow bot added the lgtm Indicates that a PR is ready to be merged. label Feb 12, 2025
Copy link

knative-prow bot commented Feb 12, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: matzew, pierDipi

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

@pierDipi
Copy link
Member Author

/test reconciler-tests

@knative-prow knative-prow bot merged commit 779992f into knative:main Feb 12, 2025
35 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/XL Denotes a PR that changes 500-999 lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants