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

Cannot startup dev lake when using Microsoft azure mysql flexible server due to missing columns #6958

Closed
2 of 3 tasks
michaelawarren opened this issue Feb 15, 2024 · 5 comments · Fixed by #6970
Closed
2 of 3 tasks
Assignees
Labels
Milestone

Comments

@michaelawarren
Copy link

Search before asking

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

What happened

I'm trying to run Dev lake in an azure kubernetes cluster using azure flexible server mysql (my sql version 8.0) I'm using helm 0.19.0 (also tried 0.21.0-beta3). When i start up it prompts me to do a db migration. when i do that i get the following error. Error is specific to 0.19.0. I get a different but similar error on 0.21.0-beta3). I'm starting with a fresh install.

time="2024-02-13 23:22:50" level=info msg="\x1b[31;1m/app/impls/dalgorm/dalgorm.go:138 \x1b[35;1mError 1054 (42S22): Unknown column 'custom_field6' in '_tool_tapd_stories'\n\x1b[0m\x1b[33m[1.730ms] \x1b[34;1m[rows:0]\x1b[0m ALTER TABLE `_tool_tapd_stories` RENAME COLUMN `custom_field6` TO `custom_field_six`"
time="2024-02-13 23:22:50" level=error msg="HTTP 500 error\n\tcaused by: error executing migration (500)\n\tWraps: (2) Error 1054 (42S22): Unknown column 'custom_field6' in '_tool_tapd_stories' (500)\n\tWraps: (3) Error 1054 (42S22): Unknown column 'custom_field6' in '_tool_tapd_stories'\n\tError types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *mysql.MySQLError"

slack link to where question was asked and bug report asked for https://devlake-io.slack.com/archives/C03APJ20VM4/p1707867572707049

What do you expect to happen

For the service to start up and work properly.

How to reproduce

created an azure mysql flexible server via azure (must start with at least 2 cpus)
disable require_secure_transport and sql_generate_invisible_primary_key
deploy dev lake via helm to kube cluster

      - name: Deploy with Helm
        id: helm-deploy
        run: |
          helm upgrade --install -f ${{ github.workspace }}/charts/devlake/values.yaml -n ${{ env.KUBE_NAMESPACE }} ${{ env.APPNAME }} ${{ github.workspace }}/charts/devlake \
            --set mysql.useExternal=true \
            --set mysql.externalServer=server-name.mysql.database.azure.com \
            --set mysql.externalPort=3306 \
            --set mysql.username=${{ secrets.MYSQL_SERVER_USERNAME }} \
            --set mysql.password=${{ secrets.MYSQL_SERVER_PASSWORD }} \
            --set mysql.database=devlake \
            --set grafana."grafana\.ini".database.type=mysql \
            --set grafana."grafana\.ini".database.host=server-name.mysql.database.azure.com \
            --set grafana."grafana\.ini".database.user=${{ secrets.MYSQL_SERVER_USERNAME }} \
            --set grafana."grafana\.ini".database.password=${{ secrets.MYSQL_SERVER_PASSWORD }} \
            --set grafana."grafana\.ini".database.name=grafana \
            --set ui.basicAuth.enabled=true \
            --set ui.basicAuth.user=${{ secrets.DEVLAKE_UI_USERNAME }} \
            --set ui.basicAuth.password=${{ secrets.DEVLAKE_UI_PASSWORD }} \
            --set lake.encryptionSecret.secret=${{ secrets.DEVLAKE_ENCRYPTION_SECRET }} \
            --set ui.livenessProbe.httpGet=null \
            --set "ui.livenessProbe.exec.command={touch,/tmp/healthy}" \
            --set ui.readinessProbe.httpGet=null \
            --set "ui.readinessProbe.exec.command={touch,/tmp/healthy}" \
            --set lake.readinessProbe.httpGet=null \
            --set "lake.readinessProbe.exec.command={touch,/tmp/healthy}"

attempt to go to the devlake-ui
it will prompt for migration
select ok
error will occur
(i pulled error from logs)

Anything else

No response

Version

v0.19.0 and v0.21.0-beta3

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@michaelawarren michaelawarren added the type/bug This issue is a bug label Feb 15, 2024
@klesh
Copy link
Contributor

klesh commented Feb 16, 2024

Thanks for reporting the problem. @d4x1 is working on it.

@abeizn
Copy link
Contributor

abeizn commented Feb 19, 2024

@michaelawarren It has taken effect in v0.20.0-beta4 version

@abeizn abeizn closed this as completed Feb 19, 2024
@michaelawarren
Copy link
Author

michaelawarren commented Feb 19, 2024

CreationTimestamp:      Mon, 19 Feb 2024 11:39:40 -0700
Labels:                 app.kubernetes.io/instance=devlake
                        app.kubernetes.io/managed-by=Helm
                        app.kubernetes.io/name=devlake
                        app.kubernetes.io/version=v0.20.0-beta4
                        helm.sh/chart=devlake-0.20.0-beta4

I'm still seeing this issue in version 0.20.0-beta4

time="2024-02-19 18:55:56" level=info msg="path /plugins/github/connections will continue"
time="2024-02-19 18:55:56" 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)"
time="2024-02-19 18:55:58" level=info msg=" [migrator] applying migration script modify tapd custom field name:20230411000004"
time="2024-02-19 18:55:58" level=info msg="\x1b[31;1m/app/impls/dalgorm/dalgorm.go:141 \x1b[35;1mError 1054 (42S22): Unknown column 'custom_field6' in '_tool_tapd_stories'\n\x1b[0m\x1b[33m[2.027ms] \x1b[34;1m[rows:0]\x1b[0m ALTER TABLE `_tool_tapd_stories` RENAME COLUMN `custom_field6` TO `custom_field_six`"
time="2024-02-19 18:55:58" level=error msg="HTTP 500 error\n\tcaused by: error executing migration (500)\n\tWraps: (2) Error 1054 (42S22): Unknown column 'custom_field6' in '_tool_tapd_stories' (500)\n\tWraps: (3) Error 1054 (42S22): Unknown column 'custom_field6' in '_tool_tapd_stories'\n\tError types: (1) *hintdetail.withDetail (2) *hintdetail.withDetail (3) *mysql.MySQLError"

@michaelawarren
Copy link
Author

ahh i see the link is for 0.21.0-beta4 not 20. I'll try that.

@michaelawarren
Copy link
Author

confirming 0.21.0-beta4 does work. Thank you very much!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants