changelog/submit: skip empty --existing-changelog-filename#152
Merged
Conversation
When a PR has no previously-committed changelog file, the evaluate step
output `existing-changelog-filename` is empty, and we were unconditionally
forwarding `--existing-changelog-filename ""` to `docs-builder changelog
prepare-artifact`.
docs-builder's prepare-artifact treats `""` as a real filename and
ends up calling `Path.Combine(outputDir, "") == outputDir`, then tries
to write the YAML at the output directory path itself, which fails on
Linux with EACCES ("Access to the path '...' is denied").
Only pass the flag when the value is non-empty. A complementary fix
in docs-builder will guard against the empty-string case as well.
Repro: elastic/cloud PR #154858 / run 25721575364
Co-authored-by: Cursor <cursoragent@cursor.com>
reakaleek
approved these changes
May 13, 2026
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.
Summary
When a PR has no previously-committed changelog file, the evaluate step output
existing-changelog-filenameis empty, and we were unconditionally forwarding--existing-changelog-filename ""todocs-builder changelog prepare-artifact.docs-builder's
ChangelogPrepareArtifactServicetreats""as a real filename:The write target ends up being the output directory path itself, and on Linux opening a directory for write returns
EACCES:This change only forwards
--existing-changelog-filenamewhen the value is non-empty. A complementary fix inelastic/docs-builderwill treat""as null inside the service so neither side relies on the other.The regression became visible after docs-builder commit
0d6115b8migrated the CLI from ConsoleAppFramework to Nullean.Argh, which no longer maps--flag ""tonull.Repro: elastic/cloud PR #154858 / run 25721575364.
Test plan
prepare-artifactsucceeds.existing-changelog-filename(PR with a prior committed changelog) still works.Made with Cursor