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][R-package] run R CRAN checks on Solaris by optional workflow #3913

Merged
merged 12 commits into from
Feb 7, 2021

Conversation

StrikerRUS
Copy link
Collaborator

.ci/run_rhub_solaris_checks.R Outdated Show resolved Hide resolved
)
rhub::validate_email(
email = intToUtf8(email - 42L)
, token = '6bc89147c8fc4824bce09f8454e4ab8e'
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This is a test token to test e-mail.
@jameslamb Can I send you a production token (in Slack, for example) and you will place new token in GitHub Repository Secrets and tell me name of new secret (something like RHUB_EMAIL_TOKEN)?

Copy link
Collaborator

Choose a reason for hiding this comment

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

ah I'm sorry, I didn't see this comment yesterday either!! It seems like I missed several of your comments. Maybe because I was looking on the "files" tab and these were on lines in the diff that had changed or something.

I would be happy to help, but I do not have permission on this repo to create secrets. I think only @guolinke can do that

Copy link
Collaborator

Choose a reason for hiding this comment

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

I noticed that all the comments I missed are on parts of the diff that say "outdated", so guess it is a GitHub UI thing

image

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, no problem! Let's start with plain token in the source code, I think.

.ci/run_rhub_solaris_checks.R Outdated Show resolved Hide resolved
.ci/run_rhub_solaris_checks.R Show resolved Hide resolved
.ci/run_rhub_solaris_checks.R Show resolved Hide resolved
.ci/run_rhub_solaris_checks.R Show resolved Hide resolved
.ci/run_rhub_solaris_checks.R Outdated Show resolved Hide resolved
}
}
for (note in notes) {
note = iconv(note, "UTF-8", "ASCII", sub="")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

iconv() to remove non-ASCII quotes around march=pentiumpro.

image

https://stackoverflow.com/a/38184834
https://stackoverflow.com/a/17292126

jobs:
test:
name: solaris-cran
timeout-minutes: 60
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

I run 20+ different checks on various platforms. All of them either finished within around 20 minutes or were aborted on RHub side (whole build took 44 minutes in that case):

3527#> * checking for unstated dependencies in ‘tests’ ... OK
3528#> * checking tests ...
3529#> Running ‘testthat.R’Build timed out (after 20 minutes). Marking the build as failed.
3530#> Build was aborted

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm surprised, but glad to hear it! I have had experiences before where I submit a job on a less-common platform like Solaris and it runs overnight (maybe 10 hours from submission to result)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Maybe there were no timeouts on Rhub before?.. I don't know... You can check "Submitted:" and "Build time:" lines in all e-mails in http://www.yopmail.com/lightgbm_test_email to check response time.

image

.ci/run_rhub_solaris_checks.R Show resolved Hide resolved
Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks for doing this! I've left some initial comments.

.ci/run_rhub_solaris_checks.R Show resolved Hide resolved
.ci/run_rhub_solaris_checks.R Outdated Show resolved Hide resolved
.ci/run_rhub_solaris_checks.R Show resolved Hide resolved
.ci/run_rhub_solaris_checks.R Show resolved Hide resolved
.github/workflows/r_solaris.yml Show resolved Hide resolved
.github/workflows/r_solaris.yml Outdated Show resolved Hide resolved
)
rhub::validate_email(
email = intToUtf8(email - 42L)
, token = "6bc89147c8fc4824bce09f8454e4ab8e"
Copy link
Collaborator

Choose a reason for hiding this comment

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

I haven't found any documentation on how often these tokens expire. But from my experience, I've found that about once every 6 weeks, I have to re-validate my email with R Hub. I don't know the rules for when and why validation is revoked, so I don't know for sure if hard-coding a token here is a problem.

I'm fine with leaving this here and seeing how it goes, but let's watch it carefully because base don my experience with R Hub, I expect we'll have to have a PR every two months or so to update this token.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

OK, let's leave this token here, I don't mind.
Let's hope that nobody will abuse RHub with our public e-mail address and publicly available token.

Copy link
Collaborator

Choose a reason for hiding this comment

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

if you want in a follow-up PR, you could make it a GitHub Secret (https://docs.github.com/en/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow, mentioned in https://github.com/StrikerRUS/LightGBM/pull/3#issuecomment-772893909), set that as an environment variable, and read it in with Sys.getenv(). Then no one will see it in plain text.

Can be a later PR though

Copy link
Collaborator Author

@StrikerRUS StrikerRUS Feb 6, 2021

Choose a reason for hiding this comment

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

Let's check how often we will have to update this token first. If not so often, then I'll ask you to add new token as a repo secret before preparing a new PR because I don't have an access for doing this.

But right after merging this PR there will be a small follow-up one with new e-mail/token (because these ones were for testing) and check that everything is working as expected.

Copy link
Collaborator

Choose a reason for hiding this comment

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

sounds good. Sorry, I missed sone of your comments and I created confusion because of it. I also do not have permission #3913 (comment)

but I'm fine leaving this in for now

.ci/run_rhub_solaris_checks.R Show resolved Hide resolved
R-package/README.md Show resolved Hide resolved
@jameslamb
Copy link
Collaborator

Looks fine, please @ me whenever CI is passing and you'd like another review

@StrikerRUS
Copy link
Collaborator Author

@jameslamb I hope I addressed all your comments from previous review in 5e034a0 or gave my comment in the corresponding thread above.

Copy link
Collaborator

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Thanks for the hard work! I don't think many R projects have found a way to reliably and automatically test on Solaris. This will help our release confidence.

I think my concerns have been addressed. Let's merge this and see how it goes.

@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 24, 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