[Bug][Tempo] GET /connections/{id}/teams always fails to decode the teams page, and remote scope search only sees the first 50 teams
Mantenedores costumam responder em até 2 dias
Avaliação
- Dificuldade
- 3/5
- Tempo estimado
- 1-2 dias
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Bug
- Clareza
- Claramente especificada
- Status de atividade
- Ativa
- Stack de tecnologia
- go
- Domínio
- api, backend-api-design
Direção de pesquisa
Start with backend/plugins/tempo/api/connection.go (GetTeams) and api/remote.go (searchTempoRemoteTeams); compare their requests with listTempoRemoteTeams and the collectors, which already follow metadata.next. Add coverage using a fake API client for multiple response pages. Done means GetTeams returns every team and remote scope search considers all matching teams; linked PR #9321 is already open.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Search before asking
- I had searched in the issues and found no similar issues.
What happened
GET /plugins/tempo/connections/{connectionId}/teams (GetTeams in backend/plugins/tempo/api/connection.go) always fails with failed to unmarshal teams response.
It decodes the GET /4/teams response into []models.TempoTeamResponse, but Tempo v4 returns a page object (PageableTeam: self, metadata, results), not an array. On main (84e3707), decoding such a body with api.UnmarshalResponse into []models.TempoTeamResponse fails with error decoding response from https://api.tempo.io/4/teams: raw response: {"self":...,"metadata":{...},"results":[...]}. Even if it decoded, it would only return the first page (Tempo's default limit is 50).
The remote scope search (searchTempoRemoteTeams in api/remote.go, behind search-remote-scopes) has the same single-request issue. It sends one GET /4/teams?name=... without offset/limit, so it only looks at the first 50 teams the API returns. Its own page/pageSize paging then works on that list, so if more than 50 teams match, the later ones can't be found.
What do you expect to happen
GET /plugins/tempo/connections/{id}/teams returns every team of the Tempo instance, and the remote scope search looks at every matching team. Both should follow metadata.next like listTempoRemoteTeams and the collectors do since #9307.
How to reproduce
- Create a Tempo connection.
curl http://localhost:8080/plugins/tempo/connections/1/teams: the request fails withfailed to unmarshal teams response.
Anything else
Proposed fix (I have a PR ready): add a listAllTempoTeams helper in api/remote.go that pages through GET /4/teams with offset/limit until metadata.next is absent. Use it in GetTeams and in searchTempoRemoteTeams, and add unit tests with a fake API client.
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
- Linguagem predominante
- Go
- Estrelas
- 3.2k
- Forks
- 832
- Merge médio
- 1d 21h
- PRs com merge (30d)
- 78
Preparar o ambiente
Inicia o contêiner de desenvolvimento do projeto no navegador, com a sua própria conta do GitHub.
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Sem guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de apache/devlake
-
[Bug][Testmo] Runs, milestones and automation runs: only the first 100 are collectedTalvez já em andamento @ShivamSharma43 assumiu há 1 dia. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 2 dias
-
[Bug][Tempo] Worklog domain ids lack the connection id, so connections with the same worklog id overwrite each otherTalvez já em andamento @ShivamSharma43 assumiu há 1 dia. Aberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
Mantenedores costumam responder em até 2 dias
-
[Bug][linker] LinkPrToIssue never matches lowercase issue keys (e.g. in branch names)Talvez já em andamento @VictorColomb assumiu há 5 dias. Abertatype/bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 78/100
apache/devlake#9283 · 1 comentário · 1 reação · 1 responsável ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 60/100
Mantenedores costumam responder em até 2 dias
-
type/bug
Dificuldade 4/5 3-5 dias Facilidade para iniciantes 51/100
Mantenedores costumam responder em até 2 dias
Todas as issues de apache/devlake
Issues semelhantes
-
Logging into a locally started instance clears its container reference, causing stop to do nothingAberta
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 79/100
microcks/microcks-cli#620 ·
Mantenedores costumam responder em até 1 dia
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
teradata-labs/loom#574 ·
Mantenedores costumam responder em até 1 dia
-
cli: name the CRID when saved link limits fail after publish; soften plain-republish mint warningAbertaenhancement pr-polish-followup priority: low
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
layervai/qurl-integrations#1994 ·
Mantenedores costumam responder em até 1 dia
-
bug needs-acceptance wg/router-models-inference-runtime
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
vllm-project/semantic-router#5891 ·
Mantenedores costumam responder em até 1 dia
-
[Bug]: `Match exec "step ssh check-host %h"` causes SSH connections through ProxyJump to hangAbertabug needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 74/100
Mantenedores costumam responder em até 1 dia