kou opened a new issue, #204:
URL: https://github.com/apache/arrow-swift/issues/204

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


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