Skip to content

MINOR: [R] Avoid stray output from expr when checking for 10.13 - #38303

Merged
jonkeane merged 5 commits into
apache:mainfrom
assignUser:fix-expr-output
Oct 17, 2023
Merged

MINOR: [R] Avoid stray output from expr when checking for 10.13#38303
jonkeane merged 5 commits into
apache:mainfrom
assignUser:fix-expr-output

Conversation

@assignUser

Copy link
Copy Markdown
Member

Rationale for this change

expr was printing the number of matching chars which showed up as noise in the log (which we want to avoid as much as possible to avoid any false positive checks)
See #38236 (comment) for @jonkeane's investigation.

What changes are included in this PR?

Replace use of expr with test.

Are these changes tested?

Crossbow

@assignUserassignUser added this to the 14.0.0 milestone Oct 17, 2023
@github-actionsgithub-actionsBot added the awaiting review Awaiting review label Oct 17, 2023
@assignUser

assignUser commented Oct 17, 2023

Copy link
Copy Markdown
MemberAuthor

@github-actions crossbow submit r-binary-packages

@github-actions

This comment was marked as outdated.

@assignUser

assignUser commented Oct 17, 2023

Copy link
Copy Markdown
MemberAuthor

The fix actually doesn't work^^ https://github.com/ursacomputing/crossbow/actions/runs/6541502691/job/17763126329#step:13:74 (the error is due to the missing flag that is set when the check is successfull)
Same code fails on 10.13
https://github.com/ursacomputing/crossbow/actions/runs/6541877833/job/17764033623

Edit:
It fails because it will return the exact version: e.g. 10.13.6 which isn't the same as 10.13. Which is of course the reason why I used expr but apparently I forgot ^^ 😅

@github-actions

Copy link
Copy Markdown

Revision: 1780fe4

Submitted crossbow builds: ursacomputing/crossbow @ actions-49d5b1c7dd

TaskStatus
r-binary-packagesGithub Actions

@assignUser

Copy link
Copy Markdown
MemberAuthor

@assignUserassignUser changed the title MINOR: [R] Don't use expr to check for 10.13 to avoid stray outputMINOR: [R] Avoid stray output from expr when checking for 10.13Oct 17, 2023

@jonkeanejonkeane left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you mind adding a comment here so future-us knows why we're using expr + dumping the output?

Comment threadr/configure
fi

if [ "$UNAME" = "Darwin" ] && expr $(sw_vers -productVersion) : '10\.13'; then
if [ "$UNAME" = "Darwin" ] && expr $(sw_vers -productVersion) : '10\.13' >/dev/null 2>&1; then

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you add a comment here about why expr + why >/dev/null 2>&1 ?

@github-actionsgithub-actionsBot added awaiting changes Awaiting changes and removed awaiting review Awaiting review labels Oct 17, 2023
Comment threadr/configure
@github-actionsgithub-actionsBot added awaiting change review Awaiting change review and removed awaiting changes Awaiting changes labels Oct 17, 2023
Comment threadr/configure Outdated
Add both the rationale behind using expr
@github-actionsgithub-actionsBot added awaiting changes Awaiting changes awaiting change review Awaiting change review and removed awaiting change review Awaiting change review awaiting changes Awaiting changes labels Oct 17, 2023
@github-actionsgithub-actionsBot added awaiting merge Awaiting merge and removed awaiting change review Awaiting change review labels Oct 17, 2023
@jonkeane
jonkeane merged commit 40571db into apache:mainOct 17, 2023
@jonkeanejonkeane removed the awaiting merge Awaiting merge label Oct 17, 2023
@assignUser
assignUser deleted the fix-expr-output branch October 17, 2023 15:23
raulcd pushed a commit that referenced this pull request Oct 17, 2023
### Rationale for this change
`expr` was printing the number of matching chars which showed up as noise in the log (which we want to avoid as much as possible to avoid any false positive checks)
See #38236 (comment) for @ jonkeane's investigation.
### What changes are included in this PR?
Replace use of expr with test.
### Are these changes tested?
Crossbow
Lead-authored-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
Signed-off-by: Jonathan Keane <jkeane@gmail.com>
@conbench-apache-arrow

Copy link
Copy Markdown

After merging your PR, Conbench analyzed the 6 benchmarking runs that have been run so far on merge-commit 40571db.

There were no benchmark performance regressions. 🎉

The full Conbench report has more details. It also includes information about 1 possible false positive for unstable benchmarks that are known to sometimes produce them.

loicalleyne pushed a commit to loicalleyne/arrow that referenced this pull request Nov 13, 2023
…he#38303)
### Rationale for this change
`expr` was printing the number of matching chars which showed up as noise in the log (which we want to avoid as much as possible to avoid any false positive checks)
See apache#38236 (comment) for @ jonkeane's investigation.
### What changes are included in this PR?
Replace use of expr with test.
### Are these changes tested?
Crossbow
Lead-authored-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
Signed-off-by: Jonathan Keane <jkeane@gmail.com>
dgreiss pushed a commit to dgreiss/arrow that referenced this pull request Feb 19, 2024
…he#38303)
### Rationale for this change
`expr` was printing the number of matching chars which showed up as noise in the log (which we want to avoid as much as possible to avoid any false positive checks)
See apache#38236 (comment) for @ jonkeane's investigation.
### What changes are included in this PR?
Replace use of expr with test.
### Are these changes tested?
Crossbow
Lead-authored-by: Jacob Wujciak-Jens <jacob@wujciak.de>
Co-authored-by: Jonathan Keane <jkeane@gmail.com>
Signed-off-by: Jonathan Keane <jkeane@gmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

@assignUser@jonkeane