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

Move date to build string in conda recipe #606

Merged
merged 5 commits into from
Feb 6, 2023

Conversation

ajschmidt8
Copy link
Member

@ajschmidt8 ajschmidt8 commented Feb 1, 2023

This PR moves the date string from the version to the build string for conda recipes in this repository.

This is necessary to ensure that the conda packages resulting from PR builds can be installed in the same environment as nightly conda packages, which is useful for testing purposes.

Additionally, this prevents a bug from occurring where the Python builds fail because the date string it computes is different than the one computed by the C++ build, therefore causing the Python build to search for a C++ build artifact that doesn't exist.

xref: rapidsai/rmm#1195

This PR moves the date string from the version to the build string for conda recipes in this repository.

This is necessary to ensure that the conda packages resulting from PR builds can be installed in the same environment as nightly conda packages. This is useful for testing purposes.

Additionally, this PR adds the `PKG_HASH` value to our build string. This value is a hash computed from the dependency names and versions used to build our packages.

Typically the `PKG_HASH` value is included in packages when the build string is omitted, as seen on most `conda-forge` packages.

Including it in our build string will help ensure that new packages are published whenever our dependencies change (which is important in the case of shared library updates).

xref: rapidsai/rmm#1195
@ajschmidt8 ajschmidt8 marked this pull request as ready for review February 2, 2023 21:45
@ajschmidt8 ajschmidt8 requested a review from a team as a code owner February 2, 2023 21:45
@ajschmidt8 ajschmidt8 marked this pull request as draft February 2, 2023 23:02
@ajschmidt8 ajschmidt8 marked this pull request as ready for review February 6, 2023 17:09
if [[ "$BUILD_MODE" = "branch" && "$SOURCE_BRANCH" = branch-* ]] ; then
export VERSION_SUFFIX=`date +%y%m%d`
fi
export RAPIDS_DATE_STRING=$(date +%y%m%d)
Copy link
Member

Choose a reason for hiding this comment

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

Should this be git show --no-patch --date=format:'%y%m%d' --format='%cd' like in GHA: https://github.com/rapidsai/gha-tools/blob/main/tools/rapids-env-update#L23

Copy link
Member Author

@ajschmidt8 ajschmidt8 Feb 6, 2023

Choose a reason for hiding this comment

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

I will be submitting a PR to gha-tools to replace that line with some logic that gets the date from the corresponding GHA workflow run.

Since some of these repos aren't on GHAs yet, it's fine to just let them use date for now.

Using date will ensure that we can get at least one new package published every day, regardless of whether there were any commits to the repository which is what we want.

@ajschmidt8
Copy link
Member Author

/merge

@ajschmidt8 ajschmidt8 merged commit 3574bf9 into rapidsai:branch-23.04 Feb 6, 2023
@ajschmidt8 ajschmidt8 deleted the recipe-fix branch February 6, 2023 17:58
@ajschmidt8 ajschmidt8 restored the recipe-fix branch February 6, 2023 18:03
@ajschmidt8 ajschmidt8 deleted the recipe-fix branch February 6, 2023 18:03
@ajschmidt8 ajschmidt8 restored the recipe-fix branch February 6, 2023 18:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants