Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allow for unexpcted version names in checks & remediations
Summary: Upgrading from a wiped bletchley fails, due to image version name validation in flashy checks and remediations ``` 2024-03-13 02:41:18.275510 - Unsafe to reboot error: "Unable to parse version info: No match for regex 'bletchley-v(?P<year>[0-9]+).(?P<week>[0-9]+)' for input 'bletchley-9e5605ae7d-dirty'". ``` We should allow for Flashy to upgrade from versions without a `vYYYY.WW.N` version tag, such as the OSS image build or locally built versions, and only proceed to the year check if it's an actual date tagged version Test Plan: Test upgrade from same device: ``` $ oobgrader --host macbmc5r0034p0049-oob.02.pci1.facebook.com --fbpkg-name openbmc.image.bletchley:weeklybuild --flashy-tag e44d3bf --wait Host Workflow ID Progress Status Result ------------------------------------------ ------------------------------------ ---------- ----------------------- ---------------------- macbmc5r0034p0049-oob.02.pci1.facebook.com 44c2f034-d1ae-4bc3-b692-40c17113f1ac finished WorkflowStatus.FINISHED FinishStatus.SUCCEEDED ``` Test upgrade on wedge100 to ensure normal behaviour ``` $ oobgrader --host fboss8382003.snc1 --primary-only --wait --force --flashy-tag e44d3bf --allow-downgrade Host Workflow ID Progress Status Result --------------------- ------------------------------------ ---------- ----------------------- ---------------------- fboss8382003-oob.snc1 647a8025-e0c2-4977-8208-dbede581f229 finished WorkflowStatus.FINISHED FinishStatus.SUCCEEDED ``` --- Unit tests: ``` ~/local/openbmc/tools/flashy (flashy-reg)]$ ./scripts/run_unit_tests.sh 141/141 unit tests passed ``` Reviewed By: doranand Differential Revision: D54872760 fbshipit-source-id: 0952d175e12fb9c9e958db9563267e40cadaab1f
- Loading branch information