alamb opened a new issue, #853:
URL: https://github.com/apache/arrow-rs-object-store/issues/853

   **Describe the bug**
   
   The ASF license header in 
[`src/client/s3.rs`](https://github.com/apache/arrow-rs-object-store/blob/main/src/client/s3.rs)
 is missing its first line:
   
   ```rust
   // Licensed to the Apache Software Foundation (ASF) under one
   ```
   
   The file currently begins with the second line of the standard header:
   
   ```rust
   // or more contributor license agreements.  See the NOTICE file
   // distributed with this work for additional information
   ...
   ```
   
   This was reported by Xuanwo during the `0.14.2` RC1 vote and resulted in a 
-1 (non-binding) vote and a request to cut a new RC: 
https://lists.apache.org/thread/vq30yjj13lyk47tx2t4mrdt0z3ho211t
   
   The incomplete header appears to date back to the file's original 
introduction in arrow-rs in May 2023:
   -  apache/arrow-rs#4207 so it has been present in every release since.
   
   
   **To Reproduce**
   
   ```shell
   $ head -1 src/client/s3.rs
   // or more contributor license agreements.  See the NOTICE file
   ```
   
   Or scan the whole tree:
   
   ```shell
   $ grep -rL 'Licensed to the Apache Software Foundation' --include='*.rs' src
   src/client/s3.rs
   ```
   
   **Expected behavior**
   
   Every source file carries the complete standard ASF license header, and CI 
fails when a header is missing or incomplete.
   
   **Additional context**
   
   Why CI did not catch this: the `rat` job in 
[`.github/workflows/dev.yml`](https://github.com/apache/arrow-rs-object-store/blob/main/.github/workflows/dev.yml)
 runs Apache RAT 
([`dev/release/run-rat.sh`](https://github.com/apache/arrow-rs-object-store/blob/main/dev/release/run-rat.sh)),
 but RAT only detects whether a recognizable license is present — the truncated 
header still contains enough of the Apache-2.0 text to satisfy it. 
apache/arrow-rs uses the same RAT-based check and would not catch this either.
   
   apache/datafusion has a CI job that would catch this: a 
`license-header-check` job in 
[`.github/workflows/dev.yml`](https://github.com/apache/datafusion/blob/main/.github/workflows/dev.yml)
 that runs [HawkEye](https://github.com/korandoru/hawkeye) (`hawkeye check 
--config licenserc.toml` with `builtin = "Apache-2.0-ASF"`), which validates 
the exact, complete header text. See 
[`ci/scripts/license_header.sh`](https://github.com/apache/datafusion/blob/main/ci/scripts/license_header.sh)
 and 
[`licenserc.toml`](https://github.com/apache/datafusion/blob/main/licenserc.toml)
 in that repository. `hawkeye format` can also auto-fix headers.
   
   Proposed fix:
   
   1. Restore the missing first line of the header in `src/client/s3.rs`.
   2. Add a HawkEye-based license header check to CI (modeled on DataFusion's) 
so incomplete headers are caught at PR time rather than during release 
verification.
   


-- 
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]

Reply via email to