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

[Bug][lake] can not edit scope config #8281

Open
2 of 3 tasks
tim-goto opened this issue Jan 29, 2025 · 4 comments
Open
2 of 3 tasks

[Bug][lake] can not edit scope config #8281

tim-goto opened this issue Jan 29, 2025 · 4 comments
Labels
component/config-ui This issue or PR relates to config-ui severity/p1 This bug affects functionality or significantly affect ux type/bug This issue is a bug

Comments

@tim-goto
Copy link
Contributor

Search before asking

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

What happened

error when clicking on 'edit scope config'

Image

lake logs

lake time="2025-01-29 14:19:47" level=info msg="\x1b[31;1m/app/impls/dalgorm/dalgorm.go:209 \x1b[35;1mError 1064 (42000): You have an error in your SQL syntax; check th
e manual that corresponds to your MySQL server version for the right syntax to use near 'varchar) = bps.scope_id) WHERE bps.plugin_name = ? AND bps.connection_id = ?' a
t line 1\n\x1b[0m\x1b[33m[0.531ms] \x1b[34;1m[rows:0]\x1b[0m SELECT bp.id AS blueprint_id, bp.project_name, bps.scope_id, _tool_github_repos.* FROM _devlake_blueprint_s
copes bps LEFT JOIN _devlake_blueprints bp ON (bp.id = bps.blueprint_id) LEFT JOIN _tool_github_repos ON (_tool_github_repos.connection_id = bps.connection_id AND cast(
_tool_github_repos.github_id as varchar) = bps.scope_id) WHERE bps.plugin_name = 'github' AND bps.connection_id = 5"
lake [GIN] 2025/01/29 - 14:19:47 | 500 |     6.36026ms |    10.232.70.46 | GET      "/plugins/github/scope-config/6/projects"
lake
lake
lake 2025/01/29 14:19:47 [Recovery] 2025/01/29 - 14:19:47 panic recovered:
lake GET /plugins/github/scope-config/6/projects HTTP/1.1
lake Host: REDACTED
lake Accept: application/json, text/plain, */*
lake Accept-Encoding: gzip, deflate, br, zstd
lake Accept-Language: en-US
lake Dnt: 1
lake Priority: u=0
lake Referer: REDACTED/connections/github/5
lake Sec-Fetch-Dest: empty
lake Sec-Fetch-Mode: cors
lake Sec-Fetch-Site: same-origin
lake User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:134.0) Gecko/20100101 Firefox/134.0
lake X-Forwarded-For: 10.232.70.46
lake X-Forwarded-Host: REDACTED
lake X-Forwarded-Port: 443
lake X-Forwarded-Proto: https
lake X-Forwarded-Scheme: https
lake X-Real-Ip: REDACTED
lake X-Request-Id: fa0480cfe6909e343b5751e1eb8b9cd6
lake X-Scheme: https

What do you expect to happen

no error, I can edit the scope config

How to reproduce

click on 'edit scope config'

Anything else

No response

Version

release-v1.0_250120_1118_6e14cfa

Are you willing to submit PR?

  • Yes I am willing to submit a PR!

Code of Conduct

@tim-goto tim-goto added the type/bug This issue is a bug label Jan 29, 2025
@dosubot dosubot bot added component/config-ui This issue or PR relates to config-ui severity/p1 This bug affects functionality or significantly affect ux labels Jan 29, 2025
Copy link

dosubot bot commented Jan 29, 2025

@tim-goto Hello there! I'm here to help you with bug fixes, answer questions, and guide you to become a contributor. Let's squash those bugs together! 🤖

I found a similar closed issue titled "[Bug][Config UI] Errors when update project connection's scopes](#6097)" which was resolved by a pull request that reset the scope API to differentiate plugins [1].

The error you're encountering seems to be related to an SQL syntax issue, specifically with casting a column to varchar. This might be similar to the issue that was previously resolved. You might want to check if the SQL syntax used in your query is compatible with the MySQL version used by DevLake.

If the issue persists, reviewing the changes made in the pull request that resolved the similar issue might provide insights into how to address the current problem.

To continue talking to Dosu, mention @dosu.


Help Dosu learn! Give it feedback: Great Response | Irrelevant Answer | Incorrect Sources | Too Verbose | Hallucination | Other

@tim-goto tim-goto changed the title [Bug][Module Name] Bug title [Bug][lake] can not edit scope config Jan 29, 2025
@kostas-petrakis
Copy link
Contributor

kostas-petrakis commented Jan 30, 2025

This looks related to the fix I submitted. Yet I did test this against a MySQL database.
Could you provide the version of the MySQL DB you are using?
I will check if the cast to char fixes it.

@tim-goto
Copy link
Contributor Author

Thanks for getting back to me, I am using MySQL Server 8.4.4-1.el9 as part of the official devlake helmchart

@tim-goto
Copy link
Contributor Author

Hey @kostas-petrakis did you get a chance to look into this? And thank you for your help :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/config-ui This issue or PR relates to config-ui severity/p1 This bug affects functionality or significantly affect ux type/bug This issue is a bug
Projects
None yet
Development

No branches or pull requests

2 participants