`verify-release-candidate.sh` version check doesn't catch `-dev` versions and is skipped on macOS

Offen Anfängerfreundlich
#27,563 1 Kommentar 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Maintainer antworten meist innerhalb von 1 Tag

@vinycalves arbeitet bereits daran.

Seit 18.11.2026.

Bewertung

Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Anfängerfreundlichkeit
78/100
Issue-Typ
Bug
Klarheit
Klar beschrieben
Aktivitätsstatus
Aktiv
Tech-Stack
rust, shell

Rechercherichtung

Lies dev/release/verify-release-candidate.sh im Bereich der vorhandenen Versionsprüfung für Cargo.toml und führe dann die Reproduktionsbefehle aus dem Issue unter GNU und BSD/macOS aus. Passe die Prüfung so an, dass sie die angegebenen Suffixe -dev und -SNAPSHOT erkennt und mit beiden find-Implementierungen funktioniert. Fertig ist es, wenn eine Vorabversion die Prüfung auf beiden Plattformen nicht besteht und eine Release-Version sie besteht.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Beschreibung

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:

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

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

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
Vorherrschende Sprache
Rust
Sterne
9.6k
Forks
2.6k
Ø Merge
3 T. 5 Std.
Gemergte PRs (30 T.)
352

Entwicklungsumgebung

In Codespaces öffnen

Startet den Dev-Container des Projekts im Browser, mit Ihrem eigenen GitHub-Konto.

Erste Schritte

  1. Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
  3. Forken Sie das Repository und arbeiten Sie in einem Branch.
  4. Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.

Mehr aus apache/datafusion

Alle Issues in apache/datafusion

Ähnliche Issues

Weitere Issues zu Rust

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.