backstage / backstage/mkdocs-monorepo-plugin
mkdocs build failed with "No such file or directory"
- Dominant language
- Python
- Stars
- 400
- Forks
- 80
- PR merge metrics
- No merged PRs in 30d
Description
Iceberg site build, `mkdocs build`, [failed after upgrading mkdocs-monorepo-plugin from a fork of 1.1.0 to 1.1.2](https://github.com/apache/iceberg/actions/runs/17542083417/job/49815489517) with following error
```
Traceback (most recent call last):
File "/opt/hostedtoolcache/Python/3.13.7/x64/bin/mkdocs", line 7, in
sys.exit(cli())
~~~^^
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/click/core.py", line 1442, in __call__
return self.main(*args, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/click/core.py", line 1363, in main
rv = self.invoke(ctx)
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/click/core.py", line 1830, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/click/core.py", line 1226, in invoke
return ctx.invoke(self.callback, **ctx.params)
~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/click/core.py", line 794, in invoke
return callback(*args, **kwargs)
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/mkdocs/__main__.py", line 315, in gh_deploy_command
build.build(cfg, dirty=not clean)
~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/mkdocs/commands/build.py", line 325, in build
files.copy_static_files(dirty=dirty, inclusion=inclusion)
~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/mkdocs/structure/files.py", line 122, in copy_static_files
file.copy_file(dirty)
~~~~~~~~~~~~~~^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/mkdocs/structure/files.py", line 485, in copy_file
utils.copy_file(self.abs_src_path, output_path)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/site-packages/mkdocs/utils/__init__.py", line 123, in copy_file
shutil.copyfile(source_path, output_path)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/hostedtoolcache/Python/3.13.7/x64/lib/python3.13/shutil.py", line 260, in copyfile
with open(src, 'rb') as fsrc:
~~~~^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: '/tmp/docs_oxlrjl8_/docs/nightly/docs'
```
It can be resolved by reverting https://github.com/backstage/mkdocs-monorepo-plugin/pull/126
Contributor guide
Research direction
Start by running the Iceberg site’s `mkdocs build` workflow and inspect the `mkdocs-monorepo-plugin` change in backstage/mkdocs-monorepo-plugin#126. Compare the plugin behavior before and after that change, then verify that the build no longer looks for the missing `/docs/nightly/docs` path.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- documentation
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100