Pavlo Sprogis
03/24/2022, 10:20 AMpact broker publish PACT_DIRS_OR_FILES ... -a, --consumer-app-version=CONSUMER_APP_VERSION -b, --broker-base-url=BROKER_BASE_URL
and
pact publish PACT_DIRS_OR_FILES ... # Publish pacts to a Pact Broker.
are there any differences? which one should be used to publish consumer contract to pact broker?Madhulika Mitra
03/24/2022, 4:45 PM.SetSslCaFilePath
Simone Di Cola
03/25/2022, 10:32 AMAshok
03/25/2022, 3:19 PMJeffrey
03/25/2022, 4:16 PMPavlo Sprogis
03/25/2022, 6:05 PMFor security purposes, the response details are not logged. To enable response logging, configure the webhook_host_whitelist property.
I have tried
PACT_BROKER_WEBHOOK_HOST_WHITELIST="gitlab.<companyname>.com <companyname>.<http://slack.com|slack.com>"
Abhi Nandan
03/29/2022, 3:26 AM2.84.0.0
, and we are currently trying to upgrade it to the latest version 2.96.0.0
. I changed the docker-compose file with the version and tried to spin up the pact broker and it throws error as it is unable to connect to the database instance, below is the error -
pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/anyway_config-2.3.0/lib/anyway/type_casting.rb:111: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!
pact-broker_1 | /pact_broker/vendor/bundle/ruby/2.7.0/gems/anyway_config-2.3.0/lib/anyway/rbs.rb:40: warning: Pattern matching is experimental, and the behavior may change in future versions of Ruby!
pact-broker_1 | Puma starting in single mode...
pact-broker_1 | * Puma version: 5.6.2 (ruby 2.7.5-p203) ("Birdie's Version")
pact-broker_1 | * Min threads: 0
pact-broker_1 | * Max threads: 5
pact-broker_1 | * Environment: production
pact-broker_1 | * PID: 7
pact-broker_1 | 2022-03-29 03:08:07.303198 I [7:4640] pact-broker -- Connecting to database: -- "{:adapter=>\"postgres\", :user=>\"<username>\", :password=>\"*****\", :host=>\"xxxx.xxxx.xxxx\", :database=>\"pact_broker\", :port=>6432, :encoding=>\"utf8\", :sql_log_level=>:debug, :enable_caller_logging=>false, :log_warn_duration=>5.0, :pool_timeout=>5, :driver_options=>{:options=>\"-c statement_timeout=15s\"}, :connect_max_retries=>5}"
pact-broker_1 | 2022-03-29 03:08:07.457332 I [7:4640] pact-broker -- Error connecting to database (Sequel::DatabaseConnectionError). Waiting 3 seconds and trying again. 5 tries to go.
pact-broker_1 | 2022-03-29 03:08:10.572607 I [7:4640] pact-broker -- Error connecting to database (Sequel::DatabaseConnectionError). Waiting 3 seconds and trying again. 4 tries to go.
pact-broker_1 | 2022-03-29 03:08:13.688064 I [7:4640] pact-broker -- Error connecting to database (Sequel::DatabaseConnectionError). Waiting 3 seconds and trying again. 3 tries to go.
pact-broker_1 | 2022-03-29 03:08:16.803917 I [7:4640] pact-broker -- Error connecting to database (Sequel::DatabaseConnectionError). Waiting 3 seconds and trying again. 2 tries to go.
pact-broker_1 | 2022-03-29 03:08:19.921639 I [7:4640] pact-broker -- Error connecting to database (Sequel::DatabaseConnectionError). Waiting 3 seconds and trying again. 1 tries to go.
pact-broker_1 | ! Unable to load application: Sequel::DatabaseConnectionError: PG::ConnectionBad: FATAL: unsupported startup parameter: options
pact-broker_1 | bundler: failed to load command: puma (/pact_broker/vendor/bundle/ruby/2.7.0/bin/puma)
pact-broker_1 | Sequel::DatabaseConnectionError: PG::ConnectionBad: FATAL: unsupported startup parameter: options
while reverting it to 2.84.0.0
starts the pact broker normally. Is there any known compatibility issues with upgrading?Simone Di Cola
03/29/2022, 8:10 AMJeroen van Dijk
04/04/2022, 1:24 PMMiKey
04/04/2022, 4:33 PMSerghei Pogodin
04/06/2022, 3:40 PMÉdouard Lopez
04/07/2022, 12:54 PMdetails
tab. But I would like to know how to populate the fields?
• Main branch
• Repository URL
Pavlo Sprogis
04/08/2022, 1:29 PM--build-url $CI_JOB_URL
with the url to Gitlab build. If I understand correctly when I open some pact or the matrix it should display also this build_url, so you can go to CI results from Pact broker. But I cannot find the build_url in Pact broker UI. Could somebody please provide more info about build-url
?Fábio Rodrigues
04/08/2022, 4:45 PMbundler: failed to load command: /pact/bin/pact (/pact/bin/pact)
/usr/lib/ruby/2.7.0/net/http.rb:960:in `initialize': execution expired (Net::OpenTimeout)
from /usr/lib/ruby/2.7.0/net/http.rb:960:in `open'
from /usr/lib/ruby/2.7.0/net/http.rb:960:in `block in connect'
from /usr/lib/ruby/2.7.0/timeout.rb:105:in `timeout'
from /usr/lib/ruby/2.7.0/net/http.rb:958:in `connect'
from /usr/lib/ruby/2.7.0/net/http.rb:943:in `do_start'
from /usr/lib/ruby/2.7.0/net/http.rb:932:in `start'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/http_client.rb:79:in `block in perform_request'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/http_client.rb:93:in `until_truthy_or_max_times'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/http_client.rb:64:in `perform_request'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/http_client.rb:25:in `get'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/link.rb:41:in `get'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal/link.rb:45:in `get!'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/hal_client_methods.rb:20:in `index_resource'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/publish_pacts.rb:31:in `call'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/publish_pacts.rb:14:in `call'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/cli/broker.rb:157:in `publish_pacts'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/cli/broker.rb:42:in `publish'
from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /usr/lib/ruby/gems/2.7.0/gems/pact_broker-client-1.59.0/lib/pact_broker/client/cli/custom_thor.rb:15:in `start'
from /pact/lib/pact/cli.rb:40:in `broker'
from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
from /usr/lib/ruby/gems/2.7.0/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
from /pact/bin/pact:15:in `<top (required)>'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `load'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:63:in `kernel_load'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli/exec.rb:28:in `run'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:474:in `exec'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/invocation.rb:127:in `invoke_command'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor.rb:392:in `dispatch'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:30:in `dispatch'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/vendor/thor/lib/thor/base.rb:485:in `start'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/cli.rb:24:in `start'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/exe/bundle:49:in `block in <top (required)>'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/lib/bundler/friendly_errors.rb:128:in `with_friendly_errors'
from /usr/lib/ruby/gems/2.7.0/gems/bundler-2.2.20/exe/bundle:37:in `<top (required)>'
from /usr/bin/bundle:25:in `load'
from /usr/bin/bundle:25:in `<main>'
using the following command on linux:
docker run --rm -w ${PWD} -v ${PWD}:${PWD} -e PACT_BROKER_BASE_URL -e PACT_BROKER_TOKEN pactfoundation/pact-cli:latest broker publish ${PWD} --consumer-app-version "POC1" c:\pacts\*.json --broker-base-url PACT_BROKER_BASE_URL --broker-token PACT_BROKER_TOKEN
For context, this is a poc for other team that is trying to do the initial consumer tests.Robert
04/11/2022, 2:29 PMAll of the Pact client libraries should have an API to allow you to publish pacts directly through that API. If your implementation is missing this feature, please raise an issue.
Is there somewhere an example for that?
I only know the methods with using the CLI Tool
, maven plugin
or gradle plugin
.Jeroen van Dijk
04/11/2022, 7:14 PMBrendan Donegan
04/12/2022, 7:24 PMMuthukumar Ramachandran
04/19/2022, 5:06 PMRafa
04/22/2022, 2:35 PMPact successfully republished for asd version 0.2.44-SNAPSHOT-8b5c0274 and provider qwe with no content changes.
View the published pact at https://...
Events detected: contract_published, contract_requiring_verification_published
Webhook "git-pact-webhook-qwe" triggered for event contract_requiring_verification_published.
View logs at https://...
Webhook "git-pact-webhook-qwe" triggered for event contract_requiring_verification_published.
View logs at https://...
the event contract_requiring_verification_published
triggered 2 runs!
thanksÉdouard Lopez
04/26/2022, 1:24 PMYesi (she/her)
05/02/2022, 6:49 PMjson
05/06/2022, 9:11 PMpact-publish --help
returns:
ERROR: The `pact-publish` command has been moved to `pact-broker publish`. We apologise for any inconvenience caused.
but pact-broker publish --help
now returns:
/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/broker.rb:8:in `require': /pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:51: syntax error, unexpected '.' (SyntaxError)
branch_name: options.branch&.strip,
^
/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:52: syntax error, unexpected '.'
tags: options.tag&.collect(&:strip)
^
/pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/version_commands.rb:53: syntax error, unexpected '}', expecting keyword_end
from /pact/lib/vendor/ruby/2.2.0/gems/pact_broker-client-1.61.0/lib/pact_broker/client/cli/broker.rb:8:in `<top (required)>'
from /pact/lib/app/pact-broker.rb:1:in `require'
from /pact/lib/app/pact-broker.rb:1:in `<main>'
So it seems to me like maybe this standalone cli is not maintained or something? Can anyone suggest an alternative?json
05/06/2022, 9:14 PMdocker run -it --entrypoint bash pactfoundation/pact-cli
to browse around inside the docker container and locate the script, I get an error that says it does not have bash installed, 🤷♂️json
05/09/2022, 2:22 PMThomas Cederholm
05/09/2022, 3:12 PMRakesh Arrepu
05/10/2022, 9:23 AMThomas Cederholm
05/10/2022, 2:48 PMPact verified
column -- what does it actually show?Josh Kilazoglou
05/12/2022, 5:07 AMNote: this contract could not be parsed to a v1 or v2 Pact, showing raw content instead.
and see the raw json for the pact rather than the nicely rendered version. Is it the case that v3 pacts cannot be rendered in pact-broker?Marcello Rigan
05/12/2022, 12:13 PMHarry
05/12/2022, 2:56 PMError: Database is uninitialized and superuser password is not specified.
You must specify POSTGRES_PASSWORD to a non-empty value for the
superuser. For example, "-e POSTGRES_PASSWORD=password" on "docker run".
You may also use "POSTGRES_HOST_AUTH_METHOD=trust" to allow all
connections without a password. This is *not* recommended.
See PostgreSQL documentation about "trust":
<https://www.postgresql.org/docs/current/auth-trust.html>