bantunes82 opened a new issue, #7943: URL: https://github.com/apache/incubator-devlake/issues/7943
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-devlake/issues?q=is%3Aissue) and found no similar issues. ### What happened if we create a deployment via webhook with multiple deployments in the same pipeline without the field "name" that is deprecated accordingly with the documentation (https://devlake.apache.org/docs/Plugins/webhook#payload-schema) then we get an error saying that the column name exceeded the size, because the value of this column is concatenating all the hash commits and adding the words "deploy" and "to Production". ### What do you expect to happen the generated value for the column name doesn't exceed the capacity. ### How to reproduce Request: curl http://localhost:4000/api/rest/plugins/webhook/connections/1/deployments -k -X 'POST' -H 'Authorization: Bearer fKkQUKnd7Y6T6j1AayYmcTDT7HdWVyqbcIQdYFncCihnkY8VrlWPRozHqnRUUKKdKkECEImp4algXrVHcjySwI6hcLWJ4hZ54d35TcuW3XfJg5Z1d8r7MPRTOnVrYYQ0' -d ' { "id": "1", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "deploymentCommits": [ { "repoUrl": "https://bitbucket.org/test/component1", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "8625ce94341c90c848726211c559a2bc59845273" }, { "repoUrl": "https://bitbucket.org/test/component2", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "c35b714e1a49fa50a5fc0f5d0b38e5f487443c17" }, { "repoUrl": "https://bitbucket.org/test/component3", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "1fd4a988203ed3641fab14287e363a9292a5e368" }, { "repoUrl": "https://bitbucket.org/test/component4", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "1d9dd77ba4c87e0b4122791126cf79fe291423cd" }, { "repoUrl": "https://bitbucket.org/test/component5", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "85a368aa72921b13a1139df2e5a24d45a4b93660" }, { "repoUrl": "https://bitbucket.org/test/component6", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "af2d01f1e2cd1dd5843470eb251cc685980188d0" }, { "repoUrl": "https://bitbucket.org/test/component7", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "8123ae4e2cab43336fe28bd3bbe97aba46949d44" }, { "repoUrl": "https://bitbucket.org/test/component8", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "8ddb9eae4025c27add234274e9428b97d1107208" }, { "repoUrl": "https://bitbucket.org/test/component9", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "f0320200826c9e2c034eddf8d89397d7439ea2f6" }, { "repoUrl": "https://bitbucket.org/test/component10", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "0bdf8d59c53cc7048010eb16e456393f5f595a4e" }, { "repoUrl": "https://bitbucket.org/test/component11", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "f6954c8eb3232d59dde0e014b43906c27eb1d628" }, { "repoUrl": "https://bitbucket.org/test/component12", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "ff0b182833118795917d50a3f9b50932cf28dfcb" }, { "repoUrl": "https://bitbucket.org/test/component13", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "241a62c28e0eb03a0b1616edbf8062a84003653c" }, { "repoUrl": "https://bitbucket.org/test/component14", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "2db21b761f7e6530efa316692edd9b51fa253835" }, { "repoUrl": "https://bitbucket.org/test/component15", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "b3a1840caf87ccb6ed921e76694274e44ce3e8d4" }, { "repoUrl": "https://bitbucket.org/test/component16", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "23981f9295008e8d0927b4273941c61bea879649" }, { "repoUrl": "https://bitbucket.org/test/component17", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "968097a37faee323b6dc909f5dedfc13da7885fe" }, { "repoUrl": "https://bitbucket.org/test/component18", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "ebf0baaba7f78231e8d0c21727514329ad276bac" }, { "repoUrl": "https://bitbucket.org/test/component19", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "db8786e45c742be5e637b1d574aa060b97c47996" }, { "repoUrl": "https://bitbucket.org/test/component20", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "9d2bdf1d2978521035f36601a7bec0faa4723ccd" }, { "repoUrl": "https://bitbucket.org/test/component21", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "8208c2688d8a508994d586b48d6be6aaf1860408" }, { "repoUrl": "https://bitbucket.org/test/component22", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "8ddb9eae4025c27add234274e9428b97d1107208" }, { "repoUrl": "https://bitbucket.org/test/component23", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "69a9e59418081b2897d5002e236c7c449c983305" }, { "repoUrl": "https://bitbucket.org/test/component24", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "fd3115157cb559cd66f528e2454927995ea03d01" }, { "repoUrl": "https://bitbucket.org/test/component25", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "c410428715fc6a3db8b30edf5ab91c165cb0b118" }, { "repoUrl": "https://bitbucket.org/test/component26", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "40c9904726eaf77ea17be2060df3ba004328deb4" }, { "repoUrl": "https://bitbucket.org/test/component27", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "6223737fabdf730700414cf5c89ba9370c2b4ddf" }, { "repoUrl": "https://bitbucket.org/test/component28", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "e8879fa3dcf9b494f5bef7468d27665bb97f00e5" }, { "repoUrl": "https://bitbucket.org/test/component29", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "65fbb7d6335ce81be19ec2a667dba6c9787812b9" }, { "repoUrl": "https://bitbucket.org/test/component30", "startedDate": "2024-01-10T17:37:19+00:00", "finishedDate": "2024-01-10T17:37:19+00:00", "commitSha": "580ff441b022c3fb02d50e7fe17019255de25c93" } ] }' Response: {"code":0,"success":false,"message":"Error 1406 (22001): Data too long for column 'name' at row 1 (500)\nWraps: (2) Error 1406 (22001): Data too long for column 'name' at row 1\nError types: (1) *hintdetail.withDetail (2) *mysql.MySQLError","causes":null,"data":null} ### Anything else Log inside the devlake container about this issue: `time="2024-08-22 10:30:51" level=info msg="redirect path: /rest/plugins/webhook/connections/1/deployments to: /plugins/webhook/connections/1/deployments" 2024-08-22T10:30:51.654961936Z time="2024-08-22 10:30:51" level=info msg="\x1b[31;1m/app/impls/dalgorm/dalgorm.go:265 \x1b[35;1mError 1406 (22001): Data too long for column 'name' at row 1\n\x1b[0m\x1b[33m[1.980ms] \x1b[34;1m[rows:0]\x1b[0m INSERT INTO `cicd_deployments` (`id`,`created_at`,`updated_at`,`_raw_data_params`,`_raw_data_table`,`_raw_data_id`,`_raw_data_remark`,`cicd_scope_id`,`name`,`display_title`,`url`,`result`,`status`,`original_status`,`original_result`,`environment`,`original_environment`,`created_date`,`queued_date`,`started_date`,`finished_date`,`duration_sec`,`queued_duration_sec`,`subtask_name`) VALUES ('1','2024-08-22 10:30:51.642','2024-08-22 10:30:51.642','','',0,'','webhook:1','deploy 8625ce94341c90c848726211c559a2bc59845273,c35b714e1a49fa50a5fc0f5d0b38e5f487443c17,1fd4a988203ed3641fab14287e363a9292a5e368,1d9dd77ba4c87e0b4122791126cf79fe291423cd,85a368aa72921b13a1139df2e5a24d45a4b93660,af2d01f1e2cd1dd5843470eb251cc685980188d0,8123ae4e2cab43336fe28bd3bbe97a ba46949d44,8ddb9eae4025c27add234274e9428b97d1107208,f0320200826c9e2c034eddf8d89397d7439ea2f6,0bdf8d59c53cc7048010eb16e456393f5f595a4e,f6954c8eb3232d59dde0e014b43906c27eb1d628,ff0b182833118795917d50a3f9b50932cf28dfcb,241a62c28e0eb03a0b1616edbf8062a84003653c,2db21b761f7e6530efa316692edd9b51fa253835,b3a1840caf87ccb6ed921e76694274e44ce3e8d4,23981f9295008e8d0927b4273941c61bea879649,968097a37faee323b6dc909f5dedfc13da7885fe,ebf0baaba7f78231e8d0c21727514329ad276bac,db8786e45c742be5e637b1d574aa060b97c47996,9d2bdf1d2978521035f36601a7bec0faa4723ccd,8208c2688d8a508994d586b48d6be6aaf1860408,8ddb9eae4025c27add234274e9428b97d1107208,69a9e59418081b2897d5002e236c7c449c983305,fd3115157cb559cd66f528e2454927995ea03d01,c410428715fc6a3db8b30edf5ab91c165cb0b118,40c9904726eaf77ea17be2060df3ba004328deb4,6223737fabdf730700414cf5c89ba9370c2b4ddf,e8879fa3dcf9b494f5bef7468d27665bb97f00e5,65fbb7d6335ce81be19ec2a667dba6c9787812b9,580ff441b022c3fb02d50e7fe17019255de25c93 to PRODUCTION','','','SUCCESS','DONE','DONE ','SUCCESS','PRODUCTION','PRODUCTION','2024-01-10 17:37:19',NULL,'2024-01-10 17:37:19','2024-01-10 17:37:19',0,NULL,'') ON DUPLICATE KEY UPDATE `updated_at`='2024-08-22 10:30:51.653',`_raw_data_params`=VALUES(`_raw_data_params`),`_raw_data_table`=VALUES(`_raw_data_table`),`_raw_data_id`=VALUES(`_raw_data_id`),`_raw_data_remark`=VALUES(`_raw_data_remark`),`cicd_scope_id`=VALUES(`cicd_scope_id`),`name`=VALUES(`name`),`display_title`=VALUES(`display_title`),`url`=VALUES(`url`),`result`=VALUES(`result`),`status`=VALUES(`status`),`original_status`=VALUES(`original_status`),`original_result`=VALUES(`original_result`),`environment`=VALUES(`environment`),`original_environment`=VALUES(`original_environment`),`created_date`=VALUES(`created_date`),`queued_date`=VALUES(`queued_date`),`started_date`=VALUES(`started_date`),`finished_date`=VALUES(`finished_date`),`duration_sec`=VALUES(`duration_sec`),`queued_duration_sec`=VALUES(`queued_duration_sec`),`subtask_name`=VALUES(`subtask_name`)" 2024-08-22T10:30:51.654994263Z time="2024-08-22 10:30:51" level=error msg="failed to save deployment\n\tcaused by: Error 1406 (22001): Data too long for column 'name' at row 1 (500)\n\tWraps: (2) Error 1406 (22001): Data too long for column 'name' at row 1\n\tError types: (1) *hintdetail.withDetail (2) *mysql.MySQLError" 2024-08-22T10:30:51.654998614Z time="2024-08-22 10:30:51" level=error msg="create deployments\n\tcaused by: Error 1406 (22001): Data too long for column 'name' at row 1 (500)\n\tWraps: (2) Error 1406 (22001): Data too long for column 'name' at row 1\n\tError types: (1) *hintdetail.withDetail (2) *mysql.MySQLError" 2024-08-22T10:30:51.656926982Z time="2024-08-22 10:30:51" level=error msg="HTTP 500 error\n\tcaused by: Error 1406 (22001): Data too long for column 'name' at row 1 (500)\n\tWraps: (2) Error 1406 (22001): Data too long for column 'name' at row 1\n\tError types: (1) *hintdetail.withDetail (2) *mysql.MySQLError" ` ### Version v1.0.1-beta4@483c93e ### Are you willing to submit PR? - [ ] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@devlake.apache.org.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org