Skip to content

remove git clones and telemetry for package-publishing jobs, use full semver tags for third-party actions - #585

Merged
rapids-bot[bot] merged 3 commits into
mainfrom
cheaper-checkout
Jun 29, 2026
Merged

remove git clones and telemetry for package-publishing jobs, use full semver tags for third-party actions#585
rapids-bot[bot] merged 3 commits into
mainfrom
cheaper-checkout

Conversation

@jameslamb

@jameslamb jameslamb commented Jun 29, 2026

Copy link
Copy Markdown
Member

Contributes to #505

  • removes telemetry and source checkouts for package-publishing jobs (conda-upload-packages and wheels-publish)

And other tiny things I noticed while doing this:

  • removes outdated comments about setuptools-scm (RAPIDS does not use this any more)
  • switches from #v7 to #v7.0.0 in comments on actions/checkout (improves clarity of auto-generated PRs to update that)
  • updates all pre-commit hooks w/ pre-commit hooks

Notes for Reviewers

Is this safe?

I think so.

conda-upload-packages and wheels-publish don't depend on anything in the calling repo's source or git history.

The rapids-release-build check here sort of depends on git tags:

if rapids-is-release-build; then
RAPIDS_CONDA_TOKEN=${{ secrets.CONDA_RAPIDSAI_TOKEN }}
fi

But doesn't get it from a local checkout... it reads the GitHub-specific environment variable GITHUB_REF: https://github.com/rapidsai/gha-tools/blob/d85a30d7a8930b079ef681a086e8f3646120c27a/tools/rapids-is-release-build#L11

Impact

Reduces runtime of these jobs a tiny bit, and more importantly removes some network requests (a common source of CI instability).

The impact on runtime will be larger for repos where git clone is more expensive. For example, on a recent cudf build on main, checking out the code took 14 seconds and telemetry-related things added around 4 seconds.

image

https://github.com/rapidsai/cudf/actions/runs/28378826926/job/84082197842

How I tested this

Proposing testing this here: rapidsai/rmm#2458

@jameslamb jameslamb added improvement Improves an existing functionality non-breaking Introduces a non-breaking change labels Jun 29, 2026
@jameslamb jameslamb changed the title WIP: remove git clones and telemetry for package-publishing jobs, use full semver tags for third-party actions remove git clones and telemetry for package-publishing jobs, use full semver tags for third-party actions Jun 29, 2026
@jameslamb
jameslamb marked this pull request as ready for review June 29, 2026 16:23
@jameslamb
jameslamb requested a review from a team as a code owner June 29, 2026 16:23
@jameslamb
jameslamb requested review from msarahan and removed request for a team June 29, 2026 16:23
@jameslamb

Copy link
Copy Markdown
Member Author

This is ready for review, but shouldn't be merged until we've done the testing in rapidsai/rmm#2458

@jameslamb jameslamb mentioned this pull request Jun 29, 2026
7 tasks

@gforsyth gforsyth left a comment

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.

I'm all for removing the unnecessary checkouts and adding the full tags for the rest.

As for removing telemetry, I think I'm a +0 -- I haven't seen that particular step fail very often, but it's a job that only runs on main and release/ branches.

If we do have those upload jobs instrumented, I'm trying to think of what we might catch.

If they start taking longer, could mean:

  1. Artifacts are larger, but we'd catch that anyway from pydistcheck
  2. Network is having issues (but we'd see that everywhere)

Yeah, I'm good with this. Thanks, James!

rapids-bot Bot pushed a commit to rapidsai/rmm that referenced this pull request Jun 29, 2026
I believe that we don't need a source checkout for the RAPIDS CI jobs that publish conda packages and wheels.

rapidsai/shared-workflows#585 is proposing removing checkouts and telemetry from those workflows, to save some time and improve CI stability.

Proposing that we merge a PR here in `rmm` using those new workflows to test.

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

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #2458
@jameslamb

Copy link
Copy Markdown
Member Author

Thanks for the thorough review @gforsyth

Artifacts are larger, but we'd catch that anyway from pydistcheck

We only checks wheels with pydistcheck. conda packages are built very differently in a lot of our cases, so it might be worthwhile to add checks in CI on those sizes too. Proposed that here: rapidsai/build-planning#299

And technically we only check wheel files with that tool, so that wouldn't be enough to catch that we'd accidentally included other, unexpected files in whatever actions/upload-artifact points at.

If we do have those upload jobs instrumented, I'm trying to think of what we might catch.

I think your summary is right.

But I looked around today and I think we might not actually be capturing telemetry data for conda-upload-packages and wheels-publish workflows anyway.

sha: ${{ inputs.sha }}
# On 'push' or 'tag', 'inputs.sha' is null.
# Fall back to 'github.sha' to avoid needing a repo checkout.
sha: ${{ inputs.sha || github.sha }}

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.

The first build of that test RMM PR failed like this:

RAPIDS_REPOSITORY=rapidsai/rmm
fatal: not a git repository (or any parent up to mount point /)
Stopping at filesystem boundary (GIT_DISCOVERY_ACROSS_FILESYSTEM not set).
Error: Process completed with exit code 128.

(build link)

If the sha input to rapidsai/shared-actions/rapids-github-info is null or an empty string, it falls back to running git rev-parse HEAD.

https://github.com/rapidsai/shared-actions/blob/113b75588021524a58ebbd8c4b91fb46eb464a0c/rapids-github-info/action.yml#L34-L36

It'll be null when this workflow is triggered by push (merge to main) or tag.

In those cases, I think it's safe and appropriate to fall back to github.sha if inputs.sha is not provided. Based on my read of https://docs.github.com/en/actions/reference/workflows-and-actions/contexts, that should be the value we want in push or tag contexts.

I restarted rmm CI, let's see what it says: https://github.com/rapidsai/rmm/actions/runs/28388699537

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.

@gforsyth gforsyth left a comment

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.

Agree with your additional analysis and think this is good to go!

@jameslamb

Copy link
Copy Markdown
Member Author

/merge

@rapids-bot
rapids-bot Bot merged commit f106844 into main Jun 29, 2026
2 checks passed
@jameslamb
jameslamb deleted the cheaper-checkout branch June 29, 2026 17:58
rapids-bot Bot pushed a commit that referenced this pull request Jun 29, 2026
Contributes to #505

As described there, it's not uncommon for pulling the `rapidsai/ci-wheel` images to take 3-4 minutes.

This is extra painful for jobs like `wheels-publish`, which just need lightweight publishing tools and not CUDA libraries, compiler toolchain, etc.

This PR proposes working around that by doing the following:

* using a small `python:3.14-slim` image instead
* installing just the small set of necessary tools at runtime of the `wheels-publish`  job

## Notes for Reviewers

### Benefits

* faster `conda-uploads-packages` and `wheels-publish`, which means reduced end-to-end time for RAPIDS nightly pipeline (see "how I tested this")
* would allow us to stop installing `anaconda-client` and its dependencies in the `rapidsai/ci-conda` and `rapidsai/ci-wheel` images at https://github.com/rapidsai/ci-imgs
  - _that project has a lot of dependencies, so that might have a small but notable improvement in image size, build time, and pull time_
  - _that'd affect all wheel builds and conda building + testing jobs_

### Costs / Risks

* adds more network calls and package installs at runtime of `wheels-publish`, which might lead to more transient failures from network issues
* adds complexity to the workflow code

### Why not pre-build a `wheels-publish` image?

That WOULD make this even faster and avoid all those package installs at runtime.

But new images need to go through a compliance/legal approval process that's a bit heavier than this use case justifies, in my opinion. In my testing, installing tools took 15-20 seconds, so that's the most we'd save by having a pre-built image with everything installed.

### How I tested this

`rmm`'s `main` branch was already pointed at this branch for package-uploading jobs from #585.

Put up changes in a `gha-tools` branch (rapidsai/gha-tools#265) to force-overwrite existing packages, so the upload time to anaconda.org is included in the timings.

Clicked "re-run all jobs" on `rmm`'s most recent run on `main`.

| workflow                         | previous `main` (as of #585)  |  this PR           |
|----------------------------------:|:-----------------------------------------:|:------------------:|
| upload-conda                 |    1m32s                                     |   **1m15s** |
| wheels-publish-cpp       |   2m51s                                      |  **0m37s**  |
| wheels-publish-python |   3m3s                                        |   **0m41s** |

*builds from `rmm`: ([previous main](https://github.com/rapidsai/rmm/actions/runs/28388699537/attempts/2) | [this PR](https://github.com/rapidsai/rmm/actions/runs/28388699537/job/84139196301))*

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

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #586
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

improvement Improves an existing functionality non-breaking Introduces a non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants