Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

C4 library does not work with Kroki server #32

Closed
romkavt opened this issue Feb 5, 2021 · 4 comments
Closed

C4 library does not work with Kroki server #32

romkavt opened this issue Feb 5, 2021 · 4 comments

Comments

@romkavt
Copy link

romkavt commented Feb 5, 2021

Hello!

Please have a look to this issue yuzutech/kroki#578 (comment)
C4 library used as PlantUML standard library include does not work within local network.
We are using Kroki server to render PlantUML diagrams.

The following diagram:

title Контекст интеграции систем TC и Yoo
!include <C4/C4_Container>

Person_Ext(User, "User", "Пользователь сервисов TC и Yoo")
System_Ext(Pay, "Apple/Google")
Rel_R(User, Pay, "Использует для платежа банковской картой")

produces the error "Cannot open URL (line: 0)" with Kroki server.
The reason is:
https://github.com/plantuml/plantuml-stdlib/blob/master/C4/C4_Context.puml#L1

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

The docker container within local network has no free access to Internet, i.e. the C4 library file preprocessing can't download included C3 files.
I assume the PlantUML server will have the same error with C4.

I think, the C4 library have to be included into PlantUML stdlib as single local file without references to remote URLs.

@Potherca
Copy link
Contributor

Potherca commented Feb 7, 2021

We are still ironing out some bugs in plantuml-stdlib/C4-PlantUML. Currently a release is being prepared that should allow you to resolve this issue (with plantuml-stdlib/C4-PlantUML#114) as well as some other semi-urgent fixes (like plantuml-stdlib/C4-PlantUML#113).

These should be completed soonish and added as an MR here (to close #31).

It looks like the issue you are seeing is because of the update to C4 v2 in 801e8df, which does not have the fixes coming up in the new C4 release.

As we are also in the process of getting the other libraries in the stdlib in a better shape, I'll add "check remote URLs are not used" to the organisation todo-list, as all stdlib repos should be able to work 100% offline.

@arnaudroques
Copy link
Contributor

I think, the C4 library have to be included into PlantUML stdlib as single local file without references to remote URLs.

Of course, you are right !
We've just fixed it.

Last beta is also up to date now.

Thanks for the report, this will be included in next official release.

@Potherca
Copy link
Contributor

Potherca commented Feb 7, 2021

@arnaudroques Thank you for picking this up so swiftly, this buys us some time to get things in order on our end!

@kirchsth
Copy link
Contributor

kirchsth commented Jul 4, 2021

Please merge #42 that the new v2.3.0 can be used without additional includes

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants