Skip to content

Fix import for new spring boot version#9144

Merged
wing328 merged 24 commits intoOpenAPITools:masterfrom
MelleD:feature/upgrade-spring-boot-2-4-4
Oct 13, 2021
Merged

Fix import for new spring boot version#9144
wing328 merged 24 commits intoOpenAPITools:masterfrom
MelleD:feature/upgrade-spring-boot-2-4-4

Conversation

@MelleD
Copy link
Copy Markdown
Contributor

@MelleD MelleD commented Mar 31, 2021

#8561

PR checklist

  • Read the contribution guidelines.
  • Pull Request title clearly describes the work in the pull request and Pull Request description provides details about how to validate the work. Missing information here may result in delayed response from the community.
  • Run the following to build the project and update samples:
    ./mvnw clean package 
    ./bin/generate-samples.sh
    ./bin/utils/export_docs_generators.sh
    
    Commit all changed files.
    This is important, as CI jobs will verify all generator outputs of your HEAD commit as it would merge with master.
    These must match the expectations made by your contribution.
    You may regenerate an individual generator by passing the relevant config(s) as an argument to the script, for example ./bin/generate-samples.sh bin/configs/java*.
    For Windows users, please run the script in Git BASH.
  • File the PR against the correct branch: master
  • If your PR is targeting a particular programming language, @mention the [technical committee]
    @bbdouglas
    @sreeshas
    @jfiala
    @lukoyanov
    @cbornet
    @jeff9finger
    @karismann
    @Zomzog
    @lwlee2608
    @wing328

@wing328
Copy link
Copy Markdown
Member

wing328 commented Apr 8, 2021

CircleCI reported the following issues:

[ERROR] The build could not read 1 project -> [Help 1]
[ERROR]   
[ERROR]   The project org.openapitools:petstore-spring-cloud:1.0.0 (/home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/spring-cloud/pom.xml) has 1 error
[ERROR]     'dependencies.dependency.version' for org.springframework.cloud:spring-cloud-starter-oauth2:jar is missing. @ line 51, column 21
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/ProjectBuildingException

Can you please take a look when you've time?

@MelleD
Copy link
Copy Markdown
Contributor Author

MelleD commented Apr 11, 2021

@wing328 next week i will fix it

@MelleD
Copy link
Copy Markdown
Contributor Author

MelleD commented Apr 16, 2021

@wing328 The issue is Hystrix is depcreated.
Hystrix is ​​no longer supported by spring boot. How should we proceed here? Remove the templates? If someone wants to use Circuit Breaker, the templates have to be adapted for a different implementation e.g. like resilience4j.

"Annotation to enable a CircuitBreaker implementation. https://martinfowler.com/bliki/CircuitBreaker.html
Deprecated
as of the 3.0.1 release. Hystrix has been removed from Spring Cloud Netflix and it was the only implementation using this annotation."

@wing328
Copy link
Copy Markdown
Member

wing328 commented Sep 2, 2021

Can you please take a look at the issues reported by CircleCI?

[ERROR] Errors: 
[ERROR]   PetApiTest.testCreateAndGetPet:35 » Decode Type definition error: [simple type...
[ERROR]   PetApiTest.testDeletePet:125 » Decode Type definition error: [simple type, cla...
[ERROR]   PetApiTest.testUpdatePet:48 » Decode Type definition error: [simple type, clas...
[ERROR]   PetApiTest.testUpdatePetWithForm:112 » Decode Type definition error: [simple t...
[ERROR]   StoreApiTest.testDeleteOrder:50 » Decode Type definition error: [simple type, ...
[ERROR]   StoreApiTest.testGetInventory:26 » Decode Type definition error: [simple type,...
[ERROR]   StoreApiTest.testPlaceOrder:34 » NotFound [404 Not Found] during [DELETE] to [...
[ERROR]   UserApiTest.logoutUser:71 » Decode Type definition error: [simple type, class ...
[ERROR]   UserApiTest.testCreateUser:28 » Decode Type definition error: [simple type, cl...
[ERROR]   UserApiTest.testCreateUsersWithArray:41 » Decode Type definition error: [simpl...
[ERROR]   UserApiTest.testCreateUsersWithList:54 » Decode Type definition error: [simple...
[ERROR]   UserApiTest.testLoginUser:63 » Decode Type definition error: [simple type, cla...
[ERROR] Tests run: 16, Failures: 0, Errors: 12, Skipped: 3
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-surefire-plugin:2.22.2:test (default-test) on project petstore-spring-cloud: There are test failures.
[ERROR] 
[ERROR] Please refer to /home/circleci/OpenAPITools/openapi-generator/samples/client/petstore/spring-cloud/target/surefire-reports for the individual test results.
[ERROR] Please refer to dump files (if any exist) [date].dump, [date]-jvmRun[N].dump and [date].dumpstream

I think that's the last hurdle to get this PR merged.

@MelleD
Copy link
Copy Markdown
Contributor Author

MelleD commented Sep 2, 2021

@wing328 No, it's not that simple. There is a generator that uses classes that Spring no longer supports (Hystrix). See comment before this should be answered. Then i can continue. Iam not so familar with Hystrix and Circuit Breaker so i can remove the templates, but cannot adapt them.

<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-netflix-hystrix</artifactId>
<version>2.2.7.RELEASE</version>
</dependency>
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@MelleD sorry for the delay in following up on this PR. Would it be hard to update the template to remove all reference to hystrix?

In order words, I would like to remove this dependency as part of this PR since it has been deprecated

(later we can have another PR to add resilience4j support)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Yes I think this is a good solution and right way. I will remove hystrix and add to spring boot 2.5.4

MelleD and others added 8 commits October 5, 2021 22:54
https://github.com/OpenAPITools/openapi-generator.git into
feature/upgrade-spring-boot-2-4-4

Conflicts:
	bin/configs/spring-cloud-no-nullable.yaml
	bin/configs/spring-cloud.yaml
	samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION
	samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java
	samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
	samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java
	samples/client/petstore/spring-cloud/.openapi-generator/VERSION
	samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java
	samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java
	samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java
@wing328
Copy link
Copy Markdown
Member

wing328 commented Oct 13, 2021

  • replace tabs with 4-spaces
  • remove HystrixCommand from the doc

@wing328 wing328 merged commit 12d80bf into OpenAPITools:master Oct 13, 2021
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.

2 participants