URL reader for techdocs not working while pulling from the Azure DevOps
See original GitHub issueExpected Behavior
When clicking on the READ DOCS
link that is generated using my simple example, the techdocs are properly displayed.
Current Behavior
The following error appears in the logs after clicking on the READ DOCS
:
β 2021-05-18T09:11:29.893Z techdocs info Step 2 of 3: Generating docs for entity Component:default/space type=plugin ββ 2021-05-18T09:11:30.408Z techdocs error Build failed with error: DEBUG - Loading configuration file: /tmp/backstage-3wIBEu/mkdocs.yml,ERROR - Config value: 'docs_dir'. Error: The path /tmp/bac ββ kstage-3wIBEu/docs isn't an existing directory.
ββ DEBUG - Config value: 'config_file_path' = '/tmp/backstage-3wIBEu/mkdocs.yml'
ββ DEBUG - Config value: 'site_name' = 'space-docs'
ββ DEBUG - Config value: 'nav' = [{'Home': 'index.md'}, {'Test': 'index2.md'}],DEBUG - Config value: 'pages' = None
ββ DEBUG - Config value: 'site_url' = ''
ββ DEBUG - Config value: 'site_description' = None
ββ DEBUG - Config value: 'site_author' = None
ββ DEBUG - Config value: 'theme' = {'name': 'mkdocs'}
ββ DEBUG - Config value: 'docs_dir' = 'docs'
ββ DEBUG - Config value: 'site_dir' = '/tmp/techdocs-tmp-LA7GwR'
ββ DEBUG - Config value: 'copyright' = None
ββ DEBUG - Config value: 'google_analytics' = None
ββ DEBUG - Config value: 'dev_addr' = Address(host='127.0.0.1', port=8000)
ββ DEBUG - Config value: 'use_directory_urls' = True,DEBUG - Config value: 'repo_url' = ''
ββ DEBUG - Config value: 'repo_name' = None
ββ DEBUG - Config value: 'edit_uri' = None
ββ DEBUG - Config value: 'extra_css' = [],DEBUG - Config value: 'extra_javascript' = []
ββ DEBUG - Config value: 'extra_templates' = [],DEBUG - Config value: 'markdown_extensions' = ['toc', 'tables', 'fenced_code'],DEBUG - Config value: 'mdx_configs' = None
ββ DEBUG - Config value: 'strict' = False,DEBUG - Config value: 'remote_branch' = 'gh-pages'
ββ DEBUG - Config value: 'remote_name' = 'origin'
ββ DEBUG - Config value: 'extra' = {},DEBUG - Config value: 'plugins' = PluginCollection([('techdocs-core', <src.core.TechDocsCore object at 0x7fe178a43b00>)]),Aborted with 1 Configuration Errors ββ ! type=plugin
Iβm fetching the project from Azure DevOps and it seems there is some problem with βunpackingβ the docs
dir?
This is how the repo looks like:
.
βββ README.md
βββ backstagenlp
β βββ __init__.py
β βββ backstagenlp.py
βββ cookiecutter.json
βββ docs
β βββ index.md
β βββ index2.md
βββ mkdocs.yml
And the mkdocs.yml
site_name: 'space-docs'
nav:
- Home: index.md
- Test: index2.md
plugins:
- techdocs-core
Now, when the repo is fetched, this is how it looks inside the container:
|-- README.md
|-- __init__.py
|-- backstagenlp.py
|-- cookiecutter.json
|-- index.md
|-- index2.md
|-- mkdocs.yml
Somehow all the directories are flattened but the techdocs plugin doesnβt seem to like it: Config value: 'docs_dir'. Error: The path /tmp/backstage-3wIBEu/docs isn't an existing directory
This is the annotation definition from catalog-info:
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: space
annotations:
backstage.io/techdocs-ref: url:https://dev.azure.com/org/project/_git/backstagenlp
Possible Solution
Steps to Reproduce
- Create the app using
yarn backstage-create-app
- Add the above example to your app-config.yaml
- Use local setup:
techdocs:
builder: 'local' # Alternatives - 'external'
generators:
techdocs: 'local' # Alternatives - 'docker'
publisher:
type: 'local' # Alternatives - 'googleGcs' or 'awsS3' or 'azureBlobStorage' or 'openStackSwift'. Read documentation for using alternatives.
- Build docker image and start it.
Context
See above.
Your Environment
- NodeJS Version (v12): v14
- Operating System and Version (e.g. Ubuntu 14.04): using default Dockerfile, image running on AKS
- Used master branch for building, latest commit https://github.com/backstage/backstage/commit/f3f09dda341ff21fc1d55d088ee6698a638feb93
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
Troubleshooting TechDocs - Backstage.io
MkDocs Build Errors. Using the TechDocs CLI, you can troubleshoot MkDocs build issues locally. Note this requires you have Docker available to launch...
Read more >Apply Release Update to Customer Solution Repository and ...
Create a pull request from the Azure DevOps project. When performing this step, you may notice that Master branch of the Customer Solution...
Read more >Items - Get - REST API (Azure DevOps Git) | Microsoft Learn
Get Item Metadata and/or Content for a single item. The download parameter is to indicate whether the content should be available as a...
Read more >An Introduction to Running and Deploying Backstage on Azure
It helps solve the problem of still needing to share architecture ... to add in a set of Azure DevOps plugins to show...
Read more >How to export a user story from Azure DevOps - Quora
You can import and export user stories from Microsoft Team Foundation Server (TFS) and ; From any query, you can export a list...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Think this has been fixed with last weeks release. Closing and feel free to reopen if the problem persists after updating.
@nadworny @OrkoHunter Pretty sure you are running into the issue I described over here: #4359