Skip to content

Commit

Permalink
Make sure everything behaves correctly during the branching window
Browse files Browse the repository at this point in the history
  • Loading branch information
FrostyX committed Feb 16, 2024
1 parent 1666344 commit c40b192
Show file tree
Hide file tree
Showing 5 changed files with 482 additions and 1 deletion.
8 changes: 8 additions & 0 deletions fedora_distro_aliases/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,16 @@ def get_distro_aliases():
"name": "Rawhide",
"long_name": "Fedora Rawhide",
"version": "rawhide",
"branch": "rawhide",
})

# During the window from branching to the final release, things can get
# weird. Bodhi can be lying to us. For example, F40 was branched yesterday,
# therefore Rawhide is F41 now. However bodhi says that Fedora 40 branch is
# `rawhide` and F41 branch is `f41`.
if fedora[-2].branch == "rawhide":
fedora[-2].branch = "f{0}".format(fedora[-2].version)

fedora_stable = [x for x in fedora if x.state == "current"]
fedora_devel = [x for x in fedora if x.state == "pending"]

Expand Down
296 changes: 296 additions & 0 deletions tests/data/bodhi-f40-branch-window-current.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,296 @@
{
"releases": [
{
"name": "EPEL-7",
"long_name": "Fedora EPEL 7",
"version": "7",
"id_prefix": "FEDORA-EPEL",
"branch": "epel7",
"dist_tag": "epel7",
"stable_tag": "epel7",
"testing_tag": "epel7-testing",
"candidate_tag": "epel7-testing-candidate",
"pending_signing_tag": "epel7-signing-pending",
"pending_testing_tag": "epel7-testing-pending",
"pending_stable_tag": "epel7-pending",
"override_tag": "epel7-override",
"mail_template": "fedora_epel_legacy_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": null,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": null,
"setting_status": null
},
{
"name": "EPEL-8",
"long_name": "Fedora EPEL 8",
"version": "8",
"id_prefix": "FEDORA-EPEL",
"branch": "epel8",
"dist_tag": "epel8",
"stable_tag": "epel8",
"testing_tag": "epel8-testing",
"candidate_tag": "epel8-testing-candidate",
"pending_signing_tag": "epel8-signing-pending",
"pending_testing_tag": "epel8-testing-pending",
"pending_stable_tag": "epel8-pending",
"override_tag": "epel8-override",
"mail_template": "fedora_epel_legacy_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": null,
"setting_status": null
},
{
"name": "EPEL-8N",
"long_name": "Fedora EPEL 8 Next",
"version": "8",
"id_prefix": "FEDORA-EPEL-NEXT",
"branch": "epel8-next",
"dist_tag": "epel8-next",
"stable_tag": "epel8-next",
"testing_tag": "epel8-next-testing",
"candidate_tag": "epel8-next-testing-candidate",
"pending_signing_tag": "epel8-next-signing-pending",
"pending_testing_tag": "epel8-next-testing-pending",
"pending_stable_tag": "epel8-next-pending",
"override_tag": "epel8-next-override",
"mail_template": "fedora_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": null,
"setting_status": null
},
{
"name": "EPEL-9",
"long_name": "Fedora EPEL 9",
"version": "9",
"id_prefix": "FEDORA-EPEL",
"branch": "epel9",
"dist_tag": "epel9",
"stable_tag": "epel9",
"testing_tag": "epel9-testing",
"candidate_tag": "epel9-testing-candidate",
"pending_signing_tag": "epel9-signing-pending",
"pending_testing_tag": "epel9-testing-pending",
"pending_stable_tag": "epel9-pending",
"override_tag": "epel9-override",
"mail_template": "fedora_epel_legacy_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": null,
"setting_status": null
},
{
"name": "EPEL-9N",
"long_name": "Fedora EPEL 9 Next",
"version": "9",
"id_prefix": "FEDORA-EPEL-NEXT",
"branch": "epel9-next",
"dist_tag": "epel9-next",
"stable_tag": "epel9-next",
"testing_tag": "epel9-next-testing",
"candidate_tag": "epel9-next-testing-candidate",
"pending_signing_tag": "epel9-next-signing-pending",
"pending_testing_tag": "epel9-next-testing-pending",
"pending_stable_tag": "epel9-next-pending",
"override_tag": "epel9-next-override",
"mail_template": "fedora_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": null,
"setting_status": null
},
{
"name": "F38",
"long_name": "Fedora 38",
"version": "38",
"id_prefix": "FEDORA",
"branch": "f38",
"dist_tag": "f38",
"stable_tag": "f38-updates",
"testing_tag": "f38-updates-testing",
"candidate_tag": "f38-updates-candidate",
"pending_signing_tag": "f38-signing-pending",
"pending_testing_tag": "f38-updates-testing-pending",
"pending_stable_tag": "f38-updates-pending",
"override_tag": "f38-override",
"mail_template": "fedora_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "dnf",
"testing_repository": "updates-testing",
"released_on": null,
"eol": "2024-05-14",
"setting_status": null
},
{
"name": "F38C",
"long_name": "Fedora 38 Containers",
"version": "38",
"id_prefix": "FEDORA-CONTAINER",
"branch": "f38",
"dist_tag": "f38-container",
"stable_tag": "f38-container-updates",
"testing_tag": "f38-container-updates-testing",
"candidate_tag": "f38-container-updates-candidate",
"pending_signing_tag": "",
"pending_testing_tag": "f38-container-updates-testing-pending",
"pending_stable_tag": "f38-container-updates-pending",
"override_tag": "f38-container-override",
"mail_template": "fedora_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": "2024-05-14",
"setting_status": null
},
{
"name": "F38F",
"long_name": "Fedora 38 Flatpaks",
"version": "38",
"id_prefix": "FEDORA-FLATPAK",
"branch": "f38",
"dist_tag": "f38-flatpak",
"stable_tag": "f38-flatpak-updates",
"testing_tag": "f38-flatpak-updates-testing",
"candidate_tag": "f38-flatpak-updates-candidate",
"pending_signing_tag": "",
"pending_testing_tag": "f38-flatpak-updates-testing-pending",
"pending_stable_tag": "f38-flatpak-updates-pending",
"override_tag": "f38-flatpak-override",
"mail_template": "fedora_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": null,
"setting_status": null
},
{
"name": "F38M",
"long_name": "Fedora 38 Modular",
"version": "38",
"id_prefix": "FEDORA-MODULAR",
"branch": "f38m",
"dist_tag": "f38-modular",
"stable_tag": "f38-modular-updates",
"testing_tag": "f38-modular-updates-testing",
"candidate_tag": "f38-modular-updates-candidate",
"pending_signing_tag": "f38-modular-signing-pending",
"pending_testing_tag": "f38-modular-updates-testing-pending",
"pending_stable_tag": "f38-modular-updates-pending",
"override_tag": "f38-modular-override",
"mail_template": "fedora_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": "2024-05-14",
"setting_status": null
},
{
"name": "F39",
"long_name": "Fedora 39",
"version": "39",
"id_prefix": "FEDORA",
"branch": "f39",
"dist_tag": "f39",
"stable_tag": "f39-updates",
"testing_tag": "f39-updates-testing",
"candidate_tag": "f39-updates-candidate",
"pending_signing_tag": "f39-signing-pending",
"pending_testing_tag": "f39-updates-testing-pending",
"pending_stable_tag": "f39-updates-pending",
"override_tag": "f39-override",
"mail_template": "fedora_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "dnf",
"testing_repository": "updates-testing",
"released_on": null,
"eol": "2024-11-12",
"setting_status": null
},
{
"name": "F39C",
"long_name": "Fedora 39 Containers",
"version": "39",
"id_prefix": "FEDORA-CONTAINER",
"branch": "f39",
"dist_tag": "f39-container",
"stable_tag": "f39-container-updates",
"testing_tag": "f39-container-updates-testing",
"candidate_tag": "f39-container-updates-candidate",
"pending_signing_tag": "",
"pending_testing_tag": "f39-container-updates-testing-pending",
"pending_stable_tag": "f39-container-updates-pending",
"override_tag": "f39-container-override",
"mail_template": "fedora_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": "2024-11-12",
"setting_status": null
},
{
"name": "F39F",
"long_name": "Fedora 39 Flatpaks",
"version": "39",
"id_prefix": "FEDORA-FLATPAK",
"branch": "f39",
"dist_tag": "f39-flatpak",
"stable_tag": "f39-flatpak-updates",
"testing_tag": "f39-flatpak-updates-testing",
"candidate_tag": "f39-flatpak-updates-candidate",
"pending_signing_tag": "",
"pending_testing_tag": "f39-flatpak-updates-testing-pending",
"pending_stable_tag": "f39-flatpak-updates-pending",
"override_tag": "f39-flatpak-override",
"mail_template": "fedora_errata_template",
"state": "current",
"composed_by_bodhi": true,
"create_automatic_updates": false,
"package_manager": "unspecified",
"testing_repository": null,
"released_on": null,
"eol": "2024-11-12",
"setting_status": null
}
],
"page": 1,
"pages": 1,
"rows_per_page": 20,
"total": 12
}
7 changes: 7 additions & 0 deletions tests/data/bodhi-f40-branch-window-frozen.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"releases": [],
"page": 1,
"pages": 0,
"rows_per_page": 20,
"total": 0
}
Loading

0 comments on commit c40b192

Please sign in to comment.