Skip to content

Preserve changelogs/current/PLACEHOLDER.txt in entries-layout changelog writes#4643

Draft
Copilot wants to merge 2 commits into
mainfrom
copilot/envoybaseutils-fix-placeholder-remove
Draft

Preserve changelogs/current/PLACEHOLDER.txt in entries-layout changelog writes#4643
Copilot wants to merge 2 commits into
mainfrom
copilot/envoybaseutils-fix-placeholder-remove

Conversation

Copilot AI commented Jun 11, 2026

Copy link
Copy Markdown
Contributor

AChangelogs.write_version() and write_current() in entries-layout mode could leave changelogs/current/ empty after writing a release/dev changelog. That removed current/PLACEHOLDER.txt, which Envoy’s changelog filegroup expects, and caused downstream workflow failures.

  • Root cause addressed

    • Entries-layout flows recreated changelogs/current/ but did not restore the tracked placeholder file.
  • Code changes

    • Added CHANGELOG_CURRENT_PLACEHOLDER = "PLACEHOLDER.txt" in the changelog constants.
    • Added AChangelogs.current_placeholder_path:
      • self.current_dir_path.joinpath(CHANGELOG_CURRENT_PLACEHOLDER).
    • Updated entries-layout write_current() to ensure directory + placeholder:
      • mkdir(..., exist_ok=True) then current_placeholder_path.touch().
    • Updated entries-layout write_version() to restore placeholder after clearing/recreating current/:
      • shutil.rmtree(...), mkdir(), then current_placeholder_path.touch().
  • Test updates

    • Added unit coverage for current_placeholder_path.
    • Extended write_current / write_version tests to assert touch() behavior on entries-layout vs legacy paths.
    • Extended parse-error path test to assert placeholder is not touched on failure.
    • Updated entries-layout end-to-end test to assert post-write_version state contains exactly one file: empty PLACEHOLDER.txt.
if self.entries_layout:
    self.current_dir_path.mkdir(parents=True, exist_ok=True)
    self.current_placeholder_path.touch()

# ...
if self.entries_layout:
    data = self.changelog_class.get_data_from_entries(self.current_dir_path)
    data["date"] = self.datestamp
    version_file.write_text(self.dump_yaml(data))
    shutil.rmtree(self.current_dir_path)
    self.current_dir_path.mkdir()
    self.current_placeholder_path.touch()

@netlify

netlify Bot commented Jun 11, 2026

Copy link
Copy Markdown

Deploy Preview for nifty-bassi-e26446 ready!

Name Link
🔨 Latest commit def93c0
🔍 Latest deploy log https://app.netlify.com/projects/nifty-bassi-e26446/deploys/6a2b0b5b7a73560008b12f92
😎 Deploy Preview https://deploy-preview-4643--nifty-bassi-e26446.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

Co-authored-by: phlax <454682+phlax@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix write_version method to preserve PLACEHOLDER.txt Preserve changelogs/current/PLACEHOLDER.txt in entries-layout changelog writes Jun 11, 2026
Copilot finished work on behalf of phlax June 11, 2026 19:24
Copilot AI requested a review from phlax June 11, 2026 19:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants