fix(homebrew): overwrite generated gateway config during migration - #3752
Merged
Merged
Conversation
Closes #3746 Use Homebrew atomic_write for exact legacy config migrations and keep the first-install write distinct in the formula test. Signed-off-by: Drew Newberry <anewberry@nvidia.com>
drew
requested review from
a team,
derekwaynecarr,
mrunalp and
sjenning
as code owners
September 27, 2026 18:45
johntmyers
approved these changes
Sep 27, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix Homebrew
post_installmigration for the two exact legacy gateway configs. Homebrew's guardedPathname#writerejects existing files, so the migration now usesatomic_writewhile first-install creation remains unchanged.Related Issue
Closes #3746
Changes
gateway_config.atomic_writeonly when an existing config matches a formula-generated schema-v1 default.writeand a migrationatomic_write.architecture/build.md.Deviations from Plan
None.
Testing
uv run pytest python/openshell/release_formula_test.py::test_generate_homebrew_formula_uses_channel_urls_and_exact_version -qmise run pre-commitmise run test(includes 257 Python tests and the Rust and TypeScript suites)mise run ci— blocked by unrelated Go gateway tests on this host:/etc/openshell/gateways/defaultadds a system gateway to cases that expect an empty list. A first run also encountered stale golangci-lint cache entries from a deleted worktree; a clean-cache rerun got past lint and reached the Go test failure.Checklist
architecture/build.mdpost_installwas not run on this Linux host