Bug 1786077 - Document how to update application-services when updating Glean's major version number r=TravisLong,janerik

Differential Revision: https://phabricator.services.mozilla.com/D228094
This commit is contained in:
Chris H-C 2024-11-11 13:07:48 +00:00
parent c882ef6160
commit d05d8d125d

View File

@ -46,5 +46,52 @@ You can find the currently used `glean_parser` version in the Glean SDK source t
In most cases you should update `glean_parser` first before updating the SDK.
## Special Concerns for Major Version Updates
If you are updating the major version of the Glean SDK
(ie from '32.x.y' to '33.z.a')
then there are specific steps to take.
The `application-services` repository integrates the Glean SDK separately.
It accepts any version within a major release,
so for non-major-version updates, it happily follows `mozilla-central`'s lead.
When there's a major version update,
we need to update `application-services` first,
allow it to generate a new (nightly) release,
and ensure that `mozilla-central` picks up that release at the same time it switches over to the new Glean SDK version.
To update the Glean SDK version used by `application-services`:
1) Consider not doing it yourself if someone else on the team who has done it before has the time.
[Setting yourself up to build and test `application-services`][as-contributing]
is straightforward, but non-trivial.
You may find it easier to ask them to do it.
2) Update the Glean SDK git submodule to the latest release's tag. e.g.
* `cd components/external/glean`
* `git checkout tags/v62.0.0`
3) Update the `glean-build` crate dependency for codegen:
* `cargo update -p glean-build`
4) Update Gradle's version of the Glean dependency for Android support:
* Edit `gradle/libs.versions.toml` to specify e.g. `glean = "62.0.0"`
5) Update Xcode's version of its Glean dependency for iOS support:
* Edit `megazords/ios-rust/MozillaTestServices/MozillaTestServices.xcodeproj/project.pbxproj`
to specify e.g. `minimumVersion = 62.0.0;` for the `glean-swift` package reference.
* Xcode also has a lockfile. If you do not have Xcode, or just don't want to run it, edit
`megazords/ios-rust/MozillaTestServices/MozillaTestServices.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved`
to specify the new version plus the git SHA of the new release of [mozilla/glean-swift][glean-swift]
e.g. `"revision" : "5c614b4af5a1f1ffe23b46bd03696086d8ce9d0d",` and `"version": "62.0.0"`
6) Run `cargo test` to make sure nothing obvious is broken.
7) Submit your PR for review and have it merged.
8) Make your `mozilla-central` changes depend on the patch the auto-update bot created to update
`mozilla-central` to the new `application-services` version that contains your changes.
* This will happen if you wait a day. Look for
an automatically-filed bug
([e.g.](https://bugzilla.mozilla.org/show_bug.cgi?id=1893248)).
* If you need to operate faster, you can ask `application-services`
folks to trigger a build for you, then write the patch yourself.
9) Push the whole stack to `try` to make sure the tree works together.
10) When everything's green, supply the whole stack to Lando to land it.
[sdk_generator.sh]: https://github.com/mozilla/glean/blob/main/glean-core/ios/sdk_generator.sh#L28
[glean-bug]: https://bugzilla.mozilla.org/enter_bug.cgi?product=Data+Platform+and+Tools&component=Glean%3A+SDK&priority=P3&status_whiteboard=%5Btelemetry%3Aglean-rs%3Am%3F%5D
[application-services]: https://github.com/mozilla/application-services
[as-contributing]: https://github.com/mozilla/application-services/blob/main/docs/contributing.md
[glean-swift]: https://github.com/mozilla/glean-swift