You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devlake.apache.org by "codebreach (via GitHub)" <gi...@apache.org> on 2024/01/02 10:11:59 UTC

[I] [Bug][Module Name] Bug title [incubator-devlake]

codebreach opened a new issue, #6718:
URL: https://github.com/apache/incubator-devlake/issues/6718

   ### 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
   
   On syncing data from GitHub the sync fails 
   in `gitextractor`
   
   with 
   "subtask collectGitBranches ended unexpectedly Wraps: (2) Error 1406 (22001): Data too long for column 'id' at row 36 (500) Wraps: (3) Error 1406 (22001): Data too long for column 'id' at row 36 Error types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *mysql.MySQLError"
   
   ### What do you expect to happen
   
   Sync should succeed
   
   ### How to reproduce
   
   Have a git repository with an extremely long branch name 
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   v0.20.0-beta5
   
   ### Are you willing to submit PR?
   
   - [X] 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-unsubscribe@devlake.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Module Name] gitextractor fails when branch name is too long [incubator-devlake]

Posted by "codebreach (via GitHub)" <gi...@apache.org>.
codebreach commented on issue #6718:
URL: https://github.com/apache/incubator-devlake/issues/6718#issuecomment-1880142452

   ran the following command and should work around. please note that theres a max key length of 3072 bytes (by default?)
   which means the max length of the id column can only be 3072/4 ~ 767 characters ascii
   
   ```log
   mysql> ALTER TABLE refs MODIFY COLUMN id VARCHAR(10240);
   ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytes
   mysql> ALTER TABLE refs MODIFY COLUMN id VARCHAR(3072);
   ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytes
   mysql> ALTER TABLE refs MODIFY COLUMN id VARCHAR(3071);
   ERROR 1071 (42000): Specified key was too long; max key length is 3072 bytes
   mysql> ALTER TABLE refs MODIFY COLUMN id VARCHAR(767);
   Query OK, 0 rows affected (0.35 sec)
   Records: 0  Duplicates: 0  Warnings: 0
   ```


-- 
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-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Module Name] gitextractor fails when branch name is too long [incubator-devlake]

Posted by "klesh (via GitHub)" <gi...@apache.org>.
klesh closed issue #6718: [Bug][Module Name] gitextractor fails when branch name is too long
URL: https://github.com/apache/incubator-devlake/issues/6718


-- 
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-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Module Name] gitextractor fails when branch name is too long [incubator-devlake]

Posted by "codebreach (via GitHub)" <gi...@apache.org>.
codebreach commented on issue #6718:
URL: https://github.com/apache/incubator-devlake/issues/6718#issuecomment-1873835168

   Based on error message, this seems to be coming from 
   
   https://github.com/apache/incubator-devlake/blob/main/backend/plugins/gitextractor/parser/repo.go#L202
   
   and 
   
   https://github.com/apache/incubator-devlake/blob/main/backend/core/models/domainlayer/domainlayer.go#L24-L27
   
   Basically ID is generated by appending repo id and branch name but that has a limit of 255 characters 
   so it will fail for `len(branch name) + 1 + len(str(repo.id)) > 255`


-- 
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-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


Re: [I] [Bug][Module Name] gitextractor fails when branch name is too long [incubator-devlake]

Posted by "abeizn (via GitHub)" <gi...@apache.org>.
abeizn commented on issue #6718:
URL: https://github.com/apache/incubator-devlake/issues/6718#issuecomment-1878030734

   Hi @codebreach, This field is designed into many tables, and we plan to solve it uniformly in the v0.22 version (because it is now in the v0.21 testing phase). We are very sorry for affecting your use. You can first extend the length of the id field in the refs table in DB.


-- 
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-unsubscribe@devlake.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org