Skip to content

Commit

Permalink
Add Focus for Android (#954)
Browse files Browse the repository at this point in the history
* Add Focus to product details and public and admin APIs
* Add Focus to config files
* Add MobileVersion and bump mozilla-version
  • Loading branch information
sarah-clements committed Dec 17, 2021
1 parent e235ef7 commit 033d05d
Show file tree
Hide file tree
Showing 16 changed files with 83 additions and 12 deletions.
7 changes: 3 additions & 4 deletions api/requirements/public.txt
Original file line number Diff line number Diff line change
Expand Up @@ -243,9 +243,9 @@ markupsafe==2.0.1 \
# via
# jinja2
# mako
mozilla-version==0.5.4 \
--hash=sha256:a0b9deda224195f173cdc48c5acb7218e15648901750082436b472efeb590bee \
--hash=sha256:f5112684b2237bf4f68a754d4cb25e1182b4103761effee735553b7fc966ef7b
mozilla-version==1.0.0 \
--hash=sha256:678093aacc455a49b6feb6eeb922296c191aca4884e815573156b5966b8b051e \
--hash=sha256:a6d06ac135dd6f4333b9ac1fd04f41f4ba96e83973dd2ac9f70daf577718b96c
# via -r requirements/public.in
openapi-schema-validator==0.1.5 \
--hash=sha256:215b516d0942f4e8e2446cf3f7d4ff2ed71d102ebddcc30526d8a3f706ab1df6 \
Expand Down Expand Up @@ -411,7 +411,6 @@ zipp==3.6.0 \
# via
# importlib-metadata
# importlib-resources

# WARNING: The following packages were not pinned, but pip requires them to be
# pinned when the requirements file includes hashes. Consider using the --allow-unsafe flag.
# setuptools
2 changes: 2 additions & 0 deletions api/src/shipit_api/admin/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -719,6 +719,7 @@ components:
- fenix
- fennec
- firefox
- focus-android
- thunderbird
version:
type: string
Expand Down Expand Up @@ -827,6 +828,7 @@ components:
- fenix
- fennec
- firefox
- focus-android
- thunderbird
version:
type: string
Expand Down
2 changes: 1 addition & 1 deletion api/src/shipit_api/admin/product_details.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ async def fetch_l10n_data(
Product(release.product) is Product.THUNDERBIRD
and release.branch == "releases/comm-beta"
and release.revision in ["3e01e0dc6943", "481fea2011e6", "85cb8f907b18", "92950b2fd2dc", "c614b6e7cf58", "e277e3f0ab13", "efd290b55a35", "f87ba53e04ff"]
) or Product(release.product) in (Product.FENIX, Product.ANDROID_COMPONENTS):
) or Product(release.product) in (Product.FENIX, Product.ANDROID_COMPONENTS, Product.FOCUS_ANDROID):
return (release, None)

url_file = {
Expand Down
6 changes: 4 additions & 2 deletions api/src/shipit_api/admin/release.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,10 @@
import logging

import requests
from mozilla_version.fenix import FenixVersion # TODO Move FenixVersion into mozilla.gecko
from mozilla_version.fenix import FenixVersion # TODO replace with MobileVersion
from mozilla_version.gecko import DeveditionVersion, FennecVersion, FirefoxVersion, ThunderbirdVersion
from mozilla_version.maven import MavenVersion # TODO To support android-components
from mozilla_version.maven import MavenVersion
from mozilla_version.mobile import MobileVersion

from shipit_api.common.config import SUPPORTED_FLAVORS
from shipit_api.common.product import Product, get_key
Expand All @@ -22,6 +23,7 @@
Product.FENIX: FenixVersion,
Product.FENNEC: FennecVersion,
Product.FIREFOX: FirefoxVersion,
Product.FOCUS_ANDROID: MobileVersion,
Product.THUNDERBIRD: ThunderbirdVersion,
}

Expand Down
4 changes: 3 additions & 1 deletion api/src/shipit_api/admin/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@
"fenix-signoff": ["shipit_mobile"],
"android-components-signoff": ["shipit_mobile"],
"thunderbird-signoff": ["shipit_thunderbird"],
"focus-android-signoff": ["shipit_mobile"],
# XPI signoffs. These are in flux.
# Adding Releng as a backup to most of these, for bus factor. Releng should
# only sign off if requested by someone in the appropriate group.
Expand All @@ -89,7 +90,7 @@
AUTH0_AUTH_SCOPES = dict()

# releng signoff scopes
for product in ["android-components", "firefox", "fenix", "fennec", "devedition", "pinebuild"]:
for product in ["android-components", "firefox", "fenix", "fennec", "devedition", "pinebuild", "focus-android"]:
scopes = {f"add_release/{product}": LDAP_GROUPS["firefox-signoff"], f"abandon_release/{product}": LDAP_GROUPS["firefox-signoff"]}
phases = []
for flavor in [product, f"{product}_rc", f"{product}_release", f"{product}_release_rc", f"{product}_beta"]:
Expand Down Expand Up @@ -140,6 +141,7 @@
+ LDAP_GROUPS["xpi_system_signoff"]
+ LDAP_GROUPS["xpi_mozillaonline-privileged_signoff"]
+ LDAP_GROUPS["xpi_mozillaonline-privileged_admin_signoff"]
+ LDAP_GROUPS["focus-android-signoff"]
)
)
}
Expand Down
3 changes: 2 additions & 1 deletion api/src/shipit_api/common/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -466,9 +466,10 @@
],
"android-components": [{"name": "ship", "in_previous_graph_ids": True}],
"fenix": [{"name": "ship", "in_previous_graph_ids": True}],
"focus-android": [{"name": "ship", "in_previous_graph_ids": True}],
}

