-
Notifications
You must be signed in to change notification settings - Fork 83
Hardcoded "TODO" subject in CloudEvents NATS driver #6250
Copy link
Copy link
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the issue
Summary
In the NATS eventing driver (internal/events/nats/natschannel.go), the subject field for outgoing CloudEvents is currently hardcoded to the literal string "TODO". This field should instead uniquely identify the specific entity (such as a repository, project, or artifact) that the event is about.
Impact
- Event Filtering: NATS JetStream relies on subjects for efficient event routing and filtering. Hardcoding the subject to
"TODO"makes it impossible for consumers to efficiently filter events. - Spec Compliance: It violates the CloudEvents specification, which expects the subject to refer to a specific resource.
To Reproduce
- Open the file
internal/events/nats/natschannel.go. - Locate the
sendEventfunction (around line 203). - Observe line 209:
event.SetSubject("TODO"). - Note the developer comment:
// This *should* represent the entity, but we don't have a standard field for it yet.
What version are you using?
Latest main branch (v0.1.0)
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working