You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@devlake.apache.org by "fbgirardsherweb (via GitHub)" <gi...@apache.org> on 2025/06/06 11:54:00 UTC

[I] [Bug] Stuck in migration with Postgress db [incubator-devlake]

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

   ### 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
   
   Im testing DevLake with a fresh postgress database instead of MySQL , since i want to use Azure managed postgress
   
   Im using this version
    "Image": "devlake.docker.scarf.sh/apache/devlake@sha256:7e4797600ee66c9ee3031779d9e62dfc33e9071ce6ebe52908f6b1ddf65f9796",
   
   - I was not able to use the helm template without modifying it
   secrets.yaml (commented out?)
   {{- else if (eq .Values.option.database "pgsql")}}
    POSTGRES_USER: "{{ .Values.pgsql.username }}"
    POSTGRES_PASSWORD: "{{ .Values.pgsql.password }}"
    POSTGRES_DB: "{{ .Values.pgsql.database }}"
    DB_URL: "{{ include "database.url" . }}"
   + _helpers.tpl
   
   The value file
   lake:
     encryptionSecret:
       secret: "Something"
   
   grafana:
     adminPassword: "admin"
   
   option:
     database: pgsql
     autoCreateSecret: true
   
   mysql:
     enabled : false
   
   pgsql:
     useExternal: true
     externalServer: my-postgres-postgresql.default.svc.cluster.local
     externalPort: 5432
     port: 5432
     username: merico
     password: merico
     database: lake
     storage:
       class: ""
       size: 5Gi
     image:
       repository: postgres
       tag: 14.2-alpine
       pullPolicy: IfNotPresent
     resources: {}
     nodeSelector: {}
     tolerations: []
     affinity: {}
     extraLabels: {}
     securityContext: {}
     containerSecurityContext: {}
     annotations: {}
   
   
   
   - I was only able to spawn the postgress db with his own helm release
   - Im not able to get past the migration , it seem like the SQL query are not valid
   
   2025/06/05 20:21:54 [Recovery] 2025/06/05 - 20:21:54 panic recovered:
   GET /proceed-db-migration HTTP/1.1
   Host: devlakepostgress-lake.default.svc.cluster.local:8080
   Accept: application/json, text/plain, */*
   Accept-Encoding: gzip, deflate, br, zstd
   Accept-Language: en-US,en;q=0.9,en-CA;q=0.8
   
   Referer: http://127.0.0.1:32001/db-migrate
   Sec-Ch-Ua: "Chromium";v="136", "Microsoft Edge";v="136", "Not.A/Brand";v="99"
   Sec-Ch-Ua-Mobile: ?0
   Sec-Ch-Ua-Platform: "Windows"
   Sec-Fetch-Dest: empty
   Sec-Fetch-Mode: cors
   Sec-Fetch-Site: same-origin
   User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/136.0.0.0 Safari/537.36 Edg/136.0.0.0
   
   
   failed to modify processed_time column (500)
   Wraps: (2) ERROR: syntax error at or near "MODIFY" (SQLSTATE 42601) (500)
   Wraps: (3) ERROR: syntax error at or near "MODIFY" (SQLSTATE 42601)
   Error types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *pgconn.PgError
   /app/core/errors/util.go:34 (0x1617f06)
   /app/server/api/api.go:126 (0x1617eb9)
   /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x16157e2)
   /app/server/api/middlewares.go:95 (0x16157c6)
   /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x1615c87)
   /app/server/api/middlewares.go:117 (0x1615b22)
   /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x1255301)
   /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/recovery.go:102 (0x12552ec)
   /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x1254426)
   /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/logger.go:240 (0x1254409)
   /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/context.go:174 (0x12532aa)
   /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:620 (0x1252f31)
   /go/pkg/mod/github.com/gin-gonic/gin@v1.9.1/gin.go:576 (0x1252a5c)
   /usr/local/go/src/net/http/server.go:2936 (0xce45b5)
   /usr/local/go/src/net/http/server.go:1995 (0xcdf751)
   
   
   
   ### What do you expect to happen
   
   No errors
   
   ### How to reproduce
   
   - Fresh helm install with latest version without mysql
   
   ### Anything else
   
   _No response_
   
   ### Version
   
   7e4797600ee66c9ee3031779d9e62dfc33e9071ce6ebe52908f6b1ddf65f9796
   
   ### 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-unsubscribe@devlake.apache.org.apache.org

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


Re: [I] [Bug] Stuck in migration with Postgress db [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8463:
URL: https://github.com/apache/incubator-devlake/issues/8463#issuecomment-3157026573

   This issue has been automatically marked as stale because it has been inactive for 60 days. It will be closed in next 7 days if no further activity occurs.


-- 
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] Stuck in migration with Postgress db [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] commented on issue #8463:
URL: https://github.com/apache/incubator-devlake/issues/8463#issuecomment-3186264024

   This issue has been closed because it has been inactive for a long time. You can reopen it if you encounter the similar problem in the future.


-- 
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] Stuck in migration with Postgress db [incubator-devlake]

Posted by "dosubot[bot] (via GitHub)" <gi...@apache.org>.
dosubot[bot] commented on issue #8463:
URL: https://github.com/apache/incubator-devlake/issues/8463#issuecomment-2949030704

   <!-- Greeting -->
   Hi @fbgirardsherweb! I'm [Dosu](https://go.dosu.dev/dosubot) and I’m helping the incubator-devlake team.
   
   <!-- Answer -->
   The migration error is happening because DevLake's migration scripts use the MySQL-specific MODIFY keyword, which PostgreSQL doesn't support. In PostgreSQL, you need to use ALTER TABLE ... ALTER COLUMN ... TYPE ... instead. For example, instead of:
   
   ```sql
   ALTER TABLE my_table MODIFY my_column VARCHAR(255);
   ```
   use:
   ```sql
   ALTER TABLE my_table ALTER COLUMN my_column TYPE VARCHAR(255);
   ```
   This pattern applies to all column type changes and is already handled in some parts of the codebase, but not everywhere—so migrations that don't check the DB dialect will fail on Postgres. See examples and implementation details in the codebase [here](https://github.com/apache/incubator-devlake/blob/41c047d2b54cefb9c4e86a19c2d738d0ab3ccbcf/backend/impls/dalgorm/dalgorm.go) and [here](https://github.com/apache/incubator-devlake/blob/41c047d2b54cefb9c4e86a19c2d738d0ab3ccbcf/backend/python/plugins/azuredevops/azuredevops/migrations.py).
   
   Currently, the official deployment files and Helm charts are MySQL-centric and not present in the main repo, so PostgreSQL support requires manual changes to DB_URL and environment variables in your deployment manifests. There are also known issues with the predefined Grafana dashboards—they are MySQL-specific and may not work out of the box with PostgreSQL [discussion](https://github.com/apache/incubator-devlake/issues/8350).
   
   If you want to proceed, you’ll need to patch the migration scripts to add PostgreSQL branches where needed, and update your deployment configs to use the correct Postgres connection string. If you hit more migration errors, look for other MySQL-specific SQL and swap in the Postgres equivalent.
   
   
   <!-- Dosu Comment Footer -->
   *To reply, just mention [@dosu](https://go.dosu.dev/dosubot).*
   
   ---
   <sup>How did I do? [Good](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/679baef2-d2c9-4a6f-aeca-51d339cf75d7?feedback_type=other)</sup>&nbsp;&nbsp;[![Join Discord](https://img.shields.io/badge/join-5865F2?logo=discord&logoColor=white&label=)](https://go.dosu.dev/discord-bot)&nbsp;[!
 [Share on X](https://img.shields.io/badge/X-share-black)](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8463)


-- 
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] Stuck in migration with Postgress db [incubator-devlake]

Posted by "github-actions[bot] (via GitHub)" <gi...@apache.org>.
github-actions[bot] closed issue #8463: [Bug] Stuck in migration with Postgress db
URL: https://github.com/apache/incubator-devlake/issues/8463


-- 
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