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

    Ali Boztemir

    05/13/2022, 7:55 AM
    Hello everyone, I have a question about document management with pact-brocker. In traditional schema driven testing, we first create the swagger api document and then write tests according to the schema. I couldn’t quite understand at what stage the document should be in pact flow. Is it possible for me to create a swagger document and perform cdc(consumer driven contract testing) first?
    b
    • 2
    • 2
  • p

    PrasDev

    05/17/2022, 10:03 AM
    Hi, I've deployment the pact-broker images to AKS, it seems to erroring out with the message "Password Authentication failed for user account ruby", I'm using the pact-foundation docker image.
    m
    s
    • 3
    • 3
  • b

    Ben Pilgrim

    05/17/2022, 12:27 PM
    Hey, I don’t understand why this pact is still in a pending state when it has been verified for the
    refs/heads/feature/testing
    branch. Any help would be greatly appreciated.
    m
    b
    • 3
    • 23
  • p

    Paul

    05/17/2022, 12:56 PM
    Hi, We are trying to integrate different workflows into the OSS pact broker. One of these is to create a pipeline that has a can-i-deploy check for the provider. Now no consumers have used PACT before on any of its interfaces. Thus the provider isn't available as a pacticipant in the broker. We are looking at adding in the provider tests, doing a can-i-deploy and then deploy. At a later date the consumers will then generate their PACTs as they implement PACT - start publishing, and then checking that they can deploy, having provider verify etc. However the initial call to can-i-deploy fails as the pacticipant isn't known in the broker ""error": "No provider with name 'example-provider' found"". Is this an invalid workflow in PACT? Do we need to / can we, just create the pacticipant (even without integrations) if it doesn't exists? so other stages will work. I realise it is consumer driven - so is it actually valid to have a provider without consumer interactions? It would be nice to fully complete the provider's pipeline as their 'test' is quite generic, so it would just work until and when consumers start using it (or implementing their tests), without then returning to update the provider unless any initial state is required. Thanks
    m
    b
    • 3
    • 8
  • m

    Muthukumar Ramachandran

    05/17/2022, 5:05 PM
    Issue: In the provider end, pact tests is failing with below error:- Request to provider failed with an exception: “/” is not allowed in an identifier in path expression “$.data[0].relationships.user/shippingAddress.data.id” at index 28 (au.com.dius.pact.core.model.InvalidPathExpression) My Request (POST): “relationships”: { “user/shippingAddress”: { “data”: { “id”: “12345”, “type”: “user/shipping-address” } } We are using junit5spring version 4.3.7. Is this a known issue in the pact ? Is there any way to fix this issue? Thanks.
    b
    • 2
    • 2
  • m

    Marcello Rigan

    05/18/2022, 9:54 AM
    Hello, im getting my contract from the pactbroker and it verifies correctly. But on the Pact broker itself, the last verified colum isnt updated. Consumer Version is 7.0 , Provider Version 2.50-SNAPSHOT with tag:test. I tried different consumerVersionSelectors like, tag test, consumer = consumername, and latest etc. The provider verification works so it has to get the right contract right?
    Copy code
    @PactBroker(url = "<https://pact-broker-url>",
                authentication = @PactBrokerAuth(username = "XXXXXXe", password = "XXXXXX"),
                consumerVersionSelectors = { @VersionSelector(consumer = "mint") }
    )
    m
    • 2
    • 4
  • b

    Ben Pilgrim

    05/18/2022, 10:34 AM
    Now that tags are being deprecated, what’s the best way to handle pr merge pipeline can-i-deploy checks? Previously it made sense to can-i-deploy -to=master, but master isn’t an environment? Would adding a can-i-deploy method to pact-broker to deploy to a branch make sense? Should we continue using tags for that use case?
    m
    b
    • 3
    • 34
  • d

    danilchican

    05/19/2022, 10:42 AM
    Hi all! URGENT. It's blocking our release right now... We're facing the issue with tagging pacticipant with tag, e.g. prod. Pact Broker version: 2.88.0.0 We have multiple versions of a pacticipant. For example latest version was 5.0.0 which has prod tag (it is marked with blue color). We're pushed new version 6.0.0 and trying to tag that version as we did it multiple times previously. But in Pact Broker i see that new version (6.0.0) was tagged as prod but not marked with clue color and when we doing request to retrieve latest version by tag for that pacticipant it returns 5.0.0. In other words "latest" flag is not switched to a newest version despite of the newest (6.0.0 version) was tagged as prod. Could anyone help us with that ASAP?
    b
    y
    • 3
    • 14
  • g

    Gustavs

    05/20/2022, 8:44 AM
    Hi. Are there any plans to get the pact-broker docker image official? We wanted to use it in our project, but it was rejected by our security team, due to the reason that it is not official. Any thoughts on this?
    b
    b
    y
    • 4
    • 8
  • k

    Kyle C

    05/24/2022, 5:19 PM
    I was hoping to get a bit of guidance on making changes to existing pacts. We’ve had our pact process setup for quite a while and have mostly followed the CI/CD pact process. This has been working well, on the provider we’ve enabled pending pacts and WipPactsSince… However, we recently needed to make a breaking change on our schema for our provider. (changing a property type from string to number) - js. This didn’t cause any breaking changes on our consumer side, but we ran into issues when trying to ‘deploy’ the changes because of the can-i-deploy didn’t have a deployed version of the provider that had that change. However, I can’t deploy it to the provider because it’s considered a ‘breaking change’ and tells me there is no verified pact between the version that is currently deployed or released to test. I know there’s a ‘right-way’ to handle this, but I can’t seem to figure it out based on the documentation here: https://docs.pact.io/pact_nirvana/step_7 I’ve got everything in place (minus the webhooks) The error I get when trying to ‘deploy’ the provider is there is no verified pact between the version of the ‘consumer’ current deployed or released to test and version ‘provider_version’ of ‘provider’
    y
    m
    b
    • 4
    • 22
  • é

    Édouard Lopez

    05/31/2022, 2:08 PM
    Hello, while publishing contracts from a project, 1 contract is published with success while the 5 others trigger a `500`:
    Copy code
    > Task :pactPublish
    PUT JSON request failed with status HTTP/1.1 500 Internal Server Error
    Publishing 'ms.customer-order-computation-ms.product-order.json' with tags git-tag-missing, HEAD ... Failed - Request failed with HTTP/1.1 500 Internal Server Error
    {"error":{"message":"An error has occurred. The details have been logged with the reference ITHepmbWaB","reference":"ITHepmbWaB"}}
    • Did you met this issue already? • Can I access those log from the UI?
    b
    • 2
    • 27
  • g

    Gianni Araco

    05/31/2022, 3:39 PM
    Uhm.. I do not recognize the error. From the UI I don't think you can see the logs, but I believe there should be a file somewhere
    é
    • 2
    • 1
  • m

    Marcello Rigan

    06/01/2022, 11:54 AM
    Hello, i got a quick question. Does this not work with gradle?
    Copy code
    @PactBroker(
            enablePendingPacts = "false",
            url = "<https://pact-broker.dev.whint.at>",
            authentication = PactBrokerAuth(
                    username = "XXXX",
                    password = "XXXX"
            )
    )
    username and password cant be resolved somehow
    b
    • 2
    • 2
  • f

    Fábio Rodrigues

    06/01/2022, 4:02 PM
    is there any url that does that but for branch instead of tag
    b
    • 2
    • 1
  • j

    json

    06/01/2022, 8:50 PM
    Another (unrelated) question: I'm trying to use the pact-broker CLI to publish a directory containing pact files. Since the first option is called
    PACT_DIRS_OR_FILES
    I assume that means it's possible to point at a directory and the pact-broker cli will simply upload all the pact files it finds. However, when I try and run it this way, I get:
    Copy code
    docker run --network host pactfoundation/pact-cli broker publish ./tests/ --consumer-app-version=ca3abdc
    Specified pact file './tests/' does not exist. This sometimes indicates one of the arguments has been specified with the wrong name and has been incorrectly identified as a file path.
    Am I missing something? Do I need to format my argument differently? Or is there a flag to enable directory mode or something?
    b
    • 2
    • 4
  • c

    Christoph Oswald

    06/02/2022, 7:31 AM
    Hi, we are still running in the issue I mentioned a few months ago. We have set up the (open-source) pact-broker and a postgresDB in kubernetes. We are receiving status 500 for some calls and then the next will return normally. In the logs I see something like. Is there some obvious issue I am missing?
    Copy code
    2022-06-02 06:10:26.905288 E [6:puma server threadpool 001 log_quietener.rb:18] pact-broker -- PG::UnableToSend: server closed the connection unexpectedly
            This probably means the server terminated abnormally
            before or while processing the request.: SELECT NULL
    2022-06-02 06:34:23 +0000 Rack app ("POST /pacts/provider/xyz/for-verification" - (10.249.112.192)): #<Sequel::DatabaseDisconnectError: PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly
            This probably means the server terminated abnormally
            before or while processing the request.
     >
    2022-06-02 06:34:23.894050 E [6:puma server threadpool 001 log_quietener.rb:18] pact-broker -- PG::ConnectionBad: PQconsumeInput() server closed the connection unexpectedly
            This probably means the server terminated abnormally
            before or while processing the request.: BEGIN
    2022-06-02 06:34:23.896197 E [6:puma server threadpool 001 log_quietener.rb:18] pact-broker -- PG::UnableToSend: no connection to the server: ROLLBACK
    b
    • 2
    • 11
  • p

    Prerit Jain

    06/02/2022, 8:01 AM
    Hello, We are implementing contract testing for mobile apps. To perform the record release & record support ended for multiple supported versions for mobile apps. How do we get the list of production versions from pact broker for a specific participant. In our case there are multiple active versions on production but we want to keep n-3 versions for the contract validation. As per our finding we can use below APIs to get the supported versions from pact broker but it will require some custom code to be written to get from the APIs. To get environment ID: http://localhost/environments/ To get the currently supported version: http://localhost/environments/{envIdFromAboveAPIResponse}/released-versions/currently-supported
    ➕ 3
    b
    • 2
    • 8
  • r

    Robert

    06/03/2022, 12:01 PM
    Hey, I have question to branch names. Is it possible to delete a branch name like the tags? E.g. I have a consumer version were mistakenly set 2 different branch names. I want to delete one of them.
    plusone 1651 1
    m
    b
    • 3
    • 8
  • w

    Wayne Ng

    06/03/2022, 8:09 PM
    So we've been playing around with the CI aspect of Pact and saw after a branch gets merged to main, we noticed that the consumer pact for the merged branch still exists as one of the contracts for the integration. Is there a way to have those be deleted once the PR is closed or do we have to manually prune (and if so how)? We seem to have a lot of them because of things like renovatebot for github actions so it quickly is cluttering up Pactflow and makes it hard to see the contract (on main) that we care about. Or is there another feature/implementation route we missed in configuring the CI? a. i.e. we see a main <--> main contract but also still the original BRANCH/123 <---> main contract
    👍 1
    b
    • 2
    • 4
  • r

    Robert

    06/08/2022, 12:58 PM
    Hi, I have another question for the OSS pact broker regarding webhooks. I created a webhook for gitlab with url
    "url": "<https://gitlab.com/api/v4/projects/123/ref/master/trigger/pipeline?token=asdasd1231asd>"
    In this case the token itself is not disguised and you can see it over the HAL Browser. Is there a way to disguise the token, like using a separate variable somehow?
    b
    • 2
    • 1
  • a

    André Sousa

    06/13/2022, 3:22 PM
    Hi everyone. I have some questions regarding Pact broker: 1. Its possible for Pact Broker to create a diff between consumer contract revisions? For example to compare what changed between revisions published by consumers? 2. What is the max ammount of entries on the matrix? To assess the risk of out of space on the postgre database 3. its there any example of CI/CD integration between a consumer and a provider with github actions instead of the pact broker webhook?
    👀 1
    b
    • 2
    • 7
  • c

    Cody A. Ray

    06/14/2022, 9:21 PM
    Hiya - I see the webhook templates library: https://docs.pact.io/pact_broker/webhooks/template_library Does anyone have experience with triggering a webhook on semaphoreci.com ? I can’t find any docs on their site about it, but hoping it’s possible somehow. fingerscrossed
    b
    • 2
    • 1
  • s

    Sebastian Claros

    06/15/2022, 8:40 PM
    Hi ! I'm trying to run pact-broker-docker in Heroku. I think my issue is configuring PACT_BROKER_PORT in the Config Vars. The running port is set dynamically. Notice the log is throwing "*Web process failed to bind to $PORT within 60 seconds of launch*"
    Copy code
    2022-06-15T20:30:22.926091+00:00 app[web.1]: Use Ctrl-C to stop
    2022-06-15T20:30:52.074325+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
    2022-06-15T20:30:52.125437+00:00 heroku[web.1]: Stopping process with SIGKILL
    2022-06-15T20:30:52.267145+00:00 heroku[web.1]: Process exited with status 137
    2022-06-15T20:31:04.337872+00:00 heroku[web.1]: Error R10 (Boot timeout) -> Web process failed to bind to $PORT within 60 seconds of launch
    2022-06-15T20:31:04.380315+00:00 heroku[web.1]: Stopping process with SIGKILL
    2022-06-15T20:31:04.558860+00:00 heroku[web.1]: Process exited with status 137
    2022-06-15T20:31:05.540549+00:00 heroku[web.1]: State changed from starting to crashed
    Thanks on advance 🙂
    y
    b
    • 3
    • 7
  • a

    Akash

    06/17/2022, 3:47 AM
    Hey peeps! We have a pact-broker (image:
    dius/pact-broker:2.100.0.1
    ) running on a k8s cluster reachable via an A record on a domain with a wildcard CA certificate. For some reason, our JVM provider verification is failing with the following error despite the docs mentioning that we shouldn’t need to do anything. Thoughts? Error:
    Copy code
    au.com.dius.pact.core.pactbroker.InvalidNavigationRequest: Failed to fetch the root HAL document
        Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
        Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    JVM provider dependency:
    Copy code
    testImplementation "au.com.dius.pact.provider:junit5spring:4.3.8"
    A python consumer also fails to publish the pacts in CI because of a 400 error (I’m guessing it’s the same cause), though it works locally. Dependency:
    pact-python==1.5.2
    .
    m
    b
    • 3
    • 79
  • b

    Ben Pilgrim

    06/22/2022, 9:10 AM
    Does the provider_verification_published webhook trigger for automatic verifications?
    b
    • 2
    • 3
  • b

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

    06/23/2022, 12:55 AM
    Welcome @Marcus James!
    👋 1
    🙌 1
  • a

    Alan Boshier

    06/23/2022, 4:43 PM
    The
    can-i-deploy
    command takes an
    --ignore
    parameter that allows me to specify multiple pacticipants to ignore for the purposes of the deploy check. Is it possible I can tell this command to treat absence of any pacticipant from the target environment as ignorable? The reason for this is twofold: • Its not necessarily an error that a given peer pacticipant isn't in the deployment environment; I have different environments that require different mixes of pacticipants. • Its very brittle to have to state what must be ignored because this might change over time as new components are added; I have to go through each environment figuring out whether new component X is expected for environment E and if not add it to the ignore list.
    m
    • 2
    • 9
  • b

    Ben Eyres

    06/23/2022, 6:58 PM
    Im a little lost with the
    publish
    command and the matrix that is maintained in the pact-broker. From the docs I've read, provided the pacts have already been tested on the provider and have not been changed by the Consumer then the matrix should show that when I publish new Consumer results they have already been verified on the Producer side. However, what im seeing is that whenever a new Consumer verification result is published to the pact-broker my Matrix shows it has not been verified by the Producer even though there has been no change to the contract itself. Am i missing something? Can someone help explain what im doing wrong here? Thanks
    m
    b
    • 3
    • 20
  • é

    Édouard Lopez

    06/24/2022, 9:14 AM
    When publish a new contract between non-existing pacticipants, isn't the broker supposed to create them?
    m
    • 2
    • 2
  • é

    Édouard Lopez

    06/24/2022, 1:36 PM
    After rolling back to the broker
    2.99.0.0
    , I'm able to publish a contract for new pacticipant, so there is probably a bug that have been introduce in later version (cf. https://pact-foundation.slack.com/archives/C9VPNUJR2/p1654006134133589)
    b
    • 2
    • 5
12345...14Latest