From 7e7d69cb8e4514c86c4677b3b18193c5cb66f884 Mon Sep 17 00:00:00 2001 From: Johan Lorenzo Date: Tue, 21 Jul 2020 16:42:08 +0200 Subject: [PATCH] Bug 1652979 - Stop producing fennecNightly, fenixNightly and fenixBeta (#12225) --- app/build.gradle | 48 +------------------ app/src/main/java/org/mozilla/fenix/Config.kt | 14 +----- .../org/mozilla/fenix/components/Analytics.kt | 3 -- .../metrics/AdjustMetricsService.kt | 3 +- taskcluster/ci/browsertime/kind.yml | 2 +- taskcluster/ci/build/kind.yml | 46 ++---------------- taskcluster/ci/config.yml | 2 - taskcluster/ci/mark-as-shipped/kind.yml | 4 +- taskcluster/ci/push-apk/kind.yml | 4 +- taskcluster/ci/raptor/kind.yml | 2 +- taskcluster/ci/signing/kind.yml | 27 ++--------- 11 files changed, 19 insertions(+), 136 deletions(-) diff --git a/app/build.gradle b/app/build.gradle index a710bb43f..ff6ef3d6a 100644 --- a/app/build.gradle +++ b/app/build.gradle @@ -72,20 +72,6 @@ android { "sharedUserId": "org.mozilla.fenix.performancetest.sharedID" ] } - fenixNightly releaseTemplate >> { - applicationIdSuffix ".fenix.nightly" - buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true" - def deepLinkSchemeValue = "fenix-nightly" - buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\"" - manifestPlaceholders = ["deepLinkScheme": deepLinkSchemeValue] - } - fenixBeta releaseTemplate >> { - applicationIdSuffix ".fenix.beta" - buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true" - def deepLinkSchemeValue = "fenix-beta" - buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\"" - manifestPlaceholders = ["deepLinkScheme": deepLinkSchemeValue] - } fenixProduction releaseTemplate >> { applicationIdSuffix ".fenix" buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true" @@ -127,23 +113,6 @@ android { "deepLinkScheme": deepLinkSchemeValue ] } - fennecNightly releaseTemplate >> { - buildConfigField "boolean", "USE_RELEASE_VERSIONING", "true" - applicationIdSuffix ".fennec_aurora" - def deepLinkSchemeValue = "fenix-nightly" - buildConfigField "String", "DEEP_LINK_SCHEME", "\"$deepLinkSchemeValue\"" - manifestPlaceholders = [ - // This release type is meant to replace Firefox (Release channel) and therefore needs to inherit - // its sharedUserId for all eternity. See: - // https://searchfox.org/mozilla-central/search?q=moz_android_shared_id&case=false®exp=false&path= - // Shipping an app update without sharedUserId can have - // fatal consequences. For example see: - // - https://issuetracker.google.com/issues/36924841 - // - https://issuetracker.google.com/issues/36905922 - "sharedUserId": "org.mozilla.fennec.sharedID", - "deepLinkScheme": deepLinkSchemeValue - ] - } } variantFilter { // There's a "release" build type that exists by default that we don't use (it's replaced by "nightly" and "beta") @@ -157,19 +126,12 @@ android { // |--------------------|---------------|-----------| // | debug | ✅ | ✅ | Both variants for testing and development. // | forPerformanceTest | ✅ | ✅ | Both variants unless the perf team only cares about Nightly (TBD). - // | fenixNightly | ✅ | ✅ | Built with both, but only the "geckoNightly" one is published to Google Play - // | fenixBeta | ❌ | ✅ | Fenix Beta ships with GV Beta - // | fenixProduction | ❌ | ✅ | Fenix Production ships with GV Beta + // | fenixProduction | ✅ | ❌ | Fenix Production (to be renamed `Nightly`) ships with GV Nightly // | fennecProduction | ❌ | ✅ | Fenix build to replace production Firefox builds // | fennecBeta | ❌ | ✅ | Fenix build to replace beta Firefox builds - // | fennecNightly | ✅ | ❌ | Fenix build to replace Nightly Firefox builds def flavors = flavors*.name.toString().toLowerCase() - if (buildType.name == 'fenixBeta' && flavors.contains("geckonightly")) { - setIgnore true - } - if (buildType.name == 'fenixProduction' && flavors.contains("geckobeta")) { setIgnore true } @@ -177,10 +139,6 @@ android { if ((buildType.name == 'fennecProduction' || buildType.name == 'fennecBeta') && flavors.contains("geckonightly")) { setIgnore true } - - if (buildType.name == 'fennecNightly' && flavors.contains("geckobeta")) { - setIgnore true - } } aaptOptions { @@ -207,10 +165,6 @@ android { androidTest { resources.srcDirs += ['src/androidTest/resources'] } - fennecNightly { - java.srcDirs = ['src/migration/java'] - manifest.srcFile "src/migration/AndroidManifest.xml" - } fennecBeta { java.srcDirs = ['src/migration/java'] manifest.srcFile "src/migration/AndroidManifest.xml" diff --git a/app/src/main/java/org/mozilla/fenix/Config.kt b/app/src/main/java/org/mozilla/fenix/Config.kt index bc7f819d1..1cc1ac176 100644 --- a/app/src/main/java/org/mozilla/fenix/Config.kt +++ b/app/src/main/java/org/mozilla/fenix/Config.kt @@ -7,13 +7,10 @@ package org.mozilla.fenix enum class ReleaseChannel { FenixDebug, - FenixNightly, - FenixBeta, FenixProduction, FennecProduction, - FennecBeta, - FennecNightly; + FennecBeta; val isReleased: Boolean get() = when (this) { @@ -33,8 +30,6 @@ enum class ReleaseChannel { val isReleaseOrBeta: Boolean get() = when (this) { - FenixProduction -> true - FenixBeta -> true FennecProduction -> true FennecBeta -> true else -> false @@ -43,14 +38,11 @@ enum class ReleaseChannel { val isBeta: Boolean get() = when (this) { FennecBeta -> true - FenixBeta -> true else -> false } val isNightlyOrDebug: Boolean get() = when (this) { - FenixNightly -> true - FennecNightly -> true FenixDebug -> true FenixProduction -> true else -> false @@ -66,12 +58,9 @@ enum class ReleaseChannel { object Config { val channel = when (BuildConfig.BUILD_TYPE) { "fenixProduction" -> ReleaseChannel.FenixProduction - "fenixBeta" -> ReleaseChannel.FenixBeta - "fenixNightly" -> ReleaseChannel.FenixNightly "debug" -> ReleaseChannel.FenixDebug "fennecProduction" -> ReleaseChannel.FennecProduction "fennecBeta" -> ReleaseChannel.FennecBeta - "fennecNightly" -> ReleaseChannel.FennecNightly // Builds for local performance analysis, recording benchmarks, automation, etc. // This should be treated like a released channel because we want to test @@ -86,7 +75,6 @@ object Config { } private val fennecChannels: List = listOf( - ReleaseChannel.FennecNightly, ReleaseChannel.FennecBeta, ReleaseChannel.FennecProduction ) diff --git a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt index 12beefc36..10ddbd2ca 100644 --- a/app/src/main/java/org/mozilla/fenix/components/Analytics.kt +++ b/app/src/main/java/org/mozilla/fenix/components/Analytics.kt @@ -103,11 +103,8 @@ private fun getSentryProjectUrl(): String? { val baseUrl = "https://sentry.prod.mozaws.net/operations" return when (Config.channel) { ReleaseChannel.FenixProduction -> "$baseUrl/fenix" - ReleaseChannel.FenixBeta -> "$baseUrl/fenix-beta" - ReleaseChannel.FenixNightly -> "$baseUrl/fenix-nightly" ReleaseChannel.FennecProduction -> "$baseUrl/fenix-fennec" ReleaseChannel.FennecBeta -> "$baseUrl/fenix-fennec-beta" - ReleaseChannel.FennecNightly -> "$baseUrl/fenix-fennec-nightly" else -> null } } diff --git a/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt b/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt index 6c75f9785..baf4566d8 100644 --- a/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt +++ b/app/src/main/java/org/mozilla/fenix/components/metrics/AdjustMetricsService.kt @@ -13,7 +13,6 @@ import com.adjust.sdk.AdjustConfig import com.adjust.sdk.LogLevel import org.mozilla.fenix.BuildConfig import org.mozilla.fenix.Config -import org.mozilla.fenix.ReleaseChannel import org.mozilla.fenix.ext.settings class AdjustMetricsService(private val application: Application) : MetricsService { @@ -23,7 +22,7 @@ class AdjustMetricsService(private val application: Application) : MetricsServic if ((BuildConfig.ADJUST_TOKEN.isNullOrBlank())) { Log.i(LOGTAG, "No adjust token defined") - if (Config.channel.isReleased && Config.channel != ReleaseChannel.FennecNightly) { + if (Config.channel.isReleased) { throw IllegalStateException("No adjust token defined for release build") } diff --git a/taskcluster/ci/browsertime/kind.yml b/taskcluster/ci/browsertime/kind.yml index 253e74e0e..6eeab0fa8 100644 --- a/taskcluster/ci/browsertime/kind.yml +++ b/taskcluster/ci/browsertime/kind.yml @@ -82,7 +82,7 @@ job-defaults: - '--app=fenix' - '--browsertime' - '--cold' - - '--binary=org.mozilla.fenix.nightly' + - '--binary=org.mozilla.fenix' - '--activity=org.mozilla.fenix.IntentReceiverActivity' - '--download-symbols=ondemand' - '--browsertime-node=$MOZ_FETCHES_DIR/node/bin/node' diff --git a/taskcluster/ci/build/kind.yml b/taskcluster/ci/build/kind.yml index 9314d59b7..91299a9c8 100644 --- a/taskcluster/ci/build/kind.yml +++ b/taskcluster/ci/build/kind.yml @@ -93,17 +93,6 @@ jobs: treeherder: symbol: forPerformanceTest(B) - nightly: - attributes: - nightly: true - include-nightly-version: true - include-shippable-secrets: true - run: - geckoview-engine: geckoNightly - gradle-build-type: fenixNightly - treeherder: - symbol: nightly(B) - nightly-simulation: attributes: nightly: false @@ -112,47 +101,22 @@ jobs: include-shippable-secrets: true run: geckoview-engine: geckoNightly - gradle-build-type: fennecNightly + gradle-build-type: fenixProduction treeherder: symbol: nightlySim(B) - beta: - attributes: - release-type: beta - include-release-version: true - include-shippable-secrets: true - filter-incomplete-translations: true - run: - geckoview-engine: geckoBeta - gradle-build-type: fenixBeta - run-on-tasks-for: [github-release] - treeherder: - symbol: beta(B) - - # XXX `production` is now the new nightly. We keep this name around while we officially remove - # `nightly` and `fennec-nightly` - production: + nightly: attributes: nightly: true include-nightly-version: true include-shippable-secrets: true run: geckoview-engine: geckoNightly + # XXX `fenixProduction` is now the new nightly. gradle-build-type: fenixProduction - run-on-tasks-for: [github-release] + run-on-tasks-for: [] treeherder: - symbol: production(B) - - fennec-nightly: - attributes: - nightly: true - include-nightly-version: true - include-shippable-secrets: true - run: - geckoview-engine: geckoNightly - gradle-build-type: fennecNightly - treeherder: - symbol: nightlyFennec(B) + symbol: nightly(B) fennec-beta: attributes: diff --git a/taskcluster/ci/config.yml b/taskcluster/ci/config.yml index ee2db8db0..d524794fe 100644 --- a/taskcluster/ci/config.yml +++ b/taskcluster/ci/config.yml @@ -2,7 +2,6 @@ trust-domain: mobile treeherder: group-names: - 'beta': 'Beta-related tasks' 'betaFennec': 'Beta-related tasks with same APK configuration as Fennec' 'Btime': 'Raptor-Browsertime tests' 'bump': 'Bump dependencies' @@ -12,7 +11,6 @@ treeherder: 'I': 'Docker Image Builds' 'nightly': 'Nightly-related tasks' 'nightlySim': 'Nightly-related tasks that run on each github push' - 'nightlyFennec': 'Nightly-related tasks with same APK configuration as Fennec' 'production': 'Release-related tasks' 'productionFennec': 'Production-related tasks with same APK configuration as Fennec' 'Rap': 'Raptor tests' diff --git a/taskcluster/ci/mark-as-shipped/kind.yml b/taskcluster/ci/mark-as-shipped/kind.yml index af8d210f4..b7cc1772c 100644 --- a/taskcluster/ci/mark-as-shipped/kind.yml +++ b/taskcluster/ci/mark-as-shipped/kind.yml @@ -17,8 +17,8 @@ primary-dependency: push-apk group-by: build-type only-for-build-types: - - fenix-beta - - fenix-production + - fennec-beta + - fennec-production job-template: description: Mark Fenix as shipped in ship-it diff --git a/taskcluster/ci/push-apk/kind.yml b/taskcluster/ci/push-apk/kind.yml index f1841f16b..4135e4ac6 100644 --- a/taskcluster/ci/push-apk/kind.yml +++ b/taskcluster/ci/push-apk/kind.yml @@ -19,7 +19,7 @@ group-by: build-type only-for-build-types: - fennec-beta - fennec-production - - production + - nightly job-template: description: Publish Fenix @@ -30,7 +30,7 @@ job-template: by-build-type: fennec-beta: fennec-beta fennec-production: fennec-production - production: production + nightly: production dep: by-level: '3': false diff --git a/taskcluster/ci/raptor/kind.yml b/taskcluster/ci/raptor/kind.yml index 135a05b5c..961bff746 100644 --- a/taskcluster/ci/raptor/kind.yml +++ b/taskcluster/ci/raptor/kind.yml @@ -77,7 +77,7 @@ job-defaults: - './test-linux.sh' - '--cfg=mozharness/configs/raptor/android_hw_config.py' - '--app=fenix' - - '--binary=org.mozilla.fenix.nightly' + - '--binary=org.mozilla.fenix' - '--activity=org.mozilla.fenix.IntentReceiverActivity' - '--download-symbols=ondemand' - '--no-conditioned-profile' diff --git a/taskcluster/ci/signing/kind.yml b/taskcluster/ci/signing/kind.yml index 45f38ff11..1436c1efb 100644 --- a/taskcluster/ci/signing/kind.yml +++ b/taskcluster/ci/signing/kind.yml @@ -20,7 +20,7 @@ job-template: description: Sign Fenix worker-type: by-build-type: - (fennec-.+|nightly|beta|production|android-test-nightly): + (fennec-.+|nightly|android-test-nightly): by-level: '3': signing default: dep-signing @@ -32,37 +32,20 @@ job-template: by-level: '3': fennec-production-signing default: dep-signing - fennec-nightly: - by-level: - '3': fennec-nightly-signing - default: dep-signing - nightly: - by-level: - '3': nightly-signing - default: dep-signing android-test-nightly: by-level: - '3': nightly-signing + '3': production-signing default: dep-signing performance-test: dep-signing - beta: - by-level: - '3': beta-signing - default: dep-signing - production: + nightly: by-level: '3': production-signing default: dep-signing default: dep-signing - signing-format: - by-build-type: - # Fennec nightly cannot have the sha256 checksums. For more details, see - # https://github.com/mozilla-releng/scriptworker-scripts/pull/102#issue-349016967 - fennec-nightly: autograph_apk_fennec_sha1 - default: autograph_apk + signing-format: autograph_apk index: by-build-type: - (fennec-.+|nightly|performance-test|beta|production|debug|nightly-simulation): + (fennec-.+|performance-test|nightly|debug|nightly-simulation): type: signing default: {} run-on-tasks-for: