Git Product home page Git Product logo

Comments (15)

hayk96 avatar hayk96 commented on August 19, 2024 1

sure, in that time the pod was printing the following logs:

database is ready
time="2024-07-12T10:45:12Z" level=info msg="no [.env] file, devlake will read configuration from environment, please make sure you have set correct environment variable."
Version:  v1.0.1-beta1@4cdd754
[GIN-debug] [WARNING] Creating an Engine instance with the Logger and Recovery middleware already attached.
[GIN-debug] [WARNING] Running in "debug" mode. Switch to "release" mode in production.
 - using env:	export GIN_MODE=release
 - using code:	gin.SetMode(gin.ReleaseMode)
[GIN-debug] GET    /ping                     --> github.com/apache/incubator-devlake/server/api/ping.Get (4 handlers)
[GIN-debug] GET    /ready                    --> github.com/apache/incubator-devlake/server/api/ping.Ready (4 handlers)
[GIN-debug] GET    /health                   --> github.com/apache/incubator-devlake/server/api/ping.Health (4 handlers)
[GIN-debug] GET    /version                  --> github.com/apache/incubator-devlake/server/api/version.Get (4 handlers)
[GIN-debug] GET    /proceed-db-migration     --> github.com/apache/incubator-devlake/server/api.SetupApiServer.func1 (6 handlers)
[GIN-debug] GET    /swagger/*any             --> github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (8 handlers)
[GIN-debug] GET    /plugins/swagger/azuredevops/*any --> github.com/swaggo/gin-swagger.CustomWrapHandler.func1 (7 handlers)
[GIN-debug] [WARNING] You trusted all proxies, this is NOT safe. We recommend you to set a value.
Please check https://pkg.go.dev/github.com/gin-gonic/gin#readme-don-t-trust-all-proxies for details.
[GIN-debug] Listening and serving HTTP on :8080
[GIN] 2024/07/12 - 10:46:28 | 200 |       7.447µs |   172.25.41.121 | GET      "/ping"
time="2024-07-12 10:46:31" level=error msg="HTTP 428 error\n\tcaused by: \n\tNew migration scripts detected. Database migration is required to launch DevLake.\n\tWARNING: Performing migration may wipe collected data for consistency and re-collecting data may be required.\n\tTo proceed, please send a request to <config-ui-endpoint>/api/proceed-db-migration (or <devlake-endpoint>/proceed-db-migration).\n\tAlternatively, you may downgrade back to the previous DevLake version.\n\t (428)"
[GIN] 2024/07/12 - 10:46:31 | 428 |     863.029µs |      10.42.39.0 | GET      "/store/onboard"
[GIN] 2024/07/12 - 10:46:33 | 200 |       3.447µs |   172.25.41.121 | GET      "/ping"
[GIN] 2024/07/12 - 10:46:33 | 200 |         719ns |   172.25.41.121 | GET      "/ping"
[GIN] 2024/07/12 - 10:46:38 | 200 |       3.379µs |   172.25.41.121 | GET      "/ping"
[GIN] 2024/07/12 - 10:46:53 | 200 |       2.073µs |   172.25.41.121 | GET      "/ping"
time="2024-07-12 10:46:53" level=error msg="failed to execute migration\n\tcaused by: Error 1406 (22001): Data too long for column 'file_path' at row 3191 (500)\n\tWraps: (2) Error 1406 (22001): Data too long for column 'file_path' at row 3191\n\tError types: (1) *hintdetail.withDetail (2) *mysql.MySQLError"
time="2024-07-12 10:46:53" level=error msg="HTTP 500 error\n\tcaused by: error executing migration (500)\n\tWraps: (2) Error 1406 (22001): Data too long for column 'file_path' at row 3191 (500)\n\tWraps: (3) Error 1406 (22001): Data too long for column 'file_path' at row 3191\n\tError types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *mysql.MySQLError"
[GIN] 2024/07/12 - 10:46:53 | 500 |  280.721364ms |      10.42.39.0 | GET      "/proceed-db-migration"
[GIN] 2024/07/12 - 10:46:58 | 200 |       3.538µs |   172.25.41.121 | GET      "/ping"
[GIN] 2024/07/12 - 10:46:58 | 200 |       1.111µs |   172.25.41.121 | GET      "/ping"
time="2024-07-12 10:47:00" level=error msg="HTTP 400 error\n\tcaused by: error executing migration (400)\n\tWraps: (2) already migrating (400)\n\tError types: (1) *hintdetail.withDetail (2) *errors.errorString"
[GIN] 2024/07/12 - 10:47:00 | 400 |     302.657µs |      10.42.38.0 | GET      "/proceed-db-migration"
[GIN] 2024/07/12 - 10:47:03 | 200 |       5.526µs |   172.25.41.121 | GET      "/ping"

from incubator-devlake-helm-chart.

hayk96 avatar hayk96 commented on August 19, 2024 1

tables that have file_path column

mysql> SELECT DISTINCT TABLE_NAME
    ->     FROM INFORMATION_SCHEMA.COLUMNS
    ->     WHERE COLUMN_NAME IN ('file_path')
    ->         AND TABLE_SCHEMA='lake';
+------------------------------+
| TABLE_NAME                   |
+------------------------------+
| _tool_sonarqube_file_metrics |
| commit_files                 |
| cq_file_metrics              |
| repo_snapshot                |
+------------------------------+
4 rows in set (0.01 sec)

length of the columns

mysql> SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'lake' AND TABLE_NAME = '_tool_sonarqube_file_metrics' AND COLUMN_NAME = 'file_path';
+--------------------------+
| CHARACTER_MAXIMUM_LENGTH |
+--------------------------+
|               4294967295 |
+--------------------------+
1 row in set (0.00 sec)

mysql> SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'lake' AND TABLE_NAME = 'commit_files' AND COLUMN_NAME = 'file_path';
+--------------------------+
| CHARACTER_MAXIMUM_LENGTH |
+--------------------------+
|                     1024 |
+--------------------------+
1 row in set (0.01 sec)

mysql> SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'lake' AND TABLE_NAME = 'cq_file_metrics' AND COLUMN_NAME = 'file_path';
+--------------------------+
| CHARACTER_MAXIMUM_LENGTH |
+--------------------------+
|               4294967295 |
+--------------------------+
1 row in set (0.00 sec)

mysql> SELECT CHARACTER_MAXIMUM_LENGTH FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = 'lake' AND TABLE_NAME = 'repo_snapshot' AND COLUMN_NAME = 'file_path';
+--------------------------+
| CHARACTER_MAXIMUM_LENGTH |
+--------------------------+
|                      255 |
+--------------------------+
1 row in set (0.00 sec)

from incubator-devlake-helm-chart.

hayk96 avatar hayk96 commented on August 19, 2024 1

I have deleted the entire stack, so can not reproduce it.

from incubator-devlake-helm-chart.

d4x1 avatar d4x1 commented on August 19, 2024

@Puvendhan what's the version you are using?

from incubator-devlake-helm-chart.

Puvendhan avatar Puvendhan commented on August 19, 2024

Here's the version 1.0.0-beta5

from incubator-devlake-helm-chart.

Puvendhan avatar Puvendhan commented on August 19, 2024

Hi, Any update on this?

from incubator-devlake-helm-chart.

klesh avatar klesh commented on August 19, 2024

Seems like a compatibility problem of the gcp Cloudsql mysql, try using mysql or mariadb instead.

from incubator-devlake-helm-chart.

hayk96 avatar hayk96 commented on August 19, 2024

Hello I'm experiencing this issue as well, starting from 1.0.0-beta3.
Database: MySQL (bitnami), Version: 8.0.37

from incubator-devlake-helm-chart.

d4x1 avatar d4x1 commented on August 19, 2024

@hayk96 You can try the latest version.

from incubator-devlake-helm-chart.

hayk96 avatar hayk96 commented on August 19, 2024

Thanks for your response @d4x1 I've just tried the latest version: 1.0.0 and the same issue there

from incubator-devlake-helm-chart.

hayk96 avatar hayk96 commented on August 19, 2024

I've tried the 1.0.1-beta1 version as well. Here the error looks like different

time="2024-07-12 10:46:53" level=error msg="failed to execute migration\n\tcaused by: Error 1406 (22001): Data too long for column 'file_path' at row 3191 (500)\n\tWraps: (2) Error 1406 (22001): Data too long for column 'file_path' at row 3191\n\tError types: (1) *hintdetail.withDetail (2) *mysql.MySQLError"

from incubator-devlake-helm-chart.

d4x1 avatar d4x1 commented on August 19, 2024

@hayk96 Please paste more logs so we can find which migration script failed with this error message.
And meanwhile you can check the field's length in your database(I am not sure which table, maybe cq_file_metrics or commits or commit_files or others).

from incubator-devlake-helm-chart.

d4x1 avatar d4x1 commented on August 19, 2024

@hayk96 I've tried v1.0.1-beta1 with am empty database, there is no error.
Is your devlake upgraded from an old version?
If yes, check your database's data in column file_path. It seems the actual data length is bigger than expected column length.

from incubator-devlake-helm-chart.

hayk96 avatar hayk96 commented on August 19, 2024

yes, all DevLeke versions work fine with an empty database. These errors have been raised during upgrades. Will check.

from incubator-devlake-helm-chart.

d4x1 avatar d4x1 commented on August 19, 2024

@hayk96 I cannot find which scipr fialed from you logs. You can change the log level and if something went wrong, we can find the script id from this line: https://github.com/apache/incubator-devlake/blob/main/backend/core/migration/migrator.go#L99

from incubator-devlake-helm-chart.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.