Skip to content

Commit

Permalink
Bump minimum version for Android general availability to 121.0a1 (#21459
Browse files Browse the repository at this point in the history
)

* Bump minimum version for Android general availability to 121.0a1

* Move comment
  • Loading branch information
diox committed Nov 20, 2023
1 parent f058921 commit 5f6bcad
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 26 deletions.
2 changes: 1 addition & 1 deletion src/olympia/addons/tests/test_serializers.py
Original file line number Diff line number Diff line change
Expand Up @@ -203,7 +203,7 @@ def test_basic(self):
AddonUser.objects.create(user=first_author, addon=self.addon, position=1)

av_min = AppVersion.objects.get_or_create(
application=amo.ANDROID.id, version='120.0'
application=amo.ANDROID.id, version='121.0'
)[0]
av_max = AppVersion.objects.get_or_create(
application=amo.ANDROID.id, version='*'
Expand Down
14 changes: 7 additions & 7 deletions src/olympia/addons/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1696,7 +1696,7 @@ def test_compatibility_forbidden_range_android(self):
assert response.data['version'] == {
'compatibility': [
'Invalid version range. For Firefox for Android, you may only pick a '
'range that starts with version 120.0a1 or higher, or ends with lower '
'range that starts with version 121.0a1 or higher, or ends with lower '
'than version 79.0a1.'
]
}
Expand All @@ -1705,7 +1705,7 @@ def test_compatibility_forbidden_range_android(self):
request_data = {
'version': {
'upload': self.upload.uuid,
'compatibility': {'android': {'min': '120.0a1', 'max': '*'}},
'compatibility': {'android': {'min': '121.0a1', 'max': '*'}},
}
}
response = self.request(data=request_data)
Expand Down Expand Up @@ -3269,7 +3269,7 @@ def test_compatibility_forbidden_range_android(self):
assert response.data == {
'compatibility': [
'Invalid version range. For Firefox for Android, you may only pick a '
'range that starts with version 120.0a1 or higher, or ends with lower '
'range that starts with version 121.0a1 or higher, or ends with lower '
'than version 79.0a1.'
]
}
Expand All @@ -3285,7 +3285,7 @@ def test_compatibility_forbidden_range_android_only_min_specified(self):
assert response.data == {
'compatibility': [
'Invalid version range. For Firefox for Android, you may only pick a '
'range that starts with version 120.0a1 or higher, or ends with lower '
'range that starts with version 121.0a1 or higher, or ends with lower '
'than version 79.0a1.'
]
}
Expand Down Expand Up @@ -5377,23 +5377,23 @@ def test_filter_by_app(self):
popularity=22,
version_kw={
'application': amo.ANDROID.id,
'min_app_version': '119.0',
'min_app_version': '121.0',
'max_app_version': '*',
},
)
both_addon = addon_factory(
slug='my-both-addon',
name='My Both Addøn',
popularity=11,
version_kw={'min_app_version': '120.0', 'max_app_version': '*'},
version_kw={'min_app_version': '121.0', 'max_app_version': '*'},
)
# both_addon was created with firefox compatibility, manually add
# android, making it compatible with both.
ApplicationsVersions.objects.create(
application=amo.ANDROID.id,
version=both_addon.current_version,
min=AppVersion.objects.get_or_create(
application=amo.ANDROID.id, version='120.0'
application=amo.ANDROID.id, version='121.0'
)[0],
max=AppVersion.objects.get(application=amo.ANDROID.id, version='*'),
)
Expand Down
4 changes: 2 additions & 2 deletions src/olympia/constants/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -364,8 +364,8 @@
MAX_VERSION_FENNEC = '68.*'

# The minimum version of Fenix where extensions are all available. Expect this
# to be bumped to 120.0 later.
MIN_VERSION_FENIX_GENERAL_AVAILABILITY = '120.0a1'
# to be lowered back to 120.0 later.
MIN_VERSION_FENIX_GENERAL_AVAILABILITY = '121.0a1'

ADDON_GUID_PATTERN = re.compile(
# Match {uuid} or something@host.tld ("something" being optional)
Expand Down
21 changes: 13 additions & 8 deletions src/olympia/devhub/tests/test_forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ def setUp(self):
'119.0',
'120.0a1',
'120.0',
'121.0a1',
'121.0',
'*',
):
Expand Down Expand Up @@ -392,15 +393,17 @@ def test_fenix_range_disabled_range_for_regular_extensions(self):
doc = pq(content)
assert doc('#id_form-1-application')[0].attrib['value'] == str(amo.ANDROID.id)
# Versions inside the forbidden Fenix range are disabled for regular
assert len(doc('#id_form-1-min option')) == 12
assert len(doc('#id_form-1-max option')) == 15
# extensions.
assert len(doc('#id_form-1-min option')) == 13
assert len(doc('#id_form-1-max option')) == 16
assert [x.text for x in doc('#id_form-1-min option[disabled=disabled]')] == [
'79.0a1',
'79.0',
'113.0',
'119.0a1',
'119.0',
'120.0a1',
'120.0',
]
assert [x.text for x in doc('#id_form-1-max option[disabled=disabled]')] == [
'79.0a1',
Expand All @@ -409,6 +412,8 @@ def test_fenix_range_disabled_range_for_regular_extensions(self):
'113.0',
'119.0a1',
'119.0',
'120.0a1',
'120.0',
]
data = {
'form-TOTAL_FORMS': 2,
Expand All @@ -423,7 +428,7 @@ def test_fenix_range_disabled_range_for_regular_extensions(self):
version='48.0'
),
'form-1-max': AppVersion.objects.filter(application=amo.ANDROID.id).get(
version='120.0a1'
version='121.0a1'
),
'form-1-application': amo.ANDROID.id,
'form-1-id': '',
Expand All @@ -439,7 +444,7 @@ def test_fenix_range_disabled_range_for_regular_extensions(self):
{
'__all__': [
'Invalid version range. For Firefox for Android, you may only pick '
'a range that starts with version 120.0a1 or higher, or ends with '
'a range that starts with version 121.0a1 or higher, or ends with '
'lower than version 79.0a1.'
]
},
Expand All @@ -455,7 +460,7 @@ def test_fenix_range_disabled_range_for_regular_extensions(self):

