How to correctly handle repository migration since Bamboo 5.14?

Hi all,

I am trying to handle the migration of a plugin that adds a new type of repository. Since 5.14, the api changed quite a lot (see bamboo-api-changes-for-5-14), but this page is the only documentation I’ve found. This and looking at Bamboo’s code.

I’ve managed to get a working plugin when I install it on a brand new instance, but I still get errors when I test instance migrations.

The documentation mentions


Provides conversion of the configuration between repository and vcsType plugins.


Automatic conversions and migration

When implementing vcsType or vcsRepositoryViewer, a corresponding converter can be provided. This allows Bamboo to automatically convert configuration of the repository that was implemented in the old API. The conversion is invoked:

when Bamboo is restarted
when save is invoked with an old-style repository configuration
when a new-style repository is used through the old API the reverse conversion is executed

All repositories provided by Bamboo that are implemented in the new system provide conversion in both directions.

After migrations, I able to see my repos and edit them. But when I launch plans which have linked repositories I get :

java.lang.RuntimeException: java.lang.IllegalStateException: Not a legacy repository

The branch detection also returns this ‘Not a legacy repository’ error.

Any hints of what I might have done wrong ? Or missed ?