Bucket DELETE ignores ?force=1: aw-server-rust deletes without it (Python refuses with 401)
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
- 70/100
Línea de trabajo
Empieza con bucket_delete en aw-server/src/endpoints/bucket.rs, que no acepta el parámetro force, y compáralo con la guarda del aw-server en Python, que devuelve 401 salvo que esté en modo de pruebas o se pase ?force=1. Ejecuta el repro con curl contra ambos servidores para confirmar la diferencia. Está terminado cuando un DELETE sin ?force=1 se rechaza fuera del modo de pruebas, y se confirma que aw-webui y aw-client-js envían force=1.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
DELETE /api/0/buckets/<id> on aw-server-rust deletes the bucket and all its events without ?force=1. The Python aw-server refuses the same request outside testing mode, and the docs say force=1 is required (REST reference, "Delete").
This matters because clients rely on the guard. aw-client's delete_bucket(bucket_id, force=False) sends ?force=1 only when you pass force=True. On aw-server-rust, the default call is irreversible.
Repro (v0.14.3 linux release, normal mode, isolated XDG_* dirs):
aw-server-rust --port 5651 & # and the bundled Python aw-server on 5652
for p in 5651 5652; do
curl -s -o /dev/null -X POST -H Content-Type:application/json \
-d '{"client":"t","type":"t","hostname":"h"}' http://127.0.0.1:$p/api/0/buckets/vb
curl -s -w " <- DELETE without force: %{http_code}\n" -X DELETE http://127.0.0.1:$p/api/0/buckets/vb
curl -s -o /dev/null -w "GET after: %{http_code}\n" http://127.0.0.1:$p/api/0/buckets/vb
done
<- DELETE without force: 200 # aw-server-rust
GET after: 404 # bucket and events are gone
{"message": "Deleting buckets is only permitted if aw-server is running in testing mode or if ?force=1"}
<- DELETE without force: 401 # Python aw-server
GET after: 200
?force=0 also deletes on aw-server-rust. bucket_delete in aw-server/src/endpoints/bucket.rs takes no force parameter at all.
Expected: the same guard as Python: refuse without ?force=1 unless the server runs with --testing.
One compatibility point to check first: whether aw-webui and aw-client-js send force=1 when deleting a bucket from the UI. If they don't, they need the parameter in the same change.
Found during a docs-vs-reality pass of the REST API docs (ActivityWatch/docs#224).
- Lenguaje dominante
- Rust
- Estrellas
- 322
- Forks
- 107
- Merge medio
- 2 d 16 h
- PR fusionados (30 d)
- 25
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 ActivityWatch/aw-server-rust
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
ActivityWatch/aw-server-rust#872 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
ActivityWatch/aw-server-rust#798 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
query: categorize rules can pin unbounded memory in the regex cache and run past query_timeoutPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abierto
Dificultad 4/5 3-5 días Aptitud para principiantes 22/100
ActivityWatch/aw-server-rust#893 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
aw-client CLI ignores aw-client.toml host/portPosiblemente ocupada @TimeToBuildBob la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 35/100
ActivityWatch/aw-server-rust#888 ·
Los mantenedores suelen responder en 1 día
-
aw-sync status calls the daemon's live staging db orphaned and safe to deletePosiblemente ocupada @TimeToBuildBob la tomó hoy. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 30/100
ActivityWatch/aw-server-rust#887 ·
Los mantenedores suelen responder en 1 día
Todos los issues de ActivityWatch/aw-server-rust
Issues similares
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
kashsuks/Pinel#172 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 69/100
Los mantenedores suelen responder en 1 día
-
test_a_503_raises_unavailable_error fails on macOS about one run in sixPosiblemente ocupada @naman-modi la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
Los mantenedores suelen responder en 1 día
-
bug ui
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
userFRM/egui-charts#4168 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 1/5 Menos de una hora Aptitud para principiantes 85/100
Los mantenedores suelen responder en 1 día