Skip to content

pubsub: Remove cloudevents dependency#707

Merged
nuclearcat merged 1 commit into
kernelci:mainfrom
nuclearcat:remove-cloudevents
Jul 18, 2026
Merged

pubsub: Remove cloudevents dependency#707
nuclearcat merged 1 commit into
kernelci:mainfrom
nuclearcat:remove-cloudevents

Conversation

@nuclearcat

Copy link
Copy Markdown
Member

The pinned cloudevents 2.0.0 no longer provides the cloudevents.http module, so api/pubsub.py and api/pubsub_mongo.py fail to import and the API cannot start. Instead of migrating to the new cloudevents v2 API, drop the library: it was only used to fill in the "id", "time" and "specversion" attributes and serialize the event to JSON.

Add a small to_cloudevent_json() helper that emits the exact same CloudEvents 1.0 JSON envelope (verified byte-identical against cloudevents 1.12.1 output for dict data, string data and extension attributes such as "owner"), so the wire format consumed by external subscribers is unchanged.

The pinned cloudevents 2.0.0 no longer provides the cloudevents.http
module, so api/pubsub.py and api/pubsub_mongo.py fail to import and
the API cannot start. Instead of migrating to the new cloudevents v2
API, drop the library: it was only used to fill in the "id", "time"
and "specversion" attributes and serialize the event to JSON.

Add a small to_cloudevent_json() helper that emits the exact same
CloudEvents 1.0 JSON envelope (verified byte-identical against
cloudevents 1.12.1 output for dict data, string data and extension
attributes such as "owner"), so the wire format consumed by external
subscribers is unchanged.

Signed-off-by: Denys Fedoryshchenko <denys.f@collabora.com>
@nuclearcat
nuclearcat added this pull request to the merge queue Jul 18, 2026
Merged via the queue into kernelci:main with commit 2439e4c Jul 18, 2026
3 checks passed
@nuclearcat
nuclearcat deleted the remove-cloudevents branch July 18, 2026 11:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant