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

Next Release (v1.0.0) #63

Merged
merged 57 commits into from Apr 26, 2024
Merged

Next Release (v1.0.0) #63

merged 57 commits into from Apr 26, 2024

Conversation

bauglir
Copy link
Owner

@bauglir bauglir commented Apr 25, 2024

This release primarily addresses issues with precompilation on Julia v1.10, while adding support for newly introduced diagrams in the Kroki services, updating supported output formats, documenting usage in of local services in GitHub Actions and much more.

For previous versions of the Kroki service, the full source of the
diagram was included in rendered results which made it possible to
directly detect the theme. This is no longer the case[^1], making it
necessary to detect the effect of a theme. The most straightforward way
to do this is by detecting fonts referenced in the rendered results.

[^1]: https://github.com/bauglir/Kroki.jl/actions/runs/8038302157/job/21954056804?pr=49#step:5:126
This is a temporary work-around until #49 is merged to negate the issue
described by #48.
When view keys are not explicitly defined, Structurizr dynamically
generates them. These keys may not be stable[^1] and may change across
Structurizr versions, resulting in errors[^2].

[^1]: https://docs.structurizr.com/dsl/language#views
[^2]: https://github.com/bauglir/Kroki.jl/actions/runs/8038492294/job/22264844603#step:5:10
Detect theme changes based on associated fonts
…info` docstring

The `info` function performs HTTP requests to the configured `ENDPOINT`
to obtain an overview of the versions of the available tools for the
specific Kroki instance. Including example output for it in the
docstring of the function was a nice feature, but it hangs
precompilation on Julia v1.10 and later due to the following[^1]:

> Julia 1.10 and higher wait for all running Tasks to finish before
> writing out the precompiled (cached) version of the package. One
> consequence is that a package that launches Tasks in its __init__
> function may precompile successfully, but block precompilation of any
> packages that depend on it.

To ensure the package does not hang precompilation and can be installed
on Julia v1.10 and later the example output needs to be removed.

Fixes #48.

[^1]: https://juliatesting.github.io/Aqua.jl/dev/persistent_tasks/
The package aims to be compatible with the most up-to-date version of
Julia and the current LTS. The CI infrastructure has not reflected this
for some time resulting in issues like #48 going by unnnoticed.
This was a temporary work-around until the PR corresponding to this
branch was merged, but it seems like a good idea to keep this pinned to
the highest supported tested Julia version.
…-information

Remove dynamically generated example output from the `info` docstring
…strict`

The `strict` keyword argument is no longer supported as of
`Documenter@1`[^1]. The `warnonly` keyword argument is its replacement.
When running in CI all errors should be critical, which is the default,
but when not they reported as warnings so they can be resolved locally
without failing the build to make it easier to make more extensive
changes to the documentation using `LiveServer` which would otherwise
error as well.

[^1]: https://github.com/JuliaDocs/Documenter.jl/blob/master/CHANGELOG.md#breaking
A `KROKI_CONTAINER_IMAGE_TAG` environment variable can be configured to
configure the service management functions to manage a specific version
of Kroki. By default, the `latest` version of Kroki will be managed.
…sion-for-locally-hosted-service

