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: use maintained action to setup rust toolchain #585

Merged
merged 10 commits into from
Mar 19, 2025

Conversation

roeap
Copy link
Collaborator

@roeap roeap commented Dec 10, 2024

What changes are proposed in this pull request?

The actions-rs/toolchain action is deprecated in favor of actions-rust-lang/setup-rust-toolchain. This PR updates the usages of the respective actions in the github workflows. THe new action already includes an integration with the rust-cache action, so no need to set that up separately anymore.

This also sets up a dependabot configuration for cargo and github-actions which we may or may not choose to keep.

How was this change tested?

no code changes.

@roeap roeap force-pushed the ci/toolchain-action branch from b779455 to f334d14 Compare December 10, 2024 15:05
@roeap roeap requested a review from zachschuermann December 10, 2024 15:09
Copy link

codecov bot commented Dec 10, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 84.38%. Comparing base (5f23fad) to head (721b2ab).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #585   +/-   ##
=======================================
  Coverage   84.38%   84.38%           
=======================================
  Files          77       77           
  Lines       19224    19226    +2     
  Branches    19224    19226    +2     
=======================================
+ Hits        16222    16224    +2     
  Misses       2200     2200           
  Partials      802      802           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Collaborator

@zachschuermann zachschuermann left a comment

Choose a reason for hiding this comment

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

nice thanks! changes to existing CI LGTM, just a question on adding dependabot and also overall question: it looks like the two most popular rust toolchains in CI are dtolnay/rust-toolchain and actions-rust-lang/setup-rust-toolchain with the latter saying that it was heavily inspired by dtolnay's? I guess this has caching built-in as the main benefit?

Copy link
Collaborator

Choose a reason for hiding this comment

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

oh nice! are we planning on enabling dependabot for the repo?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

well - i guess thats up for debate. but since this was literally just copy and paste from somewhere else, it was low cost to spark the discussion by just providing the solution 😆.

From my end, I think the utility may unfortunately be limited as auto-updates for the major dependencies (e.g. arrow) almost never work out of the box - at least in delta-rs. That said, I still landed on "let's add it" to keep the actions fresh and have the occasional rust version bump that works.

Copy link
Collaborator

Choose a reason for hiding this comment

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

yea I think it is helpful insofar as it just automatically opens small PRs to bump versions and we may (probably) have to manually help upgrade but the 'reminder' to upgrade seems useful? curious to hear what others think

Copy link
Collaborator

Choose a reason for hiding this comment

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

the dependabot-quickstart-guide doesn't recommend setting up manually like this, but rather suggests going into settings and letting github create this file. Wondering if we should just do it that way?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm okay trying this out, but also a bit skeptical of the utility here. As far as I can tell it only runs cargo update. Generally with how we've set up our Cargo.toml this will only do minor updates (i.e. it'll never update arrow 53->54). Maybe that's good, but we need a process to also run cargo outdated and try and stay on top of more major updates as well, so I'm not sure how much time this saves us.

@zachschuermann
Copy link
Collaborator

just want to make sure: is the caching working? I see the following errors in test (ubuntu-latest) in the post-run step:

Error: ENOENT: no such file or directory, opendir '/home/runner/work/delta-kernel-rs/delta-kernel-rs/target/tests/target'
Error: Error: ENOENT: no such file or directory, opendir '/home/runner/work/delta-kernel-rs/delta-kernel-rs/target/tests/target'
... Cleaning cargo registry (cache-all-crates: false) ...
... Cleaning cargo/bin ...
... Cleaning cargo git cache ...
... Saving cache ...
/usr/bin/tar --posix -cf cache.tzst --exclude cache.tzst -P -C /home/runner/work/delta-kernel-rs/delta-kernel-rs --files-from manifest.txt --use-compress-program zstdmt
Failed to save: Unable to reserve cache with key v0-rust-test-64e5ee6e-0ce599cb, another job may be creating this cache. More details: Cache already exists. Scope: refs/pull/585/merge, Key: v0-rust-test-64e5ee6e-0ce599cb, Version: 0d[39](https://github.com/delta-io/delta-kernel-rs/actions/runs/12258931755/job/34199879152#step:7:40)aea52349942f5791850f64e514ac9b6831c456410ea5407f320467a8948d

Copy link
Collaborator

@nicklan nicklan 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 for the runner changes. not as sure about dependabot :)

@@ -109,7 +92,7 @@ jobs:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.30.x'
cmake-version: "3.30.x"
Copy link
Collaborator

Choose a reason for hiding this comment

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

In yaml double quotes allow escapes and other things, so I tend to prefer single quotes unless I need that, as, fewer surprises. Any reason you changed this?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

auto-formatting ... maybe i need to make prettier or whoever it was less agressive :).

Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay sg. Maybe change back before merge, but not a big deal.

@@ -0,0 +1,14 @@
# Please see the documentation for all configuration options:
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
Copy link
Collaborator

Choose a reason for hiding this comment

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

This link doesn't seem to work. it just goes to a generic support page

Copy link
Collaborator

Choose a reason for hiding this comment

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

the dependabot-quickstart-guide doesn't recommend setting up manually like this, but rather suggests going into settings and letting github create this file. Wondering if we should just do it that way?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm okay trying this out, but also a bit skeptical of the utility here. As far as I can tell it only runs cargo update. Generally with how we've set up our Cargo.toml this will only do minor updates (i.e. it'll never update arrow 53->54). Maybe that's good, but we need a process to also run cargo outdated and try and stay on top of more major updates as well, so I'm not sure how much time this saves us.

Copy link
Collaborator

@zachschuermann zachschuermann left a comment

Choose a reason for hiding this comment

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

LGTM long as all the caching still works :)

@roeap
Copy link
Collaborator Author

roeap commented Mar 19, 2025

actions now show

... Restoring cache ...
Cache hit for: v0-rust-test-Linux-x64-f47faad6-dc67ccb0
Received 209715200 of 500222278 (41.9%), 199.4 MBs/sec
Received 496027974 of 500222278 (99.2%), 235.8 MBs/sec
Received 500222278 of 500222278 (100.0%), 229.7 MBs/sec
Cache Size: ~477 MB (500222278 B)

so i am reasonably confident the caching still works.

@roeap roeap changed the title ci: use official action to setup rust toolchain ci: use maintained action to setup rust toolchain Mar 19, 2025
Copy link
Collaborator

@nicklan nicklan left a comment

Choose a reason for hiding this comment

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

thanks!

@@ -109,7 +92,7 @@ jobs:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
with:
cmake-version: '3.30.x'
cmake-version: "3.30.x"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Okay sg. Maybe change back before merge, but not a big deal.

@roeap roeap merged commit 34b9d1a into delta-io:main Mar 19, 2025
21 checks passed
@roeap roeap deleted the ci/toolchain-action branch March 19, 2025 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants