Repository navigation
[14.5-stable] Fix bugs in unit tests - Race when accessing stats of drona request - #118
Merged
rene merged 1 commit intoOct 1, 2026
Merged
Conversation
- Adding calculation of md5checksum if not present in resp.ContentMD5 for Azure metadata Signed-off-by: Ioannis Sfakianakis <jsfakas@gmail.com> (cherry picked from commit de07a00)
This was referenced Oct 1, 2026
christoph-zededa
marked this pull request as ready for review
October 1, 2026 11:00
rene
approved these changes
Oct 1, 2026
rene
approved these changes
Oct 1, 2026
christoph-zededa
added a commit
to christoph-zededa/eve
that referenced
this pull request
Oct 5, 2026
Update eve-libs from 82b21ffd5536 to 7752b891f3f8, the tip of its 14.5-stable branch, which adds two commits: lf-edge/eve-libs#116 and lf-edge/eve-libs#118, the backports of lf-edge/eve-libs#113 and lf-edge/eve-libs#51. DronaRequest.WithContext lets the caller hand the request the context it selects on itself, so that the transport observes the same cancellation; WithCancel and Cancel, which always derived a context of their own, are gone. The downloader fix backported next builds on it. The race fix makes GetDoneParts take the request's read lock, which the stats updater already holds for writing when it records the parts, and has the AWS and Azure transports update the request's size and status under the lock as well. Pillar runs its unit tests under the race detector, and the downloader test backported at the end of this series drives a request through a real transport whose stats updater keeps writing those fields while the downloader reads them from the progress messages. Pillar is the only module on this branch that pins eve-libs; it moves to the new version, and only the six zedUpload files that carry the two changes are re-vendored. No transitive dependency moves. Signed-off-by: Christoph Ostarek <christoph@zededa.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
4 of 7 tasks
rene
pushed a commit
to lf-edge/eve
that referenced
this pull request
Oct 5, 2026
Update eve-libs from 82b21ffd5536 to 7752b891f3f8, the tip of its 14.5-stable branch, which adds two commits: lf-edge/eve-libs#116 and lf-edge/eve-libs#118, the backports of lf-edge/eve-libs#113 and lf-edge/eve-libs#51. DronaRequest.WithContext lets the caller hand the request the context it selects on itself, so that the transport observes the same cancellation; WithCancel and Cancel, which always derived a context of their own, are gone. The downloader fix backported next builds on it. The race fix makes GetDoneParts take the request's read lock, which the stats updater already holds for writing when it records the parts, and has the AWS and Azure transports update the request's size and status under the lock as well. Pillar runs its unit tests under the race detector, and the downloader test backported at the end of this series drives a request through a real transport whose stats updater keeps writing those fields while the downloader reads them from the progress messages. Pillar is the only module on this branch that pins eve-libs; it moves to the new version, and only the six zedUpload files that carry the two changes are re-vendored. No transitive dependency moves. Signed-off-by: Christoph Ostarek <christoph@zededa.com> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
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.
Description
Backport of #51 to
14.5-stable: the one commit of that PR, cherry-picked with-x. It takes the request's read lock inDronaRequest.GetDonePartsandlocks the stats updates in the S3 and Azure transports, so that a reader of
the transfer statistics no longer races the stats goroutine that writes them.
Why now: EVE's backport of its downloader fixes to this branch (lf-edge/eve#6686)
adds unit tests that run a real HTTP transfer through the transport under the
race detector, and they fail on this branch with
GetDonePartsreadingdonePartswhile the stats goroutine writes it. 16.0-stable and main havehad this fix since August 2025; this branch and 13.4-stable never received it.
The race existed here all along, it was just never exercised under
-race.One conflict in
zedUpload/datastore.go: the lock around the write ofdonePartsthat the commit adds toreqPostSizeis already present on thisbranch inside
recordStats, from the backport of #103, so this branch'sversion is kept there; everything else applied cleanly.
How to test and validate this PR
go test -race ./zedUpload/passes on this branch. With the EVE backport'sdrain_test.govendored against this change the race report disappears.PR Backports
Checklist
For backport PRs:
🤖 Generated with Claude Code