Fix/misc issues#235
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c2a82a6338
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if len(s.existingByHash[oid]) == 0 { | ||
| return true, nil | ||
| } | ||
| obj := s.drsObjByOID[oid] | ||
| if obj == nil { | ||
| return false, nil | ||
| return false, nil |
There was a problem hiding this comment.
Check downloadability before skipping uploads
needsUpload now returns false whenever any hash match exists, without verifying that the scoped object is actually downloadable. In the common recovery case where metadata exists but the backing blob is missing/unreadable (or the access URL is stale), push will skip upload and still proceed to git push, leaving refs that point to data that cannot be pulled later. The previous behavior probed downloadability before deciding to skip, so this is a regression in data availability guarantees.
Useful? React with 👍 / 👎.
| if ev.BytesSoFar > file.current { | ||
| file.current = ev.BytesSoFar | ||
| } | ||
| if ev.BytesSoFar > file.uploaded { | ||
| r.doneBytes += ev.BytesSoFar - file.uploaded | ||
| file.uploaded = ev.BytesSoFar | ||
| } | ||
| if ev.Path != "" { | ||
| r.currentLabel = ev.Path | ||
| } else if file.path != "" { | ||
| r.currentLabel = file.path | ||
| if ev.Phase == pushsync.UploadProgressUploading { | ||
| file.started = true |
There was a problem hiding this comment.
Guard progress renderer state for concurrent updates
BatchSyncForPush emits progress from multiple upload goroutines, but OnUploadProgress mutates shared renderer/file state without any synchronization. This introduces data races during parallel uploads (e.g., one goroutine rendering while another updates file.current/file.completed), which can produce inconsistent output and race-detector failures in CI.
Useful? React with 👍 / 👎.
No description provided.