dgs-framework
dgs-framework copied to clipboard
WIP: Spring Boot 3
Pull request checklist
- [x] Please read our contributor guide
- [x] Consider creating a discussion on the discussion forum first
- [ ] Make sure the PR doesn't introduce backward compatibility issues
- [x] Make sure to have sufficient test cases
Pull Request type
- [ ] Bugfix
- [ ] Feature
- [x] Refactoring (no functional changes, no api changes)
- [x] Build related changes
- [ ] Other (please describe):
Changes in this PR
Describe the new behavior from this PR, and why it's needed Issue https://github.com/Netflix/dgs-framework/issues/948
Spring Boot 3 is targeted to release this November 2022. This PR prepares dgs-framework
for Spring Boot 3. Many project maintainers are currently validating their projects against Sprint Boot 3 to prepare for the upcoming release. I have tested this branch extensively against my own Spring Boot 3 project.
Currently this PR is marked WIP because it uses Spring Milestone releases. The intention here was to get something working early to asses impact and facilitate a discussion around the changes required prior to the GA release of Spring Boot 3.
Version upgrades:
- Spring Boot
3.0.0-M4
- Spring Framework
6.0.0-M5
- Spring Security
6.0.0-M6
- Spring Cloud
2022.0.0-M4
- Kotlin
1.7.10
- JDK target
17
- graphql-java
19.2
Version downgrades:
- mockk
1.12.4
Alternatives considered
Describe alternative implementation you have considered
N/A
Thanks for the doing the pre-work and investigating this. Just to provide some context, we have some constraints with switching the framework to Spring Boot 3 due to internal usage and that will affect how we make this available. We don't have concrete timelines yet, but will be planning for it. I will post updates on this thread as and when we have more information from our side.
Is there a way to test the WIP version?
You'll have to check out the branch locally, publish to your local maven repo using ./gradlew publishToMavenLocal
and pin to the local snapshot build in order to test it out. Unfortunately, we don't have a great way to publish candidates off of branches, so this is the mechanism you would need to test it out locally.
@srinivasankavitha & @berngp, thank you both for your continued support and eyes on this PR.
I wanted to provide a quick update on the Spring Boot 3 release timeline. The release candidate process has begun. Last week the Spring team began publishing release candidates for Spring Framework & Spring Security, which this PR is now using.
Spring announced today that they will be releasing the Spring Boot 3.0.0-RC1 later this evening. https://spring.io/blog/2022/10/20/spring-framework-6-0-0-rc2-available-now
I will update this PR with the latest release candidates as they become available.
It appears that the Spring team is on track for a GA release in mid-late November.
Cheers!
Thanks for all the work on the PR so far!
Another quick update! The release candidates seem to be stabilizing from the Spring team. I'm seeing less refactoring or feature addition in these latest updates. I've updated this branch again to use the latest release candidates.
We also now have a targeted release date, the Spring team announced:
Our final release is scheduled for November 24, 2022
Looks amazing thank you for this. Are there any updates now that spring boot 3 has official gone GA?
Looks amazing thank you for this. Are there any updates now that spring boot 3 has official gone GA?
From my perspective, this branch is almost out of WIP / draft. spring-cloud-dependencies
still hasn't gone GA. Once spring-cloud-dependencies
has been released by the Spring team, I'll remove the WIP placeholder.
@srinivasankavitha & @berngp, has your team found a path around your internal constraints? I also believe we will need to update the dgs-examples-*
repositories so smoke tests don't fail from version mis-matches.
Cheers! 🚀
@Stuckya - the current plan for internal consumption is to maintain both 2.x and 3.x branches for a temporary period of time when we are ready to start consuming 3.x. Likely to happen in the next couple months. Sent from my iPhoneOn Nov 25, 2022, at 3:19 PM, Andrew Stucky @.***> wrote:
Looks amazing thank you for this. Are there any updates now that spring boot 3 has official gone GA?
From my perspective, this branch is almost out of WIP / draft. spring-cloud-dependencies still hasn't gone GA. Once spring-cloud-dependencies has been released by the Spring team, I'll remove the WIP placeholder. @srinivasankavitha & @berngp, has your team found a path around your internal constraints? I also believe we will need to update the dgs-examples-* repositories so smoke tests don't fail from version mis-matches. Cheers! 🚀
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: @.***>
@DGSMutation
and @DGSQuery
field need to be annotated with @AliasFor
due to:
https://github.com/spring-projects/spring-framework/issues/28760
@Stuckya - the current plan for internal consumption is to maintain both 2.x and 3.x branches for a temporary period of time when we are ready to start consuming 3.x. Likely to happen in the next couple months.
Sounds great, thanks for the update @srinivasankavitha!
Should I continue to target master
with this PR?
FWIW in my experience, master usually becomes the most recent release and another branch is maintained for backwards compatibility. Preserves trunk based development for the new work, but provides the flexibility of a short-lived release branch for these weird times when internal limitations complicate ideal workflows.
3.x support would == master, corresponding with a DGS 6.x release. 2.x support would == new temporary branch, maintaining the DGS 5.x release line.
Please let me know if I can help in anyway!
@DGSMutation
and@DGSQuery
field need to be annotated with@AliasFor
due to:
Thanks for bringing this back to my attention. I would be happy to address this update in my PR.
Thanks so much for all the great work in this PR! 👏
I still need to do some more testing with all these changes, so will work on that over the next few days. Next steps for me:
- Test with more apps to validate the branch
- Create a new branch for 2.7 maintenance and do a test release
- Clone and update dgs-examples that are used for the pipeline to Spring Boot 3, Java 17 - this should get the CI build passing. We will need separate examples that use SB 2.7 and 3.x
Our current plan is to aim for early Jan for a target 3.x compatible DGS release once the above is ready. We'll backport only essential changes and fixes to 2.7 branch, but new feature development will be enabled on master going forward.
Hello -
Thanks for all your work on this PR - We are moving to Spring Boot 3 across our projects and so anxiously awaiting this update. I'm trying to get a ahead and give this update a test. I built the branch out to my local maven repo and pulled it in successfully implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:5.6.0-SNAPSHOT"))
However when I start my app, I am not seeing the DGS framework initialize and no /graphql endpoint is available. Do you know if there are other updates to ensure Spring Boot is autowiring all the needed DGS components?
Also looks like Spring Cloud final is supposed to be released today: https://calendar.spring.io/
Thank you!
@Stuckya - I am thinking of merging your PR to a spring-boot-3 branch to further test and add any fixes on top of. Once we are ready, I can merge that branch to main (likely beginning of Jan). This will allow for us to make further fixes, if needed based on our testing. Does that sound ok?
I updated this branch today to make use of the spring-cloud-dependencies 2022 GA release, which means we are no longer relying on the milestone spring repository.
@Stuckya - I am thinking of merging your PR to a spring-boot-3 branch to further test and add any fixes on top of. Once we are ready, I can merge that branch to main (likely beginning of Jan). This will allow for us to make further fixes, if needed based on our testing. Does that sound ok?
@srinivasankavitha - Of course, that sounds like it will make things easier for you all to continue making updates util early Jan. Please let me know if I can help in any way.
Great, I'll create a new branch and merge your PR there and continue with my testing. It's looking really good so far! Thanks for the change you just made to update the spring-cloud-dependencies to GA. I am updating the example projects so we can get the build passing here and will take it from there.
Thanks again for the contributions!
Hello -
Thanks for all your work on this PR - We are moving to Spring Boot 3 across our projects and so anxiously awaiting this update. I'm trying to get a ahead and give this update a test. I built the branch out to my local maven repo and pulled it in successfully
implementation(platform("com.netflix.graphql.dgs:graphql-dgs-platform-dependencies:5.6.0-SNAPSHOT"))
However when I start my app, I am not seeing the DGS framework initialize and no /graphql endpoint is available. Do you know if there are other updates to ensure Spring Boot is autowiring all the needed DGS components?
Also looks like Spring Cloud final is supposed to be released today: https://calendar.spring.io/
Thank you!
@GrantGochnauer Have you checked to make sure you are on the same branch as this PR? My guess is you don't have the changes to make it work with spring boot 3. I am able to use a local snapshot built from this branch in my test projects successfully.
@Stuckya - could you please make the following changes as well as part of the PR. I updated example projects to Spring Boot 3 and this branch needs to use the updated examples for the build to pass. I cannot merge to a branch until then anyway.
- Please update this file to use
dgs-examples-kotlin
anddgs-examples-java
repositories: https://github.com/Netflix/dgs-framework/blob/master/scripts/config.yml#L21 - Same in this file: https://github.com/Netflix/dgs-framework/blob/master/.github/workflows/ci.yml#L62
@Stuckya - could you please make the following changes as well as part of the PR. I updated example projects to Spring Boot 3 and this branch needs to use the updated examples for the build to pass. I cannot merge to a branch until then anyway.
- Please update this file to use
dgs-examples-kotlin
anddgs-examples-java
repositories: https://github.com/Netflix/dgs-framework/blob/master/scripts/config.yml#L21- Same in this file: https://github.com/Netflix/dgs-framework/blob/master/.github/workflows/ci.yml#L62
You got it, update coming shortly.
@srinivasankavitha, should be good to go!
Thanks @Stuckya - build seems to have passed ci checks as well with your latest commit. 🥳 I'll merge it to a spring-boot-3-candidate branch and continue testing it. As mentioned earlier, I'll merge the branch to master once we are ready and have created a separate branch for 2.7. So early Jan, 2023.