Guide on Working with Snapshots

Hello folks,

in the last few days there were multiple incidents related to snapshots in our monorepo, such as a module deletion causing other team's jar to stop working correctly in monorepo since snapshots can't be downloaded by monorepo's gradle, or a snapshot becoming invalid due to a new dependency (the correctness of said module being snapshotted not withstanding). So let's reiterate a few points regarding snapshots and how it's related to multi repository project and monorepo in general.

The first sticking point is the way teams moving an already snapshotted module to their repo, since there are no standardized way yet. So here is one:

this procedure should also be followed in case a module that is already snapshotted is removed / not snapshotted anymore, such as for an extra impl module.

The steps above also requires changes in how teams work in multi repository to ensure maximal effectiveness, which are:

The last sticking point is on keeping snapshotted modules' dependency clean. For this, owners of those modules have to be aware regarding the snapshot status (you should be, the review that adds the willBePublished clause must be approved by you after all) and should take extra care in introducing new dependencies. Make sure those new dependencies are also already snapshotted if possible. If not, you have to inform other teams that you will have to make a major change regarding the module, perhaps creating a new module just for necessary classes for other teams.

That's all. This guide will also be reflected at the snapshot confluence page https://29022131.atlassian.net/wiki/spaces/BEI/pages/758743904/How+to+Enable+Migrations+Using+Snapshots+in+old-monorepo.