The current FAQ on What if my app supports multiple products? states that the Forge platform “supports and encourages developers to build apps that are compatible with multiple products”, though not yet for distribution via the Marketplace:
[…] If your app is compatible with multiple apps, you’ll need to create two Forge apps using the same code base, and publish two separate listings on the Marketplace.
We have followed resp. EAP advice to use the identical code base for Jira and Confluence and generate two manifests from a template, with the only differences between them being app name and ID, because the Forge runtime supposedly removes inapplicable scopes automatically.
This worked fine for a while, but yesterday we had our first (likely multi-dimensional) incident that effectively caused an app outage.
While not yet fully understood, the incident seems correlated to the (highly welcome) egress permissions rollout on Monday, which triggered a new ‘Allow access’ request for users. This grant flow worked in Jira, but always resulted in an error in Confluence (other users also encountered this).
We managed to work around the problem by explicitly removing the Jira scopes from the Confluence manifest, and instructing the linter to ignore the Jira specifics in the code based via
--no-verify during deployment.
Both of these kludges would require a refactoring towards a likely more complex CI/CD pipeline, and might even require splitting inapplicable code paths from a product’s code base one way or another.
So before we go down this route, we would highly appreciate updated guidance on how to organize a code base for cross-product Forge apps distributed via the Marketplace - specific questions/asks seem to be:
- Is the Forge runtime still supposed to transparently handle cross-product deployments (i.e. removing/ignoring inapplicable scopes/code), which would suggest that we might have simply hit a regression or edge case?
- If that is not the case anymore, can you suggest alternative approaches, both short- and mid-term?
- Can you maybe provide a cross-product Marketplace sample app with CI/CD to make this easier for others developers down the road?