[Bug][Tempo] Worklog domain ids lack the connection id, so connections with the same worklog id overwrite each other
Les mainteneurs répondent en général sous 2 jours
Évaluation
- Difficulté
- 2/5
- Temps estimé
- 1-3 heures
- Accessibilité débutants
- 78/100
- Type d'issue
- Bug
- Clarté
- Clairement spécifiée
- Activité
- Active
- Stack technique
- go
- Domaine
- data-engineering
Piste de recherche
Commence par backend/plugins/tempo/tasks/worklog_convertor.go et examine comment il construit l’ID de domaine du worklog ; compare-le à la clé primaire de TempoWorklog et aux autres ID propres à une connexion décrits dans l’issue. Ajoute un test unitaire couvrant des ID de worklog identiques provenant de deux connexions. Le travail est terminé lorsque chaque connexion produit une ligne issue_worklogs distincte et que le test réussit.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Description
Search before asking
- I had searched in the issues and found no similar issues.
What happened
The Tempo convert_worklogs subtask (backend/plugins/tempo/tasks/worklog_convertor.go) builds the issue_worklogs id from the Tempo worklog id alone:
domainWorklogId := fmt.Sprintf("tempo:TempoWorklog:%d", tempoWorklog.TempoWorklogId)
The tool layer keys worklogs by (connection_id, tempo_worklog_id) (models.TempoWorklog), and the other ids of the same row (jira:JiraIssue:<conn>:<id>, jira:JiraAccount:<conn>:<id>) carry the connection id. Domain ids that didgen generates for other plugins carry it too. The worklog id doesn't.
So when two Tempo connections have a worklog with the same tempoWorklogId (two connections to the same Tempo instance, or two instances whose worklog ids overlap), both convert to the same issue_worklogs primary key. The connection converted last overwrites the other connection's row (its issue_id, author_id and _raw_data_params), so one of the two worklogs disappears from the domain layer.
Example: connection 1 and connection 2 both have worklog 12345. After converting connection 1 and then connection 2, issue_worklogs has one row, tempo:TempoWorklog:12345, which points to jira:JiraIssue:2:.... Connection 1's worklog is gone. Re-running connection 1 brings it back and drops connection 2's.
What do you expect to happen
Each connection's worklog gets its own domain row: tempo:TempoWorklog:<connectionId>:<tempoWorklogId>, the id didgen would generate from the TempoWorklog primary key.
How to reproduce
- Create two Tempo connections (ids 1 and 2) that both return a worklog with the same
tempoWorklogId. - Collect, extract and convert worklogs for a team scope of each connection.
SELECT id, issue_id, _raw_data_params FROM issue_worklogs WHERE id LIKE 'tempo:%'shows one row for that worklog instead of two.
Anything else
Proposed fix (I have a PR ready): add the connection id to the domain worklog id and add a unit test. No migration is needed: the converter is a full-sync DataConverter, so its first batch deletes the scope's old rows (same _raw_data_table / _raw_data_params) before it saves the rows with the new ids.
Version
main
Are you willing to submit PR?
- Yes I am willing to submit a PR!
Code of Conduct
- I agree to follow this project's Code of Conduct
- Langage dominant
- Go
- Étoiles
- 3.2k
- Forks
- 832
- Merge moyen
- 1 j 21 h
- PR mergées (30 j)
- 78
Préparer son environnement
Lance le conteneur de développement du projet dans votre navigateur, avec votre propre compte GitHub.
- Aucun Dockerfile ni fichier Docker Compose
- Propose un modèle de pull request
- Aucun guide de contribution
Par où commencer
- Lisez l'issue en entier, puis le guide de contribution du projet.
- Signalez en commentaire que vous la prenez — cela évite que deux personnes fassent le même travail.
- Forkez le dépôt et travaillez sur une branche.
- Ouvrez une pull request qui référence le numéro de l'issue.
Autres issues de apache/devlake
-
[Bug][Testmo] Runs, milestones and automation runs: only the first 100 are collectedPeut-être pris @ShivamSharma43 l’a pris aujourd’hui. Ouverte
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
Les mainteneurs répondent en général sous 2 jours
-
[Bug][linker] LinkPrToIssue never matches lowercase issue keys (e.g. in branch names)Peut-être pris @VictorColomb l’a pris il y a 4 jours. Ouvertetype/bug
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
apache/devlake#9283 · 1 commentaire · 1 réaction · 1 personne assignée ·
Les mainteneurs répondent en général sous 2 jours
-
Difficulté 2/5 1-3 heures Accessibilité débutants 60/100
Les mainteneurs répondent en général sous 2 jours
-
type/bug
Difficulté 4/5 3-5 jours Accessibilité débutants 51/100
Les mainteneurs répondent en général sous 2 jours
-
[Bug][JIRA Service API TOKEN] Jira API Gateway: saved service-account token truncated by varchar(255), causing Base64 errors and HTTP 500Peut-être pris @RyoKusnadi l’a pris aujourd’hui. Ouvertetype/bug
Difficulté 3/5 1-2 jours Accessibilité débutants 58/100
apache/devlake#9328 · 1 commentaire ·
Les mainteneurs répondent en général sous 2 jours
Toutes les issues de apache/devlake
Issues similaires
-
Add an MCP server: imageatOuverteneeds-triage
Difficulté 2/5 1-3 heures Accessibilité débutants 72/100
stacklok/toolhive-catalog#1890 ·
Les mainteneurs répondent en général sous 1 jour
-
Difficulté 2/5 1-3 heures Accessibilité débutants 76/100
integrations/terraform-provider-github#3719 · 1 commentaire ·
Les mainteneurs répondent en général sous 1 jour
-
Wayfinder sample agents don't reach the Data Plane on the quickstart packPeut-être pris Une pull request liée à cette issue est ouverte ou déjà fusionnée. OuverteType/Bug
Difficulté 2/5 1-3 heures Accessibilité débutants 82/100
thunder-id/thunderid#6402 ·
Les mainteneurs répondent en général sous 1 jour
-
GoStratumEngineOuverteaddition
Difficulté 1/5 Moins d'une heure Accessibilité débutants 72/100
awesome-selfhosted/awesome-selfhosted-data#3290 ·
Les mainteneurs répondent en général sous 1 jour
-
log4j2.xml from orchestration.extraConfiguration is rendered twice, and the install fails when orchestration.log4j2 is also setPeut-être pris @irisfield l’a pris aujourd’hui. Ouverteplatform/local
Difficulté 2/5 1-3 heures Accessibilité débutants 78/100
camunda/camunda-platform-helm#7854 ·
Les mainteneurs répondent en général sous 1 jour