You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tooling.apache.org by ar...@apache.org on 2026/09/10 11:20:51 UTC
(tooling-trusted-releases) branch arm updated (09923eb7 -> 227c4cff)
This is an automated email from the ASF dual-hosted git repository.
alitheg pushed a change to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
discard 09923eb7 Add attic card into releases to group retired projects
new 227c4cff Add attic card into releases to group retired projects
This update added new revisions after undoing existing revisions.
That is to say, some revisions that were in the old version of the
branch are not in the new version. This situation occurs
when a user --force pushes a change and generates a repository
containing something like this:
* -- * -- B -- O -- O -- O (09923eb7)
\
N -- N -- N refs/heads/arm (227c4cff)
You should already have received notification emails for all of the O
revisions, and so the following emails describe only the N revisions
from the common base, B.
Any revisions marked "omit" are not gone; other references still
refer to them. Any revisions marked "discard" are gone forever.
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
Summary of changes:
atr/get/release.py | 4 ++--
tests/unit/test_releases_catalog.py | 34 ++++++++++++++++++++++++++++++----
2 files changed, 32 insertions(+), 6 deletions(-)
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org
(tooling-trusted-releases) 01/01: Add attic card into releases to group retired projects
Posted by ar...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
alitheg pushed a commit to branch arm
in repository https://gitbox.apache.org/repos/asf/tooling-trusted-releases.git
commit 227c4cff698fb6467269568a46a551210282c9dd
Author: Alastair McFarlane <ar...@apache.org>
AuthorDate: Thu Sep 10 11:50:42 2026 +0100
Add attic card into releases to group retired projects
---
atr/get/release.py | 28 +++++++++++++++++++++-------
atr/templates/committee-view.html | 2 +-
tests/unit/test_releases_catalog.py | 34 ++++++++++++++++++++++++++++++----
3 files changed, 52 insertions(+), 12 deletions(-)
diff --git a/atr/get/release.py b/atr/get/release.py
index 110190cd..e39b25f3 100644
--- a/atr/get/release.py
+++ b/atr/get/release.py
@@ -18,8 +18,8 @@
import collections
import dataclasses
import datetime
-from collections.abc import Sequence
-from typing import Literal
+from collections.abc import Mapping, Sequence
+from typing import Final, Literal
import asfquart.base as base
@@ -85,10 +85,11 @@ async def releases(_session: web.Committer, _releases: Literal["releases"]) -> s
async with db.session() as data:
latest = await interaction.project_latest_finished(data)
projects = await data.project(_committee=True).all()
+ attic = await data.committee(key=_ATTIC_COMMITTEE_KEY).get()
return await template.render(
"releases.html",
- catalog=_committee_release_catalog(projects, latest),
+ catalog=_committee_release_catalog(projects, latest, attic),
)
@@ -113,6 +114,11 @@ async def select(
)
+# Retired PMCs (which keep their own committee key) and the Attic's own projects fold into a single
+# Attic card on the releases list, matching how the catalogue collapses them under the Attic
+_ATTIC_COMMITTEE_KEY: Final = "attic"
+
+
@dataclasses.dataclass
class _ProjectReleaseEntry:
project: sql.Project
@@ -128,7 +134,9 @@ class _CommitteeReleaseEntry:
def _committee_release_catalog(
- projects: Sequence[sql.Project], latest: dict[str, tuple[int, str, datetime.datetime | None]]
+ projects: Sequence[sql.Project],
+ latest: Mapping[str, tuple[int, str, datetime.datetime | None]],
+ attic: sql.Committee | None,
) -> list[_CommitteeReleaseEntry]:
committees: dict[str, sql.Committee] = {}
by_committee: dict[str, list[_ProjectReleaseEntry]] = collections.defaultdict(list)
@@ -140,9 +148,14 @@ def _committee_release_catalog(
if committee is None:
# Nothing to group it under here, so skip it. Shouldn't happen in practice.
continue
+ # A retired PMC (kept its own key) or an Attic-homed project lands on the Attic card
+ if (attic is not None) and (committee.is_archived or (committee.key == _ATTIC_COMMITTEE_KEY)):
+ key, card = _ATTIC_COMMITTEE_KEY, attic
+ else:
+ key, card = committee.key, committee
finished_count, latest_version, latest_date = finished
- committees[committee.key] = committee
- by_committee[committee.key].append(
+ committees[key] = card
+ by_committee[key].append(
_ProjectReleaseEntry(
project=project,
finished_count=finished_count,
@@ -156,7 +169,8 @@ def _committee_release_catalog(
catalog = [
_CommitteeReleaseEntry(committee=committees[key], projects=entries) for key, entries in by_committee.items()
]
- catalog.sort(key=lambda entry: entry.committee.display_name.lower())
+ # Live committees alphabetically, with the Attic card last
+ catalog.sort(key=lambda entry: (entry.committee.key == _ATTIC_COMMITTEE_KEY, entry.committee.display_name.lower()))
return catalog
diff --git a/atr/templates/committee-view.html b/atr/templates/committee-view.html
index bf837762..c5d4677a 100644
--- a/atr/templates/committee-view.html
+++ b/atr/templates/committee-view.html
@@ -5,7 +5,7 @@
{%- block description -%}Information regarding an Apache committee.{%- endblock description -%}
{% block content %}
- <h1>{{ committee.display_name }}</h1>
+ <h1>{{ committee.display_name }}{% if committee.is_archived %} (retired){% endif %}</h1>
{% if committee.updated %}
<div class="row mb-2">
<p class="text-muted small">Last updated {{ committee.updated.strftime("%Y-%m-%d") }} by {{ committee.updated_by or "unknown" }}</p>
diff --git a/tests/unit/test_releases_catalog.py b/tests/unit/test_releases_catalog.py
index 7f1c9345..0d2a5462 100644
--- a/tests/unit/test_releases_catalog.py
+++ b/tests/unit/test_releases_catalog.py
@@ -38,7 +38,7 @@ def test_committees_sorted_by_display_name() -> None:
]
latest = {"solr": (1, "9.6.1", _MAY), "commons-io": (1, "2.16.1", _MAY)}
- catalog = release._committee_release_catalog(projects, latest)
+ catalog = release._committee_release_catalog(projects, latest, None)
assert [entry.committee.display_name for entry in catalog] == ["Commons", "Solr"]
@@ -47,7 +47,7 @@ def test_empty_version_yields_no_latest() -> None:
tika = sql.Committee(key="tika", name="Tika")
projects = [sql.Project(key="tika", name="Apache Tika", committee=tika)]
- catalog = release._committee_release_catalog(projects, {"tika": (1, "", _MAY)})
+ catalog = release._committee_release_catalog(projects, {"tika": (1, "", _MAY)}, None)
assert catalog[0].projects[0].latest_version is None
@@ -61,7 +61,7 @@ def test_groups_projects_under_their_committee() -> None:
]
latest = {"commons-io": (2, "2.16.1", _MAY), "commons-lang": (3, "3.14.0", None)}
- catalog = release._committee_release_catalog(projects, latest)
+ catalog = release._committee_release_catalog(projects, latest, None)
assert len(catalog) == 1
assert catalog[0].committee.key == "commons"
@@ -71,6 +71,32 @@ def test_groups_projects_under_their_committee() -> None:
]
+def test_retired_committees_fold_into_the_attic_card() -> None:
+ attic = sql.Committee(key="attic", name="Attic")
+ solr = sql.Committee(key="solr", name="Solr")
+ any23 = sql.Committee(key="any23", name="Any23", is_archived=True)
+ projects = [
+ sql.Project(key="solr", name="Apache Solr", committee=solr),
+ sql.Project(key="any23", name="Apache Any23", committee=any23),
+ ]
+ latest = {"solr": (1, "9.6.1", _MAY), "any23": (1, "2.7", _MAY)}
+
+ catalog = release._committee_release_catalog(projects, latest, attic)
+
+ # A live committee keeps its own card; the retired one folds into the Attic card, sorted last
+ assert [entry.committee.key for entry in catalog] == ["solr", "attic"]
+ assert [entry.project.key for entry in catalog[-1].projects] == ["any23"]
+
+
+def test_retired_committees_do_not_fold_without_an_attic_committee() -> None:
+ any23 = sql.Committee(key="any23", name="Any23", is_archived=True)
+ projects = [sql.Project(key="any23", name="Apache Any23", committee=any23)]
+
+ catalog = release._committee_release_catalog(projects, {"any23": (1, "2.7", _MAY)}, None)
+
+ assert [entry.committee.key for entry in catalog] == ["any23"]
+
+
async def test_project_latest_finished_counts_and_picks_the_newest() -> None:
engine = sqlalchemy.ext.asyncio.create_async_engine(
"sqlite+aiosqlite:///:memory:",
@@ -101,7 +127,7 @@ async def test_project_latest_finished_counts_and_picks_the_newest() -> None:
def test_release_with_no_committee_is_skipped() -> None:
projects = [sql.Project(key="orphan", name="Apache Orphan", committee=None)]
- catalog = release._committee_release_catalog(projects, {"orphan": (1, "1.0.0", _MAY)})
+ catalog = release._committee_release_catalog(projects, {"orphan": (1, "1.0.0", _MAY)}, None)
assert catalog == []
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@tooling.apache.org
For additional commands, e-mail: commits-help@tooling.apache.org