Closed kruskall closed 1 month ago
A documentation preview will be available soon.
I might have to revert this. A number of PRs are failing with:
2024-10-30 09:42:30 PDT | INFO:build_docs:---------
-- | --
 | 2024-10-30 09:42:30 PDT | INFO:build_docs: - Kibana Guide: Merging the subbed dir for [kibana][main][:(glob)src/**/*.asciidoc] into the last successful build.
 | 2024-10-30 09:42:34 PDT | INFO:build_docs: - Kibana Guide: Failed to merge the subbed dir for [kibana][main][:(glob)src/**/*.asciidoc] into the last successful build:
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:Error executing: git merge -m merge dbe7f54dd7beaf10f7e059c06d98970a8eae8b4a
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:---out---
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:Auto-merging yarn.lock
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:CONFLICT (content): Merge conflict in yarn.lock
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:Auto-merging src/dev/license_checker/config.ts
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:CONFLICT (content): Merge conflict in src/dev/license_checker/config.ts
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:Auto-merging package.json
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:CONFLICT (content): Merge conflict in package.json
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:Automatic merge failed; fix conflicts and then commit the result.
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:
 | 2024-10-30 09:42:34 PDT | INFO:build_docs:---err---
Hmm. Seems to only be Kibana PRs that are failing.
:sob:
Not sure why only Kibana PRs are failing, but they all are failing with the same error. I reverted in https://github.com/elastic/docs/pull/3098.
Not sure why only Kibana PRs are failing
kibana is excluded from the switch case which means the script will only fetch the latest commit in the PR without fetching the whole history (because it doesn't need to do the diff). I'm not sure why building the docs fail (probably using some git command that requires the whole history which imo is bad) but I guess this is an opportunity to improve the build process :D
do not fetch tags (they are unused)
use a treeless clone of the target branch instead of cloning the default branch: the initial clone of the default branch is unused, we are only interested in the target branch to compare the diff with the PR.