Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow defaulting to snapshots builds if no stable builds are found for a device #20

Open
Lanchon opened this issue Jul 20, 2024 · 3 comments

Comments

@Lanchon
Copy link

Lanchon commented Jul 20, 2024

when using the fw selector, you can remove the version=<x.x.x> url parameter to create a link to the latest available build for a device.

for example, this link will pre-select the latest build for WHW03 V2:

however, if there are no stable builds for a device yet (still on snapshot), the same type of link will fail:

these links are useful and are sometimes used in devices wikis (and i think they should be auto-generated in the ToH now). however, currently they can't be used for devices still on snapshot (whose wikis tend to be more actively maintained, paradoxically).

please consider fixing this by defaulting to snapshots if stable builds are not found.

@mwarning
Copy link
Collaborator

mwarning commented Sep 5, 2024

A missing version in the link is undefined behavior. I like to keep selector simple and not added any logic behind it.

@Lanchon
Copy link
Author

Lanchon commented Sep 7, 2024

that's too bad... it's reasonable to have a link to the latest release software for each device.

such functionality i baked in many platforms, eg: https://github.com/openwrt/openwrt/releases/latest

in any case, because links missing the version currently resolve to latest version instead of faulting, people reasonably thought that that was feature and started using it. so now there are a bunch of links from device pages to the firmware selector that work but are technically undefined.

for example, this page includes this line:

Official firmware: https://firmware-selector.openwrt.org/?target=ipq806x%2Fgeneric&id=arris_tr4400-v2

yes, that's a page i built myself for a port that i did, but i took inspiration/copied from other wiki entries.

besides that case, i know i added those types of links a couple of times in the wiki, for devices i ported and also others i helped document. i always thought that having to use a special form for devices not yet with a stable (to point to snapshot) release was a nuisance.

@mwarning
Copy link
Collaborator

mwarning commented Sep 8, 2024

I had the same idea actually and added it in 4.0.0 (https://github.com/openwrt/firmware-selector-openwrt-org/blob/master/CHANGELOG.md?plain=1#L40)

But the translation layer code (collect.py) was removed in favor of simplicity and reducing local state. That makes it very hard for the OFS to implement this. The OFS would need to load all release information at once, that would multiply the OFS load traffic by 30x).

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

No branches or pull requests

2 participants