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

[Bug][Bitbucket] Error in cloneGitRepo mysql, Incorrect string value #7203

Closed
2 of 3 tasks
duhow opened this issue Mar 21, 2024 · 2 comments · Fixed by #7212
Closed
2 of 3 tasks

[Bug][Bitbucket] Error in cloneGitRepo mysql, Incorrect string value #7203

duhow opened this issue Mar 21, 2024 · 2 comments · Fixed by #7212
Labels
type/bug This issue is a bug

Comments

@duhow
Copy link
Contributor

duhow commented Mar 21, 2024

Search before asking

  • I had searched in the issues and found no similar issues.

What happened

Split from #7198 , as this issue affects table commit_files.

Commit File is named arch/arm/include/stm32l4\x80stm32l4x6xx_irq.h and causes issues to import.

time="2024-03-21 11:37:06" level=error msg=" [pipeline service] [pipeline #91] [task #4728] [cloneGitRepo] CommitFiles error\n\tcaused by: Error 1366 (HY000): Incorrect string value: '\\x80stm32...' for column 'file_path' at row 98 (500)\n\tWraps: (2) Error 1366 (HY000): Incorrect string value: '\\x80stm32...' for column 'file_path' at row 98\n\tError types: (1) *hintdetail.withDetail (2) *mysql.MySQLError"
time="2024-03-21 11:37:06" level=error msg=" [pipeline service] [pipeline #91] [task #4728] [cloneGitRepo] CommitFiles error\n\tcaused by: add slot failed due to previous err (500)\n\tWraps: (2) Error 1366 (HY000): Incorrect string value: '\\x80stm32...' for column 'file_path' at row 98 (500)\n\tWraps: (3) Error 1366 (HY000): Incorrect string value: '\\x80stm32...' for column 'file_path' at row 98\n\tError types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *mysql.MySQLError"
time="2024-03-21 11:37:06" level=error msg=" [pipeline service] [pipeline #91] [task #4728] subtask collectGitCommits ended unexpectedly\n\tWraps: (2) add slot failed due to previous err (500)\n\tWraps: (3) Error 1366 (HY000): Incorrect string value: '\\x80stm32...' for column 'file_path' at row 98 (500)\n\tWraps: (4) Error 1366 (HY000): Incorrect string value: '\\x80stm32...' for column 'file_path' at row 98\n\tError types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *hintdetail.withDetail (4) *mysql.MySQLError"
time="2024-03-21 11:37:06" level=info msg="\x1b[31;1m/app/impls/dalgorm/dalgorm.go:251 \x1b[35;1mError 1366 (HY000): Incorrect string value: '\\x80stm32...' for column 'file_path' at row 98\n\x1b[0m\x1b[33m[23.956ms] \x1b[34;1m[rows:0]\x1b[0m
INSERT INTO `commit_files` (`id`,`created_at`,`updated_at`,`_raw_data_params`,`_raw_data_table`,`_raw_data_id`,`_raw_data_remark`,`commit_sha`,`file_path`,`additions`,`deletions`) VALUES
('721512c83aebd5ca22744284c7c0637413c2982c:193841aac7e172c2c7825dff6e9f7e579ec1d6bfdbad21e0bc41ba4784814c76','2024-03-21 11:37:05.553','2024-03-21 11:37:05.553','bitbucket_server:BitbucketServerRepo:2:IMX500/repos/incubator-nuttx','gitextractor',0,'','721512c83aebd5ca22744284c7c0637413c2982c','configs/z8encore000zco/README.txt',5,7),
('f1b71e3ae7b8c0fba8707f6d4ffc46fd038c7d12:51b5c77a530fb52aaafb65e3fa76eeb7462fd95c4348aba6185d99f7500ffab9','2024-03-21 11:37:05.553','2024-03-21 11:37:05.553','bitbucket_server:BitbucketServerRepo:2:IMX500/repos/incubator-nuttx','gitextractor',0,'','f1b71e3ae7b8c0fba8707f6d4ffc46fd038c7d12','arch/arm/include/stm32l4\x80stm32l4x6xx_irq.h',0,202),
('8a6662c95751b9a109c6cef5225db635ba814cd4:b4357c932aa247bb76a425fc0aa3f6e762daba302f24cdb7892baca203b70cff','2024-03-21 11:37:05.553','2024-03-21 11:37:05.553','bitbucket_server:BitbucketServerRepo:2:IMX500/repos/incubator-nuttx','gitextractor',0,'','8a6662c95751b9a109c6cef5225db635ba814cd4','arch/arm/include/stm32l4/chip.h',3,1),
('8a6662c95751b9a109c6cef5225db635ba814cd4:51b5c77a530fb52aaafb65e3fa76eeb7462fd95c4348aba6185d99f7500ffab9','2024-03-21 11:37:05.553','2024-03-21 11:37:05.553','bitbucket_server:BitbucketServerRepo:2:IMX500/repos/incubator-nuttx','gitextractor',0,'','8a6662c95751b9a109c6cef5225db635ba814cd4','arch/arm/include/stm32l4\x80stm32l4x6xx_irq.h',202,0) ON DUPLICATE KEY UPDATE `updated_at`='2024-03-21 11:37:06.623',`_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`),`commit_sha`=VALUES(`commit_sha`),`file_path`=VALUES(`file_path`),`additions`=VALUES(`additions`),`deletions`=VALUES(`deletions`)"

What do you expect to happen

Import the commit_files without crashing the whole task.

How to reproduce

See above notes.

Anything else

No response

Version

555264c

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@duhow duhow added the type/bug This issue is a bug label Mar 21, 2024
@duhow
Copy link
Contributor Author

duhow commented Mar 21, 2024

Seems to be fixable with:

ALTER TABLE commit_files MODIFY COLUMN file_path VARBINARY(255);

@klesh
Copy link
Contributor

klesh commented Mar 25, 2024

Thanks for reporting the issue, seems like adding a migration script could fix the problem, would you like to work on it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug This issue is a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants