Backend Monorepo & Snapshot Sunsetting
Updates
- 18 April 2022: All connectivity modules have been migrated to con-product-backend, please check the snapshot replacement document for all new jars. We also advise teams to upgrade trip-booking-framework-api to 1.0.11 to fix bugs related to string encoding in the jar.
- 14 March 2022: all recommendation modules have been moved to rec-platform-backend, please check the snapshot replacement document for all new jars. Also for crosssell-payment-rendering modules we recommend you to update the version in your repo to 7.0.179 to prevent issues due to wrong dependency used in previous versions
- 1 March 2022: All mybooking related modules will be moved to trip repository. Also crosssell-payment-rendering modules have been published as jars from payment repo. Please check the snapshot replacement document for all new jars.
- 7 Jan 2022: all modules that have been moved to bei-data-legacy / bei-publicapi-legacy / bei-legacy-libraries will be deleted from monorepo by next week. Also adding new modules to be snapshotted are discouraged, teams should just move the module to their own repository. But rest assured that existing snapshots won't be deleted.
- 21 Dec 2021: Trip teams have published many trip snapshots as libraries which means commonly used snapshots are already published. Please refer to the snapshot replacement document for the details. We also changed the January target from stopping all snapshot publishing to stopping new modules from being published as snapshot with uncertain schedule.
- 30 Nov 2021: We have published publicapi-v1 and user-context-* libraries, and trip team has published trip-data-api and trip-data-rpc as replacements for trip-datap-clean-api and trip-data-clean-rpc. We also updated the legacy libraries to stop using Java EE 7 libraries except where needed. Please refer to the snapshot replacement document for the details.
- 2 Nov 2021: We have published snapshotted data modules, common modules and publicapi as jars. Please refer to the snapshot replacement document for the details. Publicapi-v1 and user-context-* modules will follow
TL; DR
- From 22 Jan 2022, new snapshots will be scrutinized more to prevent case of snapshots without plan to be moved at a later date
- Backend-Monorepo will be decommissioned by early July 22, 2022
- Change your snapshot dependency to the proper library. List of current snapshots and replacement: Link
- Snapshot without clear owner (snapshotted application modules, data modules, frontend-fx modules and ticket-processor module) will be published as a library
- We will contact teams with any services left in monorepo, and may offer help based on the team situation
Background
Back in 2019, we pushed for the multi-repository approach hard and helped teams to migrate away from our old, deprecated monorepo. Our help includes creating the gradle plugin for Traveloka Java repository (thanks to Salvian), cleaning up many modules, enabling snapshots of cleaned monorepo modules, and regular consultation with teams undergoing migration. However, due to a multitude of reasons, we stopped actively pushing this project in early 2020. We thought, sooner or later teams will migrate away from monorepo, and that teams who already moved away won't have any trouble from monorepo.
Turns out we are wrong on both counts. Monorepo still sees active development to this day, most likely due to remaining teams not having any spare resource to attempt a migration. This is in spite of an increasing amount of problems with developing in monorepo, including longer and longer build time, broken develop branch becoming the normalized state, and old Gradle version which doesn't support Java 11 at all. Also, teams away from monorepo can still get problems from monorepo, like unexpected interaction between snapshot dependency and library version locking, or still have to develop in monorepo for some of their modules to connect with services still in monorepo.
Thus, we want to revisit this project again, but with a stronger goal, decommissioning monorepo by early July 2022. This also includes deprecating publishing and usage of snapshots by January 2022.
What Do You Need to Do
- Don’t use snapshot as direct dependency anymore in your own repository. We have created a document for all current snapshots and its replacement that will be regularly updated throughout this project.
- For snapshots without clear ownership, we will ensure they are published as a proper library at least once. So far this includes snapshotted application modules, data modules, frontend-fx modules and ticket-processor modules. Once published we will update the list above and inform you all.
- For teams with any services left in monorepo, we will contact you first to see what we can do to help, and based on the team situation may offer more help to drive the migration.
That's all for the announcement. This will be posted biweekly in the backend, technology and multirepo-all channel. Thank you for your attention.
This is a copy of https://29022131.atlassian.net/l/c/XASnAhvt