Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mysql error publishing contracts #678

Closed
spekdrum opened this issue May 24, 2024 · 1 comment
Closed

Mysql error publishing contracts #678

spekdrum opened this issue May 24, 2024 · 1 comment

Comments

@spekdrum
Copy link

spekdrum commented May 24, 2024

Hi,

We are getting this error trying to publish contracts:

Cause: Mysql2::Error: You can't specify target table 'integrations' for update in FROM clause

This error seems to be related to a Mysql limitation described here. So, maybe Pact Broker is doing any query not fully compatible with mysql when working in "mysql mode".

        env:
        - name: PACT_BROKER_DATABASE_ADAPTER
          value: mysql2

Using:

  • latest docker container
  • mysql 8.0
  • au.com.dius.pact.provider:maven:4.6.9:publish
  • trying to publish a 3.0.0 specification contract

This is happening in a shared environment we have, running Pact container. I tried to reproduce this error locally, dumping the database, etc. But I'm unable to reproduce it. I even tried deleting the integration related with the application in our shared enviroment but the error still happens.

@YOU54F
Copy link
Member

YOU54F commented Aug 12, 2024

Hey, we support mysql anymore, as of 2021

You'll note in the documentation

MySQL was supported for the native Ruby application until around 2021, but the official pactfoundation/pact-broker Docker image does not support it. New features will not be optimised for MySQL, and some new features may not even be supported on it (eg. the database clean feature).

We do test the ruby gem with mysql, but an older version, only for backwards compatibility reasons

https://github.com/pact-foundation/pact_broker/blob/master/docker-compose-ci-mysql.yml

The pact-broker docker image docs dropped recommendations in 2021

pact-foundation/pact-broker-docker@e9b819b

@YOU54F YOU54F closed this as completed Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants