Skip to content

CEXT-6527: add upgrade type surface and optional leaf-step upgrade capability - #614

Merged
iivvaannxx merged 4 commits into
CEXT-6527/extract-shared-workflowfrom
CEXT-6527/upgrade-types
Aug 10, 2026
Merged

CEXT-6527: add upgrade type surface and optional leaf-step upgrade capability#614
iivvaannxx merged 4 commits into
CEXT-6527/extract-shared-workflowfrom
CEXT-6527/upgrade-types

Conversation

@iivvaannxx

@iivvaannxx iivvaannxx commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Description

Adds the upgrade orchestration type surface and folds an optional upgrade capability onto leaf steps:

  • Step-capability types in management/common/workflow/upgrade.ts (UpgradeCapability, UpgradeDomainPlan, UpgradeOperation, UpgradePlanningInput/UpgradePlanningResult, UpgradeExecutionContext/UpgradeExecutionResult, CleanupResource, CleanupIdentityOf, UpgradeIssue).
  • Orchestration models in management/upgrade/ (UpgradePlan, StoredUpgradeAttempt, StateSnapshot, UpgradeOrchestrationState, SuccessfulUpgradeResult, UpgradeRequestContext).
  • LeafStep gains optional planUpgrade/upgrade handlers, authored via the single defineLeafStep helper (no separate step type).
  • Placeholder (TODO) adoption in the webhooks subscriptionsStep, specialized to the webhook domain types.
  • Extracts a shared LifecycleRequestContext (in common/schema.ts) reused by the installation action and UpgradeRequestContext.

Reuses installation's engine 1:1 — UpgradeIssue mirrors ValidationIssue for the planning channel, and a failed attempt's failure reuses WorkflowError. There is no upgrade runtime yet; these are coordination contracts for parallel workstreams.

Related Issue

CEXT-6527

Motivation and Context

Multiple workstreams (domain handlers, the orchestrator, the management UI) need to build against the upgrade lifecycle in parallel. This delivers the type surface plus a first placeholder domain adoption so they can start against a stable, reviewed contract.

Notes for reviewers:

  • The planUpgrade result shape (UpgradePlanningResult) is reconstructed from the HLD and should be confirmed with the orchestrator workstream.
  • The planUpgrade/upgrade pairing is a documented convention (both are optional on LeafStep), not type-enforced.

How Has This Been Tested?

  • pnpm --filter @adobe/aio-commerce-lib-app typecheck — clean.
  • pnpm --filter @adobe/aio-commerce-lib-app test — all pass, including expectTypeOf coordination-contract tests for the upgrade generics.
  • pnpm --filter @adobe/aio-commerce-lib-app build — emits .d.ts for the new public exports.
  • pnpm --filter @adobe/aio-commerce-lib-app lint / lint:openapi — clean.

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 6, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7160797

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 Minor

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

@iivvaannxx
iivvaannxx force-pushed the CEXT-6527/upgrade-types branch from 00ddc66 to e8d5355 Compare August 6, 2026 16:30
@iivvaannxx
iivvaannxx marked this pull request as ready for review August 6, 2026 16:30
@github-actions github-actions Bot added without-changeset The PR does not contain a Changeset file pkg: aio-commerce-lib-app Includes changes in `packages/aio-commerce-lib-app` labels Aug 6, 2026
Comment thread packages/aio-commerce-lib-app/source/management/common/workflow/upgrade.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/upgrade/types.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/upgrade/types.ts Outdated

@obarcelonap obarcelonap left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM but I added many comments on try to do not prefix much with upgrade since at the end at some point we may want to use this interfaces for installation too

Comment thread packages/aio-commerce-lib-app/source/management/common/workflow/step.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/common/workflow/step.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/common/workflow/upgrade.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/common/workflow/upgrade.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/common/workflow/upgrade.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/upgrade/types.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/common/workflow/upgrade.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/common/workflow/upgrade.ts Outdated
Comment thread packages/aio-commerce-lib-app/source/management/common/workflow/upgrade.ts Outdated
@iivvaannxx
iivvaannxx force-pushed the CEXT-6527/upgrade-types branch from e8d5355 to 1812828 Compare August 7, 2026 10:13
@iivvaannxx
iivvaannxx force-pushed the CEXT-6527/upgrade-types branch from 1812828 to dfa0ed2 Compare August 7, 2026 10:14
@iivvaannxx

iivvaannxx commented Aug 7, 2026

Copy link
Copy Markdown
Collaborator Author

@obarcelonap You're right, forgot that we intended to reuse the machinery for installation and uninstallation. I generalized things, please see commit dfa0ed25 (and resolve your comments as you see fit).

…pability

Add the upgrade orchestration types (step capability in common/workflow, orchestration models in upgrade), optional planUpgrade/upgrade handlers on leaf steps authored via defineLeafStep, a placeholder webhooks adoption, and a shared LifecycleRequestContext reused across lifecycle actions.
@iivvaannxx
iivvaannxx force-pushed the CEXT-6527/upgrade-types branch from 1abfd6a to 74fbb7c Compare August 10, 2026 18:33
@github-actions github-actions Bot added with-changeset The PR contains a Changeset file. and removed without-changeset The PR does not contain a Changeset file labels Aug 10, 2026
@iivvaannxx
iivvaannxx merged commit 01d5013 into main Aug 10, 2026
5 checks passed
@iivvaannxx
iivvaannxx deleted the CEXT-6527/upgrade-types branch August 10, 2026 18:57
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.

4 participants