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] remove conda from R CI jobs #3573

Merged
merged 4 commits into from
Nov 17, 2020

Conversation

jameslamb
Copy link
Collaborator

On #3405 (comment), I see the Windows CI jobs on GitHub Actions failing with this output

==> WARNING: A newer version of conda exists. <==
  current version: 4.8.3
  latest version: 4.9.2

Please update conda by running

    $ conda update -n base -c defaults conda

#
# To activate this environment, use
#
#     $ conda activate test
#
# To deactivate an active environment, use
#
#     $ conda deactivate

I'm worried that this is another case where programs writing to stderr in GitHub Actions Windows jobs causes those jobs to fail. I don't know if this recently started failing because of software updates in GitHub Actions images (https://github.com/actions/virtual-environments/commits/main) or something else.

This PR proposes just updating conda to the latest version every time, to hopefully avoid this warning.

@jameslamb
Copy link
Collaborator Author

UPDATE I see the same failures on the Windows jobs in #3515 too:https://github.com/microsoft/LightGBM/pull/3515/checks?check_run_id=1408108173

But not on builds from last night. https://github.com/microsoft/LightGBM/actions/runs/365273180

So whatever changed, I think it was in the last 24 hours.

@jameslamb jameslamb removed the request for review from StrikerRUS November 17, 2020 00:40
@jameslamb
Copy link
Collaborator Author

Ok, that did not work. https://github.com/microsoft/LightGBM/pull/3573/checks?check_run_id=1409528379

Trying to upgrade to the action to 2.0 next.

@jameslamb jameslamb requested review from StrikerRUS and removed request for StrikerRUS November 17, 2020 00:43
@jameslamb
Copy link
Collaborator Author

Seems like the combination of always updating conda + using v2 of this action fixes it

@jameslamb
Copy link
Collaborator Author

@StrikerRUS let's move #3405 (comment) here, since #3405 already has a lot of comments.

That's a good point! There is actually an r-lib/setup-pandoc action we could try: https://github.com/r-lib/actions/tree/master/setup-pandoc

Let me try on my fork tonight. If that works, I'll just change this PR.

@jameslamb
Copy link
Collaborator Author

Seems ok on my fork!

https://github.com/jameslamb/LightGBM/pull/38/checks?check_run_id=1409970898

I just pushed some changes that remove conda completely for R jobs

if [[ "${TASK:0:9}" == "r-package" ]]; then
bash ${BUILD_DIRECTORY}/.ci/test_r_package.sh || exit -1
exit 0
fi
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 had to move this up so it happens before conda create

@@ -48,8 +48,10 @@ else # Linux
fi
fi

if [[ $TRAVIS == "true" ]] || [[ $GITHUB_ACTIONS == "true" ]] || [[ $OS_NAME == "macos" ]]; then
sh conda.sh -b -p $CONDA
if [[ "${TASK:0:9}" != "r-package" ]]; then
Copy link
Collaborator Author

@jameslamb jameslamb Nov 17, 2020

Choose a reason for hiding this comment

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

@StrikerRUS I was torn between doing this != thing or just adding this before the conda steps:

if [[ "${TASK:0:9}" != "r-package" ]]; then
    exit 0
fi

Do you have a strong preference?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@jameslamb

or just adding this before the conda steps:

I think the second way will be more readable.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Never mind! I changed my mind 😄

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

haha ok. Easy to change if you ever want to.

@jameslamb jameslamb changed the title [ci] always use latest conda version on GitHub Actions [ci] remove conda from R CI jobs Nov 17, 2020
@jameslamb
Copy link
Collaborator Author

I've requested a new approval, @StrikerRUS , since I totally changed this PR since the last time you reviewed and approved

Copy link
Collaborator

@StrikerRUS StrikerRUS left a comment

Choose a reason for hiding this comment

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

LGTM!

@StrikerRUS StrikerRUS merged commit 34187a8 into microsoft:master Nov 17, 2020
@jameslamb jameslamb deleted the ci/gha-conda-update branch November 17, 2020 22:19
@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.

None yet

2 participants