maintainer-approval uses historical APPROVED reviews instead of latest review state per reviewer
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 3/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Tranquilo
- Stack tecnológico
- github-actions
- Área
- ci-cd
Línea de trabajo
Empieza por el flujo de trabajo de aprobación del maintainer y la prueba de aprobación añadida en #4918. Sigue las tres comprobaciones del historial de revisiones descritas en el issue e inspecciona cómo se representan los inicios de sesión y los estados de los revisores. Añade cobertura para una aprobación seguida de CHANGES_REQUESTED, ejecuta después las pruebas existentes del flujo de trabajo y confirma que solo cuenta el estado más reciente.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Describe the issue
The maintainer-approval workflow appears to treat review approval as "has this user ever left an APPROVED review on the PR" rather than "is this user's latest review state currently APPROVED".
That means an older approval can still satisfy the workflow even if the same reviewer later changes their review to CHANGES_REQUESTED.
Why this looks incorrect
The workflow currently checks raw review history in three places:
- maintainer approval path uses
reviews.find(...)withstate === "APPROVED" - maintainer-authored PR path uses
reviews.some(...)withstate === "APPROVED" - per-path approval builds
approverLoginsfrom all reviews withstate === "APPROVED"
It does not first reduce reviews to the latest state per reviewer.
Repro
- Open a PR that requires approval from a maintainer or a path owner
- Have reviewer
XsubmitAPPROVED - Have the same reviewer
Xlater submitCHANGES_REQUESTED - Wait for
maintainer-approvalto re-run on the review event
Expected behavior
Only the latest review state per reviewer should count.
If reviewer X later changes their review to CHANGES_REQUESTED, their earlier approval should no longer satisfy the workflow.
Actual behavior
An older APPROVED review can still satisfy the workflow because the script checks for any matching approval record in the full review list.
Relevant context
This behavior seems to date back to the initial workflow in #4912 and was preserved when per-path approval was added in #4918.
#4918 also added a test that CHANGES_REQUESTED does not count as approval, but that test only covers a PR with a single CHANGES_REQUESTED review. It does not cover the more important case where the same reviewer first approves and later requests changes.
Suggested fix direction
Collapse the review list to the latest review state per normalized login before evaluating:
- maintainer approval
- maintainer-authored PR approval
- per-path owner approval
That would make the workflow reflect current approval state rather than historical approval existence.
- Lenguaje dominante
- Go
- Estrellas
- 396
- Forks
- 233
- Merge medio
- 2 d 52 min
- PR fusionados (30 d)
- 276
Guía de contribución
No hay ninguna guía de contribución indexada para este repositorio
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 databricks/cli
-
DABs
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
databricks/cli#6670 ·
-
DABs PyDABs
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
databricks/cli#3926 · 4 comentarios ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 68/100
databricks/cli#6786 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
databricks/cli#6785 ·
-
Dificultad 4/5 3-5 días Aptitud para principiantes 45/100
databricks/cli#6770 ·
Todos los issues de databricks/cli
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
-
kind/bug needs-triage
Dificultad 1/5 Menos de una hora Aptitud para principiantes 72/100
matrixorigin/matrixone#29223 ·
-
needs-acceptance wg/data-plane-networking
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
vllm-project/semantic-router#4024 · 1 comentario ·