Once the failures are understood (if any), update the corresponding JSON-schema files, you may need to generate it
using the integration output, specially if there is any metric failure.
Testing pgbouncer upgrades
Steps to test breaking metrics changes that happen when new pgbouncer versions are released:
Update the db image and pgbouncer images in docker compose.
Use the command docker compose -f ./docker-compose-pgbouncer.yml up to get the environment running
Run the integration with go run ./src/main.go -pgbouncer -username {USERNAME} -password {PASSWORD} -p 5432 -pretty > pgbouncer_output.json
If the terminal logs errors:
Check which query is failing
Explore pgbouncer release notes for changes to the STATS and POOLS tables
Add or remove metrics to make the query succeed
Modify tests to check for the new metrics in the latest versions
No errors:
Take a look at pgbouncer_output.json and look at the pgbouncer entities and check if metrics are reported correctly.
If metrics are incorrectly reported, go back and look at where queries might be failing.