Skip to content

CEXT-6498: publishEvent: uninstall does not clear stored event/provider data - #592

Merged
jcuerdo merged 8 commits into
mainfrom
CEXT-6498/events-storage-uninstall-cleanup
Jul 24, 2026
Merged

CEXT-6498: publishEvent: uninstall does not clear stored event/provider data#592
jcuerdo merged 8 commits into
mainfrom
CEXT-6498/events-storage-uninstall-cleanup

Conversation

@jcuerdo

@jcuerdo jcuerdo commented Jul 23, 2026

Copy link
Copy Markdown
Collaborator

Description

publishEvent (added in aio-commerce-sdk PR #561, package @adobe/aio-commerce-lib-app) resolves an event's I/O Events provider ID and event code by reading data written to system config storage under the key EVENTS_STORAGE_KEY (="events") at install time. This storage is never cleared or updated during uninstall, so a stale, already-deleted providerId can remain in storage and cause publishEvent to fail after uninstall.

Test

Tested with: https://development-271530-956ochrerattlesnake-cext6498.adobeioruntime.net/api/v1/web/my-package/emit-event

After install:
image
After uninstall:
image

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

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 Jul 23, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: b6ea926

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

This PR includes changesets to release 1 package
Name Type
@adobe/aio-commerce-lib-app 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-app Includes changes in `packages/aio-commerce-lib-app` labels Jul 23, 2026

@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.

This would work, but I wonder if it's just not easier to delete the whole events system config on uninstall instead of per-provider.

@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.

Approving with nitpicks. Would be great if fixed, but not blockers

Comment thread packages/aio-commerce-lib-app/source/management/installation/events/external.ts Outdated
@jcuerdo
jcuerdo merged commit 14f285f into main Jul 24, 2026
5 checks passed
@jcuerdo
jcuerdo deleted the CEXT-6498/events-storage-uninstall-cleanup branch July 24, 2026 09:19
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` with-changeset The PR contains a Changeset file.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants