dncrews opened a new pull request, #9063:
URL: https://github.com/apache/devlake/pull/9063
### 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:
- Changes the affected live GORM model fields to explicitly use `type:text`.
- Adds a GitHub plugin migration for:
- `_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`, `name`
- Adds a core migration for:
- `cicd_tasks.name`
- `cicd_scopes.name`
- `cicd_releases.name`
- `cicd_releases.display_title`
- `cicd_deployment_commits.name`
- `cicd_deployment_commits.subtask_name`
- `cicd_deployment_commits.ref_name`
- `incidents.component`
- Corrects an existing model/migration mismatch for `cicd_pipelines.name`.
Migration `20230821_modify_cicd_pipelines_to_text` already changes existing
databases to `TEXT`, but `CICDPipeline.Name` still declared `varchar(255)`.
- Adds regression tests for both migration registration/calls and the
affected GORM model tags.
The migrations use the DAL `ModifyColumnType` operation 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:
```bash
go test ./plugins/github/models \
./plugins/github/models/migrationscripts \
./core/models/migrationscripts \
./core/models/domainlayer/devops \
./core/models/domainlayer/ticket \
-count=1
--
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]