spring-cloud / spring-cloud-openfeign

Support for using OpenFeign in Spring Cloud apps
Apache License 2.0
1.17k stars 756 forks source link

[Question]: Why was spring-boot-starter-aop removed from dependencies? #1035

Closed maxl2287 closed 1 week ago

maxl2287 commented 1 month ago

Hi together,

just a short question. We are using resilience4j, which needs:

<dependency>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-aop</artifactId>
</dependency>

With upgrading spring-cloud-dependencies to the latest version 2023.0.2, we faced issues that our Retry-mechanism was not working anymore. Then we analyzed the dependencies and saw that you have removed the aop-dependency from spring-cloud-openfeign-core (https://github.com/spring-cloud/spring-cloud-openfeign/commit/6084609de0705f24ba418704769e545a0d820d70).

As a change we just have included aop by ourself, but we just wanted to know what was the intention of removing this.

Thanks in advance! :)

jjlharrison commented 1 month ago

Just to confirm that this issue affecting multiple dependent projects. We have added the dependency directly to resolve the issue.

It would be good to know why the dependency was removed and why it was there in the first place. Unfortunately, the Resilience4J annotations are just silently ignored without it (unless you have tests verifying their behaviour, which we fortunately had).

Thanks 🙂

maxl2287 commented 1 month ago

Just to confirm that this issue affecting multiple dependent projects. We have added the dependency directly to resolve the issue.

It would be good to know why the dependency was removed and why it was there in the first place. Unfortunately, the Resilience4J annotations are just silently ignored without it (unless you have tests verifying their behaviour, which we fortunately had).

Thanks 🙂

@jjlharrison Exactly we had the same issue. This issue only came up by having verification tests, which did not trigger retries at all after upgrading spring-cloud-dependencies :)

mgimenoromanadevinta commented 3 weeks ago

Hello Are there any news on this topic? Thanks

OlgaMaciaszek commented 1 week ago

Hi all, we have discover that spring-boot-starter-aop was a legacy dependency in Spring Cloud OpenFeign. The project hasn't used it for a long time and hence it should not be there anymore. Additionally, it was causing an AOT issue (https://github.com/spring-projects/spring-data-mongodb/issues/4637#issuecomment-2034911106) that was in no way related to SC OpenFeign. If the dependency is required by other projects, the users should add it directly if not provided.

boris-faniuk-n26 commented 1 week ago

Hello, @OlgaMaciaszek ! Thanks for the explanation, we had a similar issue. As a suggestion, maybe it worth updating at least minor version in case you modify the structure of dependencies. We have dependabot grouping patch updates and PR with 10 different updates failed. It would be easier to find this thread, if we knew that openfeign update was the reason.

OlgaMaciaszek commented 1 week ago

I agree that it would be preferable, however, we do a major/minor release usually just once a year and given the AOT bug, it would have been problematic to wait that much, so since it was a bugfix, we decided to go ahead with it. We're sorry for any inconvenience this might have caused.