Skip to content

Support overriding "check_for_potential_duplicate_pacticipant_names" on a per-request basis #823

Description

@sebastian-tello

I came across this 409 response when hitting "/contracts/publish": The name "XYZ" is very similar to the following existing pacticipants...

Looking at the docs I see this check can be disabled via config in the Pact Broker, however I was wondering if you would consider allowing the check to be disabled on a per request basis.

My use case is the following: I'm building a CLI that orchestrates some specific validations (openapi <-> pact). Then in CI right after deployment contracts are published, and I would like this operation to be very resilient since a failure at this point would be very expensive. At the same time the company still uses the Pact Broker in the classic validation flow, so:

  • I would like this check to remain ON for the usage outside of the CLI I'm building, since it seems a nice to have feature
  • But to be disabled for requests coming from my CLI.

I could call "PATCH /pacticipants" (or is it POST?) every time before calling publish, or whenever I get a 409 (and then retry the publish call) but it brings unnecessary complexity and another possible point of failure just to workaround a check I don't need. Maybe the overall configuration of this check could be overriden per request by proving some sort of "checkForPotentialDuplicatePacticipantNames: true|false" param in the request.

Wdyt?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions