-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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-38049: [R] Prevent on_rosetta()
from warning
#38052
Conversation
@github-actions crossbow submit test-r-install-local |
Revision: 58ff39b Submitted crossbow builds: ursacomputing/crossbow @ actions-1c137994ff
|
@github-actions crossbow submit test-r-install-local |
Revision: 673a604 Submitted crossbow builds: ursacomputing/crossbow @ actions-7c4a2d95fb
|
on_rosetta()
from warning [WIP]on_rosetta()
from warning
# There is no warning | ||
expect_warning(on_rosetta(), NA) |
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 wasn't actually able to find a way to test that the console output from stderr doesn't show here. I tried both expect_output(..., NA)
and expect_silent(...)
as well as capturing the output with capture_output(...)
and capture.output(...)
but none of those seemed to actually capture the console warning I'm seeing. This is probably fine. I've tested locally and the output is supressed on my system.
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!
(It floated in last night that the |
I also checked this on 10.13 where it correctly silenced a warning that occurred as a result of a non-zero exit status/unknown old. Thanks again! |
Thanks for merging. For posterity only:
We actually do need to inter to get the output. |
And, actually writting that out now made me realize I had introduced a bug resolved in #38083 I tested this code on x86 but not M* |
### Rationale for this change A follow on to #38052 which introduced a small bug ### What changes are included in this PR? Don't ignore the stdout which is the mechanism to tell if under emulation. ### Are these changes tested? I tested these locally: On an M2 with emulation: ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) [1] "1" > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] TRUE ``` On an M2 without emulation: ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) [1] "0" > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] FALSE ``` On an x86 (note the warning message suppression is what #38052 resolved): ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) attr(,"status") [1] 1 Warning message: In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, : running command 'sysctl -n sysctl.proc_translated >/dev/null 2>/dev/null' had status 1 > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) character(0) attr(,"status") [1] 1 Warning message: In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) : running command 'sysctl -n sysctl.proc_translated 2>/dev/null' had status 1 > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] FALSE ``` ### Are there any user-facing changes? No / the functionality is restored Authored-by: Jonathan Keane <[email protected]> Signed-off-by: Dewey Dunnington <[email protected]>
After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit fdecb6a. 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. |
### Rationale for this change Stop extraneous warnings. ### What changes are included in this PR? Prevent warning when detecting translation, but on x86 ### Are these changes tested? Yes ### Are there any user-facing changes? Yes, there will be fewer extraneous warnings. * Closes: apache#38049 Authored-by: Jonathan Keane <[email protected]> Signed-off-by: Dewey Dunnington <[email protected]>
…#38083) ### Rationale for this change A follow on to apache#38052 which introduced a small bug ### What changes are included in this PR? Don't ignore the stdout which is the mechanism to tell if under emulation. ### Are these changes tested? I tested these locally: On an M2 with emulation: ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) [1] "1" > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] TRUE ``` On an M2 without emulation: ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) [1] "0" > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] FALSE ``` On an x86 (note the warning message suppression is what apache#38052 resolved): ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) attr(,"status") [1] 1 Warning message: In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, : running command 'sysctl -n sysctl.proc_translated >/dev/null 2>/dev/null' had status 1 > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) character(0) attr(,"status") [1] 1 Warning message: In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) : running command 'sysctl -n sysctl.proc_translated 2>/dev/null' had status 1 > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] FALSE ``` ### Are there any user-facing changes? No / the functionality is restored Authored-by: Jonathan Keane <[email protected]> Signed-off-by: Dewey Dunnington <[email protected]>
### Rationale for this change Stop extraneous warnings. ### What changes are included in this PR? Prevent warning when detecting translation, but on x86 ### Are these changes tested? Yes ### Are there any user-facing changes? Yes, there will be fewer extraneous warnings. * Closes: apache#38049 Authored-by: Jonathan Keane <[email protected]> Signed-off-by: Dewey Dunnington <[email protected]>
…#38083) ### Rationale for this change A follow on to apache#38052 which introduced a small bug ### What changes are included in this PR? Don't ignore the stdout which is the mechanism to tell if under emulation. ### Are these changes tested? I tested these locally: On an M2 with emulation: ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) [1] "1" > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] TRUE ``` On an M2 without emulation: ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) [1] "0" > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] FALSE ``` On an x86 (note the warning message suppression is what apache#38052 resolved): ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) attr(,"status") [1] 1 Warning message: In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, : running command 'sysctl -n sysctl.proc_translated >/dev/null 2>/dev/null' had status 1 > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) character(0) attr(,"status") [1] 1 Warning message: In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) : running command 'sysctl -n sysctl.proc_translated 2>/dev/null' had status 1 > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] FALSE ``` ### Are there any user-facing changes? No / the functionality is restored Authored-by: Jonathan Keane <[email protected]> Signed-off-by: Dewey Dunnington <[email protected]>
### Rationale for this change Stop extraneous warnings. ### What changes are included in this PR? Prevent warning when detecting translation, but on x86 ### Are these changes tested? Yes ### Are there any user-facing changes? Yes, there will be fewer extraneous warnings. * Closes: apache#38049 Authored-by: Jonathan Keane <[email protected]> Signed-off-by: Dewey Dunnington <[email protected]>
…#38083) ### Rationale for this change A follow on to apache#38052 which introduced a small bug ### What changes are included in this PR? Don't ignore the stdout which is the mechanism to tell if under emulation. ### Are these changes tested? I tested these locally: On an M2 with emulation: ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) [1] "1" > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] TRUE ``` On an M2 without emulation: ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) [1] "0" > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] FALSE ``` On an x86 (note the warning message suppression is what apache#38052 resolved): ``` > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE)), "1") [1] FALSE > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, ignore.stdout = TRUE) character(0) attr(,"status") [1] 1 Warning message: In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE, : running command 'sysctl -n sysctl.proc_translated >/dev/null 2>/dev/null' had status 1 > system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) character(0) attr(,"status") [1] 1 Warning message: In system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE) : running command 'sysctl -n sysctl.proc_translated 2>/dev/null' had status 1 > identical(suppressWarnings(system("sysctl -n sysctl.proc_translated", intern = TRUE, ignore.stderr = TRUE)), "1") [1] FALSE ``` ### Are there any user-facing changes? No / the functionality is restored Authored-by: Jonathan Keane <[email protected]> Signed-off-by: Dewey Dunnington <[email protected]>
Rationale for this change
Stop extraneous warnings.
What changes are included in this PR?
Prevent warning when detecting translation, but on x86
Are these changes tested?
Yes
Are there any user-facing changes?
Yes, there will be fewer extraneous warnings.