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

    Beth (pactflow.io/Pact Broker/pact-ruby)

    06/28/2022, 2:17 AM
    alert SUPPORT NOTICE - DOCKER 19 NO LONGER SUPPORTED I have updated the base image of the
    pactfoundation/pact-broker
    Docker image from
    alpine3.13
    to
    alpine3.15
    This means that Docker 19 is no longer supported for the
    pactfoundation/pact-broker
    Docker image, as alpine3.14+ requires Docker 20 or later. There were too many vulnerabilities in alpine3.13 to continue using it, and it was well overdue for an upgrade.
    🙌 1
    • 1
    • 1
  • h

    Harry

    07/01/2022, 3:20 PM
    Hello, the Can-i-deploy command is returning that its safe to deploy, even though the pact is not verified(failed) on the pact broker. Thoughts?
    m
    b
    • 3
    • 2
  • r

    Rubén Pérez

    07/04/2022, 1:11 PM
    Hi 🙂 I wanted to share with you what I'm seeing in my Pact Broker, and see if anyone can help me understand what's happening. We have set our Pact Broker image and our Webhook (reacting to the
    contract_content_changed
    event), and I was working on a consumer & provider sample repos. What is happening right now is that once the contract changes, the Webhook gets executed and makes a request to our internal CI tool, which runs the provider verification. Once that happens, the provider contract tests pass and the verification result is published. The issue I have is that, even the verification passed and the UI shows it
    green
    , we still see
    red
    on the Webhook status column (screenshot attached). If I go in to try to see what happened, I see that shows two webhook executions: one from a few days ago (that failed) and one from today (that succeeded). I have also attached an screenshot showing it. To me it looks like somehow it keeps showing an earlier webhook execution that failed, and I can't get "rid of it". Could you help me understand what's happening?
    b
    • 2
    • 57
  • b

    Ben Pilgrim

    07/06/2022, 4:26 PM
    Is providerVersionBranch missing from the contract_published and provider_verification_published webhooks?
    b
    • 2
    • 8
  • b

    Billal

    07/12/2022, 1:01 PM
    Hello. When running the verify job, I am getting this error:
    No pacts were found for the consumer versions selected
    - This is totally fine however, the job still passes. Is there a way to make it fail in such cases?
    b
    t
    • 3
    • 13
  • j

    Jeroen Lamain

    07/13/2022, 8:50 AM
    Hello, for me its not clear which version of the pact broker supports which version of the pact contracts . For example, which broker version supports https://github.com/pact-foundation/pact-specification/tree/version-4 ?
    b
    • 2
    • 2
  • j

    Jeroen Lamain

    07/13/2022, 8:52 AM
    We now use 2.93.3 from docker hub. Does it support v4 of the pact specification?
    t
    • 2
    • 3
  • l

    Lorenz Ammon

    07/14/2022, 9:01 AM
    Hi everybody. Can it be that there are still some "blank?" problems left in 2.102.1, e.g. when a consumer version selector contains {"mainBranch":true}? When running pact-broker-docker/blob/master/docker-compose.yml with pactfoundation/pact-broker:2.102.1.0 with an empty database a POST to http://localhost:9292/pacts/provider/bit-jme-cdc-provider-service-test-pact/for-verification with body {"consumerVersionSelectors":[{"mainBranch":true}],"providerVersionBranch":"feature/test-pact"} results in HTTP 500 {"error":{"message":"An error has occurred. The details have been logged with the reference JVbxfuyZqD","reference":"JVbxfuyZqD"}} with the error log pact-broker_1 | 2022-07-14 084134.430032 E [7:puma srv tp 001 logging.rb:48] PactBroker:Errors:ErrorLogger -- Error reference JVbxfuyZqD -- Exception: NoMethodError: undefined method `blank?' for true:TrueClass pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb79in `not_provided?' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb97in `validate_consumer_version_selector' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb69in `block in add_cross_field_validation_errors' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb68in `each' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb68in `each_with_index' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb68in `each' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb68in `flat_map' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb68in `add_cross_field_validation_errors' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/contracts/pacts_for_verification_json_query_schema.rb61in `call' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/resources/provider_pacts_for_verification.rb💯in `schema_validation_errors?' pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/pact_broker-2.102.1/lib/pact_broker/api/resources/provider_pacts_for_verification.rb23in `malformed_request?' When running pactfoundation/pact-broker:2.101.0.1 the same request results in { "error": "No provider with name 'bit-jme-cdc-provider-service-test-pact' found" } which is OK.
    b
    • 2
    • 7
  • a

    Abdurahman Hijazi

    07/14/2022, 3:46 PM
    How is the can-i-deploy triggered by the consumer, and when does the consumer know when the provider has finished verifying the pacts, to then run can-i-deploy
    👀 1
    b
    s
    • 3
    • 15
  • Ă©

    Édouard Lopez

    07/22/2022, 7:38 AM
    Hello, is there a way to get all interactions between all consumers/providers?
    m
    • 2
    • 5
  • j

    John Ed Alvinez

    07/25/2022, 2:53 AM
    hi pact-broker team! i didn't set any consumer version selectors in my provider test. when i run the said test, i saw it makes a POST request to pb:provider-pacts-for-verification (path:
    /pacts/provider/{provider}/for-verification
    ) with this body
    Copy code
    {
      "consumerVersionSelectors": [],
      "includePendingStatus": false
    }
    what default consumer version selectors does the pact broker use in this scenario if i didn't set it? is it below based on what i can deduce from the pacts it fetched for verification? thanks for your help! 🙏
    Copy code
    {
      "consumerVersionSelectors": [
        {
          "mainBranch": true
        },
        {
          "deployedOrReleased": true
        }
      ]
    }
    tried looking at the docs but could only find the recommended values for consumer version selectors. tried looking at the code too but couldn't find my answer (or i'm just a ruby noob) 😅
    m
    t
    b
    • 4
    • 12
  • r

    Rubén Pérez

    07/26/2022, 6:57 AM
    Hi Pact team 🙂 We have recently integrated our CI/CD flows with Pact, and we are seeing a behaviour that is being challenging to explain 😅 What we see is that the webhook (
    contract_content_changed
    event) gets executed way too many times from what we would expect. I was trying to debug what is going on looking at this, and what we see is that this is the message that I see constantly:
    "Scheduling job for webhook with uuid ap7c1tk-AdEYyphWBVieIg"
    . But it looks like the contract should have not changed, so I'm clearly missing something. Is there any way to actually see what are the 2 versions of the contract the Broker is comparing to understand what is going on? Also, as far as I've seen in the documentation, this could also explain what is happening:
    If the relevant consumer version has any tags, then for each tag, check if the content is different from the previous latest version for that tag. It is 'changed' if any of the checks are true. One side effect of this is that brand new tags will trigger a pact changed event, even if the content is the same as a previous version.
    But all the versions published are tagging with
    master
    , so I'm not sure if there is anything else I should be looking at...
    t
    m
    b
    • 4
    • 19
  • s

    Shan

    07/27/2022, 8:35 PM
    Hi there, I am trying to execute
    describe-pacticipant
    to double check if the main branch is configured but getting a "`Could not find command 'describe-pacticipant'`" . When I do a describe-version with similar parameters I works perfectly! Any thoughts?
    Copy code
    docker run --rm \
      pactfoundation/pact-cli:latest \
      broker describe-pacticipant \
      --name my-pacticipant \
      --broker-base-url <https://my_broker_base_url.com> \
      --broker-username my_user \
      --broker-password my_password
    
    Resulting -> Could not find command "describe-pacticipant".
    t
    • 2
    • 7
  • s

    Shan

    07/29/2022, 5:09 AM
    Hi there, I need some more clarification about
    contract_requiring_verification_published
    event. The doc, stated that "A webhook using the
    contract_requiring_verification_published
    should be configured to pass through the
    ${pactbroker.pactUrl}
    and
    ${pactbroker.providerVersionNumber}
    and
    ${pactbroker.providerVersionBranch}
    to the provider verification build." I assume we need to pass version number (assume it is git SHA) so that we can checkout that GIT version before verifying the pact My questions is why do we need to pass
    pactUrl
    and
    providerVersionBranch
    & and how that can be useful?
    m
    b
    • 3
    • 9
  • j

    json

    07/29/2022, 5:45 PM
    Hey, are there any known issues with the webhook hitting jenkins? My webhook is triggering my jenkins job, but the values I have in the "body" are not populating the parameters in my job. I'm not sure what I'm doing wrong
    m
    b
    • 3
    • 7
  • d

    Dmitry Munda

    08/01/2022, 7:24 PM
    hi! any ideas - are those numbers from cleanup logs ok ? 🙂
    {deleted=&gt;{pact_publications=>0, :verification_results=>28, :pact_versions=>0, :triggered_webhooks=>0}, kept=&gt;{pact_publications=>11244, :verification_results=>25401, :pact_versions=>31, :triggered_webhooks=>0}}
    b
    • 2
    • 4
  • Ă©

    Édouard Lopez

    08/03/2022, 12:54 PM
    Hello, is there a page that display the network graph for all contract?
    t
    • 2
    • 2
  • s

    Shan

    08/03/2022, 7:20 PM
    Another quick question regarding to
    contract_requiring_verification_published
    webhook event. In my provider's main pipeline I used tags to pull contracts like
    -Ppactbroker.tags='master, dev, prod'
    , since I changed to
    contract_requiring_verification_published
    , do I still have to use same approach to pull contracts? What is the recommended approach?
    t
    m
    +2
    • 5
    • 8
  • a

    Adam Witko

    08/04/2022, 8:04 AM
    Hey hey, I’m struggling with our hosted pact broker to be able to find any logs. for-verification is failing when the provider test has the exact same setup as another and has no consumer pacts to verify. I’m getting a 500 with
    {"error":{"message":"An error has occurred. The details have been logged with the reference DrCxVPsPSd","reference":"DrCxVPsPSd"}}
    but I can’t seem to find how I get to these via the API. Can anyone help?
    m
    b
    • 3
    • 7
  • s

    Shan

    08/05/2022, 4:22 AM
    Hello, I am trying to understand
    master
    ,
    deployed
    and
    released
    for
    consumer_version_selectors
    . Am I getting all right here?
    {"branch": "master"}
    ->assume we configure master as our main branch then we pull the latest version of master assume there is only one dev environment for testing, and for a given application instance,
    {"deployed":true}
    -> this will pull the the pact from dev environments and we don't have to worry about latest because the
    record-deployment
    command automatically marks any application version that was deployed to the same application instance as undeployed, which guarantees that we will have just one version of the pact. For a given application instance,
    {"released":true}
    -> this will fetch all pacts which is in prod it can be more than one version.
    b
    • 2
    • 3
  • s

    Shan

    08/09/2022, 4:59 PM
    Do I have to prevent a consumer
    feature branch
    to merge to
    master
    if pre-verification fails? Because
    can-i-deploy
    command is to check whether a code can be deployed to a specific env (
    dev, test, prod and etc
    ..) or not. Which means a
    non-verified contract
    can be merged to
    master
    there is no check to enforce that. Should we check with
    can-i-deploy
    command before the code get merged to
    master
    ?
    s
    b
    d
    • 4
    • 28
  • a

    Alison Stuart

    08/09/2022, 8:47 PM
    Hi team, I work at Macmillan Learning on a team called "writing tools" and I'm encountering an issue I believe might be related to Provider States and state handlers (which as far as I know we aren't using). I would love any advice that you can offer. My error previously mentioned "no null state handler present" prior to failing, and my new error occurs at nearly the same point in our Jenkins build and publish process, and looks as follows: Verifying writing 0.0.0-8477ca993 [2022-08-09 141240.376 +0000] INFO (29 on d53225d7acfa): pact@9.18.1: Verifying provider [2022-08-09 141240.389 +0000] INFO (29 on d53225d7acfa): pact-node@10.17.6: Verifying Pacts. [2022-08-09 141240.391 +0000] INFO (29 on d53225d7acfa): pact-node@10.17.6: Verifying Pact Files Error: connect EINVAL 0.0.11.184:80 - Local (0.0.0.0:0) at internalConnect (nodenet953:16) at defaultTriggerAsyncIdScope (nodeinternal/async hooks465:18) at GetAddrInfoReqWrap.emitLookup [as callback] (nodenet1097:9) at GetAddrInfoReqWrap.onlookup [as oncomplete] (nodedns73:8) { errno: -22, code: 'EINVAL', syscall: 'connect', address: '0.0.11.184', port: 80 } error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
    👋 1
    m
    s
    b
    • 4
    • 23
  • a

    Adam Witko

    08/10/2022, 2:34 PM
    Heya heya 👋 A question non the broker + webhooks if anyone can enlighten me with knowledge. Is there a setup of a webhook where it could pass multiple pact urls to the HTTP request to the providers pipeline trigger? I can't find any documentation that mentions this as a possibility, only that you will have 1 webhook per 1 pact that requires verification.
    b
    m
    • 3
    • 3
  • j

    John Ed Alvinez

    08/11/2022, 10:22 AM
    hi pact-broker team! i've got a question related to the default consumer version selectors again. i'm trying to understand why a certain pact is not being fetched by the provider. it's the first and only pact for that consumer and that pact's branch, tag or environments fields are not set (all N/A). when does this line of code evaluate to true? btw, confirmed the
    mainBranch
    for that consumer is set to
    main
    🙏 https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/pacts/pacts_for_verification_repository.rb#L151-L152 i was expecting that would return false so this line of code is executed instead which would fetch the latest pact for that consumer, but i guess i was wrong. 😅 https://github.com/pact-foundation/pact_broker/blob/master/lib/pact_broker/pacts/pacts_for_verification_repository.rb#L156
    b
    • 2
    • 2
  • s

    Sandy

    08/12/2022, 5:04 PM
    Hello, I am trying to connect Pactbroker to postgres using kerberos . Getting this error when starting the container. I am using docker image 2.100.0.1
    PG:: Connection Bad: GSSAPI Authentication not supported
    . Is GSSAPI not supported?
    b
    • 2
    • 7
  • s

    Shan

    08/15/2022, 7:05 PM
    Regarding to
    pact broker
    or
    pactflow
    failures (down for maintenance) what would happen when someone publishes, verifies or executes can-i-deploy commands? Does that build fail?
    m
    t
    b
    • 4
    • 33
  • t

    TL Z

    08/12/2022, 9:18 PM
    Hi, I am trying to create a webhook using the cli, however following your documentation (see first image), I end up with an incorrect format for the "body" (see image 2). The correct result should not contains the extra double quotes (see image 3). Is there another way/syntax to properly create my webhook using the cli ? Is this a bug ?
    b
    • 2
    • 4
  • a

    Ayush

    08/17/2022, 10:31 AM
    Hey , I was setting up pact broker on local and was wondering where the pacts are being stored and the role of postgres db that we set up I couldn’t find any tables in the pact_broker database
    m
    b
    • 3
    • 5
  • m

    Mustafa Siyaj

    08/18/2022, 10:10 PM
    Hi, is there a way to configure what header is read for basic authorization? We would love if there is an environment variable for this
 We are behind a gateway that is renaming our
    Authorization
    header. We are using the pact-broker container.
    m
    • 2
    • 6
  • g

    Gustavs

    08/19/2022, 10:58 AM
    Hey 😄 . I'm implementing Contract Based Tests for a project im working on. We are using our self hosted pact-broker (also considering switching to pactflow). Im wondering if anyone knows ways to gather some metrics. The /metrics endpoint gives some general data, but i was wondering if its possible to separate them per service or per integration? We are looking for failure rate.
    m
    • 2
    • 10
12345...14Latest