Image nodes carry a digest padded to the column width
- Dominant language
- Python
- Stars
- 670
- Forks
- 183
- Avg merge
- 17h 7m
- Merged PRs (30d)
- 358
Description
images.config_digest is a CHAR(72) column and a digest is 71 characters (sha256: plus 64 hex), so PostgreSQL answers it with one trailing space. ImageRow.to_detailed_dataclass strips it (trimmed_digest), but ImageRow.to_dataclass copies the column as is, and that is what the v2 image adapter builds ImageNode from. The REST v2 image search and the GraphQL ImageV2 type answer config_digest and metadata.digest as "sha256:...abc ". A client comparing the digest as a string misses.
## Expected
Every digest an image node carries is the digest as stored, without padding.
## What it needs
to_dataclass reads the digest through trimmed_digest, as to_detailed_dataclass already does.
## Acceptance
- A repository test stores a 71-character digest and reads it back from ImageData without a trailing space.
## Related
Found while writing the image adapter scenarios (BA-7837, PR #14520).
JIRA Issue: BA-7876
Contributor guide
Research direction
Start with ImageRow.to_dataclass and compare its digest handling with ImageRow.to_detailed_dataclass, which already uses trimmed_digest; then follow the v2 image adapter's construction of ImageNode. Add the repository test described in Acceptance, storing a 71-character digest and verifying ImageData returns it without trailing padding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- postgresql, python
- Domain
- api, backend, databases
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Active
- Clarity
- Clearly specified
- Newbie friendliness
- 88/100