Skip to content

util: work around broken device naming#1593

Open
efahl wants to merge 1 commit intoopenwrt:mainfrom
efahl:profile-order
Open

util: work around broken device naming#1593
efahl wants to merge 1 commit intoopenwrt:mainfrom
efahl:profile-order

Conversation

@efahl
Copy link
Copy Markdown
Contributor

@efahl efahl commented Mar 26, 2026

There are a number of broken device specifications that redundantly map various images to the same device names. Handle most of these by ensuring that the actual device name maps to itself, rather than some arbitrary value in 'SUPPORTED_DEVICES' due to these incorrect device mappings in the profiles.json.

Fixes: openwrt/openwrt#22541

There are a number of broken device specifications that redundantly
map various images to the same device names.  Handle most of these
by ensuring that the actual device name maps to itself, rather than
some arbitrary value in 'SUPPORTED_DEVICES' due to these incorrect
device mappings in the profiles.json.

Fixes: openwrt/openwrt#22541
Signed-off-by: Eric Fahlgren <ericfahlgren@gmail.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 26, 2026

Codecov Report

❌ Patch coverage is 80.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 91.57%. Comparing base (5e65dec) to head (8217774).
⚠️ Report is 348 commits behind head on main.

Files with missing lines Patch % Lines
asu/util.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1593       +/-   ##
===========================================
+ Coverage   80.75%   91.57%   +10.81%     
===========================================
  Files          15       16        +1     
  Lines         977     1745      +768     
===========================================
+ Hits          789     1598      +809     
+ Misses        188      147       -41     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@aparcar
Copy link
Copy Markdown
Member

aparcar commented Apr 13, 2026

Can we actually fix this upstream?

@efahl
Copy link
Copy Markdown
Contributor Author

efahl commented Apr 13, 2026

Can we actually fix this upstream?

Theoretically, yes. Practically, it's spread around very thinly so they are hard to find (people don't always report the issues) and crosses version boundaries, so getting the PRs approved is pretty painful.

If this PR had logging as mentioned in its comments, that would give use pointers as to what is broken...

@map-b
Copy link
Copy Markdown
Contributor

map-b commented Apr 13, 2026

It's a common practice to allow "force-less" sysupgrading between compatible images. I cannot call these cases "broken specs" as everything was implemented coherently (including sysupgrade paths, platform checks) and manual sysupgrade works as intended the only thing that need some love is "external", in the ASU side.

We have enough info to do it correctly, selecting the profile candidate which has the board_name entry the first in the SUPPORTED_DEVICES list.

*Indeed this information(shared entries) could be really useful for a potential enhancement for offering any of the supported images. (I probably shouldn't have said this last but I'm starting to be desperate, it seems) :( this cannot be healthy...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Automatic/Online System Upgrade installs wrong firmware

3 participants