Logs client ignores `from` and `take` for checkpoint pagination
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 80/100
Línea de trabajo
Empieza en lib/auth0/logs/client.rb en Auth0::Logs::Client#list y observa cómo se copian los query_params incluidos en la lista blanca (page, per_page, sort, fields, include_fields, include_totals, search) fuera de **params; añade from y take de la misma forma. Comprueba si el código se ramifica entre paginación por offset y por checkpoint, y si include_totals entra en conflicto con take. Actualiza spec/auth0/logs/client_spec.rb con una expectativa de petición para from/take, luego ejecútala mediante rspec; terminado cuando la cadena de consulta emitida lleve ambos parámetros y las pruebas de paginación existentes sigan pasando.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Checklist
- I have looked into the Readme and Examples, and have not found a suitable solution or answer.
- I have looked into the API documentation and have not found a suitable solution or answer.
- I have searched the issues and have not found a suitable solution or answer.
- I have searched the Auth0 Community forums and have not found a suitable solution or answer.
- I agree to the terms within the Auth0 Code of Conduct.
Description
The Auth0 Management API supports checkpoint pagination for tenant logs using the from and take query parameters.
However, Auth0::Logs::Client#list accepts these arguments through **params, but does not add them to the request query parameters. As a result, the arguments are silently ignored.
I expected the following call:
client.logs.list(
from: checkpoint_log_id,
take: 100
)
to send a request equivalent to:
GET /api/v2/logs?from=CHECKPOINT_LOG_ID&take=100
Instead, checkpoint pagination is not applied, and the default offset-pagination parameters are used.
Reproduction
-
Install version 6.7.0 of the
auth0gem.gem "auth0", "6.7.0" -
Create a Management API client using credentials with the
read:logsscope.client = Auth0::Client.new( domain: ENV.fetch("AUTH0_DOMAIN"), client_id: ENV.fetch("AUTH0_CLIENT_ID"), client_secret: ENV.fetch("AUTH0_CLIENT_SECRET") ) -
Obtain an existing tenant log ID and call
logs.listusing it as the checkpoint.logs = client.logs.list( from: checkpoint_log_id, take: 100 ).to_a -
Inspect the outgoing request or
lib/auth0/logs/client.rb.Auth0::Logs::Client#listacceptsfromandtakethrough**params, but does not copy them intoquery_params.The implementation only handles the following query parameters:
pageper_pagesortfieldsinclude_fieldsinclude_totalssearch
Therefore,
fromandtakeare not included in the request.
This issue is consistently reproducible.
Additional context
The Auth0 documentation describes from and take as the parameters for retrieving logs by checkpoint:
- https://auth0.com/docs/deploy-monitor/logs/retrieve-log-events-using-mgmt-api
- https://auth0.com/docs/api/management/v2/logs/get-logs
The method documentation also mentions checkpoint pagination, but the corresponding parameters are not handled by the implementation.
ruby-auth0 version
6.7.0
Ruby version
4.0.10
- Lenguaje dominante
- Ruby
- Estrellas
- 205
- Forks
- 144
- Merge medio
- 1 d 6 h
- PR fusionados (30 d)
- 12
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 auth0/ruby-auth0
-
Retrying a multipart request raises "Cannot write to closed encoder"Posiblemente ocupada @RaphaelFakhri la tomó hace 30 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 56/100
auth0/ruby-auth0#818 ·
Los mantenedores suelen responder en 1 día
-
feature request
Dificultad 3/5 1-2 días Aptitud para principiantes 45/100
auth0/ruby-auth0#709 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 50/100
auth0/ruby-auth0#610 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Rate limit data returned from API methodsPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertofeature request
Dificultad 5/5 Más de una semana Aptitud para principiantes 32/100
auth0/ruby-auth0#606 · 2 comentarios · 1 reacción ·
Los mantenedores suelen responder en 1 día
-
MFA API Bearer token issuePosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertobug
Dificultad 3/5 1-2 días Aptitud para principiantes 35/100
auth0/ruby-auth0#556 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
Todos los issues de auth0/ruby-auth0
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
TarteelAI/quranic-universal-library#1111 ·
Los mantenedores suelen responder en 1 día
-
Generated cask uses deprecated `postflight` stanza; Homebrew 7 warns on every commandPosiblemente ocupada @k4kratik la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
sachincool/cruft#4 ·
-
load_reserved() and store_conditional() call memory_model_acquire() before the memory accessAbierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
riscv/riscv-unified-db#2859 ·
Los mantenedores suelen responder en 2 días
-
agent-driven deployment documentation future releases nice to have
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
changesets
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
openstreetmap/openstreetmap-website#7629 · 1 comentario ·
Los mantenedores suelen responder en 1 día