2GP WITH DEPENDENCIES – TIPS FOR BULK INSTALLS/UPDATES.

Zuppio Home / Blog / 2GP WITH DEPENDENCIES – TIPS FOR BULK INSTALLS/UPDATES.

Work with 2nd generation managed packages with dependencies having several subscriber orgs might be slight pain if compared with 1GP. Here we want to show you a way to optimize all these processes and deliver each version of your package to as many subscriber orgs as you need just with several minor iterations.

So what are the main differences between 1GP and 2GP?

The most important note here is that each approach handles the namespace differently. With 1GP, one namespace equals one package, but with 2GP you can have several packages using one namespace. And this seems to be very helpful, especially if your managed package has a lot of interdependency. If you have multiple packages that need to interact with each other, having them all in the same namespace is really great.

Another difference is versioning. Versioning in 1GP is strictly linear, so there is no ability to branch, while with 2GP, you can have a very complex hierarchy if needed. In this case you must take into consideration all release management to maintain control over this complexity.

Get ready to deal with dependencies

Package dependency is exactly what makes one package an “extension” of another, so it’s important to understand how you should deal with it when it comes to install/update such packages on subscriber orgs.

2GP with dependencies - tips for bulk installs/updates

You must keep in mind that all the packages should be installed in a specific order to each org, as well as try to avoid any errors during the installation process. And it doesn’t seem to be a problem if you have 1, 2 subscriber orgs, but just imagine how much time and effort this process will take on a larger amount of subscribers.

Step ordering and 2GP

If you install Zuppio and operate within it – the situation becomes much better. In this scenario you as usuall, connect target organizations, add a new job – and then create all needed steps according to the order of installed packages.

2GP with dependencies - tips for bulk installs/updates

Of course, we’ve provided you with examples – here we have one core package with two extension packages, which should be installed to all subscriber orgs. In this case ext. package 2 won’t be installed without ext. package 1 and so on. So what we need is to install the core package fist, and then do the same with the 1st and 2nd one.

Let’s create the first step to install the core package: here we choose the step type – “Package upgrades”, paste Package ID and fill in all required fields.

2GP with dependencies - tips for bulk installs/updates
2GP with dependencies - tips for bulk installs/updates

At this stage you can also choose on error action – either ignore any errors that might appear or interrupt the deployment process.

2GP with dependencies - tips for bulk installs/updates

After everything is added – just click Create & New to continue with further similar steps for Extention packages.

2GP with dependencies - tips for bulk installs/updates

Almost no difference here – just Package ID of the 1st extension package instead of core one.

2GP with dependencies - tips for bulk installs/updates

There’s no need to create steps in the specific order from the beginning – you can just place them in the correct order after each step is ready. All further actions should be familiar – you choose steps, target orgs, validate and deploy as usual.

2GP with dependencies - tips for bulk installs/updates

What when it comes to updates?

No problem here – Zuppio supports both 1GP and 2GP, so all previous instructions for mass post-install updates work just the same in this case. What is great – with Step ordering you can combine several steps for install/update in one job, place them in the order you need and change it anytime.

So this is how your 2GP release management could be optimized being done just in several iterations almost without any manual monotonous work – try Zuppio right now and contact our team with any questions that might arise.

Stay in Touch
Stay in touch
Contact us
Contact us