Skip to content

Failing check: Comment on removed .md files / detect-removed-markdown (pull_request) #1609

Closed as not planned

Description

@karenzone

In a recent PR, I renamed a file, adjusted toc.yml, set up redirects, and fixed a couple of cross-doc links. Everything seems to be working as expected, but I'm getting this failed check: "Comment on removed .md files / detect-removed-markdown (pull_request)Failing after 3s"

Image

Console: https://github.com/elastic/docs-content/actions/runs/16505176891/job/46673797665?pr=2136

Activity

  1. karenzone commented on Jul 24, 2025

    @karenzone
    ContributorAuthor
  2. added a commit that references this issue on Aug 6, 2025
  3. cotti commented on Jun 3, 2026

    @cotti
    Contributor

    AI triage

    Automated investigation against the current codebase. A human still needs to confirm before any code change.

    Original concern

    A PR in elastic/docs-content that renamed a .md file (with redirects correctly set up) still failed the "Comment on removed .md files / detect-removed-markdown" check.

    Findings

    • The failing check was not a docs-builder (or docs-actions) check. It was a standalone workflow that lived in elastic/docs-content: .github/workflows/comment-on-removed-files.yml (job id detect-removed-markdown, display name "Comment on removed .md files"). It used actions/github-script to detect removed/renamed .md files and unconditionally post a PR comment.
    • Root cause of the failure: the workflow ran on: pull_request with permissions: pull-requests: write and called github.rest.issues.createComment. The triggering PR (docs-content#2136) was a fork PR (isCrossRepository: true). For pull_request events from forks, GITHUB_TOKEN is forced read-only regardless of the permissions: block, so createComment returns 403 Resource not accessible by integration and the job fails almost immediately (the observed ~3s failure). It had nothing to do with whether redirects were configured correctly. (The original run logs are expired — HTTP 410 — so the exact log line could not be re-confirmed, but the workflow shape + fork-PR token behavior account for it.)
    • The workflow has since been removed. It was deleted from docs-content in PR #2424 "Remove old workflow" (commit 4a7f923f, 2025-08-06), about two weeks after this issue was filed. The file now 404s on main. (It had been added in PR #1339, 2025-05-01.)
    • Redirect handling is now enforced properly rather than via an advisory comment. The shared docs-build pipeline runs a "Validate redirect rules" step (elastic/docs-actions/.github/workflows/docs-build.yml) backed by this repo's diff-validate action — actions/diff-validate/action.yml:L1-L9 — which invokes docs-builder diff validate.
    • That command verifies every renamed/removed page has a redirects.yml entry and fails the build otherwise: src/tooling/docs-builder/Commands/DiffCommands.cs:L22-L41.

    Verdict

    Done

    The specific failing check can no longer occur: the workflow that produced it (comment-on-removed-files.yml in docs-content) was deleted in docs-content#2424. The flaky "comment unconditionally, fails on fork PRs" mechanism has been replaced by deterministic redirect validation in the docs-build pipeline (diff-validate → docs-builder diff validate), which checks redirects.yml for every removed/renamed page. Nothing remains to fix in docs-builder; a maintainer can close this as resolved.

    Related issues

    Part of the link-checks/redirects cluster: meta #949 (open), #1538 "Validate redirects.yml inputs" (open), and #759 "Force creation of redirects" (closed — the redirect-enforcement work that supersedes this issue's concern).

    Notes

    • This issue was filed against docs-builder, but both the failing check and its removal live in elastic/docs-content. There is no corresponding code change in docs-builder to point to.
  4. added
    ai-triaged
    on Jun 3, 2026
  5. github-actions commented on Sep 15, 2026

    @github-actions
    Contributor

    This issue is stale because it has been open 90 days with no activity. Remove the stale label, or leave a comment, or this will be closed in 14 days.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    ai-triagedclosed-stalestale

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions