ninglinLiu opened a new pull request, #3528:
URL: https://github.com/apache/iceberg-rust/pull/3528

   ## Which issue does this PR close?
   
   - Closes #3487.
   
   ## What changes are included in this PR?
   
   Ports `dev/check_license_notice.sh` into `dev/release/licenses.py` as a new 
`crates check` command, next to `dependencies check`, and removes the shell 
script. `make check-license-notice` (which CI runs) now calls `python3 
./dev/release/licenses.py crates check`.
   
   The checks are the same as before: the repository root `LICENSE` and 
`NOTICE` are non-empty files, and every publishable crate (from `cargo 
metadata`, `publish != []`) lists both files at the top of `cargo package 
--list --locked --no-verify --allow-dirty`, and its copies resolve to the root 
files. Errors are still printed as `::error::` annotations under GitHub 
Actions. `cargo metadata` is parsed with `json`, so the check no longer needs 
`jq`.
   
   ## Are these changes tested?
   
   Ran locally against `main`:
   
   - `python3 dev/release/licenses.py crates check` passes for all 10 
publishable crates.
   - Replacing the `crates/iceberg/LICENSE` symlink with a copy fails with 
`iceberg LICENSE does not resolve to the repository root LICENSE`.
   - Deleting `crates/catalog/sql/NOTICE` fails with `iceberg-catalog-sql crate 
is missing NOTICE in packaged file list`.
   - `ruff check` and `ruff format` are clean.
   
   ## AI Disclosure
   
   This PR was prepared with AI assistance and reviewed and tested by the 
author. The port is a one-to-one translation of the shell checks; the places 
worth a reviewer's look are the command name (`crates check`, chosen to sit 
beside `dependencies check`) and `Path.samefile`, which replaces the shell 
`-ef` test (both compare device and inode after resolving symlinks).
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to