Run boot-config migrator before delegating to feed update#2
Merged
Conversation
Vendors airplanes-webconfig's migrate-config.sh into the skeleton at /usr/local/lib/airplanes-update/migrate-config.sh and runs it on airplanes-config.txt during update-airplanes.sh, before the feed update delegation. This ensures legacy USER= configs are translated to the MLAT_USER + MLAT_ENABLED schema regardless of whether the user has updated webconfig recently. A CI drift job diffs the vendored copy against the airplanes-webconfig dev branch via raw.githubusercontent.com so the two copies cannot silently diverge.
Mirrors the empty-USER Anonymous default added in airplanes-webconfig#3. Keeps the drift check green; behavior described in that PR.
The migrator runs via 'bash "$migrator"', which needs readability, not the executable bit. If install drops the exec bit, the -x check skipped migration silently and the next feed daemon start strict-failed with a confusing 'Run Update Webconfig' message.
The migrator normalizes USER=preserved-user to USER="preserved-user" and emits MLAT_USER + MLAT_ENABLED. The smoke assertions were pinned to the pre-migration form. Update both rootfs smoke scripts to assert the post-migration shape; this also strengthens the test by verifying the migrator runs end-to-end as part of update-airplanes.sh.
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.
Vendors airplanes-webconfig's migrate-config.sh into the skeleton (installed under the airplanes-update lib path) and invokes it on airplanes-config.txt during update-airplanes.sh, between the template-key-add block and the feed update delegation. The legacy USER= form is translated to the split MLAT_USER + MLAT_ENABLED schema before the new feed daemons ever see the config, so users who click Update Feeder without having recently clicked Update Webconfig still get a clean migration.
A CI drift job diffs the vendored copy byte-for-byte against airplanes-webconfig's dev canonical via raw.githubusercontent.com, so the two copies cannot silently diverge. PR depends on the matching airplanes-webconfig change (airplanes-live/airplanes-webconfig#3) being on dev; the drift check will fail otherwise.