This is an automated email from the ASF dual-hosted git repository.

yasithdev pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/airavata-custos.git


The following commit(s) were added to refs/heads/master by this push:
     new 3ccd251d2 Document event rename migrations (#693)
3ccd251d2 is described below

commit 3ccd251d25d48333f00b181a6163f92ce1f55fbd
Author: Yasith Jayawardana <[email protected]>
AuthorDate: Wed Nov 11 02:13:33 2026 -0500

    Document event rename migrations (#693)
---
 docs/architecture.md                     | 10 ++++++++++
 docs/contributing/writing-a-connector.md |  1 +
 2 files changed, 11 insertions(+)

diff --git a/docs/architecture.md b/docs/architecture.md
index 2ee1497c8..2c90573a0 100644
--- a/docs/architecture.md
+++ b/docs/architecture.md
@@ -176,6 +176,16 @@ event published while a connector is not loaded gets a 
delivery row and waits fo
 | Attempts | 10 |
 | Fail without retry | The handler's error wraps `events.ErrPermanent` |
 
+Event names are stored in `event_subscriptions` and `events`. Renaming an 
`EventType` therefore needs a core
+migration that renames both. Without it, pending deliveries under the old name 
find no handler and stay due. Once
+they reach the batch size, they block newer deliveries. A subscriber not 
loaded at that start keeps its old-name
+subscription, so it gets no deliveries of the new name.
+
+```sql
+UPDATE event_subscriptions SET event_type = 'user::remove' WHERE event_type = 
'user::delete';
+UPDATE events SET event_type = 'user::remove' WHERE event_type = 
'user::delete';
+```
+
 Handlers must be safe to run more than once for the same event. The bus worker 
writes an `audit_events` row for each
 delivery attempt, under the event's trace. Four endpoints expose the bus:
 
diff --git a/docs/contributing/writing-a-connector.md 
b/docs/contributing/writing-a-connector.md
index e63d0f558..64a7e8ab1 100644
--- a/docs/contributing/writing-a-connector.md
+++ b/docs/contributing/writing-a-connector.md
@@ -351,6 +351,7 @@ Nothing is lost when the server restarts or a handler fails.
 Event types are typed constants in `pkg/events/types.go`, such as 
`UserCreateEvent` (`user::create`). Each entity
 has a file of typed subscribe helpers, for example `user_subscribe.go` and 
`compute_cluster_user_subscribe.go`.
 The helpers, such as `SubscribeUserCreated` and 
`SubscribeComputeClusterUserApproved`, decode the payload for you.
+Renaming an event needs a migration of its stored name ([event 
bus](../architecture.md#event-bus)).
 
 **Subscribing.** Register inside `LoadConnector`, under your connector's`Type` 
name. 
 The bus saves the subscription under that name, so it has to be the same on 
every start.

Reply via email to