mmajis / plantuml-serverless

Serverless PlantUML diagram rendering
GNU General Public License v3.0
48 stars 22 forks source link

PlantUML server version update #25

Open david-thomas-2023 opened 1 year ago

david-thomas-2023 commented 1 year ago

The included version of the PlantUML server appears unable to render C4 diagrams with the following error:

Unknown variable $tagStereo

According to this issue, it is related to the PlantUML server version:

https://github.com/plantuml-stdlib/C4-PlantUML/issues/138

Screen Shot 2022-11-07 at 10 28 05 AM

Sample:

@startuml test_c4

!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Container.puml
!include https://raw.githubusercontent.com/plantuml-stdlib/C4-PlantUML/master/C4_Component.puml

Container(idContainer, "Sample Container", "Go", "Sample C4 container")

@enduml
Screen Shot 2022-11-07 at 10 30 38 AM

The same UML renders ok in VSCode with a later PlantUML server version:

Screen Shot 2022-11-07 at 10 35 41 AM Screen Shot 2022-11-07 at 10 34 02 AM
mmajis commented 1 year ago

Hi @david-modica-thomas!

Your example works here: https://plantuml.nitorio.us/

The plantuml version (1.2021.16) in the current plantuml-serverless release is new enough to have the fix you are after.

Where are you running plantuml-serverless? Maybe you just need to update to the latest code for your deployment.

Having said that, it's been almost a year between updates, so I'll try to update to the latest plantuml version here at some point...

david-thomas-2023 commented 1 year ago

Hi @mmajis many thanks for your reply and for checking that.

I'm installing plantuml-serverless via the "Serverless application repository" in AWS.

I seems only the 0.0.6 version of plantuml-serverless is available there (see screenshot).

I see there are later tags for the project (e.g 0.3.1) and if a later version was available there it would presumably solve the issue.

Screen Shot 2022-11-09 at 8 56 47 AM Screen Shot 2022-11-09 at 8 41 52 AM
mmajis commented 1 year ago

Oh yes, the serverless application repository. Unfortunately, it doesn't support the container-packaged Lambda functions that this project started to use after v0.0.6. So it's not possible to publish newer versions there.

You could try deploying with the serverless framework based on the code in this repository. You'll need the serverless framework (https://www.serverless.com/) and Docker installed on your computer to run the build and deployment. More information in the README.md file.

david-thomas-2023 commented 1 year ago

Ah I see, thanks for the info on it. It looks like AWS have more recently added support for container packaged Lamda functions in SAM which may help in relation to publishing newer versions https://aws.amazon.com/blogs/compute/using-container-image-support-for-aws-lambda-with-aws-sam/