V3 pact-python publish to broker #1319
-
|
Whilst upgrading my codebase to V3 of pact-python (some great changes in there btw!), in V2, the Contracts would be published to the Broker on a successful Consumer test run is this intentional? I'm aware the Broker hasn't reached V3 yet (and there are breaking changes that would change the DB structure). A workaround (that I've not looked into yet), would be to use the Broker CLI, Am I missing something obvious? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 3 replies
-
|
Hey, The recommendation since moving to the rust shared core, has been to publish via the CLI tools, as we interacted in a different way (via a c native shared library, which didn't have comparable pact broker client functionality). We no longer rely on the pact-ruby core, so have no mechanism to run the ruby broker client, unless we package the entire ruby runtime, which is less preferable now, as users have migrated onto the rust core. https://docs.pact.io/pact_broker/publishing_and_retrieving_pacts#publish-using-cli-tools https://docs.pact.io/roadmap/feature_support pact-python v3 provides a cli package, which allows users to install the standalone cli tools, via their regular python package managers. This is currently using the older packaged pact-ruby tools, but is being deprecated, superseded by https://docs.pact.io/implementation_guides/cli/pact-cli The rewrite of the pact-broker-client functionality in rust has been recently been completed here https://github.com/pact-foundation/pact-broker-cli but is only available as a binary, and not in a c shared library, similar to the rust core used in pact-python v3. This could be requested as a feature to expose as a shared lib, or a pythonic api created to interact with the binary. The comparable API based behaviour in exposed over in pact-js-cli, but may not survive the migration to the new tooling https://github.com/pact-foundation/pact-js-cli?tab=readme-ov-file#pact-cli-api as specifically the mock, stub and verifier behave slightly differently, and maintaining another api surface, over and above the CLI, is a burden, and can leave to some libraries missing features, that others have implemented |
Beta Was this translation helpful? Give feedback.
Hey,
The recommendation since moving to the rust shared core, has been to publish via the CLI tools, as we interacted in a different way (via a c native shared library, which didn't have comparable pact broker client functionality).
We no longer rely on the pact-ruby core, so have no mechanism to run the ruby broker client, unless we package the entire ruby runtime, which is less preferable now, as users have migrated onto the rust core.
https://docs.pact.io/pact_broker/publishing_and_retrieving_pacts#publish-using-cli-tools
https://docs.pact.io/roadmap/feature_support
pact-python v3 provides a cli package, which allows users to install the standalone cli tools, via their regular python p…