Skip to content

[8.19] Fix the reference documentation publish on release - #8985

Merged
flobernd merged 2 commits into
8.19from
fix/8.19-docfx-permissions
Aug 31, 2026
Merged

flobernd merged 2 commits into
8.19from
fix/8.19-docfx-permissions

Conversation

@flobernd

Copy link
Copy Markdown
Member

Summary

Restores the DocFx job of the CD workflow on 8.19 and brings the reference documentation workflows in line with
main. docfx.yml is taken from main unchanged, so an 8.19 release now trims the generated site before pushing,
regenerates the root version index and applies the version retention redirects exactly as a 9.x release does. Both
callers of docfx.yml receive the contents: write grant they were missing, and docfx_manual.yml gains an optional
name input so a specific version can be republished.

Intention

The DocFx job has failed on every 8.19 release since 8.19.24, so refdoc currently ends at 8.19.23 and neither
8.19.24 nor 8.19.25 was ever published. The push to refdoc is rejected:

remote: Permission to elastic/elasticsearch-net.git denied to github-actions[bot]
fatal: unable to access 'https://github.com/elastic/elasticsearch-net/': The requested URL returned error: 403

The repository default for GITHUB_TOKEN is read-only. On main that is compensated for by an explicit grant on
docfx.yml and on both of its callers, since a called workflow cannot request more than its caller holds. Those grants
were added in #8918 and #8948 and were never backported.

A permissions-only fix would leave 8.19 pushing the payload that caused the oversized refdoc failures, and it would
not regenerate the root version index, so docfx.yml is synced in full instead.

Changes

Related

Backports #8850, #8851, #8852, #8853, #8918 and #8948.

The name input of docfx_manual.yml is added to main in #8984, so the file stays identical on both branches.

Notes

Verified by replaying the redirect script from the backported docfx.yml against the current refdoc layout with the
published version set to 8.19.25. It exits cleanly, keeps 9.5.1 as the bleeding edge entry, retains 9.5.1, 9.4.2,
9.3.6 and 8.19.25, and redirects the superseded 8.19.x folders as well as 8.16 through 8.18 to 8.19.25. actionlint
reports no findings on the three changed files.

Backfilling 8.19.24 and 8.19.25 still needs a manual run once this is merged. Re-running the failed release jobs does
not help, because workflow_dispatch and re-runs read the workflow file from the tag, which still carries the old
definition. Dispatching docfx_manual.yml from the 8.19 branch with name set to the wanted version is the way
through, at the cost of building the docs from the branch head rather than from the tag.

The DocFx job of the CD workflow has failed on every 8.19 release since
8.19.24, because pushing the generated site to the refdoc branch gets a
read-only token:

  remote: Permission to elastic/elasticsearch-net.git denied to
  github-actions[bot]

The repository default for GITHUB_TOKEN is read-only. On main that is
compensated for by an explicit grant on docfx.yml and on both of its
callers, since a called workflow cannot request more than its caller
holds. Those grants were never backported (#8918, #8948).

Taking main's docfx.yml wholesale brings the refdoc branch fixes along
as well (#8850, #8851, #8852, #8853), so an 8.19 release no longer
pushes the payload that broke the Pages deployments, and it regenerates
the root version index and the retention redirects the same way a 9.x
release does.

The serverless removal (#8764) is deliberately not taken, because 8.19
still releases a serverless flavor and its release job and tag guards
have to stay as they are.
A manual run can only publish under the name of the dispatched ref, which
makes it unusable for republishing a specific version. Backfilling a
release whose DocFx job failed cannot go through the tag either, because
workflow_dispatch reads the workflow file from the dispatched ref and the
existing tags still carry the version without the permission grant.
Dispatching from the release branch instead resolves github.ref_name to
the branch name, which would publish the site into a folder named after
the branch.

An omitted input arrives as an empty string rather than being absent, so
it would override the default declared in docfx.yml. The fallback has to
be applied by the caller; an empty name would otherwise make the commit
step target the refdoc root.
@flobernd
flobernd merged commit 88c1901 into 8.19 Aug 31, 2026
16 of 18 checks passed
@flobernd
flobernd deleted the fix/8.19-docfx-permissions branch August 31, 2026 11:38
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.

1 participant