orphans: set flag date for ending golang exemption #13064

Closed
gotmax23 wants to merge 1 commit from orphaned-golang-flag-date into main

View file

@ -41,6 +41,8 @@ try:
except ImportError:
with_table = False
GOLANG_EXEMPTION_FLAG_DATE = datetime.datetime(2025, 11, 3, tzinfo=datetime.UTC)
@lru_cache(maxsize=20480)
def SRPM(query, package):
@ -144,22 +146,17 @@ RELEASES = {
ORPHAN_UID = "orphan"
HEADER = """\
SPECIAL NOTE: As of https://pagure.io/fesco/issue/3447,
all packages containing Golang libraries that are not leaves are exempted from
automatic retirement until the new Golang Packaging Guidelines are approved by
the Packaging Committee and published.
These packages are still listed in the report, but there is an additional list
of packages with exemptions included at the end.
Applications written in Go that do not include libraries used by other Go packages
are NOT subject to this exemption and will be retired as usual.
It is recommended not to unorphan any Golang libraries in the interim.
Instead, the Go SIG suggests waiting until the new guidelines are published and
then porting your packages to the new tooling that uses vendored dependencies,
obsoleting the current approach involving golang-*-devel packages.
Packagers interested in being early adopters or testers of the new tooling are
welcome to join #golang:fedoraproject.org on Matrix.
Once the new guidelines are fully implemented, automatic retirements of
orphaned Golang packages will resume after a six-week grace period.
SPECIAL NOTE: The exception for Golang library packages granted in
https://pagure.io/fesco/issue/3447, is going away,
as the new Golang Packaging Guidelines have been released.
2025-11-03 is the flag date for resuming retirements for these packages.
Any package orphaned before the flag date will be retired
six weeks after the flag date around 2025-12-15.
Packages orphaned after the flag date will be retied six weeks after they were
orphaned, per the usual policy.
Note that, if a Golang library becomes a leaf in a subsequent report, it will
be retired based on when it was originally orphaned, not the flag date,
as leaf packages are not subject to the exemption issued by FESCo.
The following packages are orphaned and will be retired when they
are orphaned for six weeks, unless someone adopts them. If you know for sure
@ -568,19 +565,26 @@ class DepChecker:
def maintainer_table(
packages, pagure_dict
packages, pagure_dict, golang_exemptions: set[str]
) -> tuple[Any, dict[str, set[str]], list[str]]:
affected_people: dict[str, set[str]] = {}
all_addresses: set[str] = set()
if with_table:
table = texttable.Texttable(max_width=80)
table.header(["Package", "(co)maintainers", "Status Change"])
table.set_cols_align(["l", "l", "l"])
header = ["Package", "(co)maintainers", "Status Change"]
if golang_exemptions:
header.append("Time since Golang flag date")
table.header(header)
align = ["1"] * len(header)
table.set_cols_align(align)
table.set_deco(table.HEADER)
else:
table = ""
now = datetime.datetime.now(datetime.timezone.utc)
time_since_golang_delta = now - GOLANG_EXEMPTION_FLAG_DATE
time_since_golang_str = f"{time_since_golang_delta.days // 7} weeks ago"
for package_name in packages:
pkginfo = pagure_dict[package_name]
people, addresses = pkginfo.get_people_and_emails()
@ -588,13 +592,22 @@ def maintainer_table(
for p in people:
affected_people.setdefault(p, set()).add(package_name)
p = ", ".join(people)
age = pkginfo.age
agestr = f"{age.days // 7} weeks ago"
time_since_golang = "n/a"
if golang_exemptions and package_name in golang_exemptions:
sc: datetime.datetime = pkginfo.status_change
if sc < GOLANG_EXEMPTION_FLAG_DATE:
time_since_golang = time_since_golang_str
if with_table:
table.add_row([package_name, p, agestr])
row = [package_name, p, agestr]
if golang_exemptions:
row.append(time_since_golang)
table.add_row(row)
else:
table += f"{package_name} {p} {agestr}\n"
table += f"{package_name} {p} {agestr} {time_since_golang}\n"
all_addresses.discard(f"{ORPHAN_UID}@fedoraproject.org")
if with_table:
@ -692,7 +705,13 @@ def package_info(
info_dict: dict[str, Any] = {}
pagure_dict = depchecker.pagure_dict
table, affected_people, addresses = maintainer_table(unblocked, pagure_dict)
ge_set = set()
if go_package_data:
info_dict["golang_exemptions"] = get_golang_exemptions(
go_package_data, unblocked
)
ge_set = set(info_dict["golang_exemptions"])
table, affected_people, addresses = maintainer_table(unblocked, pagure_dict, ge_set)
info_dict["affected_people"] = {
key: list(value) for key, value in affected_people.items()
}
@ -822,11 +841,8 @@ def package_info(
)
if go_package_data:
info_dict["golang_exemptions"] = get_golang_exemptions(
go_package_data, unblocked
)
info += wrap_and_format(
f"Golang orphans{release_text} that are exempted from retirement",
f"Non-leaf golang library packages{release_text}",
info_dict["golang_exemptions"],
)