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

make conda installs in CI stricter #17013

Merged
merged 5 commits into from
Oct 8, 2024

Conversation

jameslamb
Copy link
Member

@jameslamb jameslamb commented Oct 8, 2024

Description

Contributes to rapidsai/build-planning#106

Proposes specifying the RAPIDS version in conda install calls in CI that install CI artifacts, to reduce the risk of CI jobs picking up artifacts from other releases.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@jameslamb jameslamb added 2 - In Progress Currently a work in progress improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Oct 8, 2024
@jameslamb jameslamb changed the title WIP: make package installations in CI stricter WIP: make conda installs in CI stricter Oct 8, 2024
@jameslamb jameslamb changed the title WIP: make conda installs in CI stricter make conda installs in CI stricter Oct 8, 2024
@jameslamb jameslamb added 3 - Ready for Review Ready for review by team and removed 2 - In Progress Currently a work in progress labels Oct 8, 2024
@jameslamb jameslamb marked this pull request as ready for review October 8, 2024 15:35
@jameslamb jameslamb requested a review from a team as a code owner October 8, 2024 15:35
@jameslamb jameslamb requested review from msarahan and bdice October 8, 2024 15:35
@@ -5,6 +5,8 @@ set -euo pipefail

. /opt/conda/etc/profile.d/conda.sh

RAPIDS_VERSION_MAJOR_MINOR="$(rapids-version-major-minor)"
Copy link
Contributor

@bdice bdice Oct 8, 2024

Choose a reason for hiding this comment

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

In build_docs.sh we export this, but here we're just setting it locally. I doubt it matters here but it might be worth establishing consistent patterns. Also applies to other files.

Copy link
Member Author

Choose a reason for hiding this comment

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

My thinking here was "export it if it's already exported (as in the docs example), otherwise make it local", since I thought that had the least risk of causing other surprising problems.

I clicked around a little, and I think:

  • RAPIDS_VERSION = does not even need to be set in docs-build scripts
  • RAPIDS_VERSION_MAJOR_MINOR = does not need to be exported
  • RAPIDS_VERSION_NUMBER = needs to be exported, for rapids-upload-docs (code link in gha-tools)

For all the other scripts that are not docs builds, this PR only introduces NEW variables, so I think not exporting them is slightly safer.

Just pushed 16367a5 doing that. If that works, I'll make similar changes in the other PRs.

Copy link
Member Author

Choose a reason for hiding this comment

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

This went fine in CI... docs built successfully and I see the expected versions of things in the environment. Docs look ok at the preview too: https://downloads.rapids.ai/ci/cudf/pull-request/17013/16367a5/docs/libcudf/html/index.html

Copy link
Member Author

Choose a reason for hiding this comment

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

Some of these claims I made about the variables not needing to be exported were incorrect. Addressed in #17042 (and updated across all the other PRs for this issue).

@jameslamb jameslamb removed the request for review from msarahan October 8, 2024 21:40
@jameslamb
Copy link
Member Author

/merge

@rapids-bot rapids-bot bot merged commit 349ba5d into rapidsai:branch-24.12 Oct 8, 2024
101 checks passed
@jameslamb jameslamb deleted the ci-conda-installs branch October 8, 2024 22:06
rapids-bot bot pushed a commit that referenced this pull request Oct 11, 2024
Follow-up to #17013

Changes relative to that PR:

* switches to pinning CI conda installs to the output of `rapids-version` (`{major}.{minor}.{patch}`) instead of `rapids-version-major-minor` (`{major}.{minor}`), to get a bit more protection in the presence of hotfix releases
* restores some exporting of variables needed for docs builds

I made some mistakes in #17013 (comment). Missed that this project's Doxygen setup is expecting to find `RAPIDS_VERSION` and `RAPIDS_VERSION_MAJOR_MINOR` defined in the environment.

https://github.com/rapidsai/cudf/blob/7173b52fce25937bb69e22a083a5de4655078fa1/cpp/doxygen/Doxyfile#L41

https://github.com/rapidsai/cudf/blob/7173b52fce25937bb69e22a083a5de4655078fa1/cpp/doxygen/Doxyfile#L2229

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

URL: #17042
rapids-bot bot pushed a commit to rapidsai/cuspatial that referenced this pull request Oct 11, 2024
Contributes to rapidsai/build-planning#106

This project doesn't need any of the changes that are being made as part of that issue across most other repos... it's already doing all of its `pip` and `conda` installs in CI in single installs (which is strict and safe) 🎉 

This small PR just makes its handling of environment variables in `ci/build_docs.sh` consistent with other RAPIDS repos, in the interest of keeping those scripts looking similar so it's easy to apply changes across all RAPIDS projects. ref: rapidsai/cudf#17013 (comment)

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - Mike Sarahan (https://github.com/msarahan)

URL: #1469
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3 - Ready for Review Ready for review by team improvement Improvement / enhancement to an existing function non-breaking Non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants