https://pact.io logo
Join Slack
Powered by
# pact-broker
  • j

    joao diogo Henriques

    11/18/2024, 1:07 PM
    Hello, I'm running the latest version of the pactfoundation/pact-broker image. When I try to publish a new contract I get the following message in the logs:
    Copy code
    2024-11-16 15:27:57.057292 I [6:puma srv tp 001] PactBroker::Pacts::Service -- Creating new pact publication -- {:consumer_name=>"Gamebeast frontend", :provider_name=>"API", :consumer_version_number=>"a4eac43446d04a8da19b1e87381064ba53ea570d", :pact_version_sha=>"086898c0d6db6c1dd208f5f8b547b7f65612e2aa"}
    2024-11-16 15:28:19.429973 I [6:puma srv tp 001] PactBroker::matrix::Service -- Querying matrix -- {:selectors=>[{:pacticipant_name=>"frontend", :pacticipant_version_number=>"a4eac43446d04a8da19b1e87381064ba53ea570d"}], :options=>{:latestby=>"cvp", :limit=>"100", :environment_name=>"dev", :ignore_selectors=>[]}}
    WARN: Ignoring unsupported combine AND for path $
    WARN: Ignoring unsupported combine AND for path $['created_at']
    WARN: Ignoring unsupported combine AND for path $
    WARN: Ignoring unsupported combine AND for path $['created_at']
    WARN: Ignoring unsupported combine AND for path $
    WARN: Ignoring unsupported combine AND for path $
    WARN: Ignoring unsupported combine AND for path $
    WARN: Ignoring unsupported combine AND for path $['configuration']['variables']
    WARN: Ignoring unsupported combine AND for path $['max_requests']
    WARN: Ignoring unsupported combine AND for path $
    WARN: Ignoring unsupported combine AND for path $[*]['created_at']
    WARN: Ignoring unsupported combine AND for path $
    Following that i get:
    Copy code
    2024-11-16 18:41:43.847979 E [6:puma srv tp 001 logging.rb:58] PactBroker::Errors::ErrorLogger -- Error reference pAzBlPLjhh -- Exception: Sequel::DatabaseError: PG::UndefinedTable: ERROR:  relation "pact_publications" does not exist
    LINE 1: SELECT "pact_publications".* FROM "pact_publications" INNER ...
    ^ This leads to an Internal server error when accessing the broker. Restarting the container leads to a series of migrations errors.
    m
    • 2
    • 11
  • s

    Stanislav Vodetskyi

    11/22/2024, 3:03 AM
    Hi folks, is there a doc on the
    /matrix
    API? It's not documented in HAL browser and the syntax for the parameters is somewhat confusing. Or is this API not considered public? Context: we need to implement a customized
    can-i-deploy
    cli, basically mirror open-source version with some tweaks related to security (such as automatically retrieving credentials from credential store). We've been using a shell script wrapper, but are now considering to call API directly. We cannot use
    pb:can-i-deploy-pacticipant-version-to-environment
    API because that one doesn't support
    ignore
    parameter. We can also package an open-source cli and our wrapper in a docker image and use that, but I feel it's cleaner to use the API.
  • m

    Matt (pactflow.io / pact-js / pact-go)

    11/22/2024, 3:15 AM
    Hi folks, is there a doc on the
    /matrix
    API? It’s not documented in HAL browser and the syntax for the parameters is somewhat confusing. Or is this API not considered public?
    We’ve been trying to avoid making it public, because it’s a complicated API. I’ll be honest - I don’t even know how it works. But we do have it documented here: https://smartbear.portal.swaggerhub.com/pactflow/default/pactflow_saas_api#/matrix/get_matrix
    s
    • 2
    • 4
  • m

    Matt (pactflow.io / pact-js / pact-go)

    11/22/2024, 3:16 AM
    It’s not exactly clear what
    latestby
    is in the API. I think the options are here: https://github.com/pact-foundation/pact_broker/blob/96532124f3a53a499276c69ff2df785b8377588e/lib/pact_broker/matrix/repository.rb#L91
  • a

    Adrien DEVILLERS

    11/26/2024, 10:07 AM
    Hi there, I have set-up pact testing within my team, with pact-broker CI-CD integrations webhooks, can-i-merge / deploy jobs and WIP/Pending pacts.We are scaling up and so far it works pretty good. But lately I had an issue with the workflow and I couldn’t find a recommendation on how to solve it. Here’s the problem: • I’m adding a new contract between a provider and a consumer, • I merged the provider, the branch master of the provider verify the pending pact of my consumer branch (which becomes not pending). • Unfortunately, a colleague also merged on the provider right before I could launch the can-i-merge job on the consumer MR. • The provider CI doesn’t fetch my contract for verification since it is not pending anymore. • The can-i-merge job then timeout because it waits for the verification of the latest master version but it will never come… Is there something wrong / missing with the workflow? Do I need to setup a web hook that will trigger a verification for a specific contract, when there is a timeout on can-i-merge job?
  • s

    Stanislav Vodetskyi

    12/06/2024, 8:58 AM
    hi folks, what's the db flush interval for the pact-broker? We noticed that taking a pg_dump of the postgres db doesn't necessarily include very last minute changes that are available through the api, though we had pretty limited testing, could've missed something.
    m
    • 2
    • 4
  • m

    Martin Mineo

    12/06/2024, 7:09 PM
    Hi all! I’m trying to use the pact broker CLI to publish a pact into the broker (dockerized) and cannot do it. I’m getting an error but I can’t figure it out why I created the pact from the pactNet project. But when I run the command
    Copy code
    pact-broker publish 'pacts/Fulfilment_API-Orders_API.json' -b <http://localhost:9292> --consumer-app-version 1.0.0 -v -u packbroker -p packbroker
    I’m getting the
    Unauthorized
    error
    Copy code
    the whole error in the thread
    ...
    ...
    <- "POST /contracts/publish HTTP/1.1\r\nAccept: application/hal+json\r\nUser-Agent: Ruby\r\nContent-Type: application/json\r\nAuthorization: [redacted]\r\n"
    <- "{\"pacticipantName\":\"Fulfilment_API\",\"pacticipantVersionNumber\":\"1.0.0\",\"tags\":[],\"contracts\":[{\"consumerName\":\"Fulfilment_API\",\"providerName\":\"Orders_API\",\"specification\":\"pact\",\"contentType\":\"application/json\",\"content\":\"eyJjb25zdW1lciI6eyJuYW1lIjoiRnVsZmlsbWVudF9BUEkifSwiaW50ZXJhY3Rpb25zIjpbeyJjb250ZW50cyI6eyJjb250ZW50Ijp7ImlkIjoxfSwiY29udGVudFR5cGUiOiJhcHBsaWNhdGlvbi9qc29uIiwiZW5jb2RlZCI6ZmFsc2V9LCJkZXNjcmlwdGlvbiI6ImFuIGV2ZW50IGluZGljYXRpbmcgdGhhdCBhbiBvcmRlciBoYXMgYmVlbiBjcmVhdGVkIiwibWF0Y2hpbmdSdWxlcyI6eyJib2R5Ijp7IiQuaWQiOnsiY29tYmluZSI6IkFORCIsIm1hdGNoZXJzIjpbeyJtYXRjaCI6ImludGVnZXIifV19fX0sInBlbmRpbmciOmZhbHNlLCJ0eXBlIjoiQXN5bmNocm9ub3VzL01lc3NhZ2VzIn1dLCJtZXRhZGF0YSI6eyJwYWN0UnVzdCI6eyJmZmkiOiIwLjQuMjMiLCJtb2RlbHMiOiIxLjIuNSJ9LCJwYWN0U3BlY2lmaWNhdGlvbiI6eyJ2ZXJzaW9uIjoiNC4wIn19LCJwcm92aWRlciI6eyJuYW1lIjoiT3JkZXJzX0FQSSJ9fQ==\"}]}"
    -> "HTTP/1.1 401 Unauthorized\r\n"
    -> "Content-Type: text/plain\r\n"
    -> "WWW-Authenticate: Basic realm=\"Restricted area\"\r\n"
    -> "Content-Length: 0\r\n"
    -> "\r\n"
    reading 0 bytes...
    -> ""
    read 0 bytes
    Conn keep-alive
    Do you have any suggestions?
    m
    • 2
    • 5
  • b

    Boris Nedelkov

    12/10/2024, 10:29 AM
    Hi there! I was wondering if anyone could tell me which files contain the code for the front end of the pact broker. Me and my team are having trouble figuring out what we need to modify since we have a project that requires us to change the UI. Thanks in advance!
    y
    • 2
    • 4
  • а

    Александр Чепрасов

    12/16/2024, 9:49 AM
    Hi everyone! We're setting up automation with a Pact Broker. Let me share an issue we encountered. We have one consumer that interacts with five providers. For full automation, we need to use webhooks from the Pact Broker. However, for each branch, we need to create separate hooks for every provider. How can we get a list of providers that will be involved in the tests for the given consumer's changes, or how can we retrieve a list of all providers for a specific consumer?
    m
    s
    • 3
    • 6
  • s

    Stanislav Vodetskyi

    12/17/2024, 10:06 AM
    hi folks. Is there an API to retry a failed webhook in open-source pact broker? HAL browser doesn't show it, but it is missing some of the calls, so I was wondering if there's a way. If not, can this be a feature request? We had a brief outage and webhook couldn't reach our CI system, so the pacts were not verified. We have resolved it quickly, but are now looking for ways to replay the webhook (we can trigger builds in CI system directly too, but it would be easier to just click on the failed webhook in the UI and hit a retry button or smth) Another use case (and probably more important) would be to help debug webhooks. I know that you can use "pb:execute" API call, but that one doesn't allow specifying custom parameters, it will automatically pick provider name/version/etc
  • g

    Garrett Fitzgerald

    12/17/2024, 6:56 PM
    hi guys. i just signed up for a trial but i am getting this error when trying to deploy to pact-broker: i think it's because i have multiple organizations/subscriptions maybe {"error":"You can not publish a contract for a new integration as the maximum number of integrations has already been created for this account. If you would like to upgrade your plan to remove this limit please go to https://uniqlearn.pactflow.io/settings/billing in the UI."}
    m
    • 2
    • 5
  • r

    Ran Abitbul

    01/06/2025, 6:13 AM
    Hi team, TL;DR - is there a way to manually report verification results? I have applied your solution on our legacy code, which uses TestNG as testing framework. The way it works, is I have a TestNG test, which executes a JUnit5 Tests Runner, which runs the verification class that uses the verification test template. I am facing an issue where I have a race condition, where the verification reporter reports before the test completes (always success). I was wondering if there is a way I could manually report results. Thanks.
    m
    • 2
    • 2
  • j

    James P

    01/08/2025, 11:51 AM
    Hi, Is there ever a valid case to have multiple versions of a contract be tagged in a specific environment E.g. between service A & B, both versions X (older version) and Y are tagged with the environment ‘dev’? It’s causing issues in our pipelines that record deployment isn’t removing the environment from the older contract and intermittently the can-i-deploy is picking up the older contract
    • 1
    • 2
  • a

    Adrien DEVILLERS

    01/08/2025, 4:45 PM
    Hi, I am in a situation where my job can-i-merge is failing because my contract has been verified by a commit on master that is no longer the latest one • I am using pending pacts , WIP pacts and webhooks • I can probably manually trigger a webhook to request a verification for this specific pact but it's not practical I'd rather automate it • I think my setup is globally good but i struggle to find a satisfying work-around for this issue so any insight is welcomed 🙂 • Ideally I'd like to modify my can-i-merge job to execute webhook for a consumer/provider pair in case the can-i-merge command has timed out thanks in advance
  • m

    Miguel Gramacho

    01/09/2025, 11:32 AM
    Hi! Are there plans to have oauth2 supported in the dockerized pact broker?
    b
    m
    • 3
    • 2
  • k

    Kyle Shrader

    01/09/2025, 9:34 PM
    Hi. I am looking to upgrade pgsql to version 17.2. My pact broker is running 2.107.1. Are there any known issues with integrating these versions? I did see issue #126 mention a similar scenario, but it was only resolved by downgrading the pact-broker. Should I expect this issue, or others? In the event that I do see issues, what would be the best remedy? • Is there a version of pact broker which supports 17.2, which I can upgrade to? • Should I downgrade postgresql? • Or should I downgrade the pact-broker?
    j
    m
    • 3
    • 4
  • h

    Hernan Mateika

    01/10/2025, 8:23 PM
    Hi community! Question, do you have
    pact-broker
    deployed on your AWS account? It will be really helpful to know how many resources are you setting for pact-broker and postgres db. (If you are using EC2 which instance family type are you using) and know how many contracts are you handling with those resources Thanks in advance!
    m
    • 2
    • 2
  • g

    Gabriel Vasconcelos

    01/15/2025, 3:50 PM
    Hello. We had a pact defined between 2 teams (bidirectional). There were no changes to the pact or to the swagger, but the validation started failing after this update. The pact mismatch was:
    Copy code
    'Value is incompatible with the parameter defined in the spec file: must match format "date-time"',
    My question is: were there any improvements done then during the parsing? Could this be a bug? Thanks.
    m
    • 2
    • 2
  • i

    Iuri Araujo Ramos

    01/15/2025, 7:51 PM
    Hi team, We are facing an issue with some contracts not resolving as expected. We have a bidirectional contract setup, with consumers implemented in JavaScript and Java, and the provider code(developed in Java) has published the API specification. During verification, the contract tests are passing, but Pact indicates that the provider is not compatible with the consumer contract. Additionally, we are encountering the following error message:
    Copy code
    {
      "error": {
        "message": "Cannot read properties of undefined (reading 'type')"
      }
    }
    Could you please assist us in diagnosing and resolving this issue? Thank you! FYI: @Luis Eduardo Camilo
    m
    s
    • 3
    • 8
  • r

    Ruth

    01/20/2025, 11:11 AM
    HI, I try to tidy up the branches in our system. For that I would need to get a list of all the branches associated with a pacticipant. So far I used the pact CLI together with docker
    Copy code
    docker run --rm \
          --env PACT_BROKER_BASE_URL=$PACT_BROKER_BASE_URL \
          --env PACT_BROKER_TOKEN=$PACTFLOW_TOKEN_READONLY \
          pactfoundation/pact-cli \
          broker <task>
    unfortunately I cannot find a way to get a list of all the branches. I found a link to them in the
    describe-pacticipant
    command, but nothing for the CLI.
    Copy code
    "pb:branches": {
          "href": "<https://europace.pactflow.io/pacticipants/Ratenkredit-Leadtools-Backend/branches>"
        },
    Anything I missed?
    m
    • 2
    • 4
  • l

    Lachlan Newman

    01/21/2025, 1:15 AM
    Hey question. im using the
    pact_verifier_cli
    to run provider verification. the command for provider verification looks like the following
    Copy code
    pact_verifier_cli --broker-url="<http://pact-broker.cougar-lake.ts.net>" --loglevel=info --port=9000 --provider-name="CTC Model Container" --provider-version=9dabe924c0a4be109226c3802584b61350ca8513 --provider-tags=main --provider-branch=main --request-timeout=300000 --enable-pending --include-wip-pacts-since=2023-10-28
    however the pact_verifier does actually attempt to verify any pending pacts it just verifies the latest pact ?
    m
    • 2
    • 1
  • d

    D

    01/22/2025, 8:00 AM
    Hi, when I run can-I-deploy using .\pact-broker with powershell, I dont get the same output as specified in the docs. I dont get the table, or the verification results link I only get the following
    Copy code
    You can add ostruct to your Gemfile or gemspec to silence this warning.
    Computer says yes \o/
    
    There are no missing dependencies
    I am using version pact-2.4.14-windows-x86_64 Would anyone know anything in regards to this?
    m
    • 2
    • 5
  • t

    Tim Vahlbrock

    01/23/2025, 2:19 PM
    Hey, when setting up webhooks on the OSS Broker, is there any way to protect Credentials that need to be passe in the URL, like the Pipeline Trigger Token for GitLab Pipelines?
    y
    • 2
    • 4
  • t

    Thomas Kanne

    01/28/2025, 2:22 PM
    Hi! I want to migrate to use
    contract_requiring_verification_published
    in the Pact-Broker's webhooks as I am working on multiple environments (main branch, integration, stage, prod). I am using Gitlab trigger tokens which trigger a pipeline only running the
    pactVerify
    job (which is a Gradle talk of my project executing the Java PactProviderTest). As Gitlab only accepts branches and tags as reference (
    ref
    ), I don't know how I can pass the right revision to the
    ref
    as my
    pactbroker.providerVersionNumber
    returns a combination of my Gradle project version + the respective Git short SHA (e.g. 1.0.0-a6d33b7a). My tags in Gitlab are named in format v1.0.0. I was thinking about parsing the version and do string manipulation to reach my desired format, but this seems not be possible within a webhook. Alternatively I thought about setting the
    providerVersionsTags
    and use them to pass to the
    ref
    . But this seems to be a complex (and probably dirty) workaround which I am not even sure about if it would work as expected. Do you have any idea?
    a
    • 2
    • 4
  • h

    Hernan Mateika

    01/30/2025, 1:53 PM
    Hi community! Anyone is handling secrets in open-source version? If so, could you share your experience and how you do it? thanks in advance!
  • d

    Dominic Plourde

    01/30/2025, 4:26 PM
    Hello, we have been experiencing this error with our broker for a few days: _“Failed to load pact from ‘https://pact-broker.**.com’: Error with the content of a HAL resource - Expected either a “_” or path identifier in path expression “$.query.$” at index 8"* We have tried to understand what it means, but we haven’t found a solution. 2025/01/30 112536 [INFO] package libpact_ffi found 2025/01/30 112536 [INFO] checking version 0.4.26 of libpact_ffi against semver constraint >= 0.4.0, < 1.0.0 2025/01/30 112536 [INFO] package libpact_ffi is correctly installed Thank you for your help.
    m
    • 2
    • 4
  • d

    Dimitris Dranidis

    01/31/2025, 10:42 AM
    Hi, I am searching for a way to get all versions of a pacticipant that are currently in an environment, e.g.
    production
    . I did not find anything in the pact-broker CLI or in the Pact-broker API. Is there a way?
    m
    • 2
    • 3
  • p

    Paul Beigang

    01/31/2025, 12:52 PM
    Hi there, are there any infos how much resources needed when self hosting the Pact Broker? What resources does it need? How much space should I plan for the database? thanks!
    y
    • 2
    • 4
  • v

    Victor Vargas

    02/05/2025, 8:01 AM
    hey folks how are you? I would like to know when running the CI if an application is a consumer or a provider. Is there any endpoint that given a pacticipant we get its interactions such as the one that offers Pactflow? GET https://myorg-xxxx.pactflow.io/pacticipant/myapp/network Thanks in advance 💃
  • m

    Matt (pactflow.io / pact-js / pact-go)

    02/05/2025, 8:41 AM
    See /integrations endpoint
    v
    • 2
    • 5
1...1011121314Latest