Neutralize orphan gitlinks after checkout in docs-build#139
Open
theletterf wants to merge 1 commit into
Open
Conversation
actions/checkout's post-job runs `git submodule foreach --recursive` unconditionally to clean local config (core.sshCommand, extraheader). A tree gitlink (mode 160000) without a matching .gitmodules entry causes that command to abort with exit 128 and marks the job red even when the build itself succeeded — observed today on elastic/kibana after a stray top-level `integrations` gitlink landed on main. Add a small composite action (git/neutralize-orphan-gitlinks) that detects orphan gitlinks and removes them from the runner's working index, emitting an annotation pointing at the source-repo defect so it still gets fixed upstream. Wire it into all three actions/checkout sites in docs-build.yml. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
Label error. Requires exactly 1 of: automation, breaking, bug, changelog:skip, chore, ci, dependencies, documentation, enhancement, feature, fix. Found: |
5 tasks
nickofthyme
added a commit
to elastic/kibana
that referenced
this pull request
May 6, 2026
## Summary #243732 ([Lens] Improve transform validation checking) accidentally recorded a top-level `integrations` submodule pointer (`mode 160000`, sha `5a5d30c6ebf4fef2c4226a67c31d772ceb93230d`) without an entry in `.gitmodules` (which doesn't exist in this repo). The intent was to add files under `src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/tests/integrations/` — that part of the change is preserved; only the stray top-level gitlink is removed. The orphan gitlink causes `actions/checkout`'s post-job cleanup (`git submodule foreach --recursive`) to abort with exit 128: ``` fatal: No url found for submodule path 'integrations' in .gitmodules ``` This marks the docs CI jobs (`build / build`, `build / vale`) red on every PR that touches `docs/**`, even when docs-builder itself reports `0 Errors / 0 Warnings / 0 Hints`. First seen on #267647. cc @nickofthyme — most likely a `git submodule add` / `.gitmodules` interaction during local work on #243732. Please confirm nothing in the Lens integration tests actually needs a populated submodule at the repo root (the per-package `tests/integrations/` directory is untouched here). A complementary defensive fix is up at [elastic/docs-actions#139](elastic/docs-actions#139) so future orphan gitlinks degrade to a CI warning instead of a hard failure. ### Checklist - [x] No user-facing changes — `release_note:skip`. - [x] No backport needed — affects `main` only (the bad commit hasn't been backported). ### Identify risks - **None.** The change is `git rm --cached integrations` only. No working-tree files are removed. The Lens integration test files added in #243732 (under `src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/tests/integrations/`) are untouched. ## Test plan - [ ] Verify the file tree under `src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/tests/integrations/` is unchanged. - [ ] Verify no `mode 160000` entries remain at the repo root: `git ls-files --stage | awk '$1 == "160000"'` returns empty. - [ ] After merge, verify `build / build` and `build / vale` go green on a docs PR (e.g. #267647) without any other change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Nick Partridge <nicholas.partridge@elastic.co>
ersin-erdal
pushed a commit
to ersin-erdal/kibana
that referenced
this pull request
May 6, 2026
## Summary elastic#243732 ([Lens] Improve transform validation checking) accidentally recorded a top-level `integrations` submodule pointer (`mode 160000`, sha `5a5d30c6ebf4fef2c4226a67c31d772ceb93230d`) without an entry in `.gitmodules` (which doesn't exist in this repo). The intent was to add files under `src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/tests/integrations/` — that part of the change is preserved; only the stray top-level gitlink is removed. The orphan gitlink causes `actions/checkout`'s post-job cleanup (`git submodule foreach --recursive`) to abort with exit 128: ``` fatal: No url found for submodule path 'integrations' in .gitmodules ``` This marks the docs CI jobs (`build / build`, `build / vale`) red on every PR that touches `docs/**`, even when docs-builder itself reports `0 Errors / 0 Warnings / 0 Hints`. First seen on elastic#267647. cc @nickofthyme — most likely a `git submodule add` / `.gitmodules` interaction during local work on elastic#243732. Please confirm nothing in the Lens integration tests actually needs a populated submodule at the repo root (the per-package `tests/integrations/` directory is untouched here). A complementary defensive fix is up at [elastic/docs-actions#139](elastic/docs-actions#139) so future orphan gitlinks degrade to a CI warning instead of a hard failure. ### Checklist - [x] No user-facing changes — `release_note:skip`. - [x] No backport needed — affects `main` only (the bad commit hasn't been backported). ### Identify risks - **None.** The change is `git rm --cached integrations` only. No working-tree files are removed. The Lens integration test files added in elastic#243732 (under `src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/tests/integrations/`) are untouched. ## Test plan - [ ] Verify the file tree under `src/platform/packages/shared/kbn-lens-embeddable-utils/config_builder/tests/integrations/` is unchanged. - [ ] Verify no `mode 160000` entries remain at the repo root: `git ls-files --stage | awk '$1 == "160000"'` returns empty. - [ ] After merge, verify `build / build` and `build / vale` go green on a docs PR (e.g. elastic#267647) without any other change. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com> Co-authored-by: Nick Partridge <nicholas.partridge@elastic.co>
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
actions/checkout's post-job runsgit submodule foreach --recursiveunconditionally (to cleancore.sshCommand/extraheaderconfigs). A tree gitlink (mode 160000) without a matching.gitmodulesentry causes that command to abort with exit 128 and marks the job red even when the build itself succeeded.integrationsgitlink landed onmainvia #243732; every subsequent docs PR touchingdocs/**failed bothbuild / buildandbuild / valedespite docs-builder reporting0 Errors / 0 Warnings / 0 Hints.git/neutralize-orphan-gitlinksthat detects orphan gitlinks andgit rm --cacheds them from the runner's working index. The change is local to the runner — nothing is pushed.::warning::annotation is emitted so the source-repo defect remains visible and gets fixed upstream rather than silently absorbed.actions/checkout@v6sites indocs-build.yml(check,build,vale).Test plan
build / buildandbuild / valego green with a warning annotation pointing at the orphanintegrationsgitlink.🤖 Generated with Claude Code