Bug 1905941 - Merge automation workaround for comm-central-to-beta and .gecko_rev.yml. r=dandarnell

This should be fixed by adding functionality to deal with .gecko_rev.yml to
Treescript. However in the interest of getting merge automation working add
this workaround.
There's no GECKO_HEAD_REV field in .gecko_rev.yml when comm-central-to-beta
runs, so instead create a line that can be easily replaced with the correct
data.

Differential Revision: https://phabricator.services.mozilla.com/D221194

--HG--
extra : rebase_source : 9926068cbee7017d06a91296926d041fd3dfe6f9
extra : amend_source : f8b057b344b9f7e76dc56ab84b5d69527b2fa3d9
extra : absorb_source : be4bdd4c1dd27c18cf48248768e225a5a0a14301
This commit is contained in:
Rob Lemley 2024-09-24 01:35:36 +00:00
Родитель 80062f2f26
Коммит a71126297f
3 изменённых файлов: 15 добавлений и 5 удалений

Просмотреть файл

@ -2,6 +2,7 @@
GECKO_BASE_REPOSITORY: https://hg.mozilla.org/mozilla-unified
GECKO_HEAD_REPOSITORY: https://hg.mozilla.org/mozilla-central
GECKO_HEAD_REF: default
######
### For comm-central
# GECKO_BASE_REPOSITORY: https://hg.mozilla.org/mozilla-unified

Просмотреть файл

@ -92,6 +92,7 @@ def get_gecko_rev_yml(repo_base_url):
def get_upstream_tag(tag_regex, base_regex, repo):
print(f"get_upstream_tag: Looking for {tag_regex} or {base_regex}")
base_tag_matcher = re.compile(base_regex)
release_tag_matcher = re.compile(tag_regex)
@ -140,6 +141,8 @@ def pin_gecko_rev_yml(config, tasks):
if "merge_config" not in config.params:
break
behavior = config.params["merge_config"]["behavior"]
resolve_keyed_by(
task,
"worker.gecko-rev",
@ -147,7 +150,7 @@ def pin_gecko_rev_yml(config, tasks):
**{
"project": config.params["project"],
"release-type": config.params["release_type"],
"behavior": config.params["merge_config"]["behavior"],
"behavior": behavior,
},
)
@ -183,11 +186,16 @@ def pin_gecko_rev_yml(config, tasks):
"GECKO_HEAD_REF", gecko_rev_yml["GECKO_HEAD_REF"], tag_data["tag"]
)
)
replacements.extend(
mk_gecko_rev_replacement(
"GECKO_HEAD_REV", gecko_rev_yml["GECKO_HEAD_REV"], tag_data["node"]
if behavior == "comm-central-to-beta":
replacements.append(
[".gecko_rev.yml", "######", f"GECKO_HEAD_REV: {tag_data['node']}"]
)
else:
replacements.extend(
mk_gecko_rev_replacement(
"GECKO_HEAD_REV", gecko_rev_yml["GECKO_HEAD_REV"], tag_data["node"]
)
)
)
merge_config["replacements"].extend(replacements)

Просмотреть файл

@ -78,5 +78,6 @@ tasks:
upstream: mozilla-esr128
tag: 'FIREFOX_{major_version}_{minor_version_plus1}(_\d+)?esr_BUILD\d'
base: '(FIREFOX_ESR_{major_version}_BASE|FIREFOX_{major_version}_{minor_version}(_\d+)?)esr_BUILD\d'
default: null
run-on-projects: []
expiration-policy: long