-
Notifications
You must be signed in to change notification settings - Fork 46
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
Unable find pacts when using pactBrokerUrl with context path #420
Comments
Could you please attach the full TRACE level thread as an attachment here (please redact any sensitive info)? I believe the upstream issue was fixed in #220. |
Attached log file with the complete run |
This entry looks suspicious, but it's hard to tell as it doesn't look like the request/response is logged. The @rholshausen does the attached log indicate a problem in the core? I think it's not in JS at least, as the |
Can't tell. It seems to have made the request to the Broker to fetch the pb:provider-pacts-for-verification link, and got a 404 Not Found response back. This is to the index that returns all the links. |
Yeah, I thought so. I was expecting to see the raw HTTP request/response in those logs - were they removed @JesusHM or are they just not present? @JesusHM can you please issue a call to the root resource e.g.
|
I've not removed any line from the log. Curl works fine. The easier way to reproduce the problem is:
As you can see, the intial request is done to GET "/" and the path "pact-broker" is lost (as log should show GET /pact-broker HTTP/1.1) |
If you look at the HAL browser, do the returned links have the path suffix The pact broker uses HAL relations, and the client cli's request the index link for the broker and retrieves a set of links to folllow, if this isn't configured to have the suffix, then there will be a 404 as the calling client is redirected to a url that doesn't exist. See
|
yes, the HAL does return the context path /pact-broker, The problem is the first request, the one fetching the HAL the one which ignore the context path, trying to get the HAL from / and then, failing |
Also to mention that java implementation works fine |
Looks like the issue might be upstream in the pact reference library. I've tested with the latest CLI verifier and the same issue occurs. Moving upstream. |
Software versions
Issue Checklist
Please confirm the following:
Expected behaviour
On verification phase, when configuring the pactBrokerUrl property witch contain a context path, ( for example https://my.domain.com**/pact**), pact should be able to fetch the corresponding contracts
Actual behaviour
Pact remove the context path from the pactBrokerUrl, trying to get them from the parent (https://my.domain.com/) , and therefore, fail
Steps to reproduce
Relevant log files
INFO ThreadId(02) pact_verifier::pact_broker**: Fetching path '/' from pact broker ERROR ThreadId(0") pact_verifier: No pacts found for provider 'test-provider' matching the given consumer version selectors in pact broker 'https://my.domain.com/pact': Link/Resource was not found - No pacts for provider 'test-provider' were found in the pact broker. URL: 'https://my.domain.com/pact'
The text was updated successfully, but these errors were encountered: