diff --git a/taskcluster/docker/funsize-update-generator/scripts/funsize.py b/taskcluster/docker/funsize-update-generator/scripts/funsize.py index c000501d666a..d8ee0d9b7f56 100755 --- a/taskcluster/docker/funsize-update-generator/scripts/funsize.py +++ b/taskcluster/docker/funsize-update-generator/scripts/funsize.py @@ -236,7 +236,7 @@ async def generate_partial(work_env, from_dir, to_dir, dest_mar, mar_data, log.info("Generating partial %s", dest_mar) env = work_env.env env["MOZ_PRODUCT_VERSION"] = mar_data['version'] - env["MAR_CHANNEL_ID"] = mar_data["ACCEPTED_MAR_CHANNEL_IDS"] + env["MAR_CHANNEL_ID"] = mar_data["MAR_CHANNEL_ID"] env['BRANCH'] = mar_data['branch'] env['PLATFORM'] = mar_data['platform'] if use_old_format: @@ -248,7 +248,7 @@ async def generate_partial(work_env, from_dir, to_dir, dest_mar, mar_data, cmd = " ".join([make_incremental_update, dest_mar, from_dir, to_dir]) await run_command(cmd, cwd=work_env.workdir, env=env, label=dest_mar.split('/')[-1]) - validate_mar_channel_id(dest_mar, mar_data["ACCEPTED_MAR_CHANNEL_IDS"]) + validate_mar_channel_id(dest_mar, mar_data["MAR_CHANNEL_ID"]) def get_hash(path, hash_type="sha512"): @@ -368,9 +368,7 @@ async def manage_partial(partial_def, filename_template, artifacts_dir, from_path = os.path.join(work_env.workdir, "from") mar_data = { - "ACCEPTED_MAR_CHANNEL_IDS": get_option( - to_path, filename="update-settings.ini", section="Settings", - option="ACCEPTED_MAR_CHANNEL_IDS"), + "MAR_CHANNEL_ID": os.environ["MAR_CHANNEL_ID"], "version": get_option(to_path, filename="application.ini", section="App", option="Version"), "to_buildid": get_option(to_path, filename="application.ini", @@ -389,12 +387,9 @@ async def manage_partial(partial_def, filename_template, artifacts_dir, "platform": partial_def["platform"], "locale": partial_def["locale"], } - # Override ACCEPTED_MAR_CHANNEL_IDS if needed - if "ACCEPTED_MAR_CHANNEL_IDS" in os.environ: - mar_data["ACCEPTED_MAR_CHANNEL_IDS"] = os.environ["ACCEPTED_MAR_CHANNEL_IDS"] for filename in check_channels_in_files: - validate_mar_channel_id(filename, mar_data["ACCEPTED_MAR_CHANNEL_IDS"]) + validate_mar_channel_id(filename, mar_data["MAR_CHANNEL_ID"]) for field in ("update_number", "previousVersion", "previousBuildNumber", "toVersion", "toBuildNumber"): diff --git a/taskcluster/taskgraph/transforms/partials.py b/taskcluster/taskgraph/transforms/partials.py index 7c70bee72e3b..7c2d1bfca0d3 100644 --- a/taskcluster/taskgraph/transforms/partials.py +++ b/taskcluster/taskgraph/transforms/partials.py @@ -104,17 +104,6 @@ def make_task_description(config, jobs): extra['funsize']['partials'].append(partial_info) update_number += 1 - mar_channel_id = None - if config.params['project'] == 'mozilla-beta': - if 'devedition' in label: - mar_channel_id = 'firefox-mozilla-aurora' - else: - mar_channel_id = 'firefox-mozilla-beta' - elif config.params['project'] == 'mozilla-release': - mar_channel_id = 'firefox-mozilla-release' - elif 'esr' in config.params['project']: - mar_channel_id = 'firefox-mozilla-esr' - level = config.params['level'] worker = { @@ -131,10 +120,9 @@ def make_task_description(config, jobs): 'DATADOG_API_SECRET': 'project/releng/gecko/build/level-{}/datadog-api-key'.format(level), 'EXTRA_PARAMS': '--arch={}'.format(architecture(attributes['build_platform'])), + 'MAR_CHANNEL_ID': attributes['mar-channel-id'] } } - if mar_channel_id: - worker['env']['ACCEPTED_MAR_CHANNEL_IDS'] = mar_channel_id if config.params.release_level() == 'staging': worker['env']['FUNSIZE_ALLOW_STAGING_PREFIXES'] = 'true'