mbutrovich opened a new issue, #27563:
URL: https://github.com/apache/datafusion/issues/27563

   ## Describe the bug
   
   `verify-release-candidate.sh` rejects a release whose `Cargo.toml` contains 
`SNAPSHOT`:
   
   
https://github.com/apache/datafusion/blob/13efc9c27d59b7fbc6503025042f14064c5fa0f7/dev/release/verify-release-candidate.sh#L153-L156
   
   The check misses a pre-release version in two ways.
   
   First, #26845 changed `main` to `-dev` versions (`57.0.0-dev` today), but 
the check still greps for `SNAPSHOT`, which no `Cargo.toml` has used since 
#1350. An RC cut with a leftover `-dev` version passes on every platform.
   
   Second, the check calls `find` without a starting path. GNU find defaults 
the path to `.`, but BSD find on macOS requires one and exits with `find: 
illegal option -- i`. That failure happens inside the `if ( ... )` condition, 
so `set -e` doesn't stop the script and the condition is false. On macOS the 
check passes without reading any `Cargo.toml`.
   
   ## To Reproduce
   
   On macOS:
   
   ```shell
   $ if ( /usr/bin/find -iname 'Cargo.toml' | xargs grep SNAPSHOT ); then echo 
found; else echo "check passed"; fi
   /usr/bin/find: illegal option -- i
   check passed
   ```
   
   On any platform, from a `main` checkout:
   
   ```shell
   $ if ( find . -iname 'Cargo.toml' | xargs grep SNAPSHOT ); then echo found; 
else echo "check passed"; fi
   check passed
   $ grep -m1 '^version' Cargo.toml
   version = "57.0.0-dev"
   ```
   
   I found this while verifying 56.0.0-rc2. A manual grep for `-dev` and 
`-SNAPSHOT` versions found none in that release.
   
   ## Expected behavior
   
   The check fails for any pre-release version suffix, on both GNU and BSD 
find. For example:
   
   ```shell
   if ( find . -name 'Cargo.toml' -print0 | xargs -0 grep -nE '^version *= 
*"[^"]*-(dev|SNAPSHOT)' ); then
     echo "Cargo.toml version should not have a -dev or -SNAPSHOT suffix for 
releases"
     exit 1
   fi
   ```
   


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