-
Notifications
You must be signed in to change notification settings - Fork 65
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
Upgrade to graphql-java 17.0 #122
Conversation
@berngp: Thank you for submitting a pull request! Before we can merge it, you'll need to sign the Apollo Contributor License Agreement here: https://contribute.apollographql.com/ |
Attempt to upgrade to [graphql-java 17.0](https://github.com/graphql-java/graphql-java/releases/tag/v17.0). Status: * `com.apollographql.federation:federation-graphql-java-support` is incompatible with `graphql-java` v17.0 ref apollographql/federation-jvm#122 for details
@berngp - https://github.com/graphql-java-kickstart/graphql-java-tools/releases |
I'm wondering why this is relevant? The federation lib shouldn't have a dependency on |
Correct, I believe it's limited to the spring-examples @paulbakker |
This is getting a bit off-topic, but wouldn't it be a lot easier (from a maintenance perspective) dropping the |
@setchy upgraded to |
@setchy happy to squash if you rather have the pr merged as a single commit. |
28a8cf5
to
d1ce8c5
Compare
@setchy scratch that. I had to rebase and then fix some dependency version that the MVN Enforcer plugin now complained about. |
This commit upgrades the framework to [graphql-java 17.0](https://github.com/graphql-java/graphql-java/releases/tag/v17.0). Required changes. * Upgrade to graphql-java-tools 11.1.0, it now supports graphql-java 17.0 * Include graphql-java-extended-scalars since it was moved out of graphql-java. * Upgrade to Spring Boot 2.4.5 due that graphql-java-kickstarter requires a min of 2.4.5. If we don't do this the MVN Enforcer Plugin will fail the build. Same case for junit, log4j, and spring-aop.
d1ce8c5
to
2fe3e61
Compare
@sachindshinde 👆 - appreciate your help to review and merge/release |
@setchy Thanks for the ping here! I can take a look at this sometime later this week/early next week (as part of QA, we'll also have to smoke test a release RC in Apollo's infra prior to release). EDIT: Apologies for the delays here. I'll be helping an engineer ramp up on the codebase to help maintain it, so we'll need to push back the timeline a bit to 2021/09/07 for review and release. |
|
Update here: Due to an incident escalation in our backend, we couldn't get to this PR today, but we intend to get to this tomorrow (2021/09/08). |
Update here: While we have temporarily resolved the incident, product/planning has decided our team must take an interrupt this sprint to resolve the incident in the medium-term, and has asked we push back the date here two weeks to 2021/09/22 (apologies for the delays here again 🙇). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@berngp
The changes here for versioning looked mostly fine, although there are a few issues:
- For
FederationSdlPrinter
, when we bumpgraphql-java
versions, we usually don't try to tweak the printer to make it compile and pass tests, but instead just rebase the changes introduced by this repo onto the new version ofSchemaPrinter
.- This usually involves copying the
SchemaPrinter
used by thatgraphql-java
version, renaming the class, and then replaying the changeset introduced by this repo onto that. - There a few reasons we opt for this route:
- The changeset this repo introduces on
SchemaPrinter
is rather small. - The tests in this repo for
FederationSdlPrinter
are very minimal compared to the tests thatgraphql-java
uses to testSchemaPrinter
. The tests in this repo forFederationSdlPrinter
are primarily to test the features that this repo adds toSchemaPrinter
, and not the base functionality ofSchemaPrinter
itself.- This means that tweaking
FederationSdlPrinter
until it compiles and tests pass may be insufficient, as it will miss edge cases (e.g. subtle changes in API behavior).
- This means that tweaking
- Rebasing the changeset on the newer
SchemaPrinter
ofgraphql-java
means that we'll get bugfixes toSchemaPrinter
, in addition to the changes needed toSchemaPrinter
to support the new API changes (in addition to subtle changes that need to be made, by virtue of the maintainers ofgraphql-java
knowing more about the subtleties of their API changes).
- The changeset this repo introduces on
- In the near future, we expect to delete
FederationSdlPrinter
, and go back to relying on theSchemaPrinter
fromgraphql-java
. This should hopefully make these kinds of PRs substantially easier.- The reason we have
FederationSdlPrinter
is to support very old gateways that have odd requirements of the subgraph schemas presented atquery { _service { sdl } }
(specifically, they require standard and federated GraphQL directive definitions and types to be omitted from that SDL, making them invalid GraphQL).- These old gateways wouldn't work with newer GraphQL features usable in newer
graphql-java
versions, so there's an argument to be made that it's fine to drop support for them, as they couldn't really use newergraphql-java
versions in a safe way (in other words, we only partially supported that use case).
- These old gateways wouldn't work with newer GraphQL features usable in newer
- The reason we have
- This usually involves copying the
- Regarding the
dependencyManagement
section for thegraphql-java-extended-scalars
artifact, it appears to be needed due to a bug ingraphql-java-kickstart
. (We don't use extended scalars in this repo explicitly, but they're used by dependencies.) At a cursory glance, it looks like code somewhere in agraphql-java-kickstart
artifact is calling methods/classes from a newer version ofgraphql-java-extended-scalars
than is requested by that artifact.- This can indeed be resolved though
dependencyManagement
, although I'd prefer that it be placed next to the JacksondependencyManagement
entries in thespring-example
POM since this is specifically an issue with a transitive dependency ofspring-example
. - The scope of the
dependencyManagement
shouldn't betest
, as it's also needed at runtime. (E.g. runningmvn -pl spring-example spring-boot:run
will fail if it's justtest
scope.)
- This can indeed be resolved though
We're looking to cut an RC release this Wednesday morning and make a release by Wednesday EOD, so I've went ahead and implemented the above suggestions in #127 .
Thanks for taking care of the changes with #127. Will close this PR in favor of it. |
This commit upgrades the framework to graphql-java 17.0.
Required changes.