Skip to content

Commit 6b3b63c

Browse files
committed
[libc++] Avoid synchronizing status files for "In Progress" issues
This doesn't provide much value and it creates a lot of churn in the CSV files.
1 parent 2bda9e1 commit 6b3b63c

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

libcxx/utils/synchronize_csv_status_files.py

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -128,9 +128,6 @@ def to_csv_entry(self) -> str:
128128
}
129129
return self._original if self._original is not None else mapping[self._status]
130130

131-
def is_done(self) -> bool:
132-
return self._status == PaperStatus.DONE or self._status == PaperStatus.NOTHING_TO_DO
133-
134131
class PaperInfo:
135132
paper_number: str
136133
"""
@@ -250,21 +247,25 @@ def merge(paper: PaperInfo, gh: PaperInfo) -> PaperInfo:
250247
row with the newer status. Otherwise, report an error if they have a different status because
251248
something must be wrong.
252249
250+
We don't update issues from 'To Do' to 'In Progress', since that only creates churn and the
251+
status files aim to document user-facing functionality in releases, for which 'In Progress'
252+
is not useful.
253+
253254
In case we don't update the CSV row's status, we still take any updated notes coming
254255
from the Github issue.
255256
"""
256-
if paper.status < gh.status:
257-
return gh
258-
elif paper.status != gh.status:
259-
print(f"We found a CSV row and a Github issue with different statuses:\nrow: {paper}\nGithub issue: {gh}")
260-
return paper
257+
if paper.status == PaperStatus(PaperStatus.TODO) and gh.status == PaperStatus(PaperStatus.IN_PROGRESS):
258+
result = copy.deepcopy(paper)
259+
result.notes = gh.notes
260+
elif paper.status < gh.status:
261+
result = copy.deepcopy(gh)
262+
elif paper.status == gh.status:
263+
result = copy.deepcopy(paper)
264+
result.notes = gh.notes
261265
else:
262-
# Retain the notes from the Github issue, if any
263-
if gh.notes is not None:
264-
cp = copy.deepcopy(paper)
265-
cp.notes = gh.notes
266-
return cp
267-
return paper
266+
print(f"We found a CSV row and a Github issue with different statuses:\nrow: {paper}\nGithub issue: {gh}")
267+
result = copy.deepcopy(paper)
268+
return result
268269

269270
def load_csv(file: pathlib.Path) -> List[Tuple]:
270271
rows = []

0 commit comments

Comments
 (0)