Skip to content

Conversation

@haoozhang
Copy link
Contributor

Description of Changes

For a pure Spring (non-Spring Boot) project, currently it detects as Spring, Spring Boot because of hardcoded frameworks.
This PR is to separate the Spring Boot, Spring Cloud from Spring detection.

Related Issue(s)

Link the GitHub/GitLab/JIRA issues that are related to this PR.

Acceptance Criteria

Testing and documentation do not need to be complete in order for this PR to be approved. However, tracking issues must be opened for missing testing/documentation.

  • Unit/Functional tests

  • Documentation

Tests Performed

  • For a pure Spring project, it detects as Spring only, no Spring Boot.
  • For a Spring Boot project, it detects as Spring, Spring Boot.

How To Test

Instructions for the reviewer on how to test your changes.

Notes To Reviewer

Any notes you would like to include for the reviewer.

Signed-off-by: Hao Zhang <haozhan@microsoft.com>
@openshift-ci openshift-ci bot requested review from Jdubrick and thepetk August 12, 2025 02:26
@openshift-ci
Copy link

openshift-ci bot commented Aug 12, 2025

@zhoufenqin: changing LGTM is restricted to collaborators

In response to this:

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes-sigs/prow repository.

@haoozhang
Copy link
Contributor Author

Hi @Jdubrick @thepetk , could you please help to review this PR, thanks!

Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey @haoozhang thank you for your contribution!

That's a nice enhancement you're suggesting. Just to mention my approach to this would
be to just expand the logic of the springDetector, as I see the three implementations are quite similar.

So I would add different cases here (one of spring, spring boot or spring cloud)

https://github.com/devfile/alizer/blob/main/pkg/apis/enricher/framework/java/spring_detector.go#L55-L59

My other comment is about test cases. It would be awesome if you could add some test cases (similar to what we have right now for spring) so we are sure that alizer after the updates detects correctly the cloud and boot frameworks all the time.

Hao Zhang added 3 commits August 14, 2025 11:29
Signed-off-by: Hao Zhang <haozhan@microsoft.com>
Signed-off-by: Hao Zhang <haozhan@microsoft.com>
Signed-off-by: Hao Zhang <haozhan@microsoft.com>
@haoozhang haoozhang requested a review from thepetk August 14, 2025 07:11
@haoozhang
Copy link
Contributor Author

Hey @haoozhang thank you for your contribution!

That's a nice enhancement you're suggesting. Just to mention my approach to this would be to just expand the logic of the springDetector, as I see the three implementations are quite similar.

So I would add different cases here (one of spring, spring boot or spring cloud)

https://github.com/devfile/alizer/blob/main/pkg/apis/enricher/framework/java/spring_detector.go#L55-L59

My other comment is about test cases. It would be awesome if you could add some test cases (similar to what we have right now for spring) so we are sure that alizer after the updates detects correctly the cloud and boot frameworks all the time.

Thanks for your comment, I updated the PR, please help to review again, thanks!

@thepetk
Copy link
Contributor

thepetk commented Aug 14, 2025

Hey @haoozhang thank you for your contribution!
That's a nice enhancement you're suggesting. Just to mention my approach to this would be to just expand the logic of the springDetector, as I see the three implementations are quite similar.
So I would add different cases here (one of spring, spring boot or spring cloud)
https://github.com/devfile/alizer/blob/main/pkg/apis/enricher/framework/java/spring_detector.go#L55-L59
My other comment is about test cases. It would be awesome if you could add some test cases (similar to what we have right now for spring) so we are sure that alizer after the updates detects correctly the cloud and boot frameworks all the time.

Thanks for your comment, I updated the PR, please help to review again, thanks!

Thanks @haoozhang for the updates! One last thing I'd ask is to add test cases for the spring cloud detection too. We could simply add small resource project in the projects dir and then add a test case here: https://github.com/devfile/alizer/blob/main/test/apis/component_recognizer_test.go

@haoozhang
Copy link
Contributor Author

haoozhang commented Aug 15, 2025

Hey @haoozhang thank you for your contribution!
That's a nice enhancement you're suggesting. Just to mention my approach to this would be to just expand the logic of the springDetector, as I see the three implementations are quite similar.
So I would add different cases here (one of spring, spring boot or spring cloud)
https://github.com/devfile/alizer/blob/main/pkg/apis/enricher/framework/java/spring_detector.go#L55-L59
My other comment is about test cases. It would be awesome if you could add some test cases (similar to what we have right now for spring) so we are sure that alizer after the updates detects correctly the cloud and boot frameworks all the time.

Thanks for your comment, I updated the PR, please help to review again, thanks!

Thanks @haoozhang for the updates! One last thing I'd ask is to add test cases for the spring cloud detection too. We could simply add small resource project in the projects dir and then add a test case here: https://github.com/devfile/alizer/blob/main/test/apis/component_recognizer_test.go

@thepetk Comment updated, please help to review again, thanks!

Signed-off-by: Hao Zhang <haozhan@microsoft.com>
Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/ok-to-test

Copy link
Contributor

@thepetk thepetk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/lgtm

@haoozhang huge thanks for your contribution <3

@openshift-ci
Copy link

openshift-ci bot commented Aug 18, 2025

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: haoozhang, thepetk, zhoufenqin

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@thepetk thepetk merged commit 6e7056e into devfile:main Aug 18, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants