Skip to content

Rework Upgrade Report support #483

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

Closed
fabapp2 opened this issue Oct 16, 2022 · 1 comment · Fixed by #482
Closed

Rework Upgrade Report support #483

fabapp2 opened this issue Oct 16, 2022 · 1 comment · Fixed by #482
Assignees
Labels
type: enhancement New feature or request
Milestone

Comments

@fabapp2
Copy link
Contributor

fabapp2 commented Oct 16, 2022

What needs to be done

The Upgrade Report creation should be simplified.
It basically consists of a template and some logic that finds matches and provides them to the template and the condition which defines if the section should be rendered. The condition is in most cases true if matches were found.

Why it needs to be done

The Spring Boot upgrade report requires multiple classes and defining the sections in Asciidoctor syntax through a fluent API. this is cumbersome and time-consuming.

Implementation

The template for each section should be provided in the recipe YAML.
One class per section should be defined which is data provider and condition.

@fabapp2 fabapp2 added the type: enhancement New feature or request label Oct 16, 2022
@fabapp2 fabapp2 self-assigned this Oct 16, 2022
@fabapp2 fabapp2 added this to the v0.13.0 milestone Oct 16, 2022
@fabapp2 fabapp2 linked a pull request Oct 16, 2022 that will close this issue
@fabapp2
Copy link
Contributor Author

fabapp2 commented Oct 16, 2022

The report creation with AsciidoctorJ fails when the default charset is set to US-ASCII (as set by the JDK I used) and the error complains about incompatible encodings of UTF-8 and US-ASCII. The cause seems to be RubyString which uses the default encoding and fails if the template encoding is not the same.
jruby/jruby#6588
asciidoctor/asciidoctorj#815

The problem is solved when either the file is encoded using US-ASII (no option)
Or setting export JAVA_TOOL_OPTIONS=-Dfile.encoding="UTF-8"

  • Add precondition check and inform users when Charset.defaultCharset() is not UTF-8

fabapp2 added a commit that referenced this issue Oct 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant