Skip source writes when the content is unchanged

Open
#347 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
62/100
Issue type
Feature
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
api

Research direction

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.

Written by the indexing model from the issue text.

Description

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.

Dominant language
JavaScript
Stars
6
Forks
18
Avg merge
5h 12m
Merged PRs (30d)
5

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from adobe/da-admin

All issues in adobe/da-admin

Similar issues

More JavaScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.