Multi-approval task accepts a repeat vote from a team-assigned reviewer with HTTP 200 and drops it
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 1-2 días
- Aptitud para principiantes
- 68/100
Línea de trabajo
Start with WorkflowHandler.handleMultiApproval in governance/workflows/WorkflowHandler.java, then trace how TaskWorkflowHandler.resolveWorkflowTask and TaskRepository.requireAssigneeForWorkflowApproval handle repeat votes by team and direct user assignees. Extend WorkflowDefinitionResourceIT.test_WorkflowApprovalThresholdReturnsOpenTaskUntilThresholdIsMet with the team-assignee case. Done when both assignee types receive the same 4xx with an already-voted message on a repeat vote, and the voter remains listed once.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
On a multi-approval workflow task (a userApprovalTask node with approvalThreshold above 1), a reviewer who is assigned through a team can vote twice. The second POST /api/v1/tasks/{id}/resolve returns HTTP 200 with the task still Open, and the vote is dropped with only a server log line. The caller cannot tell a recorded vote from an ignored one, and a reviewer cannot change a vote.
Why it happens, from the code on main:
WorkflowHandler.handleMultiApproval(governance/workflows/WorkflowHandler.java, around lines 1425-1428) returnsfalsewhen the voter is already inapproversListorrejectersList, logging[MultiApproval] User '...' has already voted on this task.resolveTaskWithFreshReadsturnsfalseintoWAITING_FOR_VOTES, andTaskWorkflowHandler.resolveWorkflowTaskanswers 200 with the refreshed open task.- A reviewer assigned directly as a user does not hit this path a second time, because
removeTaskFromVoterFeedForTaskEntitydrops the user fromtask.assigneesafter the first vote andTaskRepository.requireAssigneeForWorkflowApprovalthen answers 403. A team entry is never removed fromtask.assignees(the remover matches assignee names against the user name), so a team member still passes the assignee check and reaches the silent drop.
Evidence from a throwaway integration test that set the seeded RequestApprovalTaskWorkflow review node to approvalThreshold 2 and reviewed an ontology release with a team of two members as the reviewer. Member M1 approved, then approved again:
m1-approve | HTTP 200 in 4386ms body: status=Open stage=review assignees=[team:..._team] ...
after-m1-approve flowable | vars={approversList=[..._m1], approvalThreshold=2, votedUsers=[..._m1], ...}
m1-approve-again | HTTP 200 in 1153ms body: status=Open stage=review assignees=[team:..._team] ...
after-m1-approve-again flowable | vars={approversList=[..._m1], approvalThreshold=2, votedUsers=[..._m1], ...}
The same test showed the direct-user case for comparison: the second vote by user R1 returned HTTP 403 ... operations [ResolveTask] not allowed.
What we want
A repeat vote on a multi-approval task is refused with an explicit error (409 or 403, consistent for user and team assignees) instead of a 200 that drops the vote. The response should say the caller has already voted on this task.
Done when
- A reviewer assigned through a team who resolves the same multi-approval task twice gets a 4xx on the second call, and
approversList/rejectersListstill list them once. - A reviewer assigned directly as a user gets the same status code on a repeat vote.
WorkflowDefinitionResourceIT.test_WorkflowApprovalThresholdReturnsOpenTaskUntilThresholdIsMetgains a team-assignee case that asserts the refusal.
Found while building #35983 (ontology release review rules), which does not change this behavior.
- Lenguaje dominante
- TypeScript
- Estrellas
- 15.4k
- Forks
- 2.4k
- Merge medio
- 1 d 1 h
- PR fusionados (30 d)
- 699
Preparar el entorno
Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.
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 open-metadata/OpenMetadata
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
open-metadata/OpenMetadata#36463 ·
Los mantenedores suelen responder en 1 día
-
AI Context empty state covers the whole app and blocks sidebar navigation when no persona existsAbiertobug
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
open-metadata/OpenMetadata#36240 ·
Los mantenedores suelen responder en 1 día
-
UpdatedOn semantic Playwright tests mix local dates with UTC thresholdsPosiblemente ocupada @ZhangJin233 la tomó hace 4 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
open-metadata/OpenMetadata#36151 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Java SDK glossary term assets GET sends RequestOptions as a request bodyPosiblemente ocupada @LubabaKhalid la tomó hace 2 días. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
open-metadata/OpenMetadata#36150 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 1/5 Menos de una hora Aptitud para principiantes 68/100
open-metadata/OpenMetadata#36094 ·
Los mantenedores suelen responder en 1 día
Todos los issues de open-metadata/OpenMetadata
Issues similares
-
e2e-failure ready-to-code
Dificultad 1/5 Menos de una hora Aptitud para principiantes 82/100
redhat-developer/rhdh-plugin-export-overlays#4616 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 66/100
Los mantenedores suelen responder en 1 día
-
ai-handle
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
nextlevelbuilder/dewee-web-v2#73 ·
Los mantenedores suelen responder en 1 día
-
backend bug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 70/100
PoCInnovation/Distribox#255 ·
Los mantenedores suelen responder en 1 día