narrowizard commented on issue #8216:
URL:
https://github.com/apache/incubator-devlake/issues/8216#issuecomment-2496597643
# Plan
The implementation involves two APIs for uploading issues.csv and
issue_repo_commits.csv data, respectively.
## For issues.csv:
- Parameters: boardId, boardName, file
- Existing Logic:
1. Update data in the boards table based on boardId.
2. Clear data in the issues and issue_labels tables (clearing logic:
remove records associated only with the given boardId).
3. Clear data in the board_issues table.
4. Create or update records in the issue_labels table based on the
uploaded file (primary key: issue_id, label_name).
5. Create or update records in the board_issues table based on the
uploaded file (primary key: board_id, issue_id).
6. Create new records in the issues table based on the uploaded file.
- Incremental Update Logic:
1. Add a new parameter: incremental = false.
2. When incremental = true:
- Skip the data-clearing steps from the existing logic.
- Modify the issues table operation to CreateOrUpdate (primary key: id).
- Retain all other existing logic.
## For issue_repo_commits.csv:
- Parameters: boardId, file
- Existing Logic:
1. Clear data in the issue_repo_commits and issue_commits tables (clearing
logic: remove records associated only with the given boardId).
2. Create new records in the issue_repo_commits and issue_commits tables
based on the uploaded file.
- Incremental Update Logic:
1. Add a new parameter: incremental = false.
2. When incremental = true:
- Skip the data-clearing steps from the existing logic.
- Modify the issue_repo_commits table operation to CreateOrUpdate
(primary key: issue_id, repo_url, commit_sha).
> This plan ensures support for incremental updates while retaining the full
upload functionality when needed.
--
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]