Skip to content

fix(aio-app-deployment): tolerate post-app-deploy upgrade check 403 not-owner - #212

Closed
harshaaligent wants to merge 1 commit into
mainfrom
fix/aio-deploy-tolerate-upgrade-check-not-owner
Closed

harshaaligent wants to merge 1 commit into
mainfrom
fix/aio-deploy-tolerate-upgrade-check-not-owner

Conversation

@harshaaligent

Copy link
Copy Markdown

Problem

Deploys of apps using @adobe/aio-commerce-lib-app fail in CI after the actions have deployed successfully (seen in PolyaireDev/polyaire-appbuilder-apps run 44641431763: order-, account-, catalog- and store-location-management).

The extension's post-app-deploy hook calls GET /v1/workspaces/<id>/extensions on the App Management Service using the current IMS user token. This workflow authenticates with OAuth Server-to-Server (oauth_sts), so the service replies HTTP 403, code not-owner ("Only a user can access workspace resources"). The hook exits 1 and this step fails (pipefail plus the Command failed with exit code grep).

Change

The Deploy step now captures aio app deploy's exit code and passes with a ::warning only when all hold:

  • every Command failed with exit code N: line is matched by a HTTP 403, code not-owner, GET /v1/workspaces/<id>/extensions line, and there is at least one
  • the log contains Deployed N action(s)

Anything else (build errors, other hook failures, failed deploys) still fails with the original exit code and the existing ::error annotation.

Caveats

  • The app-upgrade check does not run in CI, so upgradeMode: auto upgrades are not applied automatically; the warning annotation keeps this visible.
  • Matching is on log text; if Adobe changes the wording the step reverts to failing (safe direction).

Testing

Not yet run. Suggest re-running the failed Staging Deployment jobs in polyaire-appbuilder-apps against this branch.

🤖 Generated with Claude Code

…ot-owner

aio-commerce-lib-app's post-app-deploy hook calls the App Management Service
with a user IMS token. CI uses Server-to-Server credentials, so the service
returns 403 not-owner after the actions have already deployed, failing the job.

Tolerate exactly that failure (every hook failure is a not-owner 403 on
/workspaces/<id>/extensions and actions were deployed) and emit a warning.
Any other failure still fails with the original exit code.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@harshaaligent

Copy link
Copy Markdown
Author

Closing: opened prematurely; change withdrawn.

@harshaaligent
harshaaligent deleted the fix/aio-deploy-tolerate-upgrade-check-not-owner branch November 20, 2026 00:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant