CEXT-6506: Execute Event Configurations Changes During Application Upgrade - #625
Conversation
🦋 Changeset detectedLatest commit: 335f4cf The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
# Conflicts: # packages/aio-commerce-lib-app/test/unit/management/domains/events/apply.test.ts
iivvaannxx
left a comment
There was a problem hiding this comment.
LGTM for subscriptions, but what about updates to labels/descriptions that drive data of registrations/metadata and providers?
…grade - refactor tests
Co-authored-by: Ivan Porto Wigner <iporto@adobe.com>
…grade - code review
For now, I would leave as it is as there is no proper API to update it. We can discuss it with @danperezAdobe and decide if we want to recreate everything if the label/description changed. If yes, I will do it in the separate PR |
|
@oshmyheliuk The |
Added |
Description
Reconciles in-place configuration changes to existing Commerce event subscriptions during an app upgrade. Previously the events diff matched subscriptions only by event name and emitted
add/remove— an event in both baseline and target was never re-examined, so editing itsfields/rules/priority/hipaa_audit_requiredand redeploying silently drifted the live subscription from config.@adobe/aio-commerce-lib-events: newupdateEventSubscriptionclient method wrapping the CommercePUT eventing/eventSubscribe/:name(merge) endpoint.@adobe/aio-commerce-lib-app: the upgrade now detects subscription config changes (order-insensitive, normalized), emits a first-classupdateplan op, and applies them two-tier — additive/same-key changes in place via the merge endpoint; changes that remove or re-key a field/rule via unsubscribe→resubscribe (the registration survives, re-linking by event code). A failed update fails the upgrade step rather than drifting silently.Related Issue
CEXT-6506. Stacked on CEXT-6505 (event add/remove during upgrade).
Types of changes
Checklist: