Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Work with the new application-services release process #105

Merged
merged 1 commit into from
Apr 19, 2023

Conversation

bendk
Copy link
Contributor

@bendk bendk commented Mar 30, 2023

Updated the code to handle nightly releases. The release channel is not implemented yet, but I plan to come back and do that once the new nightly system is in place.

I tested this by merging the app-services-nightlies into bendk/firefox-android/main then running the relbot script against it.

Here's the resulting PR: bendk/firefox-android#3

Here's the script output:

2023-03-30 12:38:37,920 - __main__.<module>:106 - INFO - This is relbot working on https://github.com/bendk as sebastian@mozilla.com / MickeyMoz
2023-03-30 12:38:38,080 - util.get_current_ac_version:112 - INFO - Fetched A-C version 113.0a1 from bendk/firefox-android
2023-03-30 12:38:38,080 - android_components._update_application_services:300 - INFO - Updating A-S on bendk/firefox-android:main
2023-03-30 12:38:38,238 - android_components._update_application_services:305 - INFO - Current A-S channel is nightly
2023-03-30 12:38:38,455 - android_components._update_application_services:310 - INFO - Current A-S Nightly version in A-C bendk/firefox-android:main is 113.20230320174514
2023-03-30 12:38:38,879 - android_components._update_application_services:319 - INFO - Latest A-S Nightly version available is 113.20230323131908
2023-03-30 12:38:38,879 - android_components._update_application_services:330 - INFO - We should update A-C main with A-S Nightly 113.20230323131908
2023-03-30 12:38:39,205 - android_components._update_application_services:362 - INFO - Last commit on main is 20957faa4371be9cfd97b4f082a4f35d37e45a26
2023-03-30 12:38:39,550 - android_components._update_application_services:367 - INFO - Created branch relbot/update-as/ac-113 on 20957faa4371be9cfd97b4f082a4f35d37e45a26
2023-03-30 12:38:39,550 - android_components._update_application_services:369 - INFO - Updating android-components/plugins/dependencies/src/main/java/ApplicationServices.kt
2023-03-30 12:38:40,103 - android_components._update_application_services:386 - INFO - Creating pull request
2023-03-30 12:38:41,351 - android_components._update_application_services:393 - INFO - Pull request at https://github.com/bendk/firefox-android/pull/3
2023-03-30 12:38:41,351 - android_components._update_application_services:399 - INFO - Asking Bors to run a try build
2023-03-30 12:38:42,283 - android_components._update_geckoview:168 - INFO - Updating GeckoView on A-C bendk/firefox-android:main
2023-03-30 12:38:42,454 - android_components._update_geckoview:173 - INFO - Current GV channel is nightly
2023-03-30 12:38:42,623 - android_components._update_geckoview:178 - INFO - Current GV Nightly version in A-C bendk/firefox-android:main is 113.0.20230330094555
2023-03-30 12:38:43,476 - android_components._update_geckoview:189 - INFO - Latest GV Nightly version available is 113.0.20230330094555
2023-03-30 12:38:43,668 - android_components._update_geckoview:197 - INFO - Current Glean version in A-C bendk/firefox-android:main is 52.4.2
2023-03-30 12:38:43,771 - android_components._update_geckoview:202 - INFO - Latest bundled Glean version available is 52.4.2
2023-03-30 12:38:43,771 - android_components._update_geckoview:205 - WARNING - No newer GV Nightly release found. Exiting.

@bendk
Copy link
Contributor Author

bendk commented Apr 4, 2023

@JohanLorenzo Do you think this code could work? I'm hoping to get all my PRs ready before the end of the nightly cycle so we can make the swap at the start of the 114 cycle.

Copy link
Contributor

@JohanLorenzo JohanLorenzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The overall logic looks good to me. Thanks for taking care of these changes!

If I'm not mistaken, we'll have to support the old get_latest_as_version() logic for beta and release. Otherwise, we will break these branches. It should be a matter of having this logic:

if as_major_version >= CUTOFF_VERSION:
   # new logic
else:
  # old logic

r.raise_for_status()
return r.json()["version"]
else:
raise NotImplementedError("Only the AS nightly channel is currently supported")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, relbot doesn't "ride the train". Any change we make and release has to be compatible with nightly, beta, and release at once. I'm sorry about this. The good news is: this logic will go away once bug android-to-gecko-repos is done

return match_as_channel(content_file.decoded_content.decode("utf8"))


def validate_glean_version(v):
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Improvement for a potential followup: we could make glean and application-services part of mozilla-version. This Python library takes care of validating version numbers (historical ones as well as future ones)

@bendk
Copy link
Contributor Author

bendk commented Apr 6, 2023

The overall logic looks good to me. Thanks for taking care of these changes!

If I'm not mistaken, we'll have to support the old get_latest_as_version() logic for beta and release. Otherwise, we will break these branches. It should be a matter of having this logic:

Ahh, I see. I updated the code to handle both cases. It turned out that it was usually easier to check the a-c version than the a-s one. I manually triggered PRs for both the new and legacy case on my firefox-android repo and they looked good to me.

@ddurst
Copy link

ddurst commented Apr 18, 2023

@JohanLorenzo Do you need to r+ the changes?

src/android_components.py Outdated Show resolved Hide resolved
src/util.py Outdated Show resolved Hide resolved
Updated the code to handle nightly releases.  The release channel is not
implemented yet, but I plan to come back and do that once the new
nightly system is in place.
Copy link
Contributor

@JohanLorenzo JohanLorenzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for taking care of the review, @jcristau! Sorry, I missed that one, 2 weeks ago.

@jcristau jcristau merged commit 0bc1f9e into mozilla-mobile:master Apr 19, 2023
@bendk
Copy link
Contributor Author

bendk commented Apr 19, 2023

I'm not sure this one is ready to merge because there's also related app-services and firefox-android PRs. They all need to be merged together for the new system to work. I'm hoping to get those merged today, but I'm not sure about that. If they don't get merged, then I think the android-components bump tomorrow may fail.

I'll definitely update you with the status before eastern time EOD. Sorry for not mentioning this earlier, I'm not used to juggling so many PRs.

@jcristau
Copy link
Contributor

@bendk firefox-android pins a specific tag of relbot (https://github.com/mozilla-mobile/firefox-android/blob/c1add9b7278852b5d80a5a3750a6d811d928828f/.github/workflows/ac-update-geckoview.yml#L32), so it shouldn't matter when this gets merged, we can make a relbot release and then include a bump of the relbot version in the firefox-android PR.

@bendk
Copy link
Contributor Author

bendk commented Apr 19, 2023

Ahh, very nice.

Could you make a release with this change? Once that's done, I'll update my firefox-android PR to include the bump.

@jcristau
Copy link
Contributor

Done: https://github.com/mozilla-mobile/relbot/releases/tag/6.1.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants