Skip to content

Make ArchiveUtils work on Windows#683

Merged
jonesbusy merged 1 commit into
oras-project:mainfrom
ThomasVitale:gh-671
Apr 25, 2026
Merged

Make ArchiveUtils work on Windows#683
jonesbusy merged 1 commit into
oras-project:mainfrom
ThomasVitale:gh-671

Conversation

@ThomasVitale
Copy link
Copy Markdown
Contributor

@ThomasVitale ThomasVitale commented Apr 18, 2026

Description

  • Handle POSIX permissions only on compatible OSes, with fallback on default, standard permissions.
  • Include check to ensure the OS support symlinks before creating them. On Windows, a warning is logged when trying to create a symlink without the necessary permissions.

Fixes gh-671

Testing done

Confirmed the automated tests for ArchiveUtils still work on macOS and Linux. I ran manual tests on Windows for ArchiveUtils specifically since some of the other tests can't run on Windows (I can see that's being handled in #690. That might reveal more areas than ArchiveUtils to update to make them work on Windows as well).

Submitter checklist

  • I have read and understood the CONTRIBUTING guide
  • I have run mvn license:update-file-header, mvn spotless:apply, pre-commit run -a, mvn clean install before opening the PR

@codecov
Copy link
Copy Markdown

codecov Bot commented Apr 18, 2026

Codecov Report

❌ Patch coverage is 63.15789% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.40%. Comparing base (e259a94) to head (620174f).
⚠️ Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
src/main/java/land/oras/utils/ArchiveUtils.java 61.11% 5 Missing and 2 partials ⚠️

❌ Your patch status has failed because the patch coverage (63.15%) is below the target coverage (80.00%). You can increase the patch coverage or adjust the target coverage.

Additional details and impacted files
@@             Coverage Diff              @@
##               main     #683      +/-   ##
============================================
+ Coverage     87.01%   87.40%   +0.38%     
- Complexity      963      965       +2     
============================================
  Files            43       44       +1     
  Lines          2988     3000      +12     
  Branches        374      377       +3     
============================================
+ Hits           2600     2622      +22     
+ Misses          228      216      -12     
- Partials        160      162       +2     

☔ 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.

* Handle POSIX permissions only on compatible OSes, with fallback on default, standard permissions.
* Include check to ensure the OS support symlinks before creating them. On Windows, a warning is logged when trying to create a symlink without the necessary permissions.

Fixes oras-projectgh-671

Signed-off-by: Thomas Vitale <ThomasVitale@users.noreply.github.com>
@ThomasVitale ThomasVitale marked this pull request as ready for review April 25, 2026 08:59
@ThomasVitale ThomasVitale requested a review from jonesbusy as a code owner April 25, 2026 08:59
@jonesbusy jonesbusy added the bug Something isn't working label Apr 25, 2026
@jonesbusy jonesbusy self-assigned this Apr 25, 2026
@jonesbusy
Copy link
Copy Markdown
Collaborator

Thanks. Looks good. I will merge and this will help for #690

@jonesbusy jonesbusy merged commit 4e9add3 into oras-project:main Apr 25, 2026
7 of 8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ArchiveUtils doesn't work on Windows

2 participants