PG::UniqueViolation: ERROR: on big refactor

I’m doing a pretty big refactor and running to into an issue I don’t quite understand. when I “deploy to production” I git this popup:

I remap in a way that seem sensible:

and this “Continue deployment” to get this error:

PG::UniqueViolation: ERROR: duplicate key value violates unique constraint "index_data_sets_on_tenant_id_uname_and_project_id" DETAIL: Key (tenant_id, uname, project_id)=(1099511639674, survey_responses, 1099511639231) already exists.

when I scan/grep the code base for survey_responses that string only exists in one place:

$ rg survey_responses
demoa/survey/9_datasets/survey_responses_nps.dataset.aml
1:Dataset survey_responses_nps {

demoa/survey/9_datasets/survey_responses.dataset.aml
1:Dataset survey_responses {

how do I go about repairing this?

Hi Matt,

Thank you for bringing this issue to our attention. Our team is actively investigating it and we will keep you updated on the progress.

FYI. I was on a deadline, needing to get this out. While troubleshooting, I ended up deleting a couple of old dashboards. The Survey Invitations Report was on a dashboard that had an embedded URL link associated with it. When I deleted that link and dashboard, the promotion worked.

Unfortunately I didn’t try to promote after having only deleted the embed link. Maybe that was the blocker that restricted the publishing event.

Hope this helps.

2 Likes