Hi Everyone, I'm facing issue with the broker data...
# pact-broker
t
Hi Everyone, I'm facing issue with the broker data purge feature, trying to apply given version selector:
"[{\"max_age\": 15}, {\"max_age\": 30, \"branch\": \"main\"}]"
but as a result in broker logs I got:
ERROR: each UNION query must have the same number of columns.
I used tags before and this selector worked fine, it looks like it stopped after changing to branches, any ideas what to do with it?
query
Copy code
pack_broker.public> SELECT * FROM "versions" WHERE ("id" NOT IN (SELECT * FROM (SELECT * FROM (SELECT * FROM (SELECT "id" FROM "versions" WHERE ("versions"."created_at" >= '2022-10-23') UNION (SELECT "id", "branch_name" FROM "versions" INNER JOIN (SELECT "version_id", "branch_name" FROM "branch_versions" WHERE ("branch_id" IN (SELECT "id" FROM "branches" WHERE ("name" = 'main')))) AS "bv" ON ("versions"."id" = "bv"."version_id") WHERE ("versions"."created_at" >= '2022-10-08'))) AS "t1" UNION (SELECT "id" FROM "versions" WHERE ("id" IN (SELECT "version_id" FROM "deployed_versions" WHERE ("id" IN (SELECT "deployed_version_id" FROM "currently_deployed_version_ids")))))) AS "t1" UNION (SELECT "id" FROM "versions" WHERE ("id" IN (SELECT "version_id" FROM "released_versions" WHERE ("support_ended_at" IS NULL))))) AS "t1")) ORDER BY "id" ASC LIMIT 50
error:
Copy code
[2022-11-07 14:32:19] [42601] ERROR: each UNION query must have the same number of columns
[2022-11-07 14:32:19] Position: 181
b
@Tomasz can you raise an issue in the pact broker codebase with a reproducible example please?
t
sure, I will do it
b
I’ve made an issue for this on our internal jira so it gets done as part of the commercial work.
t
cool, thanks!