Skip source writes when the content is unchanged

Abierto
#347 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
3/5
Tiempo estimado
1-2 días
Aptitud para principiantes
62/100
Tipo de issue
Nueva funcionalidad
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript
Área
api

Línea de trabajo

Start from the PUT handler that already reads the current object to evaluate If-Match, since the stored ETag for comparison comes from that read. Add the MD5-vs-ETag short-circuit after condition checks but before the write, metadata and audit paths, and confirm POST /versionsource and restores still create versions. Read the existing conditional-PUT tests (412 on mismatch) and add cases for an identical PUT returning the current ETag; done means no metadata or audit change on a no-op write, plus a release note.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

Every PUT writes, even with identical content. last-modified, "last modified by", and the audit log change with no real change, and change detection (indexes, sync tools, translation status) gets false positives.

Change

  • Before writing, compare the MD5 of the new body with the current object's ETag. da-admin already reads the current object for If-Match, so this adds no storage read.
  • On a match: no write, no metadata change, no audit entry. Return success with the current ETag; optionally x-da-unchanged: true.
  • Conditions are evaluated first: an If-Match mismatch is still 412, even with identical content.
  • POST /versionsource and restore points still create a version.

Compatibility: a plain PUT creates no version today (only POST /versionsource and restore points do), so no caller loses versions. What changes: an identical PUT no longer bumps last-modified or "last modified by", or adds an audit entry. A search of first-party repos (2026-11-23) found no caller that re-writes identical content on purpose. The remaining risk is external scripts that re-save a page only to bump last-modified (e.g. to make it show as needing preview); that stops working, so add a release note.

Same change for Helix 6: helix-api-service — skip unchanged writes.

Lenguaje dominante
JavaScript
Estrellas
6
Forks
18
Merge medio
5 h 12 min
PR fusionados (30 d)
5

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de adobe/da-admin

Todos los issues de adobe/da-admin

Issues similares

Más issues de JavaScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.