Discussion: Connect and Forge together

Hi, Paul,

I need to do a connect and Forge app

“Connect and Forge” apps are still in alpha so I’d recommend sticking to Connect for now if you want to build a production app that can’t be built using exclusively Forge features.

Will the connect app get all of the lifecycle events when the app is installed?

You can declare install and uninstall handlers (but not enabled or disabled).

What is the best way to communicate between the connect and forge parts of the app?

That’s a great question. We don’t offer an easy way to facilitate such communication, yet. If you’d still like to try, though, you could experiment with sharing data via entity properties, with web triggers or with custom authentication between forge functions and your app server over HTTP.

Is there an example app that uses connect and Forge?

Besides the worked example from the talk, there’s this one linked from the Build a Connect on Forge app page.

Hope that helps.

2 Likes

@jhazelwood thanks for those answers.

It was probably said in the talk (but I have forgotten) but when is connect → Forge going to be ready. I don’t want to use just connect because I need the internal storage (and data residency) of Forge but its event system isn’t quite then yet so I need a hybrid

I don’t have the slides from the session handy, but I think the ballpark figure was the first half of next year because there’s a fair bit to do.

As for data residency, we are working on supporting that in Connect, but it will put more of the onus on the app developer.

I don’t have the slides from the session handy, but I think the ballpark figure was the first half of next year because there’s a fair bit to do.

The dates weren’t in the session because they’re fairly rough estimates at the moment, but yes, ideally we are aiming for early 2022 as the current target.

Bugger, that far away. I was hoping this would be a workaround for not getting the deleted comment text in delete comment events. Is there any other way I can get the deleted comment text for a forge app without using Forge and Connect?

I’m afraid I don’t know when we’re aiming to address that, sorry. I’ll ask around.

@SamPurchase has directed me to this discussion between the two of you, and the Forge Ticket that was raised as a result. That about covers it; I don’t have any more to add besides that, sorry.

You’ve already thought of the one possible workaround that occurred to me: keeping track of everything so you already have the comment content stored when the deletion event comes through (and you also thought of the main drawbacks: you are likely to run into storage limits, and it’s a lot of customer data to be storing).

1 Like

@jhazelwood , thanks for that. Yeah, I have been asking around trying to find ways around this. Thought someone might come up with a way that I hadn’t yet thought of. At least I now have one date, the Forge connect bridge.
Thanks
Paul

Hi again @scottohara and other interested developers, we’ve finished investigating and planning and have begun in earnest on:

a way to update our Marketplace listings to point to a Forge version of the app instead of the existing Connect version

Our planned first step is to make it possible to set the connect key of your forge app in your manifest, like so (in future, this will become fixed to the marketplace key at listing time):

app:
  id: abc-123
  connectKey: com.pluginsquad.awesome-planning-poker

This can vary per-environment, but there’s only the one slot in the manifest so you’ll need to adjust it before deploying to a different environment.

As a next step, we want to add support for installing a Forge app environment over the top of a classic connect app with a matching key.

Please share any feedback or questions on the plan, or let us know if you’re interested in trying an early version of this feature when it’s ready!

Cheers,
James

4 Likes

Would it be possible to make the connectKey be a hash? Since the manifest in Forge does a lot more than in Connect (ie it declares the backend resolvers etc) - having multiple manifests floating around would seem kinda scary - especially since it would lead to “oh crap I forgot to declare the new function in the production manifest” and we would literally be testing in production…

My suggestion would be the connectKey be a hash in the manifest (you can always rewrite it when things are deployed) of something like:

app:
   id: abc-123
   connectKeys:
       production: com.pluginsquad.awesome-planning-poker
       development: com.pluginsquad.awesome-planning-poker-dev
1 Like

Hi, it’s certainly possible, and we considered something like this. We were hesitant, however, because are other things that we might want to make per-environment, like remotes[0].baseUrl and environment variables, so we should probably give more thought to how to introduce the concept of per-environment config before we introduce this new concept.

Would you want to also have a per-environment baseUrl, and do you have any thoughts on what a format for that would look like?

As for the current proposed design, the usage pattern I imagined wasn’t multiple manifests, but rather some kind of script that wrapped the forge deploy command and subbed the correct connectKey and baseUrl into the manifest file before running the deployment. I agree that having the official tool / manifest format take care of it would be nicer, though.

I’ll take this back to the team responsible for the manifest format and discuss it as well.

Thanks for the feedback!

I’ve only just discovered this thread, as I’m not actively developing on Forge yet (I had a look last year, but I’ve been focused on addressing breaking changes over on connect this year).

A shout out to @HeyJoe & @jhazelwood as your Developer Day presentation Connect and Forge together | Developer Day 2021 - YouTube is excellent.

I noticed it only has 27 views but should be essentially viewing for everyone developing Connect right now.

4 Likes

Hi everyone,

We would like to update you on some of the changes we’ve implemented to support migrating your Connect on Forge apps. These changes are part of an alpha release.

In order to allow you to replace your Connect app with a Forge version of the app, we have introduced an app.connect section in the manifest file so that you can reference Connect portions of your app. In particular, the app.connect.key will give you the ability to control the app key for testing your Connect on Forge app, and the app.connect.remote key will allow you to reference the baseUrl of your existing Connect app.

For example:

app:
  connect:
    key: hello-world
    remote: connect-app-server
remotes:
  - key: connect-app-server
    baseUrl: https://hello-world-app.example.com

It’s important to note that the app.connect.key of your Forge app’s production environment should match the existing key of the Connect app you wish to replace. For development and staging, we recommend using the production key with a suitable suffix, e.g. hello-world.development . The tutorial linked below offers one way to juggle the different environments’ keys.

At this stage, changing the key is not supported, but support is coming soon.

If you have an existing Connect on Forge app you wish to continue using, you will need to set app.connect.key of its environments to match its existing (randomly-generated) key.

For more detailed instructions on how to configure the app.connect section, please see: https://developer.atlassian.com/platform/forge/build-a-connect-on-forge-app

As always, we invite you to share any feedback or bugs so that we can improve the migration journey from Connect to Forge.

Thank you :smiley:

7 Likes

Hi all, we’ve received reports of connect modules not showing up in connect-on-forge apps. We’re investigating this now. You can follow this ticket for updates.

4 Likes

Please see the public issue for an update. It includes a workaround, which is to let us know your app ID so we can let you know your app’s randomly-generated key, in order to set app.connect.key to match.

1 Like

Is it possible to deploy Connect in Forge app in the Marketplace? @JulianWolf reports that’s it’s not possible in FRGE-158

It’s not possible today, but we’re working on it, too.

Hi everyone,

We’ve released an update regarding the Connect-on-Forge migration pathway. You can follow along with the discussion and read the post here: 22 Sep 2021 - Unifying Atlassian Connect and Forge: An Update.

3 Likes

@AditiVenkatesh - will Forge be available for Bitbucket cloud apps? Along a similar timeline?

2 Likes

Hi @UlrichKuhnhardtIzym1,

Thanks for your question. I have reached out to the relevant team that is handling this and will provide you with a more detailed answer as soon as I get a response.

1 Like