Relocate entries-layout changelog date to changelogs/current/.date with current.yaml read fallback#4577
Closed
Copilot wants to merge 2 commits into
Closed
Relocate entries-layout changelog date to changelogs/current/.date with current.yaml read fallback#4577Copilot wants to merge 2 commits into
changelogs/current/.date with current.yaml read fallback#4577Copilot wants to merge 2 commits into
Conversation
✅ Deploy Preview for nifty-bassi-e26446 ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Agent-Logs-Url: https://github.com/envoyproxy/toolshed/sessions/264d26cf-17a5-4c83-9469-fa1116b6a9ca Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Remove release date from current.yaml in changelog
Relocate entries-layout changelog date to May 20, 2026
changelogs/current/.date with current.yaml read fallback
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This updates entries-layout changelog state so release date no longer depends on
changelogs/current.yaml. In entries mode, date is now read/written fromchangelogs/current/.date, while keeping a compatibility read fallback tocurrent.yamlwhen.dateis absent.New on-disk date source for entries layout
CHANGELOG_CURRENT_DATE_PATH = "changelogs/current/.date".rel_current_date_pathandcurrent_date_pathhelpers onAChangelogs.Entries-layout parse behavior
AChangelog.get_data_from_entries(...)to:.datewhen present,current.yamldate when.dateis missing,ChangelogParseErrorwhen neither source exists.Entries-layout write paths no longer touch
current.yamlwrite_current()now createschangelogs/current/and writesPending\nto.date.write_date()now writes the formatted date to.date.write_version()now freezes current data, recreateschangelogs/current/, and resets.datetoPending\n(without writingcurrent.yaml).Commit change-set updates
changes_for_commit()now addsCHANGELOG_CURRENT_DATE_PATH(instead ofCHANGELOG_CURRENT_PATH) forrelease/devwhen_entries_layoutis true.Test coverage updates
AChangelogstests forwrite_current,write_date,write_version, andchanges_for_commitin entries mode.get_data_from_entriestests for:.date-first reads,.date-only repos (nocurrent.yaml) acrossis_pending,write_date, andwrite_version.Original prompt
Background
This is the second PR in a sequence to remove
changelogs/current.yamlfromenvoyproxy/envoyand from the toolshed tooling that drives the changelog lifecycle.current.yaml, makingchangelogs/current/(the directory) the sentinel.date(Pending/May 19, 2026) out ofcurrent.yamlso the yaml file has no remaining functional role in entries-layout mode.current.yamlreferences.Context envoy PR: envoyproxy/envoy#45093
Context envoy issue: envoyproxy/envoy#45095
Goal
In entries-layout mode, store the release date in a small dedicated file inside
changelogs/current/instead of inchangelogs/current.yaml. After this PR, an envoy checkout with only thechangelogs/current/directory (nocurrent.yaml) MUST be fully usable end-to-end: parse, check date, write date on release, freeze on dev, etc.For a transition window, support reading the date from
changelogs/current.yamlif the new date file is missing (compatibility shim — to be removed in PR 3).New on-disk format
CHANGELOG_CURRENT_DATE_PATH = "changelogs/current/.date".Pendingor a formatted date string (same format as today —DATE_FORMAT = "%B %-d, %Y"). No yaml, no key prefix — just the value, optional trailing newline.Scope (entries-layout only)
All behavioral changes MUST be gated on
_entries_layoutbeing true. The legacy single-yaml layout (nochangelogs/current/directory) MUST be completely unaffected — same reads, same writes, same commit set.Required changes
py/envoy.base.utils/envoy/base/utils/abstract/project/changelog.pyAdd the constant:
In
AChangelogs, add helpers:rel_current_date_path->pathlib.Path(CHANGELOG_CURRENT_DATE_PATH)current_date_path->self.project.path.joinpath(self.rel_current_date_path)Update the following methods. In every case, if
_entries_layoutis false, behavior is unchanged.AChangelog.get_data_from_entriesCurrently reads
datefrom the yaml file atyaml_path. Change to:current_date_pathexists, readdatefrom it (strip whitespace).ChangelogParseErrorwith a clear message.The function's signature can stay the same (
yaml_path,entry_dir); just consult the sibling date file first. Alternatively, refactor to take anAChangelogsreference — pick whichever is cleaner; the abstract method onAChangelogsalready has both pieces of state available.AChangelogs.write_currentIn entries-layout branch, replace:
with:
Do NOT write to
current_pathanymore in entries mode.AChangelogs.write_dateIn entries-layout branch, replace:
with:
AChangelogs.write_versionIn entries-layout branch, the current sequence is:
Change to:
Do NOT touch
current_pathin entries mode.AChangelogs.is_pendingCurrently:
That goes through
AChangelog.data->get_data_from_entries, so onceget_data_from_entriesreads the new file,is_pendingworks automatically. No change needed unless you want to short-circuit by readingcurrent_date_pathdirectly (optional optimization — fine to leave).AChangelogs.changes_for_commitCurrently adds
CHANGELOG_CURRENT_PATHto the commit set onrelease/dev. In entries-layout mode, swap to the new date file: