quarkiverse / quarkus-pact

Pact is a widely-recommended framework for consumer-driven contract testing. This Quarkus extension gives the best Pact integration with Quarkus.
https://pact.io/
Apache License 2.0
12 stars 6 forks source link

1.2.0 -> 1.3.0 causing class not found errors #189

Open edeandrea opened 7 months ago

edeandrea commented 7 months ago

It seems the upgrade from 1.2.0 to 1.3.0 is causing some class not found errors?

See https://github.com/quarkusio/quarkus-super-heroes/actions/runs/8109821111/job/22165814968#step:4:4739

holly-cummins commented 7 months ago

Hmm, sure looks like it, doesn't it? It also looks like there's a missing test on this side!

With the move Pact >4.5.7 introduced a bunch of new dependencies, and each of them needed to manually listed as parent first, because we haven't been able to move away from parent-first. Looks like one of the dependencies is exercised in something the superheroes app does, but wasn't exercised in the paths in the tests in the extension.

edeandrea commented 7 months ago

Sure looks like it! We're using the ktor mock server. I honestly don't remember why :) but we are....

holly-cummins commented 7 months ago

Hmm, interesting. I had to mark a bunch of new transitive dependencies as parent first in the provider extension, and ktor is one of the ones marked parent first. But it didn't change recently, it's been parent-first for two years.

And, the failure is on the consumer side, where nothing is marked as parent first. So 'parent first' seems to be the wrong tree. The Pact JVM consumer has been using KTor for several years with relatively few changes, so this isn't going to be an easy one to track down.

edeandrea commented 7 months ago

I'm not married to using ktor, so if it's easier to switch away from it I'm fine with that. I think I started using it because it has nice logging of the requests and responses.

holly-cummins commented 7 months ago

I've got a reproducer (which I'll merge once it's passing), and I've binary-chopped to narrow down where the issue happen. Anything below Pact 4.6.0 is fine. Pact 4.6.0 upgraded ktor, which seems likely to be the issue: https://github.com/pact-foundation/pact-jvm/commit/1fafbf45c381ef413135e614ecfbd3df6e8d735e