Enable configuration of kroki version for locally hosted service
Although technically not required by GitHub Actions, adding these
ensures linters do not complain about the lack of these indicators.
This is the most current release and the currently supported version.
Hence it should be used consistently everywhere.
This makes the documentation look more up-to-date with the supported
(and tested) Julia version.
…ion`

This reusable semantic release configuration has grown out of the
configuration that was previously part of this package. Maintaining a
separate configuration here is therefore no longer worth the effort.
Although this hasn't been an issue so far, this makes the action slighly
less prone to breaking.
…i itself

The Julia package is not directly affiliated with the Kroki project
itself and is not able to provide support for it. This may not be
immediately clear so some guidance on how to get help is added to the
documentation.
…vironments

There are varying reasons to want to run dedicated Kroki services within
CI environments, e.g. stability of the publicly hosted service,
proprietary nature of diagrams, etc. This note helps guide the setup of
Kroki within CI.

Closes #43.
…github-actions

Document use of local Kroki services within GitHub Actions
Uses https://github.com/terrastruct/d2 to render https://d2lang.com
diagrams. Support was added in Kroki@0.19.0.

References #42.
Uses https://github.com/softwaretechnik-berlin/dbml-renderer to render
https://dbml.org diagrams. Support was added in Kroki@0.19.0.

References #42.
Uses https://github.com/kevinpt/symbolator to render VHDL/Verilog
diagrams. Support was added in Kroki@0.22.0.

References #42.
Uses https://github.com/pgf-tikz/pgf to render Tikz/PGF plots. Support
was added in Kroki@0.21.0.

References #42, closes #46.
Uses https://github.com/formatc1702/WireViz to render wiring diagrams.
Support was added in Kroki@v0.20.0.

References #42.
JPEG support for these diagram types has been changed in Kroki itself as
of [Kroki@0.21.0](https://github.com/yuzutech/kroki/releases/tag/v0.21.0).

References yuzutech/kroki#1536.
Previously the `blockdiag` related diagrams were grouped together
resulting in some other diagram types having been inserted into
incorrect locations, e.g. `diagramsnet`. To prevent these types of
issues it's better if lexical ordering is applied everywhere.
As of Kroki@0.22.0[^1] the BlockDiag related tools, i.e. ActDiag,
BlockDiag, NwDiag, PacketDiag, RackDiag, and SeqDiag are incorporated
into the "core" container image. Therefore the separate container is no
longer necessary.

[^1]: https://github.com/yuzutech/kroki/releases/tag/v0.22.0
Update diagram support to correspond to Kroki v0.24.1
This was committed (and merged) incorrectly in #56. The corresponding
workflow was previously not marked as required.
"TikZ/PGF" was incorrectly marked as "Symbolator" in #56 as a result of
copy and pasting/duplicating the line when adding TikZ/PGF support.
…ocumentation

Fix formatting and TikZ/PGF support documentation
The `structurizr/dsl` repository has been archived. The Structurizr
website is now the canonical source for documentation.
Fix link to Structurizr DSL in documentation
If the release process successfully ran but did not result in a new
release getting published, JuliaRegistrator should not be notified. This
was a situation that was unlikely to happen in this repository due to
its feature branch/development/main workflow, but it would have
triggered incorrectly otherwise.
…egistrator

In most scenarios the `main` branch is equivalent to the generated tag.
However, when signing commits the tag will be a unique object that can
be referenced instead. The tag will also be more stable/less likely to
change during the time the registration process runs, which in general
is likely not an issue but it does not hurt to guard against.
This was previously disabled as all diagram types that were meant to
support JPEG did not actually support JPEG output. Support for some of
these diagram types has either been removed[^1] or added[^2] making the
functionality reliable again.

[^1]: https://github.com/yuzutech/kroki/releases/tag/v0.21.0
[^2]: https://github.com/yuzutech/kroki/releases/tag/v0.18.0
Re-enable automatic JPEG rendering through `Base.show`
Version 1 of the action was a Node.js v16 action. Node.js v16 as a
runtime will be disabled in the near future[^1], therefore migration to
a version relying on the Node.js v20 runtime is necessary.

[^1]: https://github.blog/changelog/2023-09-22-github-actions-transitioning-from-node-16-to-node-20/
This should speed up workflow runs (at least on subsequent builds for
the same PR/branch) and is recommended by the `julia-buildpkg`
action[^1].

[^1]: https://github.com/bauglir/Kroki.jl/actions/runs/8798251759
This both saves on some typing, requires less instances to have to be
created and makes it slightly easier to read the tests.
`Kroki` tries to select the most suitable output format to render a
diagram in using Julia's `Base.show` and `AbstractDisplay` capabilities.
Situations may occur where the "best" output format that gets determined
is not actually the "best" output format.

This new functionality enables control over which output formats will be
used by `Base.show`, in particular allowing specific output formats to
be disabled. This approach prevents the need for having to explicitly
construct a `Diagram` and `render`ing it and will also work when
defining diagrams using the string literals.

This is technically not a breaking change. However, given that the
overall API of this package has proven stable over a long period of time
this addition is a good point in time to move to v1.y.z.

Closes #51.
…gram-type

Enable showable overrides per diagram type
@bauglir bauglir self-assigned this Apr 25, 2024
@bauglir bauglir merged commit f0af069 into main Apr 26, 2024
22 checks passed
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

Successfully merging this pull request may close these issues.

None yet

1 participant