# That range is valid because it's entirely above Fenix GA
data['form-1-min'] = AppVersion.objects.get(
application=amo.ANDROID.id, version='120.0a1'
application=amo.ANDROID.id, version='121.0a1'
)
data['form-1-max'] = AppVersion.objects.get(
application=amo.ANDROID.id, version='*'
Expand Down Expand Up @@ -483,8 +488,8 @@ def test_fenix_range_not_disabled_for_recommended_android_extensions(self):
content = formset.render()
doc = pq(content)
assert doc('#id_form-1-application')[0].attrib['value'] == str(amo.ANDROID.id)
assert len(doc('#id_form-1-min option')) == 12
assert len(doc('#id_form-1-max option')) == 15
assert len(doc('#id_form-1-min option')) == 13
assert len(doc('#id_form-1-max option')) == 16
assert [x.text for x in doc('#id_form-1-min option[disabled=disabled]')] == []
assert [x.text for x in doc('#id_form-1-max option[disabled=disabled]')] == []
data = {
Expand All @@ -500,7 +505,7 @@ def test_fenix_range_not_disabled_for_recommended_android_extensions(self):
version='48.0'
),
'form-1-max': AppVersion.objects.filter(application=amo.ANDROID.id).get(
version='120.0a1'
version='121.0a1'
),
'form-1-application': amo.ANDROID.id,
'form-1-id': '',
Expand Down
14 changes: 11 additions & 3 deletions src/olympia/reviewers/tests/test_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -2737,11 +2737,19 @@ def test_item_history_with_unlisted_review_page_viewer(self):

def test_item_history_compat_ordered(self):
"""Make sure that apps in compatibility are ordered."""
av = AppVersion.objects.all()[0]
v = self.addon.versions.all()[0]
version = self.addon.versions.all()[0]

ApplicationsVersions.objects.create(
version=v, application=amo.ANDROID.id, min=av, max=av
version=version,
application=amo.ANDROID.id,
min=AppVersion.objects.get_or_create(
application=amo.ANDROID.id,
version=amo.MIN_VERSION_FENIX_GENERAL_AVAILABILITY,
)[0],
max=AppVersion.objects.get_or_create(
application=amo.ANDROID.id,
version=amo.DEFAULT_WEBEXT_MAX_VERSION,
)[0],
)

assert self.addon.versions.count() == 1
Expand Down
10 changes: 5 additions & 5 deletions src/olympia/versions/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ def test_full(self):
assert amo.ANDROID in addon.current_version.compatible_apps
assert (
addon.current_version.compatible_apps[amo.ANDROID].min.version
== '120.0a1'
== '121.0a1'
)
assert addon.current_version.compatible_apps[amo.ANDROID].max.version == '*'
assert (
Expand Down Expand Up @@ -185,7 +185,7 @@ def test_full(self):
name='Recommended for Android 119',
version_kw={
'application': amo.ANDROID.id,
'min_app_version': '120.0a1',
'min_app_version': '121.0a1',
'max_app_version': '*',
},
promoted=RECOMMENDED,
Expand All @@ -194,7 +194,7 @@ def test_full(self):
name='Normal for Android 119',
version_kw={
'application': amo.ANDROID.id,
'min_app_version': '120.0a1',
'min_app_version': '121.0a1',
'max_app_version': '*',
},
promoted=RECOMMENDED,
Expand Down Expand Up @@ -316,7 +316,7 @@ def test_full(self):
assert amo.ANDROID in addon.current_version.compatible_apps
assert (
addon.current_version.compatible_apps[amo.ANDROID].min.version
== '120.0a1'
== '121.0a1'
)
assert addon.current_version.compatible_apps[amo.ANDROID].max.version == '*'
assert (
Expand Down Expand Up @@ -441,7 +441,7 @@ def test_basic(self):
application=amo.ANDROID.id,
version=amo.MIN_VERSION_FENIX_GENERAL_AVAILABILITY,
)
new_min_android_ga_version = '120.0a1'
new_min_android_ga_version = '121.0a1'
AppVersion.objects.get_or_create(
application=amo.ANDROID.id,
version=new_min_android_ga_version,
Expand Down

0 comments on commit 5f6bcad

Please sign in to comment.