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

[ci] fail R macOS CI jobs earlier when installations fail #5129

Merged
merged 3 commits into from
Apr 6, 2022

Conversation

jameslamb
Copy link
Collaborator

#5128 describes an issue where:

  • brew install of a required dependency fails
  • the CI job does not fail
  • building LightGBM, running tests, etc. all happen
  • a much later step (R CMD check for the R package) fails, because it's missing that dependency from Homebrew

This PR proposes adding some exit -1 calls to the main CI script for for R-package jobs, so that those jobs will fail earlier when such issues occur in the future.

Benefits of this:

@jameslamb jameslamb requested a review from StrikerRUS as a code owner April 5, 2022 01:20
@jameslamb jameslamb marked this pull request as draft April 5, 2022 01:33
@jameslamb jameslamb removed the request for review from StrikerRUS April 5, 2022 01:33
@jameslamb
Copy link
Collaborator Author

Going to move this back to "draft" while investigating the latest error

installer: Error - the package path specified was invalid: '/Users/runner/work/LightGBM/LightGBM/R.pkg'.
Error: Process completed with exit code 255.

But hey, at least in https://github.com/microsoft/LightGBM/runs/5826439843?check_suite_focus=true, basictex was installed successfully, so maybe #5128 is fixed!

@jameslamb
Copy link
Collaborator Author

jameslamb commented Apr 5, 2022

😱 it looks like the R.pkg we were installing was removed!

curl -I https://cran.r-project.org/bin/macosx/R-4.1.2.pkg
HTTP/1.1 404 Not Found
Date: Tue, 05 Apr 2022 01:51:31 GMT
Server: Apache
Vary: accept-language,accept-charset
Accept-Ranges: bytes
Content-Type: text/html; charset=utf-8
Content-Language: en

But because there was no || exit -1 on the line installing it, CI jobs didn't fail.

curl -sL https://cran.r-project.org/bin/macosx/R-${R_MAC_VERSION}.pkg -o R.pkg

And those jobs just silently fell back to the R version already available from GitHub Actions (https://github.com/actions/virtual-environments/blob/main/images/macos/macos-11-Readme.md).

For example, look at this r-package (macOS-10.15, clang, R 4.1, cmake) job from two days ago: https://github.com/microsoft/LightGBM/runs/5800165206?check_suite_focus=true

R installation failed:

installer: Error - the package path specified was invalid: '/Users/runner/work/LightGBM/LightGBM/R.pkg'.

But the job continued, and you can see that the job used R 4.1.3, the version installed by default by GitHub Actions for this runner (link).

* using R version 4.1.3 (2022-03-10)

Pushed 43d60f6, targeting https://cran.r-project.org/bin/macosx/base/ for R 4.x builds so this doesn't happen again.

@jameslamb jameslamb marked this pull request as ready for review April 5, 2022 13:04
@jameslamb jameslamb requested a review from StrikerRUS April 5, 2022 13:04
@StrikerRUS
Copy link
Collaborator

yikes!

Thanks for fixing this!

Can this error be related to #4990?

@jameslamb
Copy link
Collaborator Author

Can this error be related to #4990?

ah!!! I bet you're right! I can try that later (updating those jobs to macOS-latest). I think it's very very likely that they're related.

@github-actions
Copy link

This pull request has been automatically locked since there has not been any recent activity since it was closed. To start a new related discussion, open a new issue at https://github.com/microsoft/LightGBM/issues including a reference to this.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 23, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants