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
Question - How to fix "Pact Binary Error: WARN: Ignoring unsupported matching rules" #205
Comments
@cchen-kenzan is it just those top 4 that are showing up as ignored, or all of the body keys? Can you please also let us know which version of Also there is a micro version upgrade on @bethesque any ideas? I can imagine that the |
I believe I've fixed this in the very latest version of pact support. Does the js library version mentioned above have the latest standalone? |
It should be at |
No, that was an unrelated fix. Bother. I was sure I'd fixed this! @cchen-kenzan can you throw together a git repo that recreates the issue so I can reproduce this on my machine? |
@bethesque sorry, just to be clear, the version of standalone in |
Oh, right. Please update @cchen-kenzan! |
Thanks @bethesque and @mefellows it seems to have resolved most of my issues, but I'm still getting one pact binary error/warning on the following code:
This is the unsupported matching rule:
I think it may have to do with using eachLike in a nested fashion. |
Yes, I think that is why, but I thought I'd fixed that part. I'll try using your example and see if I can reproduce it. |
Ok, v1.54.3 of the standalone should fix this!!!! |
What is this version number for? |
All you need to check this is that your version of |
I'm still getting this error when using matching rule on query parameters. Shouldn't this be supported too? |
Dammit! This is like whackamole. Please provide your code. The matching is correct, it's just that when you have nested likes, it's complicated to ensure that you get the correct warnings. |
My spec is not even nested:
|
I've worked out why the warning is there for the query, I just need to work out what to do about it. It can be safely ignored. |
I have similar problem with an array rule. I'm using My matching rule is:
And I get ps: I'm assuming I'm reporting this to the wrong repo, sorry about it. If you tell me where this should be reported @bethesque I'll create an issue in that repo. ps2: pact is awesome! :) keep up the good work! |
Thanks! The issue belongs in the pact-support repository. Can you raise the issue there please? How are you creating it through the DSL? Most these warnings have actually been false positives - they occur because there is more than one place in the JSON hierarchy that turns the "match by type" (Pact.like) logic on, and once it's turned on, a repeated "match by type" (nesting a Pact.like) is redundant. It's been remarkably tricky to work out all the nesting cases and make sure that rules that are genuinely not being applied get logged, while making sure the redundant ones aren't! |
Thanks, I've opened the issue: pact-foundation/pact-support#61 |
Software versions
Note: The pact tests seem to be running correctly, but getting the following Pact binary errors and wondering how we can resolve them.
Expected behaviour
I want to be able to clear out these Pact binary errors.
Actual behaviour
I'm gettting the following errors when I'm running my interactions to create the pact contracts:
Steps to reproduce
We are matching using like in the following manner:
The text was updated successfully, but these errors were encountered: