knative / eventing

Event-driven application platform for Kubernetes
https://knative.dev/docs/eventing
Apache License 2.0
1.42k stars 599 forks source link

Eventtype has SOURCE attr as optional #7314

Closed matzew closed 8 months ago

matzew commented 1 year ago

Describe the bug The EventTypeSpec has the source as optional:

    // Source is a URI, it represents the CloudEvents source.
    // +optional
    Source *apis.URL `json:"source,omitempty"`

But since this represents metadata of the CloudEvent spec, this is wrong, since the spec demands a source attribute to be there:

Constraints:

  • REQUIRED
  • MUST be a non-empty URI-reference
  • An absolute URI is RECOMMENDED
  • A clear and concise description of what the bug is.

Expected behavior

I'd expect it is not optional

Additional context

Wit the planned changes to be more CloudEvent spec matching, let's change this behavior. Related issue: https://github.com/knative/eventing/issues/7265

karthikmurali60 commented 1 year ago

/assign

karthikmurali60 commented 1 year ago

@matzew I would like to solve this issue, can I start work on this ?

Cali0707 commented 1 year ago

@karthikmurali60 I'd start here: https://github.com/knative/eventing/blob/16d75a9807031432828cba975fe77b9f9cb7a45f/pkg/apis/eventing/v1beta2/eventtype_types.go#L67-L69

However, this will likely be a change in v1beta3, not an update to the existing v1beta2, right @matzew ?

github-actions[bot] commented 10 months ago

This issue is stale because it has been open for 90 days with no activity. It will automatically close after 30 more days of inactivity. Reopen the issue with /reopen. Mark the issue as fresh by adding the comment /remove-lifecycle stale.

pierDipi commented 8 months ago

This will be fixed as part of v1beta3 #7265