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

SmallRye GraphQL 2.11 #43850

Merged
merged 8 commits into from
Oct 15, 2024
Merged

SmallRye GraphQL 2.11 #43850

merged 8 commits into from
Oct 15, 2024

Conversation

jmartisk
Copy link
Contributor

Fixes #42534 (and more)

@jmartisk
Copy link
Contributor Author

jmartisk commented Oct 14, 2024

FYI @RoMiRoSSaN and @dpolysiou this includes your commits
Also @mskacelik

@jmartisk jmartisk requested review from gsmet and cescoffier October 14, 2024 08:28

This comment has been minimized.

Copy link

github-actions bot commented Oct 14, 2024

🙈 The PR is closed and the preview is expired.

This comment has been minimized.

This comment has been minimized.

Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

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

Overall, this looks good to me but I added a few questions and comments.

Thanks!

Comment on lines 162 to 164
it is essential to override the bean's scope to `RequestScoped` (or another similar scope). By default, the
Typesafe client is an application-scoped bean. This guarantees that each new instance of the bean created
after a certificate reload will be configured with the latest certificate.
Copy link
Member

Choose a reason for hiding this comment

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

Not sure if it's just me misunderstanding but this looks confusing to me.

AFAICS from the first sentence, ApplicationScoped beans won't work well.

But the second sentence says some beans are application scoped and then it says This guarantees.... So you might think that the fact that they are application scoped guarantees it to work. Which is not the case unless I'm mistaken?

Also is it a general limitation of the TLS registry because it seems quite problematic to require all the beans to be request scoped?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good point, I'll clarify that a bit.
Yeah, I think we simply have to make the beans short-lived to get new instances configured with the new certificates. We probably don't want to hot-swap it inside a running GraphQL client instance because that would require closing the underlying HTTP client (and there might be running websocket connections etc), that would be very dangerous.

Btw Dynamic clients are Dependent right now, we plan to figure out a way to make that configurable.

*/
@ConfigItem
@Deprecated
Copy link
Member

Choose a reason for hiding this comment

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

Please add since and forRemoval. Valid for all the configuration properties you deprecated.

* The name of the TLS configuration (bucket) used for client authentication in the TLS registry.
*/
@ConfigItem
public Optional<String> tlsConfigurationName;
Copy link
Member

Choose a reason for hiding this comment

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

Just to make sure, this is consistent with the other extensions, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yeah, we copied this from the gRPC client

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I confirm this is the name used everywhere and documented in the ADR.

@jmartisk jmartisk force-pushed the smallrye-graphql-2.11 branch from 0e909a6 to a06c47f Compare October 14, 2024 12:10

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

This comment has been minimized.

@jmartisk jmartisk force-pushed the smallrye-graphql-2.11 branch from 82db312 to 3375bb2 Compare October 15, 2024 11:34
@jmartisk
Copy link
Contributor Author

Hopefully fixed the Windows failures now 🫤

Copy link

quarkus-bot bot commented Oct 15, 2024

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 3375bb2.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

Copy link

quarkus-bot bot commented Oct 15, 2024

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 3375bb2.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

You can consult the Develocity build scans.


Flaky tests - Develocity

⚙️ JVM Tests - JDK 17

📦 extensions/panache/hibernate-reactive-rest-data-panache/deployment

io.quarkus.hibernate.reactive.rest.data.panache.deployment.repository.PanacheRepositoryResourcePutMethodTest.shouldUpdateComplexObject - History

  • 1 expectation failed. JSON path name doesn't match. Expected: is "updated collection" Actual: empty collection - java.lang.AssertionError
java.lang.AssertionError: 
1 expectation failed.
JSON path name doesn't match.
Expected: is "updated collection"
  Actual: empty collection

	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)

@jmartisk jmartisk merged commit fe164e0 into quarkusio:main Oct 15, 2024
55 checks passed
@jmartisk jmartisk deleted the smallrye-graphql-2.11 branch October 15, 2024 19:32
@quarkus-bot quarkus-bot bot added the kind/enhancement New feature or request label Oct 15, 2024
@quarkus-bot quarkus-bot bot added this to the 3.16 - main milestone Oct 15, 2024
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.

Integrate GraphQL clients with the TLS registry extension
6 participants