Regenerate FlatBuffers Swift sources automatically on Dependabot updates
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 52/100
- Issue type
- Feature
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- github-actions, swift
- Domain
- build-system, ci-cd
Research direction
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.
Written by the indexing model from the issue text.
Description
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:
- Run on Dependabot PRs that change the FlatBuffers version in
Package.swift - Download the
flatcbinary for that version from thegoogle/flatbuffersreleases - Fetch
format/*.fbsfromapache/arrowat a pinned revision - Run
gen-flatbuffers.shand 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.shuses paths for the old repository layout. We need to fix them as part of this. We should also record the pinnedapache/arrowrevision forformat/*.fbsin the script.- Workflows triggered by Dependabot get a read-only
GITHUB_TOKENby default, so the workflow needspermissions: contents: write. - Commits pushed with
GITHUB_TOKENdon'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.
- Dominant language
- Swift
- Stars
- 33
- Forks
- 20
- Avg merge
- 1h 38m
- Merged PRs (30d)
- 4
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from apache/arrow-swift
-
Mark generated files as linguist-generatedPossibly taken @sidpug-arcana claimed this today. Open
Difficulty 1/5 1-3 hours Newbie friendliness 85/100
apache/arrow-swift#203 · 1 comment ·
-
setup-swift doesn't work on Ubuntu 26.04Possibly taken @ump45nose claimed this 3 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 66/100
apache/arrow-swift#199 ·
-
BaseBufferBuilder.isNull returns the inverse of the null statePossibly taken @maltzsama claimed this 98 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
apache/arrow-swift#180 ·
-
ArrowReader.fromFile crashes on files smaller than the Arrow file markerPossibly taken @maltzsama claimed this 98 days ago. Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
apache/arrow-swift#176 ·
-
Difficulty 3/5 1-2 days Newbie friendliness 72/100
apache/arrow-swift#186 ·
All issues in apache/arrow-swift
Similar issues
-
🎉 Add BossanovaOpen
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
jaywcjlove/awesome-mac#4096 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 85/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
altic-dev/FluidVoice#1264 ·
Maintainers usually reply within 1 day
-
needs-triage S3: minor
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
manaflow-ai/cmux#28422 · 1 comment ·
Maintainers usually reply within 1 day