<#6968 [BUG] failed to record action in the databa...
# flyte-github
a
#6968 [BUG] failed to record action in the database Issue created by pingsutw Flyte & Flytekit version flyte2 Describe the bug It seems we’re attempting to create the same action in the database multiple times, when it should only be created once
Copy code
2026/03/05 14:33:24 /Users/kevin/git/flyte/runs/repository/impl/action.go:253 UNIQUE constraint failed: <http://actions.org|actions.org>, actions.project, actions.domain, actions.name
[0.900ms] [rows:0] INSERT INTO `actions` (`org`,`project`,`domain`,`name`,`parent_action_name`,`phase`,`action_spec`,`action_details`,`ended_at`) VALUES ("testorg","flytesnacks","development","2dly0jqbp82npd9fop3r9onon","run-1772749610",1,"{""action_id"":{""run"":{""org"":""testorg"",""project"":""flytesnacks"",""domain"":""development"",""name"":""run-1772749610""},""name"":""2dly0jqbp82npd9fop3r9onon""},""parent_action_name"":""run-1772749610"",""input_uri"":""<s3://flyte-data/testorg/flytesnacks/development/run-1772749610/2dly0jqbp82npd9fop3r9onon/inputs.pb>"",""Spec"":{""Task"":{}}}","{}",NULL) RETURNING `created_at`,`updated_at`,`id`
{"json":{"src":"internal_run_service.go:91"},"level":"warning","msg":"RecordAction: failed to create action 2fhazqnjb2uhh2ti5pc7kqfsd: failed to create action: UNIQUE constraint failed: <http://actions.org|actions.org>, actions.project, actions.domain, actions.name","ts":"2026-03-05T14:33:24-08:00"}

2026/03/05 14:33:24 /Users/kevin/git/flyte/runs/repository/impl/action.go:253 UNIQUE constraint failed: <http://actions.org|actions.org>, actions.project, actions.domain, actions.name
[0.594ms] [rows:0] INSERT INTO `actions` (`org`,`project`,`domain`,`name`,`parent_action_name`,`phase`,`action_spec`,`action_details`,`ended_at`) VALUES ("testorg","flytesnacks","development","2oxnw2tnrg8aogqkmsv58cvml","run-1772749610",1,"{""action_id"":{""run"":{""org"":""testorg"",""project"":""flytesnacks"",""domain"":""development"",""name"":""run-1772749610""},""name"":""2oxnw2tnrg8aogqkmsv58cvml""},""parent_action_name"":""run-1772749610"",""input_uri"":""<s3://flyte-data/testorg/flytesnacks/development/run-1772749610/2oxnw2tnrg8aogqkmsv58cvml/inputs.pb>"",""Spec"":{""Task"":{}}}","{}",NULL) RETURNING `created_at`,`updated_at`,`id`
{"json":{"src":"internal_run_service.go:91"},"level":"warning","msg":"RecordAction: failed to create action 2oxnw2tnrg8aogqkmsv58cvml: failed to create action: UNIQUE constraint failed: <http://actions.org|actions.org>, actions.project, actions.domain, actions.name","ts":"2026-03-05T14:33:24-08:00"}

2026/03/05 14:33:24 /Users/kevin/git/flyte/runs/repository/impl/action.go:253 UNIQUE constraint failed: <http://actions.org|actions.org>, actions.project, actions.domain, actions.name
[0.710ms] [rows:0] INSERT INTO `actions` (`org`,`project`,`domain`,`name`,`parent_action_name`,`phase`,`action_spec`,`action_details`,`ended_at`) VALUES ("testorg","flytesnacks","development","5kd0aqsfvh5nm8wrggw4bi1qq","run-1772749610",1,"{""action_id"":{""run"":{""org"":""testorg"",""project"":""flytesnacks"",""domain"":""development"",""name"":""run-1772749610""},""name"":""5kd0aqsfvh5nm8wrggw4bi1qq""},""parent_action_name"":""run-1772749610"",""input_uri"":""<s3://flyte-data/testorg/flytesnacks/development/run-1772749610/5kd0aqsfvh5nm8wrggw4bi1qq/inputs.pb>"",""Spec"":{""Task"":{}}}","{}",NULL) RETURNING `created_at`,`updated_at`,`id`
{"json":{"src":"internal_run_service.go:91"},"level":"warning","msg":"RecordAction: failed to create action 2dly0jqbp82npd9fop3r9onon: failed to create action: UNIQUE constraint failed: <http://actions.org|actions.org>, actions.project, actions.domain, actions.name","ts":"2026-03-05T14:33:24-08:00"
Expected behavior Should not see this error Additional context to reproduce No response Screenshots No response Are you sure this issue hasn't been raised already? • Yes Have you read the Code of Conduct? • Yes flyteorg/flyte