Skip to content
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

OP-21771: springboot3 upgrade aftereffects swagger failed so migrating from SpringFox to SpringDoc. #51

Merged
merged 1 commit into from Feb 14, 2024

Conversation

rahul-chekuri
Copy link
Collaborator

https://devopsmx.atlassian.net/browse/OP-21771

SpringFox is not compatible with springboot3 so using SpringDoc.
springfox/springfox#3983

This is the migration guide followed.
https://springdoc.org/#migrating-from-springfox

@@ -32,6 +32,7 @@ dependencies {
implementation "io.spinnaker.kork:kork-config"
implementation "io.spinnaker.kork:kork-plugins"
implementation "io.spinnaker.kork:kork-web"
implementation "io.spinnaker.kork:kork-swagger"
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

kork-runtime seems to be runtimeOnly so to avoid compilation issues around annotation types not found, this has been added.

@j-sandy
Copy link
Collaborator

j-sandy commented Feb 14, 2024

@rahul-chekuri it seems at few places refactoring get missed, could you please update them ?
https://github.com/OpsMx/gate-oes/blob/bugfix/OP-21771-OES-1.30.1/gate-integrations-gremlin/src/main/java/com/netflix/spinnaker/gate/controllers/gremlin/GremlinController.java#L27
https://github.com/OpsMx/gate-oes/blob/bugfix/OP-21771-OES-1.30.1/gate-plugins/src/main/kotlin/com/netflix/spinnaker/gate/plugins/deck/DeckPluginsController.kt
https://github.com/OpsMx/gate-oes/blob/bugfix/OP-21771-OES-1.30.1/gate-plugins/src/main/kotlin/com/netflix/spinnaker/gate/plugins/web/info/PluginInfoController.kt
https://github.com/OpsMx/gate-oes/blob/bugfix/OP-21771-OES-1.30.1/gate-plugins/src/main/kotlin/com/netflix/spinnaker/gate/plugins/web/installed/PluginsInstalledController.kt

@j-sandy any idea how these went off the radar while building the image? just curious to know. :)

Did you try to build the code before image creation ? like ./gradlew clean build -x test
If it skipped build then its quite serious, because it implies that by some or the other way (may be transitively) springfox dependency still exist and we may need to verify.
Other possibility could be that main build.gradle class is not picking these modules (but its highly unlikely). This we can verify by running individual build command like:
./gradlew clean gate-plugins:build

@rahul-chekuri
Copy link
Collaborator Author

./gradlew clean build -x test

./gradlew --no-daemon gate-web:installDist -x test was the command I copied from GitHub action. That's how we missed it. But I am able to see compilation issues with ./gradlew clean build -x test. I have fixed all of them and updated the PR just now. Please review.

@j-sandy
Copy link
Collaborator

j-sandy commented Feb 14, 2024

Instead of multiple commits plz try to use git commit --amend, which try to add the code in existing commit. Otherwise we may end up creating lot of commits for a single PR, which may not be required.

@j-sandy j-sandy merged commit fb0cfa2 into OES-1.30.1 Feb 14, 2024
1 check failed
@j-sandy j-sandy deleted the bugfix/OP-21771-OES-1.30.1 branch February 15, 2024 08:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants