dosubot[bot] commented on issue #8602: URL: https://github.com/apache/incubator-devlake/issues/8602#issuecomment-3917125523
<!-- Answer --> You're absolutely right—this is a bug in DevLake's schema, not an individual installation issue. The `cicd_deployments.name` column is currently defined as `varchar(255)` in the codebase, which can't accommodate longer deployment names from GitHub's API. Interestingly, a similar migration was already done for `cicd_pipelines.name` (changed to TEXT in [August 2023](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/core/models/migrationscripts/20230821_modify_cicd_pipelines_to_text.go)), but `cicd_deployments` was never updated—this looks like an oversight. DevLake has fixed similar varchar(255) overflow issues multiple times across different plugins ([#8250](https://github.com/apache/incubator-devlake/issues/8250), [#8254](https://github.com/apache/incubator-devlake/issues/8254), [#8325](https://github.com/apache/incubator-devlake/issues/8325), [#8545](https://github.com/apache/incubator-devlake/issues/8545)). A PR contribution would very likely be accepted since there's clear precedent. The fix would involve: 1. Updating the `Name` field in [`cicd_deployment.go`](https://github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/core/models/domainlayer/devops/cicd_deployment.go#L27) to `gorm:"type:text"` 2. Adding a migration script similar to the `cicd_pipelines` one Since @klesh mentioned planning a release this week, this might be a good time to get a fix in. I'd suggest removing the stale label and tagging it appropriately so it doesn't get auto-closed again. <!-- 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/59869461-dff6-4dc7-8d79-9c7dd0743c29?feedback_type=great_response) | [Irrelevant](https://app.dosu.dev/response-feedback/59869461-dff6-4dc7-8d79-9c7dd0743c29?feedback_type=irrelevant_answer) | [Incorrect](https://app.dosu.dev/response-feedback/59869461-dff6-4dc7-8d79-9c7dd0743c29?feedback_type=incorrect_sources) | [Verbose](https://app.dosu.dev/response-feedback/59869461-dff6-4dc7-8d79-9c7dd0743c29?feedback_type=too_verbose) | [Hallucination](https://app.dosu.dev/response-feedback/59869461-dff6-4dc7-8d79-9c7dd0743c29?feedback_type=hallucination) | [Report 🐛](https://app.dosu.dev/response-feedback/59869461-dff6-4dc7-8d79-9c7dd0743c29?feedback_type=bug_report) | [Other](https://app.dosu.dev/response-feedback/59869461-dff6-4dc7-8d79-9c7dd0743c29?feedback_type=other)</sup> [](https://app.dosu.dev/b4e8e847-d479-4541-83a8-d88d83fea5c9/ask?utm_source=github) [](https://cursor.com/link/prompt?text=You%27re%20absolutely%20right%E2%80%94this%20is%20a%20bug%20in%20DevLake%27s%20schema%2C%20not%20an%20individual%20installation%20issue.%20The%20%60cicd_deployments.name%60%20column%20is%20currently%20defined%20as%20%60varchar%28255%29%60%20in%20the%20codebase%2C%20which%20can%27t%20accommodate%20longer%20deployment%20names%20from%20GitHub%27s%20API.%0A%0AInterestingly%2C%20a%20similar%20migration%20was%20already%20done%20for%20%60cicd_pipelines.name%60%20%28changed%20to%20TEXT%20in%20%5BAugust%202023%5D%28https%3A//github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/core/models/migrationscripts/20230821_modify_cicd_pipelines_to_text.go%29%29%2C%20but%20%60cicd_deployments%60%20was%20never%20updated%E2%80%94thi s%20looks%20like%20an%20oversight.%20DevLake%20has%20fixed%20similar%20varchar%28255%29%20overflow%20issues%20multiple%20times%20across%20different%20plugins%20%28%5B%238250%5D%28https%3A//github.com/apache/incubator-devlake/issues/8250%29%2C%20%5B%238254%5D%28https%3A//github.com/apache/incubator-devlake/issues/8254%29%2C%20%5B%238325%5D%28https%3A//github.com/apache/incubator-devlake/issues/8325%29%2C%20%5B%238545%5D%28https%3A//github.com/apache/incubator-devlake/issues/8545%29%29.%0A%0AA%20PR%20contribution%20would%20very%20likely%20be%20accepted%20since%20there%27s%20clear%20precedent.%20The%20fix%20would%20involve%3A%0A1.%20Updating%20the%20%60Name%60%20field%20in%20%5B%60cicd_deployment.go%60%5D%28https%3A//github.com/apache/incubator-devlake/blob/2c15ad880dce830c6512fa58039527cbf4745b8b/backend/core/models/domainlayer/devops/cicd_deployment.go%23L27%29%20to%20%60gorm%3A%22type%3Atext%22%60%0A2.%20Adding%20a%20migration%20script%20similar%20to%20the%20%60cicd_pipelines%60%20o ne%0A%0ASince%20%40klesh%20mentioned%20planning%20a%20release%20this%20week%2C%20this%20might%20be%20a%20good%20time%20to%20get%20a%20fix%20in.%20I%27d%20suggest%20removing%20the%20stale%20label%20and%20tagging%20it%20appropriately%20so%20it%20doesn%27t%20get%20auto-closed%20again.) [](https://go.dosu.dev/discord-bot) [](https://twitter.com/intent/tweet?text=%40dosu_ai%20helped%20me%20solve%20this%20issue!&url=https%3A//github.com/apache/incubator-devlake/issues/8602) -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
