Glance compatibility expansion#11
Draft
JSYoo5B wants to merge 4 commits into
Draft
Conversation
JSYoo5B
commented
Jul 2, 2026
| image.SizeBytes = int64(len(data)) | ||
| image.UpdatedAt = now.Format(time.RFC3339) | ||
|
|
||
| if _, err := s.repository.Update(image); err != nil { |
Owner
Author
There was a problem hiding this comment.
Image data and image metadata are stored separately. The metadata update happens before the blob write here, so a future durable data store may need transactional handling if partial failures become important.
JSYoo5B
commented
Jul 2, 2026
| return nil | ||
| } | ||
|
|
||
| func (s *Service) StageData(id string, data []byte) error { |
Owner
Author
There was a problem hiding this comment.
StageData intentionally leaves the image in uploading state while storing the staged bytes. ImportData below is the separate compatibility step that marks the image active.
JSYoo5B
commented
Jul 2, 2026
| return err | ||
| } | ||
|
|
||
| func (s *Service) DownloadData(id string) ([]byte, error) { |
Owner
Author
There was a problem hiding this comment.
Download checks image existence before reading data. That keeps missing image semantics separate from missing blob semantics in the data repository.
6c507e9 to
9ee66c6
Compare
264e59a to
7864e35
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Main Review Points
Verification