Regenerate FlatBuffers Swift sources automatically on Dependabot updates

Aperta
#204 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
52/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Attiva
Stack tecnologico
github-actions, swift

Direzione di ricerca

Read Package.swift and gen-flatbuffers.sh to see how the FlatBuffers runtime version and generated Swift sources are currently handled; the script’s paths and pinned Apache Arrow format revision need attention. Then map the requested shell and gh workflow to Dependabot pull requests and inspect how CI builds and tests the package. Done means qualifying version bumps regenerate Sources/Arrow/*_generated.swift, update the PR branch when needed, and run build and tests.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

Describe the enhancement requested

We commit the FlatBuffers generated Swift sources (Sources/Arrow/*_generated.swift). They must be regenerated with the flatc version that matches the FlatBuffers Swift runtime version in Package.swift.

Dependabot only updates Package.swift/Package.resolved. So a Dependabot PR that bumps FlatBuffers can't pass CI by itself, and someone has to regenerate the sources manually. For example, #160 (25.2.10 -> 25.12.19) fails CI.

How about adding a GitHub Actions workflow that regenerates the sources on Dependabot PRs? It would:

  1. Run on Dependabot PRs that change the FlatBuffers version in Package.swift
  2. Download the flatc binary for that version from the google/flatbuffers releases
  3. Fetch format/*.fbs from apache/arrow at a pinned revision
  4. Run gen-flatbuffers.sh and push the regenerated sources to the PR branch if there are any changes

Notes:

  • This only automates regeneration. If the runtime API changes, we still need to update the hand-written code manually in the PR.
  • gen-flatbuffers.sh uses paths for the old repository layout. We need to fix them as part of this. We should also record the pinned apache/arrow revision for format/*.fbs in the script.
  • Workflows triggered by Dependabot get a read-only GITHUB_TOKEN by default, so the workflow needs permissions: contents: write.
  • Commits pushed with GITHUB_TOKEN don't trigger other workflows. So the workflow should also build and run the tests after regeneration, or we need to re-run CI manually.
  • We should use only shell and gh (no third-party actions) to comply with the ASF GitHub Actions policy.

We can apply the same approach to the Protocol Buffers/gRPC generated sources in Sources/ArrowFlight/ later.

Lingua principale
Swift
Stelle
33
Fork
20
Merge medio
1h 38m
PR unite (30g)
4

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di apache/arrow-swift

Tutte le issue di apache/arrow-swift

Issue simili

Altre issue su Swift

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.