Skip to content

Conversation

Wwwsylvia
Copy link
Member

@Wwwsylvia Wwwsylvia commented Mar 17, 2025

  1. Remove the use of atomic.Value
  2. Cancel all go-routines before releasing semaphore permits
  3. Wait for schedule go-routines to release the semaphore permits before returning
  4. Add unit tests

Fixes #916, fixes #908

Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Copy link

codecov bot commented Mar 17, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 80.98%. Comparing base (fdf2c51) to head (26ee98a).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #921      +/-   ##
==========================================
+ Coverage   80.24%   80.98%   +0.74%     
==========================================
  Files          63       63              
  Lines        6053     6063      +10     
==========================================
+ Hits         4857     4910      +53     
+ Misses        858      811      -47     
- Partials      338      342       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@Wwwsylvia
Copy link
Member Author

Wwwsylvia commented Mar 17, 2025

Mmmm the missing lines are tricky to cover

Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the code coverage, let's discuss offline.

Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Signed-off-by: Lixia (Sylvia) Lei <lixlei@microsoft.com>
Copy link
Contributor

@shizhMSFT shizhMSFT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Wwwsylvia Wwwsylvia merged commit d51a392 into oras-project:main Mar 19, 2025
9 checks passed
@Wwwsylvia Wwwsylvia deleted the fix_syncutil branch March 19, 2025 10:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Incorrect use of atomic.Value in the syncutil.Go utility function causes panic Flaky unit test: TestCopyGraph_WithOptions/MountFrom_error
2 participants