docs are not available from UI latest backstage version
See original GitHub issue- I have component definition like
apiVersion: backstage.io/v1alpha1
kind: Component
metadata:
name: my-service
description: |
Main brain
tags:
- kotlin
links:
- title: Playbook entry
url: https://domain.com/playbook/services/my-service.html
annotations:
backstage.io/source-location: url:https://gitlab.domain.com/xxx/my-service
backstage.io/techdocs-ref: url:https://gitlab.domain.com/xxx/my-backstage/-/tree/master/my-service
spec:
type: service
owner: myteam
lifecycle: production
dependsOn: ['component:talon-one']
providesApis: ['my-service-api']
- Then backstage parses docs and displays them on the docs index page
- When I click on the record, it says “dropped the mic!” and I see that it tries to query https://domain.com/api/techdocs/static/docs/default/component/my-service/index.html (returns 404)
- I see that https://domain.com/api/techdocs/static/docs/default/Component/my-service/index.html returns content
Expected Behavior
Documentation is shown
Current Behavior
Error is shown
Possible Solution
When I login into the container I can manually rename folder to lowercase and it starts to show it:
root@backstage-75cf748684-7rl9n:/# cd /app/node_modules/@backstage/plugin-techdocs-backend/static/docs/default/
root@backstage-75cf748684-7rl9n:/app/node_modules/@backstage/plugin-techdocs-backend/static/docs/default# ls
Component
root@backstage-75cf748684-7rl9n:/app/node_modules/@backstage/plugin-techdocs-backend/static/docs/default# mv Component component
Context
I’ve updated backstage with yarn backstage-cli versions:bump
and did all necessary patch changes and now documentation is not working.
Another thing which is related to this issue is that DefaultTechDocsCollator queries /api/techdocs/static/docs/default/Component/my-service/search/search_index.json
(capitalised “Kind”). So I can not just rename that folder, because then collator does not work.
It is also worth to mention, that DefaultTechDocsCollator
queries an url
with capitalised C
:
/api/techdocs/static/docs/default/Component/my-service/search/search_index.json
. So there is currently some misalignment. Maybe both variants shall be served, from the back-end perspective.
Your Environment
Docker container build on top of FROM node:14-buster-slim
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:8 (5 by maintainers)
Thanks for the patience, all! In your existing Backstage deployment, you should be able to bump versions and get the fix for this. Manually updating to the following versions should also work:
@backstage/plugin-techdocs
-v0.11.1
@backstage/plugin-techdocs-backend
-v0.10.1
(If you used the workaround, you will naturally want to revert that configuration)
This can be temporary fixed by providing configuration: