-
Notifications
You must be signed in to change notification settings - Fork 552
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix a couple of "Data too long" errors from sonarqube, jira, etc (#7885)
* refactor: remove extraction logic from github graphql collector * fix: pull requests not being updated * refactor: update github job extractor for single record structure * refactor: update github issue extractor to extract single record * refactor: update github deployment extractor to extract single records * refactor: update github account/release extractor to adopt single record extraction * docs: add comments * fix: github issues not being updated * fix: gitub deployment unit test * fix: change jira issue component field to text type * fix: column type should not be parameterized * fix: #7852 sonarqube issues component field data too long * fix: change issue.components to text to avoid data too long error * docs: fix jira issues component tag * fix: change bitbucket issue components field to text * fix: change gitee issue components field to text * fix: change github issue components field to text * fix: change gitlab issue components field to text * fix: #7715 Data too long for column 'project_key' * fix(framework): update trigger api's request body schema (#7888) * fix(framework): update trigger api's request body schema * fix(framework): fix test errors * fix(framework): fix test errors * test(jira): add e2e test for custom account field in issues (#7894) * fix: github graphql collectors are not refetching data in incremental mode (#7878) * refactor: remove extraction logic from github graphql collector * fix: pull requests not being updated * refactor: update github job extractor for single record structure * refactor: update github issue extractor to extract single record * refactor: update github deployment extractor to extract single records * refactor: update github account/release extractor to adopt single record extraction * docs: add comments * fix: github issues not being updated * fix: gitub deployment unit test * fix: github graphql issue collector should order records by CREATED_AT to avoid data missing * fix: linting --------- Co-authored-by: Lynwee <1507509064@qq.com>
- Loading branch information
1 parent
0a7a71e
commit f974bda
Showing
28 changed files
with
403 additions
and
16 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
backend/core/models/migrationscripts/20240813_change_issue_component_type.go
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package migrationscripts | ||
|
||
import ( | ||
"github.com/apache/incubator-devlake/core/context" | ||
"github.com/apache/incubator-devlake/core/errors" | ||
"github.com/apache/incubator-devlake/core/plugin" | ||
) | ||
|
||
var _ plugin.MigrationScript = (*changeIssueComponentType)(nil) | ||
|
||
type changeIssueComponentType struct{} | ||
|
||
func (script *changeIssueComponentType) Up(basicRes context.BasicRes) errors.Error { | ||
return basicRes.GetDal().ModifyColumnType("issues", "components", "text") | ||
} | ||
|
||
func (*changeIssueComponentType) Version() uint64 { | ||
return 20240813153901 | ||
} | ||
|
||
func (*changeIssueComponentType) Name() string { | ||
return "change issues.components type to text" | ||
} |
40 changes: 40 additions & 0 deletions
40
backend/core/models/migrationscripts/20240813_increase_project_key_length.go
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package migrationscripts | ||
|
||
import ( | ||
"github.com/apache/incubator-devlake/core/context" | ||
"github.com/apache/incubator-devlake/core/errors" | ||
"github.com/apache/incubator-devlake/core/plugin" | ||
) | ||
|
||
var _ plugin.MigrationScript = (*increaseProjectKeyLength)(nil) | ||
|
||
type increaseProjectKeyLength struct{} | ||
|
||
func (script *increaseProjectKeyLength) Up(basicRes context.BasicRes) errors.Error { | ||
return basicRes.GetDal().ModifyColumnType("cq_projects", "project_key", "varchar(500)") | ||
} | ||
|
||
func (*increaseProjectKeyLength) Version() uint64 { | ||
return 20240813160242 | ||
} | ||
|
||
func (*increaseProjectKeyLength) Name() string { | ||
return "increase cq_projects.project_key length to 500" | ||
} |
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
backend/plugins/bitbucket/models/migrationscripts/20240813_change_issue_component_type.go
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package migrationscripts | ||
|
||
import ( | ||
"github.com/apache/incubator-devlake/core/context" | ||
"github.com/apache/incubator-devlake/core/errors" | ||
"github.com/apache/incubator-devlake/core/plugin" | ||
) | ||
|
||
var _ plugin.MigrationScript = (*changeIssueComponentType)(nil) | ||
|
||
type changeIssueComponentType struct{} | ||
|
||
func (script *changeIssueComponentType) Up(basicRes context.BasicRes) errors.Error { | ||
return basicRes.GetDal().ModifyColumnType("_tool_bitbucket_issues", "components", "text") | ||
} | ||
|
||
func (*changeIssueComponentType) Version() uint64 { | ||
return 20240813154323 | ||
} | ||
|
||
func (*changeIssueComponentType) Name() string { | ||
return "change _tool_bitbucket_issues.components type to text" | ||
} |
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
backend/plugins/gitee/models/migrationscripts/20240813_change_issue_component_type.go
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package migrationscripts | ||
|
||
import ( | ||
"github.com/apache/incubator-devlake/core/context" | ||
"github.com/apache/incubator-devlake/core/errors" | ||
"github.com/apache/incubator-devlake/core/plugin" | ||
) | ||
|
||
var _ plugin.MigrationScript = (*changeIssueComponentType)(nil) | ||
|
||
type changeIssueComponentType struct{} | ||
|
||
func (script *changeIssueComponentType) Up(basicRes context.BasicRes) errors.Error { | ||
return basicRes.GetDal().ModifyColumnType("_tool_gitee_issues", "components", "text") | ||
} | ||
|
||
func (*changeIssueComponentType) Version() uint64 { | ||
return 20240813154445 | ||
} | ||
|
||
func (*changeIssueComponentType) Name() string { | ||
return "change _tool_gitee_issues.components type to text" | ||
} |
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
backend/plugins/github/models/migrationscripts/20240813_change_issue_component_type.go
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package migrationscripts | ||
|
||
import ( | ||
"github.com/apache/incubator-devlake/core/context" | ||
"github.com/apache/incubator-devlake/core/errors" | ||
"github.com/apache/incubator-devlake/core/plugin" | ||
) | ||
|
||
var _ plugin.MigrationScript = (*changeIssueComponentType)(nil) | ||
|
||
type changeIssueComponentType struct{} | ||
|
||
func (script *changeIssueComponentType) Up(basicRes context.BasicRes) errors.Error { | ||
return basicRes.GetDal().ModifyColumnType("_tool_github_issues", "components", "text") | ||
} | ||
|
||
func (*changeIssueComponentType) Version() uint64 { | ||
return 20240813154633 | ||
} | ||
|
||
func (*changeIssueComponentType) Name() string { | ||
return "change _tool_github_issues.components type to text" | ||
} |
This file contains 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
This file contains 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
40 changes: 40 additions & 0 deletions
40
backend/plugins/gitlab/models/migrationscripts/20240813_change_issue_component_type.go
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/* | ||
Licensed to the Apache Software Foundation (ASF) under one or more | ||
contributor license agreements. See the NOTICE file distributed with | ||
this work for additional information regarding copyright ownership. | ||
The ASF licenses this file to You under the Apache License, Version 2.0 | ||
(the "License"); you may not use this file except in compliance with | ||
the License. You may obtain a copy of the License at | ||
http://www.apache.org/licenses/LICENSE-2.0 | ||
Unless required by applicable law or agreed to in writing, software | ||
distributed under the License is distributed on an "AS IS" BASIS, | ||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
See the License for the specific language governing permissions and | ||
limitations under the License. | ||
*/ | ||
|
||
package migrationscripts | ||
|
||
import ( | ||
"github.com/apache/incubator-devlake/core/context" | ||
"github.com/apache/incubator-devlake/core/errors" | ||
"github.com/apache/incubator-devlake/core/plugin" | ||
) | ||
|
||
var _ plugin.MigrationScript = (*changeIssueComponentType)(nil) | ||
|
||
type changeIssueComponentType struct{} | ||
|
||
func (script *changeIssueComponentType) Up(basicRes context.BasicRes) errors.Error { | ||
return basicRes.GetDal().ModifyColumnType("_tool_gitlab_issues", "components", "text") | ||
} | ||
|
||
func (*changeIssueComponentType) Version() uint64 { | ||
return 20240813154323 | ||
} | ||
|
||
func (*changeIssueComponentType) Name() string { | ||
return "change _tool_gitlab_issues.components type to text" | ||
} |
This file contains 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
This file contains 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
Oops, something went wrong.