knative / knative/eventing

Event Lineage: Create Transform Function for Suffix Filter

Open
#7,687 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

kind/feature-request triage/accepted
Dominant language
Go
Stars
1.6k
Forks
631
Avg merge
3d 13h
Merged PRs (30d)
6

Description

Problem
Transform functions are how we track changes to eventtypes as events flow through the system. To support the suffix filter, we should implement a transform function to represent how a given eventtype becomes "narrower" as it passes the filter. Specifically, this transform function should (for each attribute set in the suffix filter):

  1. Check if the attribute is already set. If it is and does not have the expected prefix from the filter, return a nil eventtype to model no events passing this filter
  2. If the attribute is not already set, set it to the value expected by the filter, along with an empty variable for the prefix {x}.
  3. If the attribute is compatible with the value required by the filter, but the filter provides more information, update the value to include the filter value. For example, if the value is currently {x}bc, where {x} is a variable, and the suffix filter is abc, then we can update the value to be {x}abc. Similarly, if the current value is abc{x}, and the suffix filter is de, then we can update the value to be abc{x}de.
  4. If the prefix matches the value, but provides no new information, do not change anything. For example, if the value is abc, and the suffix is bc, then there is no need to make any change

Persona:
Which persona is this feature for?

Exit Criteria
A measurable (binary) test that would indicate that the problem has been resolved.

Time Estimate (optional):
How many developer-days do you think this may take to resolve?

Additional context (optional)
Add any other context about the feature request here.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

No file or test is named; begin by locating the event-lineage transform functions and the suffix-filter implementation in the Go repository. Compare existing transform behavior with the four cases in the issue, then add coverage showing compatible attributes are narrowed correctly and incompatible attributes produce no event type.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
backend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.