From 2a0232504395e789901da69f0c34b719de65222d Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 12 Nov 2020 11:51:25 -0800 Subject: [PATCH 1/2] hack/backfill: Add a backfilling script Following up on 646535a052 (Add all previous minor stable versions to current minor fast and stable, 2020-10-29, #526) with improved backfilling logic. The idea is that all previous-minor releases in the previous minor's branch of the same weight are in your branch (e.g. 4.3.0 is in candidate-4.3, so it gets backfilled into candidate-4.4). And all current-minor releases in the next-minor's branch of the same weight are in your branch (e.g. if 4.5.0 was in candidate-4.6, it would be backfilled into candidate-4.5, but currently no changes from this logic). --- hack/backfill.py | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100755 hack/backfill.py diff --git a/hack/backfill.py b/hack/backfill.py new file mode 100755 index 000000000..49b66d738 --- /dev/null +++ b/hack/backfill.py @@ -0,0 +1,44 @@ +#!/usr/bin/env python3 + +import functools +import re + +import yaml + + +SEMVER = re.compile('^(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)\.(?P0|[1-9]\d*)(?:-(?P(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+(?P[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*))?$') + + +def version_key(v, minor): + match = SEMVER.match(v) + groups = match.groupdict() + v_minor = int(groups['minor']) + v_patch = int(groups['patch']) + if v_minor != minor: + v_patch = -v_patch + return (int(groups['major']), v_minor, v_patch, v) + + +data = {} +minors = [3, 4, 5, 6] +weights = ['candidate', 'fast', 'stable'] +for minor in minors: + data[minor] = {} + for weight in weights: + with open('channels/{}-4.{}.yaml'.format(weight, minor)) as f: + data[minor][weight] = yaml.safe_load(f) + +for minor, next_minor in zip(minors, minors[1:]): + for weight in weights: + versions = set(data[minor][weight]['versions']) + versions.update(v for v in data[next_minor][weight]['versions'] if v.startswith('4.{}.'.format(minor))) + data[minor][weight]['versions'] = sorted(versions, key=functools.partial(version_key, minor=minor)) + + versions = set(data[next_minor][weight]['versions']) + versions.update(v for v in data[minor][weight]['versions'] if v.startswith('4.{}.'.format(minor))) + data[next_minor][weight]['versions'] = sorted(versions, key=functools.partial(version_key, minor=next_minor)) + +for minor in minors: + for weight in weights: + with open('channels/{}-4.{}.yaml'.format(weight, minor), 'w') as f: + yaml.safe_dump(data[minor][weight], f, default_flow_style=False) From 1d9fe0ff885054c44ca11f63bde9dcbcc6c8c02e Mon Sep 17 00:00:00 2001 From: "W. Trevor King" Date: Thu, 12 Nov 2020 11:56:24 -0800 Subject: [PATCH 2/2] channels: More backfilling (e.g. 4.3.0 in candidate-4.4) Generated with: $ hack/backfill.py $ git checkout HEAD -- channels/candidate-4.3.yaml $ emacs channels/candidate-4.4.yaml $ git checkout HEAD -- channels/stable-4.6.yaml With the candidate-4.3 and 4.4 massaging so we don't get: - 4.3.14 +- 4.3.14+amd64 and similar, where all arches went into candidate-4.3, but only amd64 went into the candidate-4.4, 5ff491a42f (Enable 4.3.14 in candidate channel(s), 2020-04-22, #193). The stable-4.6 massaging is because we are delaying the 4.5->4.6 stable updates while we convince ourselves that fast traffic is sufficiently reliable. --- channels/candidate-4.4.yaml | 8 +++++++- channels/candidate-4.5.yaml | 22 +++++++++++++++++++--- channels/candidate-4.6.yaml | 14 ++++++++------ channels/fast-4.4.yaml | 10 +++++++++- channels/fast-4.5.yaml | 11 ++++++++--- channels/fast-4.6.yaml | 2 -- channels/stable-4.4.yaml | 10 +++++++++- channels/stable-4.5.yaml | 9 ++++++--- 8 files changed, 66 insertions(+), 20 deletions(-) diff --git a/channels/candidate-4.4.yaml b/channels/candidate-4.4.yaml index 1bb178a3b..28e87cda6 100644 --- a/channels/candidate-4.4.yaml +++ b/channels/candidate-4.4.yaml @@ -26,6 +26,13 @@ versions: - 4.3.9 - 4.3.8 - 4.3.5 +- 4.3.3 +- 4.3.2 +- 4.3.1 +- 4.3.0 +- 4.3.0-0.hotfix-2020-09-30-133631 +- 4.3.0-rc.0 +- 4.3.0-rc.3 - 4.4.0 - 4.4.0-rc.0 - 4.4.0-rc.1 @@ -67,5 +74,4 @@ versions: - 4.4.27 - 4.4.28 - 4.4.29 - - 4.4.30 diff --git a/channels/candidate-4.5.yaml b/channels/candidate-4.5.yaml index bb966b12b..ed04d667b 100644 --- a/channels/candidate-4.5.yaml +++ b/channels/candidate-4.5.yaml @@ -1,5 +1,5 @@ name: candidate-4.5 -versions: +versions: - 4.4.30 - 4.4.29 - 4.4.28 @@ -23,7 +23,25 @@ versions: - 4.4.10 - 4.4.9 - 4.4.8 +- 4.4.7 - 4.4.6 +- 4.4.5 +- 4.4.4 +- 4.4.3 +- 4.4.2 +- 4.4.0 +- 4.4.0-rc.0 +- 4.4.0-rc.1 +- 4.4.0-rc.10 +- 4.4.0-rc.11 +- 4.4.0-rc.12 +- 4.4.0-rc.13 +- 4.4.0-rc.2 +- 4.4.0-rc.4 +- 4.4.0-rc.6 +- 4.4.0-rc.7 +- 4.4.0-rc.8 +- 4.4.0-rc.9 - 4.5.0 - 4.5.0-0.hotfix-2020-08-24-185832 - 4.5.0-rc.1 @@ -50,7 +68,5 @@ versions: - 4.5.15 - 4.5.16 - 4.5.17 - - 4.5.18 - - 4.5.19 diff --git a/channels/candidate-4.6.yaml b/channels/candidate-4.6.yaml index bbae2cb22..2f1c355b8 100644 --- a/channels/candidate-4.6.yaml +++ b/channels/candidate-4.6.yaml @@ -1,9 +1,7 @@ name: candidate-4.6 versions: - 4.5.19 - - 4.5.18 - - 4.5.17 - 4.5.16 - 4.5.15 @@ -21,8 +19,15 @@ versions: - 4.5.3 - 4.5.2 - 4.5.1 +- 4.5.1-rc.0 +- 4.5.0 - 4.5.0-0.hotfix-2020-08-24-185832 - +- 4.5.0-rc.1 +- 4.5.0-rc.2 +- 4.5.0-rc.4 +- 4.5.0-rc.5 +- 4.5.0-rc.6 +- 4.5.0-rc.7 - 4.6.0 - 4.6.0-fc.0 - 4.6.0-fc.1 @@ -38,9 +43,6 @@ versions: - 4.6.0-rc.3 - 4.6.0-rc.4 - 4.6.1 - - 4.6.2 - - 4.6.3 - - 4.6.4 diff --git a/channels/fast-4.4.yaml b/channels/fast-4.4.yaml index 2cfa44f62..342c3a431 100644 --- a/channels/fast-4.4.yaml +++ b/channels/fast-4.4.yaml @@ -17,6 +17,15 @@ versions: - 4.3.18 - 4.3.13 - 4.3.12 +- 4.3.10 +- 4.3.9 +- 4.3.8 +- 4.3.5 +- 4.3.3 +- 4.3.2 +- 4.3.1 +- 4.3.0 +- 4.3.0-0.hotfix-2020-09-30-133631 - 4.4.3 - 4.4.4 - 4.4.5 @@ -39,5 +48,4 @@ versions: - 4.4.26 - 4.4.27 - 4.4.29 - - 4.4.30 diff --git a/channels/fast-4.5.yaml b/channels/fast-4.5.yaml index 5d7ec44a8..59320c4c7 100644 --- a/channels/fast-4.5.yaml +++ b/channels/fast-4.5.yaml @@ -1,7 +1,6 @@ name: fast-4.5 versions: - 4.4.30 - - 4.4.29 - 4.4.27 - 4.4.26 @@ -18,6 +17,12 @@ versions: - 4.4.12 - 4.4.11 - 4.4.10 +- 4.4.9 +- 4.4.8 +- 4.4.6 +- 4.4.5 +- 4.4.4 +- 4.4.3 - 4.5.0-0.hotfix-2020-08-24-185832 - 4.5.1 - 4.5.2 @@ -28,12 +33,12 @@ versions: - 4.5.7 - 4.5.8 - 4.5.9 +- 4.5.10 - 4.5.11 +- 4.5.12 - 4.5.13 - 4.5.14 - 4.5.15 - 4.5.16 - - 4.5.17 - - 4.5.18 diff --git a/channels/fast-4.6.yaml b/channels/fast-4.6.yaml index 0d374ca5f..7b6eb4ac0 100644 --- a/channels/fast-4.6.yaml +++ b/channels/fast-4.6.yaml @@ -19,7 +19,5 @@ versions: - 4.5.2 - 4.5.1 - 4.5.0-0.hotfix-2020-08-24-185832 - - 4.6.1 - - 4.6.3 diff --git a/channels/stable-4.4.yaml b/channels/stable-4.4.yaml index ba33da504..cefd39c95 100644 --- a/channels/stable-4.4.yaml +++ b/channels/stable-4.4.yaml @@ -17,6 +17,15 @@ versions: - 4.3.18 - 4.3.13 - 4.3.12 +- 4.3.10 +- 4.3.9 +- 4.3.8 +- 4.3.5 +- 4.3.3 +- 4.3.2 +- 4.3.1 +- 4.3.0 +- 4.3.0-0.hotfix-2020-09-30-133631 - 4.4.3 - 4.4.4 - 4.4.5 @@ -38,5 +47,4 @@ versions: - 4.4.23 - 4.4.26 - 4.4.27 - - 4.4.29 diff --git a/channels/stable-4.5.yaml b/channels/stable-4.5.yaml index c726eeda0..7b550a61e 100644 --- a/channels/stable-4.5.yaml +++ b/channels/stable-4.5.yaml @@ -1,7 +1,6 @@ name: stable-4.5 versions: - 4.4.29 - - 4.4.27 - 4.4.26 - 4.4.23 @@ -17,6 +16,12 @@ versions: - 4.4.12 - 4.4.11 - 4.4.10 +- 4.4.9 +- 4.4.8 +- 4.4.6 +- 4.4.5 +- 4.4.4 +- 4.4.3 - 4.5.0-0.hotfix-2020-08-24-185832 - 4.5.1 - 4.5.2 @@ -32,7 +37,5 @@ versions: - 4.5.14 - 4.5.15 - 4.5.16 - - 4.5.17 - - 4.5.18