Skip to content

Support reusing Conditions for Helper in Spring Boot 3 Upgrade Report YAML #592

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

Conversation

fabapp2
Copy link
Contributor

@fabapp2 fabapp2 commented Dec 12, 2022

The SpringBootUpgradeSectionHelper can be configured to use an existing condition.
The Condition will be evaluated to decide if a section will be rendered.
No data is provided to the Asciidoc when ConditionOnlyHelper is used.

This will use the HasImportStartingWith condition to show/hide the section

  helper:
      type: org.springframework.sbm.boot.upgrade_27_30.report.helper.ConditionOnlyHelper
      condition:
        type: org.springframework.sbm.java.migration.conditions.HasImportStartingWith
        value: "a.b"

To stay compatible with existing section declarations, the previously existing syntax is still valid:

helper: org.springframework.sbm.boot.upgrade_27_30.report.helper.BannerSupportHelper

Additionally

  • some cleanups
  • the rendered GitHub info section on the top of each section is not part of the asserted asciidoctor code to allow reformatting without needing all tests to be adjusted
  • The SpringBootUpgradeReportSection.Helper was moved to its own abstract class

@fabapp2 fabapp2 force-pushed the 591-modify-the-spring-boot-3-upgrade-yaml-to-take-condition-as-alternative-to-helper branch from f7f370f to 39052d1 Compare December 12, 2022 23:58
@fabapp2 fabapp2 changed the title Spring Boot 3 Upgrade yaml allows Helper to reuse existing Condition Support reusing Conditions for Helper in Spring Boot 3 Upgrade Report YAML Dec 13, 2022
@fabapp2 fabapp2 force-pushed the 591-modify-the-spring-boot-3-upgrade-yaml-to-take-condition-as-alternative-to-helper branch from 39052d1 to be7e3b6 Compare December 13, 2022 00:12
@fabapp2 fabapp2 merged commit 26ec07e into main Jan 3, 2023
@fabapp2 fabapp2 deleted the 591-modify-the-spring-boot-3-upgrade-yaml-to-take-condition-as-alternative-to-helper branch January 3, 2023 09:55
fabapp2 added a commit that referenced this pull request Jan 31, 2023
… YAML (#592)

* Deprecate outdated class

* Support to reuse existing condition for Helper

* Remove linebreak in pom.xml

* Remove GitHub info from rendered asciidoc in tests

* Test for ConditionDeserializer

* Refactor internal Helper class into top level class

* Change section numeration in report

* Add Helper that is always true and returns no data

* Add description to Condition
@fabapp2 fabapp2 added type: enhancement New feature or request 3.0.0 Spring Boot 3.0.0 upgrade:boot-report labels Feb 24, 2023
@fabapp2 fabapp2 self-assigned this Feb 24, 2023
@fabapp2 fabapp2 added this to the v0.14.0 milestone Feb 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3.0.0 Spring Boot 3.0.0 type: enhancement New feature or request upgrade:boot-report
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modify the Spring Boot 3 Upgrade YAML to take Condition as alternative to Helper
1 participant