ListEvents can exceed page size after label filtering
Los mantenedores suelen responder en 2 días
Nadie ha tomado este issue todavía.
- #7086 de @rootp1 — cerrado sin fusionar
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 62/100
Línea de trabajo
Comienza en pkg/app/server/grpcapi/web_api.go, en WebAPI.ListEvents y su bucle de paginación filtrado por etiquetas, y compara después la ruta equivalente de ListDeployments. Añade o actualiza pruebas para resultados de etiquetas densos, dispersos y sin coincidencias, y verifica que las respuestas respeten PageSize mientras que la continuación mediante cursor no tenga eventos duplicados ni omitidos.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What happened:
WebAPI.ListEvents applies label filtering after fetching datastore pages, then keeps appending matching events while scanning additional pages until it has at least PageSize matches. If the final scanned page contains multiple matching events after the threshold is crossed, the response can exceed the requested logical page size. The handler then returns the datastore cursor from the final scanned page, which makes filtered pagination unstable for event timelines.
Summary
ListEvents can return an oversized filtered response when label matches are spread across multiple datastore pages.
Affected Area
pkg/app/server/grpcapi/web_api.go, specifically WebAPI.ListEvents and its label-filtered pagination path.
What you expected to happen:
ListEvents should return one logical filtered page, no larger than the requested PageSize, and provide a cursor suitable for continuing to the next filtered page without duplicates or dropped events.
Expected Behaviour
The API should enforce a stable logical page size after label filtering and return a cursor for the next filtered page.
How to reproduce it:
- Seed or mock multiple datastore pages of events with label matches spread across pages.
- Call
WebAPI.ListEventswithOptions.Labelsand aPageSizesmaller than the total matching events. - Make the first page contain fewer matching events than
PageSize, and a later fetched page contain enough matches to cross the threshold by more than one event. - Observe that the response includes more than
PageSizeevents because every matching event from the final scanned page is appended.
Actual Behaviour
The endpoint can return an uncapped list of matched events encountered during the scan, exceeding the requested page size.
Technical Evidence
ListEvents builds datastore ListOptions with Limit: pageSize, fetches one page, filters by labels in memory, then repeats while len(filtered) < pageSize. Inside the repeat loop, every matching event from the newly fetched datastore page is appended. There is currently a TODO noting the overflow risk immediately before returning the response:
pkg/app/server/grpcapi/web_api.go:// TODO: Think about possibility that the response of ListEvents exceeds the page size
This mirrors the same post-filter pagination risk that exists in ListDeployments.
Suspected Root Cause
Label filtering happens after datastore pagination, but the filtered slice is never capped back to the requested logical page size before the response is returned. The returned cursor is the datastore cursor from the final scanned page.
Proposed Direction
Refactor the filtered pagination path so ListEvents only returns up to PageSize filtered events. If possible, share the helper with the equivalent ListDeployments path so both handlers use consistent cursor semantics.
Acceptance Criteria
ListEventsenforces a stable logical page size after label filtering.- Cursor-based continuation yields no duplicate or dropped events.
- Tests cover dense matches, sparse matches, and zero-match scenarios.
Environment:
pipedversion: Not applicable; this is a control-plane WebAPI handler issue.control-planeversion: Current upstreammasteras of 2026-07-24.- Others: Not applicable.
- Lenguaje dominante
- Go
- Estrellas
- 1.4k
- Forks
- 391
- Merge medio
- 4 d 1 h
- PR fusionados (30 d)
- 58
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de pipe-cd/pipecd
-
Applications at the repository root are not triggered by new commitsPosiblemente ocupada @Daksha1611 la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
Los mantenedores suelen responder en 2 días
-
pipedv1 kubernetes plugins ignore trafficRouting.istio.host in K8S_TRAFFIC_ROUTINGPosiblemente ocupada @Dhirenderchoudhary la tomó hoy. Abierto
Dificultad 2/5 Medio día Aptitud para principiantes 74/100
pipe-cd/pipecd#7626 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 2 días
-
pipectl transfer restore application drops backed-up labelsPosiblemente ocupada @bhavishyajain545 la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
pipe-cd/pipecd#7622 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 83/100
Los mantenedores suelen responder en 2 días
Todos los issues de pipe-cd/pipecd
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
docker-compose: postgres healthcheck should probe TCP (pg_isready -h localhost)Posiblemente ocupada @zezo-mohamed22 la tomó hoy. Abierto
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
OneBusAway/watchdog#305 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
self-care self-care:agent-discoverability
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
githubnext/gh-cao#20928 ·
Los mantenedores suelen responder en 1 día
-
automation documentation
Dificultad 1/5 Menos de una hora Aptitud para principiantes 70/100
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
SocialGouv/iterion#3287 ·
Los mantenedores suelen responder en 1 día