question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. ItΒ collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

URL reader for techdocs not working while pulling from the Azure DevOps

See original GitHub issue

Expected 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

  1. Create the app using yarn backstage-create-app
  2. Add the above example to your app-config.yaml
  3. 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.
  1. Build docker image and start it.

Context

See above.

Your Environment

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
benjdlambertcommented, Sep 23, 2021

Think this has been fixed with last weeks release. Closing and feel free to reopen if the problem persists after updating.

1reaction
awanlincommented, May 31, 2021

@nadworny @OrkoHunter Pretty sure you are running into the issue I described over here: #4359

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found