3 title: Merge day process
4 permalink: /contributing/merge-day
9 Firefox and Gecko(View) are released in multiple release channels: `Nightly`, `Beta`, `Release`. Those versions are maintained in separate repositories (`mozilla-central`, `mozilla-beta`, `mozilla-release`). Right before the release of a new version of Firefox, on "merge day", those repositories get merged so that: The `Beta` version becomes the `Release` version. The `Nightly` version comes the `Beta` version and the `Nightly` version gets a higher version number.
11 ![](https://wiki.mozilla.org/images/b/b1/Maintrepositories.png)
14 * GeckoView Beta 70.0 (`mozilla-beta`) -> GeckoView Release 70.0 (`mozilla-release`)
15 * GeckoView Nightly 71.0 (`mozilla-central`) -> GeckoView Beta 71.0 (`mozilla-beta`)
16 * GeckoView Nightly 71.0 (`mozilla-central`) -> GeckoView Nightly 72.0 (`mozilla-central`)
18 Since the *Android Components* project uses separate components for tracking the GeckoView release channels we need to perform the same changes in the *Android Components* repository by moving the code accordingly and updating the dependency versions.
22 * `browser-engine-gecko-beta` (using GeckoView Beta 70.0) -> `browser-engine-gecko-release` (using GeckoView Release 70.0)
23 * `browser-engine-gecko-nightly` (using GeckoView Nightly 71.0) -> `browser-engine-gecko-beta` (using GeckoView Beta 71.0)
24 * `browser-engine-gecko-nightly` -> Starts using GeckoView 72.0
26 A new release happens roughly every 6 weeks. See the release calendar:
27 https://wiki.mozilla.org/Release_Management/Calendar
33 Before starting the "Merge day" process make sure that all new major versions for all release channels of GeckoView (nightly, beta, release) are available on
34 https://maven.mozilla.org/.
36 * Release: https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/geckoview/
37 * Beta: https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/geckoview-beta/
38 * Nightly: https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/geckoview-nightly/
42 First we delete the existing code of the `browser-engine-gecko` component and replace it with the code of the `browser-engine-gecko-beta` component:
45 rm -rf components/browser/engine-gecko/src
46 cp -R components/browser/engine-gecko-beta/src components/browser/engine-gecko/
49 In addition to that we need to replace the metrics file:
52 cp -R components/browser/engine-gecko-beta/metrics.yaml components/browser/engine-gecko
55 After that we update `Gecko.kt` to use the latest GeckoView release version (used by `browser-engine-gecko`) from https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/geckoview/
58 vi buildSrc/src/main/java/Gecko.kt
61 Finally we build and test the component to see whether there are any issues.
64 ./gradlew browser-engine-gecko:test
67 See the "Build failures" section if the build or tests fail.
69 If the build and test passes then commit this change.
71 Example commit message:
72 `Issue #xxxx: (Merge day) browser-engine-gecko-beta (70) -> browser-engine-gecko (70)`
76 Now we are removing the existing code of the `browser-engine-gecko-beta` component and replace it with the code of the `browser-engine-gecko-nightly` component:
79 rm -rf components/browser/engine-gecko-beta/src
80 cp -R components/browser/engine-gecko-nightly/src components/browser/engine-gecko-beta
83 In addition to that we need to replace the metrics file:
86 cp -R components/browser/engine-gecko-nightly/metrics.yaml components/browser/engine-gecko-beta
89 After that we update `Gecko.kt` to use the latest GeckoView beta version (previously used by `browser-engine-gecko-nightly`) from https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/geckoview-beta/
92 vi buildSrc/src/main/java/Gecko.kt
95 Finally we build and test the component to see whether there are any issues.
98 ./gradlew browser-engine-gecko-beta:test
101 See the "Build failures" section if the build or tests fail.
103 If the build and test passes then commit this change.
105 Example commit message:
106 `Issue #xxxx: (Merge day) browser-engine-gecko-nightly (71) -> browser-engine-gecko-beta (71)`
111 Finally we need to update the nightly component. For this component we do not need to copy any code and instead can update the version of the component immediately from https://maven.mozilla.org/?prefix=maven2/org/mozilla/geckoview/geckoview-nightly/
114 vi buildSrc/src/main/java/Gecko.kt
117 Again we are building and running the tests of the component:
120 ./gradlew browser-engine-gecko-nightly:test
123 See the "Build failures" section if the build or tests fail.
125 If the build and test passes then commit this change.
127 Example commit message:
128 `Issue #xxxx: (Merge day) browser-engine-gecko-nightly -> 72.`
132 Finally add an entry to the changelog:
135 * **browser-engine-gecko**, **browser-engine-gecko-beta**, **browser-engine-gecko-nightly**
137 * `browser-engine-gecko-release`: GeckoView 70.0
138 * `browser-engine-gecko-beta`: GeckoView 71.0
139 * `browser-engine-gecko-nightly`: GeckoView 72.0
144 * ***Gradle***: A common reason for build failures is changes in the Gradle configuration or the list of dependencies. Since we do not copy `build.gradle` (because it contains channel specific configuration) we need to manually compare the files to see if there's something to change.
146 * ***Breaking API changes***: Especially when updating the Nightly component it can happen that there are breaking API changes that landed in GeckoView just right after the new version was started. So the first time we see them is after merge day when updating the major version of the dependency. In this case we need to fix those breaking changes manually like other breaking changes that happen in "normal" development phases.