backstage / demo

The Backstage demo deployment
Apache License 2.0
86 stars 156 forks source link

Don't use the latest version of kroki at Dockerfile or update python in your image up to 3.10 #290

Open ajax-kovtunov-o opened 4 months ago

ajax-kovtunov-o commented 4 months ago

It's produces type err, cause it uses the Python 3.10 at latest release and it's incompatible with old versions image

awanlin commented 4 months ago

Hi @ajax-kovtunov-o, can you share a little more details? As you posted a screen shot and not a link it's hard for me to follow where you are coming from.

ajax-kovtunov-o commented 4 months ago

The plugin mcdocs kroki has released new version with 0.71, that include rely to Python 3.10 and use new features. https://github.com/AVATEAM-IT-SYSTEMHAUS/mkdocs-kroki-plugin

You use the latest version of this plugin at dockerfile https://github.com/backstage/demo/blob/ca9b75448dd1b36869f539c98084e2a6bb4ce5fa/Dockerfile#L74

You can't be sure that Python version at your image is Python 3.10+.

So, try render diagram

And add to any file with uml to your docs

@startuml
!theme aws-orange
@enduml

Then, if you use the latest version of python lib mkdocs-kroki-plugin, and your Python lower than Python 3.10, you will catch the TypeError.

I suggest you to use fixed version of mkdocs-kroki-plugin and be sure that your Python version at docker image at least 3.10.

awanlin commented 4 months ago

Awesome, thanks for the details! We are only using Kroki for Mermaid and it's still working here: https://demo.backstage.io/docs/default/component/backstage-demo/examples/mermaid/. For PlantUML we are using the PlantUML itself. These are mostly to act as working examples but they need to work so this information is valuable.

awanlin commented 4 months ago

I am considering using what's been suggested here as an alternative: https://github.com/backstage/mkdocs-techdocs-core/issues/35#issuecomment-1779151887. Kroki is nice but for many Adopters poses security concerns with this data going out of their network and not really wanting to have to run yet another server for it