Skip to content

Commit fbdb005

Browse files
committed
Fix order of arangodb-branches (4.0 < oem)
1 parent 7e88f8b commit fbdb005

File tree

3 files changed

+23
-3
lines changed

3 files changed

+23
-3
lines changed

.circleci/config.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,9 +122,10 @@ jobs:
122122
123123
pip install pyyaml requests
124124
125+
# The list of branches needs to be sorted by name (based on the `name` field in versions.yaml)!
125126
python3 generate_config.py \
126127
--workflow << pipeline.parameters.workflow >> \
127-
--arangodb-branches << pipeline.parameters.arangodb-3_10 >> << pipeline.parameters.arangodb-3_11 >> << pipeline.parameters.arangodb-oem >> << pipeline.parameters.arangodb-3_12 >> << pipeline.parameters.arangodb-4_0 >> \
128+
--arangodb-branches << pipeline.parameters.arangodb-3_10 >> << pipeline.parameters.arangodb-3_11 >> << pipeline.parameters.arangodb-3_12 >> << pipeline.parameters.arangodb-4_0 >> << pipeline.parameters.arangodb-oem >> \
128129
--arangodb-branch << pipeline.parameters.arangodb-branch >> \
129130
--release-type << pipeline.parameters.release-type >> \
130131
--docs-version << pipeline.parameters.docs-version >> \

.circleci/generate_config.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
## Load versions
2020
versions = yaml.safe_load(open("versions.yaml", "r"))
21-
versions = sorted(versions["/arangodb/"], key=lambda d: d['name'])
21+
versions = sorted(versions["/arangodb/"], key=lambda d: d['name'])
2222

2323

2424
print(f"Loaded versions {versions}")
@@ -33,7 +33,7 @@
3333
"--workflow", help="The workflow to trigger", type=str
3434
)
3535
parser.add_argument(
36-
"--arangodb-branches", nargs='+', help="The arangodb/arangodb branches to be used for the generate workflow"
36+
"--arangodb-branches", nargs='+', help="The arangodb/arangodb branches to be used for the generate workflow (sorted by name)"
3737
)
3838
parser.add_argument(
3939
"--arangodb-branch", help="The arangodb/arangodb branch to be used for the release workflow", type=str

README.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,25 @@ It makes a warning show at the top of every page for that version.
957957
+ --arangodb-branches << pipeline.parameters.arangodb-3_11 >> << pipeline.parameters.arangodb-3_12 >> << pipeline.parameters.arangodb-4_0 >> \
958958
```
959959

960+
Note that the order of the branches is important because the version information
961+
is looked up based on the index number. The branches need to be ordered according
962+
to a sorted list of the `name` fields as defined in the `versions.yaml`.
963+
964+
Code excerpt from `generate_config.py`:
965+
966+
```py
967+
versions = yaml.safe_load(open("versions.yaml", "r"))
968+
versions = sorted(versions["/arangodb/"], key=lambda d: d['name'])
969+
970+
def workflow_generate(config):
971+
# ...
972+
973+
for i in range(len(versions)):
974+
version = versions[i]["name"]
975+
# ...
976+
branch = args.arangodb_branches[i]
977+
```
978+
960979
3. In the `toolchain/docker/amd64/docker-compose.yml` file, add an entry under
961980
`services.toolchain.volumes` for the new version. Simply increment the value
962981
after `:-/tmp/`. Example:

0 commit comments

Comments
 (0)