pact-foundation / pact-foundation/pact-cli

`ignore-order` is not a valid matching rule type

Open
#49 3 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2
Forks
1
Avg merge
3d 8h
Merged PRs (30d)
9

Description

Hi, we stumbeled across the following error when trying to upload pacts.

When trying to upload the following contract:

we observe the following:

$ npm i -g @pact-foundation/pact-cli

$ pact-broker publish *.json --consumer-app-version "0.0.0-SNAPSHOT" --branch "test" --broker-base-url= --broker-token=...

❌ Failed to load pact from JSON: Err(Could not parse matcher JSON Object {"match": String("ignore-order"), "max": Number(0)}

Caused by:
ignore-order is not a valid matching rule type)

$ pact-broker --version
pact-broker 0.6.3

Downgrading the @pact-foundation/pact-cli from 18.0.0 to the next most recent 16.1.7 fixes this problem. So we assume the error sits somewhere in this project, as the backend was changed to this project between these versions.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the failure by publishing the attached pact.json with pact-broker 0.6.3, using the command shown in the issue, and compare it with pact-cli 16.1.7. Trace the matcher JSON parsing for the ignore-order rule; done means the contract uploads successfully on the current version without rejecting that matcher.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.