Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SOLR-17654: DistribFileStore._getRealPath() has issues on Windows #3160

Merged
merged 1 commit into from
Feb 6, 2025

Conversation

mlbiscoc
Copy link
Contributor

@mlbiscoc mlbiscoc commented Feb 5, 2025

https://issues.apache.org/jira/browse/SOLR-17654

Description

Number of tests failing on windows due to beginning slash in a path not being stripped to become relative.

Solution

Revert to old logic but use more modern FileSystems.getDefault().getSeparator() instead.

Checklist

Please review the following and check all that apply:

  • I have reviewed the guidelines for How to Contribute and my code conforms to the standards described there to the best of my ability.
  • I have created a Jira issue and added the issue ID to my pull request title.
  • I have given Solr maintainers access to contribute to my PR branch. (optional but recommended, not available for branches on forks living under an organisation)
  • I have developed this patch against the main branch.
  • I have run ./gradlew check.
  • I have added tests for my changes.
  • I have added documentation for the Reference Guide

@dsmiley
Copy link
Contributor

dsmiley commented Feb 5, 2025

(thinking out loud)
I'd love to get a JVM running in Windows in a container maybe (not possible with macOS host?) or I suppose VirtualBox if I have to. Actually, I could probably use AWS free tier and use an AMI with Java to do some temporary tinkering. Or maybe someone recommends another option.

@janhoy
Copy link
Contributor

janhoy commented Feb 5, 2025

(thinking out loud) I'd love to get a JVM running in Windows in a container maybe (not possible with macOS host?) or I suppose VirtualBox if I have to. Actually, I could probably use AWS free tier and use an AMI with Java to do some temporary tinkering. Or maybe someone recommends another option.

I use UTM (https://mac.getutm.app) on M1 mac to spin up Win11 ARM edition. You can share your disk and test stuff. PS: Wonder if we could tell GithubActions to run tests on windows runner for a PR? Perhaps triggered by some file touched?

@dsmiley
Copy link
Contributor

dsmiley commented Feb 6, 2025

Thanks Jan for that suggestion! I grabbed that and intend to play with it this weekend.
I'll merge this PR shortly.

@dsmiley dsmiley merged commit d0ec48f into apache:main Feb 6, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants