Skip to content

Retarget changelog evaluate staging to changelog-ci/ - #308

Open
lcawl wants to merge 2 commits into
mainfrom
hidden-directories-fix
Open

Retarget changelog evaluate staging to changelog-ci/#308
lcawl wants to merge 2 commits into
mainfrom
hidden-directories-fix

Conversation

@lcawl

@lcawl lcawl commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Relates to elastic/docs-builder#3913 (merged).

Problem

changelog-submit was writing staging/artifact files under .artifacts/.... That is a hidden directory, so:

  1. docs-builder ScopedFileSystem rejected the path (fixed in docs-builder for callers that still use .artifacts).
  2. actions/upload-artifact skips hidden paths by default, so upload can fail with “no files found”.

Using include-hidden-files: true was rejected in review: hidden dirs are denied for a reason; the output path should not require that option.

Fix

Retarget evaluate staging/upload to a non-hidden in-repo directory:

  • changelog-ci/changelog-stagingmkdir, changelog add --output, prepare-artifact --staging-dir
  • changelog-ci/changelog-artifactprepare-artifact --output-dir, upload-artifact path

Artifact name stays changelog-staging, so apply still downloads to /tmp/changelog-staging unchanged.

No docs-builder changes are required for this path; changelog-ci/ is already in scope for ChangelogFileSystem / RunnerTempFileSystem.

Notes for reviewers

No per-repo setup is required for changelog-ci/ to work.

Evaluate creates it on the runner with mkdir -p changelog-ci/changelog-staging after checkout. That’s a normal writable workspace dir — no permissions, branch rules, or pre-created folder in the team repos.

Nothing in that folder is committed. Apply only git adds the real changelog YAML under the configured changelog directory (e.g. docs/changelog/…). Staging lives under changelog-ci/ on the evaluate job, is uploaded as the changelog-staging artifact, then apply unpacks it to /tmp/changelog-staging. The job workspace goes away when the run ends.

.gitignore updates are not required for the action. docs-content (for example) already ignores .artifacts, which covered the old path; changelog-ci/ is a different name and isn’t needed for CI.

Optional hygiene: add changelog-ci/ to a consumer .gitignore only if people might run the same local paths and accidentally commit junk. That’s convenience, not a prerequisite for using the action.

@lcawl
lcawl requested a review from a team as a code owner August 21, 2026 18:32
@lcawl
lcawl requested a review from reakaleek August 21, 2026 18:32
@lcawl lcawl added the fix label Aug 21, 2026

@Mpdreamz Mpdreamz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We deny hidden files and folders for a reason. This option should not exist in the first place IMO.

The output path shpuld be configured in the allowed set.

@lcawl lcawl changed the title Add include-hidden-files to changelog submit action Retarget changelog evaluate staging to changelog-ci/ Aug 24, 2026
@lcawl
lcawl force-pushed the hidden-directories-fix branch from 938a893 to b467140 Compare August 24, 2026 19:46
@lcawl

lcawl commented Aug 24, 2026

Copy link
Copy Markdown
Contributor Author

We deny hidden files and folders for a reason. This option should not exist in the first place IMO.

The output path shpuld be configured in the allowed set.

I've added b467140
Lmk if that's not what you had in mind.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants