ShivamSharma43 opened a new pull request, #9331: URL: https://github.com/apache/devlake/pull/9331
### Summary `convert_worklogs` built the `issue_worklogs` id from the Tempo worklog id alone (`tempo:TempoWorklog:<id>`). The tool layer keys worklogs by `(connection_id, tempo_worklog_id)`, so when two connections have a worklog with the same id, both convert to the same domain row and the connection converted last overwrites the other's worklog. Changes: - `tasks/worklog_convertor.go`: the domain id is now `tempo:TempoWorklog:<connectionId>:<tempoWorklogId>`, the id `didgen` generates from the `TempoWorklog` primary key. The row conversion moved into a small `convertWorklog` function so it can be unit tested. The issue and author ids are unchanged. - `tasks/worklog_convertor_test.go` (new): `TestConvertWorklog` checks the converted row, and `TestConvertWorklogIdsAreUniquePerConnection` checks that two connections with worklog `12345` get different ids. - `e2e/snapshot_tables/issue_worklogs.csv`: the expected ids now include the connection id (`tempo:TempoWorklog:1:12345`). No migration: `ConvertWorklogs` uses a full-sync `DataConverter`, so on the next run its first batch deletes the scope's existing rows (same `_raw_data_table` / `_raw_data_params`) before it saves the rows with the new ids. Old-format ids don't linger next to the new ones. ### Does this close any open issues? Closes #9330 ### Screenshots N/A ### Other Information - `go test ./plugins/tempo/tasks/`: pass. `TestConvertWorklogIdsAreUniquePerConnection` fails on `main` (both ids are `tempo:TempoWorklog:12345`). - `go vet`, `gofmt` and `golangci-lint run ./plugins/tempo/...`: clean. - `plugins/tempo/e2e` needs a live `E2E_DB_URL` database, which I didn't run locally. I updated the `TestWorklogDataFlow` snapshot to the new ids, and CI's e2e job covers it. - This doesn't touch the files of the open Tempo PRs #9303, #9319 and #9321. - Suggested label: `pr-type/bug-fix`. - AI assistance disclosure: this change was prepared with the help of Claude Code (Claude Opus 5.5), and I reviewed the diff. The commit carries a `Generated-by:` trailer per the ASF generative tooling guidance. 🤖 Generated with [Claude Code](https://claude.com/claude-code) -- 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]
