This is broken out from #1381
Problem
There is currently no specification for how a behaved importer should be written.
Persona:
Event producer and System Integrator
Exit Criteria
-
Agreed upon importer specification and documentation
-
Conformance test so importers can be tested for their level of conformance
Time Estimate (optional):
5d
Additional context (optional)
This is part of the overall design proposal for issue #1381 and the following is a necessary part of that, assuming the overall design moves forward.
The primary design point here is introducing the concept of importers identifying themselves. We introduce a CloudEvents extension attribute called sourceid that allows for events to be filtered based on this attribute if present. This is needed to disambiguate between importers of events that might be connected to the same upstream producer.
The convention here is that a well-behaved importer will populate the sourceid attribute with the metadata.uid value for the object that a trigger writer would select on. This could be the importer itself, or could be a knative service. It is important to note that objects may need to coordinate.
The GCSSource actually creates a Cloud PubSub importer to bring the events into the broker. The PubSub importer should use the uid of the GCSSource since that is what the user will be configuring against.
This introduces a new data plane contract for importers. When going through an event mesh, this is unavoidable if we wish to support the FaaS scenarios as defined in #1381 . This solution makes it very important for an importer author, but it is also optional. Not all importers / event producers will have to implement the sourceid contract, but failing to do so, prevents the FaaS scenario.
Conformance tests should make it clear to a user if the importer they are using supports the sourceid contract or not.
This is broken out from #1381
Problem
There is currently no specification for how a behaved importer should be written.
Persona:
Event producer and System Integrator
Exit Criteria
Agreed upon importer specification and documentation
Conformance test so importers can be tested for their level of conformance
Time Estimate (optional):
5d
Additional context (optional)
This is part of the overall design proposal for issue #1381 and the following is a necessary part of that, assuming the overall design moves forward.
The primary design point here is introducing the concept of importers identifying themselves. We introduce a CloudEvents extension attribute called
sourceidthat allows for events to be filtered based on this attribute if present. This is needed to disambiguate between importers of events that might be connected to the same upstream producer.The convention here is that a well-behaved importer will populate the
sourceidattribute with themetadata.uidvalue for the object that a trigger writer would select on. This could be the importer itself, or could be a knative service. It is important to note that objects may need to coordinate.The GCSSource actually creates a Cloud PubSub importer to bring the events into the broker. The PubSub importer should use the
uidof the GCSSource since that is what the user will be configuring against.This introduces a new data plane contract for importers. When going through an event mesh, this is unavoidable if we wish to support the FaaS scenarios as defined in #1381 . This solution makes it very important for an importer author, but it is also optional. Not all importers / event producers will have to implement the
sourceidcontract, but failing to do so, prevents the FaaS scenario.Conformance tests should make it clear to a user if the importer they are using supports the
sourceidcontract or not.