Repository navigation
Make dependencies.py generate fail on cargo-deny error - #1366
Merged
Merged
Conversation
dependencies.py generate fail on cargo-deny error
Comment on lines
+25
to
+31
| "crates/catalog/glue", | ||
| "crates/catalog/hms", | ||
| "crates/catalog/memory", | ||
| "crates/catalog/rest", | ||
| "crates/catalog/sql", | ||
|
|
||
| "crates/integrations/datafusion", | ||
|
|
||
| "bindings/python" | ||
| "bindings/python", |
Contributor
There was a problem hiding this comment.
We could use following codes to list all dirs:
cargo metadata --no-deps --format-version 1 | jq -r '.packages[] | .manifest_path | rtrimstr("/Cargo.toml")'
Contributor
There was a problem hiding this comment.
May we just need to call cargo metadata --no-deps --format-version 1 and process left parts with python.
Contributor
Author
There was a problem hiding this comment.
I was considering cargo metadata and find . -name Cargo.toml -exec dirname {} \; but landed with the python solution. cargo metadata skips the python binding subdir, find and the python solution is more future proof
LMK what you think!
Contributor
Author
There was a problem hiding this comment.
actually i prefer this PR as is right now and moved the change to #1370 since we need to regenerate the license after adding the new directories
kevinjqliu
force-pushed
the
kevinjqliu/show-script-error
branch
from
May 22, 2025 14:44
8bbb56b to
e61c44a
Compare
kevinjqliu
added a commit
that referenced
this pull request
May 22, 2025
…1370) ## Which issue does this PR close? <!-- We generally require a GitHub issue to be filed for all bug fixes and enhancements and this helps us generate change logs for our releases. You can link an issue to this PR using the GitHub syntax. For example `Closes #123` indicates that this PR will close issue #123. --> - Depends on #1366 ## What changes are included in this PR? <!-- Provide a summary of the modifications in this PR. List the main changes such as new features, bug fixes, refactoring, or any other updates. --> Instead of hardcoding a few repos to check in `dependencies.py`, lets walk down all subdirectories and get all with `Cargo.toml` file. This is more future proof in case we add new crates. We also need to regenerate license for 0.5.0 ``` python3 ../scripts/dependencies.py check python3 ../scripts/dependencies.py generate ``` which added 7 new files: ``` crates/catalog/s3tables/DEPENDENCIES.rust.tsv crates/examples/DEPENDENCIES.rust.tsv crates/integration_tests/DEPENDENCIES.rust.tsv crates/integrations/cache-moka/DEPENDENCIES.rust.tsv crates/integrations/cli/DEPENDENCIES.rust.tsv crates/sqllogictest/DEPENDENCIES.rust.tsv crates/test_utils/DEPENDENCIES.rust.tsv ``` ## Are these changes tested? <!-- Specify what test covers (unit test, integration test, etc.). If tests are not included in your PR, please explain why (for example, are they covered by existing tests)? -->
11 tasks done
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Which issue does this PR close?
What changes are included in this PR?
DEPENDENCIES.rust.tsvfiles were accidentally removed as part of the 0.5.0 prep PR (#1345). It was added back and updated in the follow up PR (#1363).I realized this happened because I did not install
cargo-denyin my env and the dependency generation script did not error.This PR changes generation script (
python3 ./scripts/dependencies.py generate) to error when the underlying subprocess call (cargo deny) errors.I also ran
uvx ruff format scripts/dependencies.pyto format the scriptAre these changes tested?
Yes, manually
I was also able to install
cargo-denyand confirm #1363 changes are all correct