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

Seamlessly overwrite existing custom form in case of conflict #141

Closed
davidfischer-ch opened this issue Feb 20, 2025 · 0 comments · Fixed by #145
Closed

Seamlessly overwrite existing custom form in case of conflict #141

davidfischer-ch opened this issue Feb 20, 2025 · 0 comments · Fixed by #145
Assignees
Labels
enhancement New feature or request go Pull requests that update Go code P1 High priority
Milestone

Comments

@davidfischer-ch
Copy link
Owner

davidfischer-ch commented Feb 20, 2025

Inspired by https://registry.terraform.io/providers/gitlabhq/gitlab/latest/docs/resources/branch_protection.

╷
│ Error: Client error
│
│   with module.windows_4_2[0].module.template_sql_server.aria_custom_form.form[0],
│   on .terraform\modules\windows_4_2.template_sql_server\form.tf line 1, in resource "aria_custom_form" "form":
│    1: resource "aria_custom_form" "form" {
│
│ Unable to create Custom Form c25531b2-df94-4a6f-9a14-e5c930fa5e6d (DFI -
│ Windows Server SQL Server v4.2), got error: API response status code 400
│ (expected 201), Body:
│ {"timestamp":"2025-02-20T15:01:57.977+0000","path":"/form-service/api/forms","status":400,"error":"Bad
│ Request","message":"could not execute statement [ERROR: duplicate key value
│ violates unique constraint
│ \"form_formdefinition_source_id_source_type_type_tenant_key\"\n  Detail:
│ Key (source_id, source_type, type,
│ tenant)=(2c08c969-9741-3d83-ac90-f3bd98f5da17, com.vmw.blueprint,
│ requestForm, 2817c6e5-7408-449f-a86d-8f511105e5ba) already exists.] [insert
│ into form_formdefinition
│ (created_date,form,modified_date,name,provider_ref,status,styles,source_id,source_type,type,tenant,id)
│ values (?,?,?,?,?,?,?,?,?,?,?,?)]; SQL [insert into form_formdefinition
│ (created_date,form,modified_date,name,provider_ref,status,styles,source_id,source_type,type,tenant,id)
│ values (?,?,?,?,?,?,?,?,?,?,?,?)]; constraint
│ [form_formdefinition_source_id_source_type_type_tenant_key]","errorCode":10106,"@type":"data_integrity_violation","cause":{"message":"could
│ not execute statement [ERROR: duplicate key value violates unique
│ constraint \"form_formdefinition_source_id_source_type_type_tenant_key\"\n
│ Detail: Key (source_id, source_type, type,
│ tenant)=(2c08c969-9741-3d83-ac90-f3bd98f5da17, com.vmw.blueprint,
│ requestForm, 2817c6e5-7408-449f-a86d-8f511105e5ba) already exists.] [insert
│ into form_formdefinition
│ (created_date,form,modified_date,name,provider_ref,status,styles,source_id,source_type,type,tenant,id)
│ values (?,?,?,?,?,?,?,?,?,?,?,?)]","@type":"jdbc_exception","sql":"insert
│ into form_formdefinition
│ (created_date,form,modified_date,name,provider_ref,status,styles,source_id,source_type,type,tenant,id)
│ values (?,?,?,?,?,?,?,?,?,?,?,?)","cause":{"message":"ERROR: duplicate key
│ value violates unique constraint
│ \"form_formdefinition_source_id_source_type_type_tenant_key\"\n  Detail:
│ Key (source_id, source_type, type,
│ tenant)=(2c08c969-9741-3d83-ac90-f3bd98f5da17, com.vmw.blueprint,
│ requestForm, 2817c6e5-7408-449f-a86d-8f511105e5ba) already
│ exists.","@type":"sql_exception","sqlState":"23505","errorCode":0}}}
╵
@davidfischer-ch davidfischer-ch self-assigned this Feb 20, 2025
@davidfischer-ch davidfischer-ch added enhancement New feature or request go Pull requests that update Go code P1 High priority labels Feb 20, 2025
@davidfischer-ch davidfischer-ch added this to the Refinements milestone Feb 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request go Pull requests that update Go code P1 High priority
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant