зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1458385: [partials] Set the mar-channel-id of partials explicitly; r=sfraser
Since the taskgraph knows the mar-channel-id to use, pass it explicitly to the partial tasks, rather than extracting the channel from a MAR. Differential Revision: https://phabricator.services.mozilla.com/D37482 --HG-- extra : moz-landing-system : lando
This commit is contained in:
Родитель
2208f1c2cf
Коммит
b39a761dde
|
@ -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"):
|
||||
|
|
|
@ -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'
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче