Skip to content

CEXT-6506: Execute Event Configurations Changes During Application Upgrade - #625

Merged
oshmyheliuk merged 21 commits into
mainfrom
CEXT-6506
Aug 20, 2026
Merged

CEXT-6506: Execute Event Configurations Changes During Application Upgrade#625
oshmyheliuk merged 21 commits into
mainfrom
CEXT-6506

Conversation

@oshmyheliuk

Copy link
Copy Markdown
Collaborator

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 its fields/rules/priority/hipaa_audit_required and redeploying silently drifted the live subscription from config.

  • @adobe/aio-commerce-lib-events: new updateEventSubscription client method wrapping the Commerce PUT eventing/eventSubscribe/:name (merge) endpoint.
  • @adobe/aio-commerce-lib-app: the upgrade now detects subscription config changes (order-insensitive, normalized), emits a first-class update plan 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

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have read the DEVELOPMENT document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@changeset-bot

changeset-bot Bot commented Aug 12, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 335f4cf

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 3 packages
Name Type
@adobe/aio-commerce-lib-events Minor
@adobe/aio-commerce-lib-app Minor
@adobe/aio-commerce-sdk Patch

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

@github-actions github-actions Bot added with-changeset The PR contains a Changeset file. pkg: aio-commerce-lib-events Includes changes in `packages/aio-commerce-lib-events` pkg: aio-commerce-lib-app Includes changes in `packages/aio-commerce-lib-app` labels Aug 12, 2026
# Conflicts:
#	packages/aio-commerce-lib-app/test/unit/management/domains/events/apply.test.ts

@iivvaannxx iivvaannxx left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM for subscriptions, but what about updates to labels/descriptions that drive data of registrations/metadata and providers?

Comment thread .changeset/commerce-update-event-subscription.md Outdated
Comment thread .changeset/eventing-subscription-config-updates.md Outdated
Comment thread packages/aio-commerce-lib-app/source/management/domains/events/apply.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/domains/events/apply.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/domains/events/utils.ts Outdated
Base automatically changed from CEXT-6505-2 to main August 19, 2026 14:57
@oshmyheliuk

Copy link
Copy Markdown
Collaborator Author

LGTM for subscriptions, but what about updates to labels/descriptions that drive data of registrations/metadata and providers?

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
oshmyheliuk requested a review from iivvaannxx August 19, 2026 19:21
Comment thread packages/aio-commerce-lib-app/source/management/domains/events/apply.ts Outdated
@iivvaannxx

Copy link
Copy Markdown
Collaborator

@oshmyheliuk The eventing parent branch does not define meta.upgrade. This will crash at runtime when executing the tree, you should add it.

@oshmyheliuk

Copy link
Copy Markdown
Collaborator Author

@oshmyheliuk The eventing parent branch does not define meta.upgrade. This will crash at runtime when executing the tree, you should add it.

Added

@oshmyheliuk
oshmyheliuk merged commit e0852d1 into main Aug 20, 2026
5 checks passed
@oshmyheliuk
oshmyheliuk deleted the CEXT-6506 branch August 20, 2026 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pkg: aio-commerce-lib-app Includes changes in `packages/aio-commerce-lib-app` pkg: aio-commerce-lib-events Includes changes in `packages/aio-commerce-lib-events` with-changeset The PR contains a Changeset file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants