Skip to content

add shellcheck, update pre-commit hooks#738

Merged
rapids-bot[bot] merged 9 commits intorapidsai:branch-25.04from
jameslamb:more-repo-checks
Mar 19, 2025
Merged

add shellcheck, update pre-commit hooks#738
rapids-bot[bot] merged 9 commits intorapidsai:branch-25.04from
jameslamb:more-repo-checks

Conversation

@jameslamb
Copy link
Copy Markdown
Member

@jameslamb jameslamb commented Mar 5, 2025

Contributes to #667

Expands testing to improve release confidence in these images.

  • adds new pre-commit hooks:
    • rapidsai/verify-copyright = keep copyright notices up to date
    • shellcheck = catch issues and enforce consistency in shell scripts
  • updates all other pre-commit hooks
  • switches from a manual run: to pre-commit/action@v3.0.1 in CI, for faster runs of pre-commit and simpler CI configuration

@jameslamb
Copy link
Copy Markdown
Member Author

The arm64 builds that install cuvs-bench-cpu are failing because of #739

That'll be fixed (and CI unblocked here) once rapidsai/cuvs#750 is merged

}

for FILE in $(find . -name Dockerfile); do
find . -name Dockerfile | while IFS= read -r -d '' FILE; do
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Fixes this from shellcheck:

SC2044 (warning): For loops over find output are fragile. Use find -exec or a while read loop.

Comment thread context/test_notebooks.py
for notebook in nb_errors.keys():
if nb_errors[notebook]:
print(f'Errors during {notebook}')
for notebook_id, errors in nb_errors.items():
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

fixes this from ruff:

context/test_notebooks.py:200:9: PLC0206 Extracting value from dictionary without calling `.items()

Comment thread context/test_notebooks.py Outdated
# context on this being skipped: https://github.com/rapidsai/docker/issues/726
'cuspatial/trajectory_clustering.ipynb',
# context on this being skipped: https://github.com/rapidsai/docker/issues/740
'cuspatial/Taxi_Dropoff_Reverse_Geocoding.ipynb',
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

proposing this to unblock CI, see #740

@isVoid I'll start a separate offline thread about our strategy for these notebooks.

@jameslamb
Copy link
Copy Markdown
Member Author

Seeing the one arm test job here fail with this error from cudf:

Jitify fatal error: Uninitialized

(build link)

I think that's related to other ongoing jitify issues cudf has been experiencing on arm the last few days (don't have a great tracking issue, but things that led to PRs like rapidsai/cudf#18175).


cuvs_bench_source_tags=()
cuvs_bench_datasets_source_tags=()
# cuvs_bench_datasets_source_tags=()
Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

This and other things I'm commenting out in this file are unused as long as this other code is commented out:

# check_tag_exists "$CUVS_BENCH_DATASETS_IMAGE_REPO" "$full_cuvs_bench_datasets_tag"
# cuvs_bench_datasets_source_tags+=("${org}/${CUVS_BENCH_DATASETS_IMAGE_REPO}:$full_cuvs_bench_datasets_tag")

as it was in #725

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR mentioned in #725 as a patch was closed, but there is a comment that indicates this might have been fixed in 25.02, though it's unclear, see #723 (review)

Is there an issue or PR in progress tracking this? that we can reference so when it's fixed we can uncomment this back?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Thanks, good point. I just pushed ca8832f, which adds a comment to the issue tracking the cuVS dataset stuff: #724

@jameslamb jameslamb changed the title WIP: add shellcheck, update pre-commit hooks add shellcheck, update pre-commit hooks Mar 7, 2025
@jameslamb jameslamb marked this pull request as ready for review March 7, 2025 20:00
@jameslamb jameslamb requested a review from a team as a code owner March 7, 2025 20:00
Copy link
Copy Markdown

@ncclementi ncclementi left a comment

Choose a reason for hiding this comment

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

LGTM, I left a comment about the cuvs commented code. I wasn't able to find an issue or anything suggesting we should fix this, but I think ideally we should leave comment in code referencing an issue on why are we commenting this out.


cuvs_bench_source_tags=()
cuvs_bench_datasets_source_tags=()
# cuvs_bench_datasets_source_tags=()
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The PR mentioned in #725 as a patch was closed, but there is a comment that indicates this might have been fixed in 25.02, though it's unclear, see #723 (review)

Is there an issue or PR in progress tracking this? that we can reference so when it's fixed we can uncomment this back?

Copy link
Copy Markdown
Contributor

@bdice bdice left a comment

Choose a reason for hiding this comment

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

A few nits, otherwise LGTM.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Should we pin to SHAs of these actions?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

If we want to switch from tags to SHAs, I think that'd be better done as a RAPIDS-wide thing and not in the scope of this PR.

I'd like to not have to worry, for this PR, about questions I have about that, such as how that'd affect auto-updates from dependabot / renovate.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

I've started a separate (private) discussion about switching to commit SHAs RAPIDS-wide. Let's defer the decision on that to the outcome of that discussion.

I'm going to merge this with these pinned to tags, as other actions in this repo's CI already are.

Comment thread ci/release/update-version.sh Outdated
Comment thread context/entrypoint.sh Outdated
Comment thread context/test_notebooks.py Outdated
Copy link
Copy Markdown
Member

@KyleFromNVIDIA KyleFromNVIDIA left a comment

Choose a reason for hiding this comment

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

Looks good, just a few minor questions and changes.

Comment thread context/entrypoint.sh
Comment thread .github/workflows/build-test-publish-images.yml Outdated
Comment thread .pre-commit-config.yaml
jameslamb and others added 4 commits March 18, 2025 14:55
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
Co-authored-by: Bradley Dice <bdice@bradleydice.com>
Comment thread .pre-commit-config.yaml
@jameslamb
Copy link
Copy Markdown
Member Author

/merge

@rapids-bot rapids-bot Bot merged commit e6f193d into rapidsai:branch-25.04 Mar 19, 2025
@jameslamb jameslamb deleted the more-repo-checks branch March 19, 2025 22:09
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.

4 participants