We maintain a Connect app that we migrated to Forge module by module. Until today we had two types of installations:
-
Connect-on-Forge version (new installations and upgrades from Connect)
-
Legacy Connect version (customers that never upgraded to our Connect-on-Forge version);
Our latest major version removed the last Connect artefacts from the manifest (lifecycle, scopes, etc). We kept app.connect.key, as the docs require.
Before:
app:
connect:
key: our-connect-key
remote: connect
authentication: jwt
connectModules:
jira:lifecycle:
- key: lifecycle-events
installed: /lifecycle/install
uninstalled: /lifecycle/uninstall
After:
app:
connect:
key: our-connect-key
modules:
preUninstall:
- key: app-uninstall-trigger
endpoint: app-uninstall-endpoint
No connectModules, no connect.remote, no connect.authentication. The new version also drops the read:connect-jira and write:connect-jira scopes.
What we are observing on upgrades to the latest major version
Sites already on the Connect-on-Forge version → The upgrade sends only avi:forge:upgraded:app. We receive no Connect callback of any kind, even though the previous version declared jira:lifecycle with an uninstalled URL. This is the behaviour we hoped for.
Sites still on the legacy Connect version → We receive the Connect uninstalled lifecycle POST first, then avi:forge:installed:app (not avi:forge:upgraded:app).
Note 1: It’s possible that the uninstall + install combination is result of manual actions, but the fact that we are observing it consistently, and only on the Connect to Forge path, makes it suspicious.
Note 2: Past upgrades from the legacy Connect version to the Connect-on-Forge version didn’t trigger an uninstall.
Problems
-
The
uninstalledhandler on our remote is a destructive operation (meanwhile, we release a temporary fix). -
Between Connect
uninstalledand Forgeavi:forge:installed:app, the app becomes silent (i.e. no Jira events sent to our remote).
Questions
-
Is the behaviour we are observing expected when upgrading a legacy Connect version to a fully adopted Forge version (same app key)?
-
For a site coming from the legacy Connect version, is
avi:forge:installed:appthe expected event, rather thanavi:forge:upgraded:app? -
Assuming we are observing the correct behaviour, is there any signal in the callback payload or the Forge event that lets an app tell a migration apart from a genuine uninstall?
Thanks for any clarification on this topic!