SUPPORTED_MOBILE_REPO_NAMES = ("fenix", "android-components", "staging-fenix", "staging-android-components")
SUPPORTED_MOBILE_REPO_NAMES = ("fenix", "android-components", "staging-fenix", "staging-android-components", "focus-android", "staging-focus-android")

SIGNOFFS = {
# 'projects/maple': {
Expand Down
1 change: 1 addition & 0 deletions api/src/shipit_api/common/product.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class Product(enum.Enum):
FENIX = "fenix"
FENNEC = "fennec"
THUNDERBIRD = "thunderbird"
FOCUS_ANDROID = "focus-android"


@enum.unique
Expand Down
2 changes: 2 additions & 0 deletions api/src/shipit_api/public/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from mozilla_version.fenix import FenixVersion
from mozilla_version.gecko import DeveditionVersion, FennecVersion, FirefoxVersion, ThunderbirdVersion
from mozilla_version.maven import MavenVersion
from mozilla_version.mobile import MobileVersion
from werkzeug.exceptions import BadRequest

from shipit_api.common.models import DisabledProduct, Phase, Release, XPIRelease
Expand All @@ -25,6 +26,7 @@
Product.FENIX.value: FenixVersion,
Product.FENNEC.value: FennecVersion,
Product.FIREFOX.value: FirefoxVersion,
Product.FOCUS_ANDROID.value: MobileVersion,
Product.THUNDERBIRD.value: ThunderbirdVersion,
}

Expand Down
1 change: 1 addition & 0 deletions api/src/shipit_api/public/api.yml
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,7 @@ components:
- fenix
- fennec
- firefox
- focus-android
- thunderbird
version:
type: string
Expand Down
3 changes: 2 additions & 1 deletion api/tests/test_publicapi.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ def test_public_api_subset():
full_api = yaml.safe_load(open(full_api_file))
public_api = yaml.safe_load(open(public_api_file))
generated_public_api = extract(full_api, PUBLIC_API_SECTIONS)
assert generated_public_api == public_api, "You probably forgot to regenerate src/shipit_api/public/api.yml after changing api.yml"
# If this fails, check the diff; each file needs to match exactly, including the ordering of enum values
assert generated_public_api == public_api
3 changes: 3 additions & 0 deletions api/tests/test_release.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
import pytest
from mozilla_version.fenix import FenixVersion
from mozilla_version.gecko import DeveditionVersion, FennecVersion, FirefoxVersion, ThunderbirdVersion
from mozilla_version.mobile import MobileVersion

from shipit_api.admin.api import get_signoff_emails
from shipit_api.admin.release import bump_version, is_eme_free_enabled, is_partner_enabled, is_rc, parse_version
Expand Down Expand Up @@ -35,6 +36,7 @@
# https://github.com/mozilla/release-services/pull/2265
# Let's be explicitly failing about it.
("fennec_release", "68.1.1", pytest.raises(ValueError), None),
(Product.FOCUS_ANDROID, "95.0.1", does_not_raise(), MobileVersion(95, 0, 1)),
),
)
def test_parse_version(product, version, expectation, result):
Expand Down Expand Up @@ -82,6 +84,7 @@ def test_is_rc(product, version, partial_updates, result):
("fenix", "84.0.0-rc.1", "84.0.0-rc.2"),
("fenix", "84.0.0", "84.0.1"),
("android-components", "84.0.0", "84.0.1"),
("focus-android", "95.0.0", "95.0.1"),
),
)
def test_bump_version(product, version, result):
Expand Down
2 changes: 1 addition & 1 deletion api/tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ usedevelop = true
deps =
-r {toxinidir}/requirements/test.txt
commands =
{posargs:py.test --cov-config=tox.ini --cov-append --cov=shipit_api --cov-report term-missing tests}
{posargs:py.test -vv --cov-config=tox.ini --cov-append --cov=shipit_api --cov-report term-missing tests}

[testenv:clean]
skip_install = true
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/configs/dev.js
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,25 @@ module.exports = {
],
enablePartials: false,
},
{
product: 'focus-android',
prettyName: 'Focus for Android',
appName: 'focus-android',
branches: [
{
branch: '',
},
],
repositories: [
{
prettyName: 'Staging fork',
project: 'staging-focus-android',
repo: 'https://github.com/mozilla-releng/staging-focus-android',
enableReleaseEta: false,
},
],
enablePartials: false,
},
],
XPI_MANIFEST: {
branch: 'master',
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/configs/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,25 @@ module.exports = {
],
enablePartials: false,
},
{
product: 'focus-android',
prettyName: 'Focus for Android',
appName: 'focus-android',
branches: [
{
branch: '',
},
],
repositories: [
{
prettyName: 'Staging fork',
project: 'staging-focus-android',
repo: 'https://github.com/mozilla-releng/staging-focus-android',
enableReleaseEta: false,
},
],
enablePartials: false,
},
],
XPI_MANIFEST: {
branch: 'master',
Expand Down
19 changes: 19 additions & 0 deletions frontend/src/configs/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,25 @@ module.exports = {
],
enablePartials: false,
},
{
product: 'focus-android',
prettyName: 'Focus for Android',
appName: 'focus-android',
branches: [
{
branch: '',
},
],
repositories: [
{
prettyName: 'Official repo',
project: 'focus-android',
repo: 'https://github.com/mozilla-mobile/focus-android',
enableReleaseEta: false,
},
],
enablePartials: false,
},
],
XPI_MANIFEST: {
branch: 'master',
Expand Down
2 changes: 1 addition & 1 deletion taskcluster/ci/docker-image/kind.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
python38:
definition: python
args:
PYTHON_VERSION: "3.8"
PYTHON_VERSION: "3.8.12"
node14:
definition: node
args:
Expand Down

0 comments on commit 033d05d

Please sign in to comment.