Comments (2)
Hey @mieliespoor! I'm here to help you with any bugs, questions, or contributions you have. Let's work together to solve this issue.
The error you're encountering is related to a collation conversion issue in MySQL. The latest beta version (1.0.0-beta9) of incubator-devlake includes changes that could affect MySQL collation settings and potentially cause such errors. Specifically, the migration scripts 20230316_modify_character_set.go
and 20240325_modify_commit_character_type.go
include ALTER TABLE
statements to convert tables to the utf8mb4
character set and utf8mb4_bin
collation, which might be causing the issue [1][2][3].
To resolve this, ensure that your MySQL database and tables are consistently using the utf8mb4
character set and utf8mb4_bin
collation. You can configure these settings in your docker-compose.yml
file as follows:
version: "3"
services:
mysql:
image: mysql:8
volumes:
- mysql-storage:/var/lib/mysql
restart: always
ports:
- 3306:3306
environment:
MYSQL_ROOT_PASSWORD: admin
MYSQL_DATABASE: lake
MYSQL_USER: merico
MYSQL_PASSWORD: merico
TZ: UTC
command: --character-set-server=utf8mb4
--collation-server=utf8mb4_bin
--skip-log-bin
Additionally, you can use a migration script to convert existing tables to the correct character set and collation:
package migrationscripts
import (
"net/url"
"github.com/apache/incubator-devlake/core/context"
"github.com/apache/incubator-devlake/core/errors"
)
type modifyCharacterSet struct{}
func (*modifyCharacterSet) Up(basicRes context.BasicRes) errors.Error {
dbUrl := basicRes.GetConfig("DB_URL")
if dbUrl == "" {
return errors.BadInput.New("DB_URL is required")
}
u, err1 := url.Parse(dbUrl)
if err1 != nil {
return errors.Convert(err1)
}
if u.Scheme == "mysql" {
err := basicRes.GetDal().Exec(`ALTER TABLE _tool_sonarqube_projects CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_bin;`)
if err != nil {
return err
}
// Repeat for other tables as needed
}
return nil
}
func (*modifyCharacterSet) Version() uint64 {
return 20230316220071
}
func (*modifyCharacterSet) Name() string {
return "sonarqube modify character set"
}
This should help avoid collation conversion errors in your CI pipeline [4][5][6][7].
Details
About Dosu
This response is meant to be useful and save you time. It is not meant to be a precise solution, but rather a starting point for your own research.
Help me be more useful! Please leave a 👍 if this is helpful and 👎 if it is irrelevant.
To continue the conversation, mention @dosu.
from incubator-devlake.
I think this was because some migration didn't properly run. I was in the position where I could delete all the tables in the db and start over, so I simply did that. I think this database was in some unrecoverable state in any case.
As I won't be able to add much to this going forward, I will be closing this.
from incubator-devlake.
Related Issues (20)
- [Bug][backend] Docker build is failing HOT 4
- [Question][Module Name] Is it possible to clone Gitlab repos using SSH? HOT 4
- [Question][Deployment] Webhook: <no value> is allowed for required? HOT 2
- [Bug][gitext] Failed to clone Github private repos HOT 11
- [Bug][Jira] A issue has been deleted in Jira,but devlake didnot delete it in devlake mysql,so when execute config-ui collect data ,the issue still exist HOT 2
- [Bug][AzureDevOpsPlugin] Unauthorized request HOT 8
- [Feature][Keycloak] Can't add SSO in Apache Devlake.
- [Bug][JiraPlugin] Failing on "collectIssues" subtask HOT 9
- [Feature][Convertor] Add data processing for Issue tracking to compute issue status and assignee history HOT 1
- [Bug][Config UI] I can still add an existing scope in AzureDevops
- [Feature][GitLab] Add assignees and reviewers to table.pull_requests
- [Bug][Module Name] my data doesnt show on the dashboard can someone help me please HOT 3
- [Refactor][DORA] Refactor CalculateChangeLeadTimeMeta subtask HOT 2
- [Feature][PagerDuty] Change Incident Times HOT 5
- [Bug][PagerDuty] not enough info for Pagerduty execution (400) HOT 3
- [Bug][Module Name] AxiosError: Request failed with status code 500 HOT 2
- [Bug][CircleCI] CircleCI regex is not working to collect data HOT 3
- [Feature][StarRocks] support starrocks replication num
- [Feature][CustomizePlugin] Data extraction 'rawDataParams' does not support wild cards
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from incubator-devlake.