elastic / elastic/docs

Building ES docs against git worktree fails

Open
#2,039 4 comments 0 reactions 0 assignees View on GitHub
docs-build
Dominant language
Ruby
Stars
265
Forks
347
Avg merge
3d 15h
Merged PRs (30d)
2

Description

Using git worktree for different branches of ES is common. Running the docs build in a worktree (or perhaps just a folder not called elasticsearch) does not seem to work.

My setup is that I have a GIT_HOME with:
```
docs
elasticsearch (master)
elasticsearch-7.x (worktree)
elasticsearch-7.11 (worktree)
...
```

I can successfully run the docs build from the master git directory. But if I run it from any of my worktrees it fails:

```
cd $GIT_HOME/elasticsearch
git worktree add ../elasticsearch-7.x 7.x
cd $GIT_HOME/elasticsearch-7.x
$GIT_HOME/docs/build_docs --doc $GIT_HOME/elasticsearch-7.x/docs/reference/index.asciidoc --resource=$GIT_HOME/elasticsearch-7.x/x-pack/docs/ --chunk 1
INFO:build_docs:Building HTML from /doc/elasticsearch-7.x/docs/reference/index.asciidoc
INFO:build_docs:Couldn't find repo toplevel for /doc/elasticsearch-7.x/docs/reference
INFO:build_docs:Guessed toplevel=[/doc/elasticsearch-7.x/docs/reference] remote=[0] branch=[master] repo=[repo]
INFO:build_docs:Couldn't find repo toplevel for /doc/elasticsearch-7.x/x-pack/docs
INFO:build_docs:
INFO:build_docs:asciidoctor: ERROR: modules/cluster/misc.asciidoc: line 123: include file not found: /doc/elasticsearch-7.x/docs/reference/modules/cluster/{elasticsearch-root}/docs/reference/indices/dangling-indices-list.asciidoc
...
(lots of errors)
```

I can workaround this by checking out the branch in my `master` `elasticsearch` dir, but it is a bit inconvenient. Thus not urgent in any way.

It seems worktree support was added in #860.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.