test(messaging): wait for the applied callback counter in the dev end-to-end check
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
- 88/100
Línea de trabajo
Lee products/messaging/scripts/test-dev.sh y encuentra dónde comprueba la métrica messaging_provider_callbacks_total{outcome="applied"} después de esperar al estado del SMS. Consulta la métrica periódicamente dentro de la espera acotada existente, mantén el recuento esperado en 1 e informa del último valor si se agota el tiempo de espera. Ejecuta el script con Docker y luego compruébalo con ShellCheck y shfmt -d; estará listo cuando la comprobación espere al contador y siga rechazando los callbacks duplicados.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
What fails
products/messaging/scripts/test-dev.sh can fail in the Messaging PostgreSQL runtime CI job with:
test-dev: GET /v1/messages/<sms>: status delivered
test-dev: GET /v1/messages/<email>: status submitted
test-dev: Mailpit holds 1 message
test-dev: 0 signed callbacks were applied, expected 1
It failed once on pull request #2913, in a run whose changes touch no Messaging code or script. The same job passed on the previous two runs.
Why
The script waits, with a bound, until the SMS reads delivered. It then reads messaging_provider_callbacks_total{outcome="applied"} once.
The runtime records that counter after the callback is handled. In crates/registry-messaging/src/callbacks.rs, the handler awaits receive_callback, which commits the status change, and then calls state.metrics.record_callback(outcome). A status read that lands between the commit and the counter update sees delivered while the counter is still 0. The single metrics read then fails the check.
The runtime behaviour is fine: the counter is eventually correct, and nothing reads it as a commit signal. The check is too strict about ordering.
Proposed change
Read the applied counter inside the same kind of bounded wait the script already uses for the message status. For example, poll $dev_metrics every 0.5 seconds until the applied count is 1 or settle_seconds passes, then fail with the last value read.
Keep the exact expectation of 1, so a duplicate callback still fails the check.
Verification
products/messaging/scripts/test-dev.shpasses locally with Docker.- ShellCheck and
shfmt -dare clean on the script. - Optional: inject a short delay before
record_callbackin a local build and confirm that the check waits rather than fails.
- Lenguaje dominante
- Rust
- Estrellas
- 2
- Forks
- 0
- Merge medio
- 13 h 7 min
- PR fusionados (30 d)
- 119
Preparar el entorno
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 registrystack/registry-stack
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
registrystack/registry-stack#2924 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
registrystack/registry-stack#2890 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
registrystack/registry-stack#2873 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Give the TypeScript live suite a regular execution pathPosiblemente ocupada @jeremi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
registrystack/registry-stack#2849 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
registrystack/registry-stack#2848 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de registrystack/registry-stack
Issues similares
-
Mobile release verification reports missing build inputs with a custom Cargo target directoryAbiertobug good first issue help wanted
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
getsotto/sotto-authenticator#139 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
foundry-rs/starknet-foundry#4733 ·
Los mantenedores suelen responder en 4 días
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 86/100
-
autofix:working
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100