-
Notifications
You must be signed in to change notification settings - Fork 476
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
Building anserini on MacOS #2445
Comments
Seems like a transient error... try again? |
Hrm... seems to work for me... can you provide more detailed error log? |
[ERROR] Tests run: 3, Failures: 0, Errors: 1, Skipped: 0, Time elapsed: 0.013 s <<< FAILURE! - in io.anserini.index.PrebuiltIndexTest |
This works fine for me... the URL does appear to be valid.
Try that on your end and see what you get? |
it works, i tried running the mvn command after that but it is giving the same issue from the screenshot, i found some resource on the runtimeexception so I will try to fix that |
Try removing |
Update: My friend below mentioned a fix Same issue from doing both: Attached is the textfile of the error report: io.anserini.index.PrebuiltIndexTest.txt |
Pretty sure line 48 of PreBuiltIndexTest.java needs to be changed from
to
Otherwise errors are caused within builds since the url being tested isn't used and http://example.com/ is an invalid url. |
Pretty sure http://example.com/ is a valid URL:
... but, try changing it to something like https://uwaterloo.ca/ and see what happens? |
Yeah it does look valid thought it wasn't. Also not sure why it would be checking example.com for all urls under IndexInfo as it looks like none of the urls in IndexInfo is checked for from this test: // test url validity
@Test
public void testUrls() {
for (IndexInfo info : IndexInfo.values()) {
for (String url : info.urls) {
// check each url status code is 200
try {
final URL requestUrl = new URI("http://example.com").toURL();
final HttpURLConnection con = (HttpURLConnection) requestUrl.openConnection();
assertEquals(200, con.getResponseCode());
} catch (IOException e) {
throw new RuntimeException("Error connecting to " + url, e);
} catch (Exception e) {
throw new RuntimeException("Malformed URL: " + url, e);
}
}
}
} |
Yea, good point... maybe that was supposed to be a placeholder that didn't get fixed. It would make sense to check all the URLs, as intended. @Gelardinio would you be willing to send a PR to fix? Always good to fix janky code, but still doesn't address the original question of why the tests are failing? |
Sounds good. I don't think I have the permissions to make a PR yet since I just started the onboarding yesterday. To answer the original question it's probably because some rate limit is probably being reached with http://example.com because we're sending a request to it for every url in IndexInfo. |
re: permissions - clone the repo and send PR that way? |
Didn't seem to work when I tried. Will try again once I'm back later today. |
Looks like I don't have permissions to make a pr with my branch I think. |
Clone the repo, then branch off your clone, then send PR? |
No, you're trying to branch off the main anserini repo. You need to fork first: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/fork-a-repo |
My bad, this should work #2449 |
hi @Gelardinio thanks for your PR. merged. |
I am builing anserini using JDK 21 and maven 3.9.6 as mentioned in the updated readme, however it is failing when trying to connect to the link as shown in the screenshot.
The text was updated successfully, but these errors were encountered: