-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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
GH-38570: [R] Ensure that test-nix-libs is warning free #38571
GH-38570: [R] Ensure that test-nix-libs is warning free #38571
Conversation
if (is_release & !test_mode) { | ||
VERSION <- VERSION[1, 1:3] | ||
arrow_repo <- paste0(getOption("arrow.repo", sprintf("https://apache.jfrog.io/artifactory/arrow/r/%s", VERSION)), "/libarrow/") | ||
} else { | ||
} else if(!test_mode) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also wrap this whole block in if (!test_mode) { ... }
since we don't want to run the actual detection yet, just check the functions. Unless I'm missing something and we actually do want this whole main chunk to run?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we do want the whole main chunk to run (or at least, from spending a few minutes with the script last week it seemed like that was the original intention). Wrapping the main logic in a function and testing that function would be another way to go about it but I don't feel to strongly about it (I'm just glad there's a place to put tests for these functions).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And just to make sure I understand: you're suggesting leaving this as is rather than making the whole block skip while being tested.
We could also suppress the message more deeply (or even in the test script) but IMHO both of those are harder to figure out what's up / reason about than stopping this one bit from running during testing and producing distracting output. But happy to change it to elsewhere if you have strong feelings about it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think most of the distracting output is fixed in #38534 even with sourcing the script (output here: https://github.com/apache/arrow/actions/runs/6746935491/job/18341961924?pr=38534#step:5:23756 ). Is there any part of that output that could be improved?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This bit here is about suppressing this part, which I see in that output:
*** No nightly binaries were found for version 8.0.0.9000: falling back to libarrow build from source
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We could also set LIBARROW_BINARY=false
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I also just used the existing pattern so 🤷 I think it should be fine to fix it like this as further up is a block that sets the version specifically for testing and iirc we don't use the arrow repo option in any of the tests (other wise we would also see fails in ci).
cc @paleolimbot in case this overlaps with anything you're working on |
I'll take a closer look Monday! I did have #38534 open to solves one of the two warnings listed but I'm also happy to rebase after this one merges 🙂 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for taking this on! I think I'd prefer to keep the existing "run the whole script when in test mode" logic even though it's a little odd (unless @assignUser corrects me and it was never the original intention to run the entire script in the test block).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I remembered what I was thinking of: the comment # Prevent error with binary selection during testing.
vs. the comment # Flag so that we just load the functions and don't evaluate them like we do when called from configure.R
. I'll add a comment in #38534 to clarify that we don't actually want to run selection in the test file! (Or feel free to add here!)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM thanks
After merging your PR, Conbench analyzed the 5 benchmarking runs that have been run so far on merge-commit 7622ded. There were no benchmark performance regressions. 🎉 The full Conbench report has more details. It also includes information about 5 possible false positives for unstable benchmarks that are known to sometimes produce them. |
…#38571) ### Rationale for this change Although we stop / fail the CI job for warnings elsewhere, we don't seem to be doing that for our buildsystem tests. Let's change that so warnings + other output doesn't creep in. - [x] Prevent `*** Failed to find latest nightly for 8.0.0.9000` from showing up when the file is sourced under test - [x] fix `Warning ('test-nixlibs.R:140:3'): select_binary() with test program 'x' is NULL so the result will be NULL` - [x] update version strings to be characters to avoid r-devel warnings ### What changes are included in this PR? Added `stop_on_warning` to the test call, and fixes to make that pass ### Are these changes tested? Yes, they are all part of the test suite ### Are there any user-facing changes? No. * Closes: apache#38570 Authored-by: Jonathan Keane <jkeane@gmail.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
…#38571) ### Rationale for this change Although we stop / fail the CI job for warnings elsewhere, we don't seem to be doing that for our buildsystem tests. Let's change that so warnings + other output doesn't creep in. - [x] Prevent `*** Failed to find latest nightly for 8.0.0.9000` from showing up when the file is sourced under test - [x] fix `Warning ('test-nixlibs.R:140:3'): select_binary() with test program 'x' is NULL so the result will be NULL` - [x] update version strings to be characters to avoid r-devel warnings ### What changes are included in this PR? Added `stop_on_warning` to the test call, and fixes to make that pass ### Are these changes tested? Yes, they are all part of the test suite ### Are there any user-facing changes? No. * Closes: apache#38570 Authored-by: Jonathan Keane <jkeane@gmail.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
### Rationale for this change Although we stop / fail the CI job for warnings elsewhere, we don't seem to be doing that for our buildsystem tests. Let's change that so warnings + other output doesn't creep in. - [x] Prevent `*** Failed to find latest nightly for 8.0.0.9000` from showing up when the file is sourced under test - [x] fix `Warning ('test-nixlibs.R:140:3'): select_binary() with test program 'x' is NULL so the result will be NULL` - [x] update version strings to be characters to avoid r-devel warnings ### What changes are included in this PR? Added `stop_on_warning` to the test call, and fixes to make that pass ### Are these changes tested? Yes, they are all part of the test suite ### Are there any user-facing changes? No. * Closes: #38570 Authored-by: Jonathan Keane <jkeane@gmail.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
…#38571) ### Rationale for this change Although we stop / fail the CI job for warnings elsewhere, we don't seem to be doing that for our buildsystem tests. Let's change that so warnings + other output doesn't creep in. - [x] Prevent `*** Failed to find latest nightly for 8.0.0.9000` from showing up when the file is sourced under test - [x] fix `Warning ('test-nixlibs.R:140:3'): select_binary() with test program 'x' is NULL so the result will be NULL` - [x] update version strings to be characters to avoid r-devel warnings ### What changes are included in this PR? Added `stop_on_warning` to the test call, and fixes to make that pass ### Are these changes tested? Yes, they are all part of the test suite ### Are there any user-facing changes? No. * Closes: apache#38570 Authored-by: Jonathan Keane <jkeane@gmail.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
…#38571) ### Rationale for this change Although we stop / fail the CI job for warnings elsewhere, we don't seem to be doing that for our buildsystem tests. Let's change that so warnings + other output doesn't creep in. - [x] Prevent `*** Failed to find latest nightly for 8.0.0.9000` from showing up when the file is sourced under test - [x] fix `Warning ('test-nixlibs.R:140:3'): select_binary() with test program 'x' is NULL so the result will be NULL` - [x] update version strings to be characters to avoid r-devel warnings ### What changes are included in this PR? Added `stop_on_warning` to the test call, and fixes to make that pass ### Are these changes tested? Yes, they are all part of the test suite ### Are there any user-facing changes? No. * Closes: apache#38570 Authored-by: Jonathan Keane <jkeane@gmail.com> Signed-off-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Rationale for this change
Although we stop / fail the CI job for warnings elsewhere, we don't seem to be doing that for our buildsystem tests. Let's change that so warnings + other output doesn't creep in.
*** Failed to find latest nightly for 8.0.0.9000
from showing up when the file is sourced under testWarning ('test-nixlibs.R:140:3'): select_binary() with test program 'x' is NULL so the result will be NULL
What changes are included in this PR?
Added
stop_on_warning
to the test call, and fixes to make that passAre these changes tested?
Yes, they are all part of the test suite
Are there any user-facing changes?
No.