Skip to content
This repository was archived by the owner on Dec 11, 2023. It is now read-only.
This repository was archived by the owner on Dec 11, 2023. It is now read-only.

Transformed CE type can lead to unexpected trigger filters when using --source #218

@jmcx

Description

@jmcx

If I use a JSON transformation to customise the value of the CE type using stored variables, as such:

context:
- operation: add
  paths:
  - key: type
    value: $region-$category
data:
- operation: store
  paths:
  - key: $region
    value: region
  - key: $category
    value: category

And create this component, where orders-source is a kafka source (not relevant):

tmctl create transformation --name transform-extract-region-category -f orders-add-region-category.yaml --source orders-source

This creates a component which in tmctl describe shows eventType as $region-$category which is actually cool because I know this is going to be a dynamic event type:

transform-extract-region-category $region-$category online(http://localhost:56877)

BUT if I then use this transformation as a source, e.g. in a new transformation:

tmctl create transformation -f orders-eu-formatting.yaml --source transform-extract-region-category

Then this uses the variable expression as part of the filter in the Trigger, e.g. as shown here in the tmctl describe output and in the Trigger CRD:

order-router-trigger-e8079841 order-router-transformation type is $region-$category

filters:
        - exact:
            type: $region-$category

This filter does not do what I'm expecting it to

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions