fix: widen unbounded GitHub and CI/CD string columns - #9063
Open
dncrews wants to merge 3 commits into
Open
Conversation
GET /blueprints/:blueprintId/pipelines runs COUNT(*) and a filtered SELECT on _devlake_pipelines.blueprint_id, but the column was unindexed. On instances with tens of thousands of pipeline rows this forces a full table scan on every request; observed ~30s for a table of 34k rows, causing upstream request timeouts in config-ui. Add a gorm index tag on Pipeline.BlueprintId for fresh installs and a migration script to add the index to existing installs. Signed-off-by: Dan Crews <crewsd@gmail.com>
Signed-off-by: Dan Crews <crewsd@gmail.com>
Signed-off-by: Dan Crews <crewsd@gmail.com>
dncrews
force-pushed
the
fix/varchar-to-text-many
branch
from
August 19, 2026 20:36
5e1fb96 to
b0005c1
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Several GitHub API fields and CI/CD domain fields can exceed 255 characters, but their database columns were defined as
varchar(255). This causes collection or conversion failures when DevLake receives longer values.This PR:
type:text._tool_github_jobs:name,runner_name,environment_tool_github_runs:head_branch,path_tool_github_pull_requests:head_ref,base_ref,author_name,merged_by_name_tool_github_deployments:environment,ref_name,description_tool_github_accounts:company,namecicd_tasks.namecicd_scopes.namecicd_releases.namecicd_releases.display_titlecicd_deployment_commits.namecicd_deployment_commits.subtask_namecicd_deployment_commits.ref_nameincidents.componentcicd_pipelines.name. Migration20230821_modify_cicd_pipelines_to_textalready changes existing databases toTEXT, butCICDPipeline.Namestill declaredvarchar(255).The migrations use the DAL
ModifyColumnTypeoperation and stop on the first failed column alteration.Does this close any open issues?
N/A
Screenshots
N/A — database schema and backend model changes only.
Other Information
This PR is stacked on #9059 and should initially be reviewed against
fix/pipeline-index.Verification performed:
go test ./plugins/github/models \ ./plugins/github/models/migrationscripts \ ./core/models/migrationscripts \ ./core/models/domainlayer/devops \ ./core/models/domainlayer/ticket \ -count=1