Branches, flatpakref URLs

There’s been this discussion regarding which is the correct URL to suggest as a flatpakref file for a said flathub application.

It seems like this url keeps changing:
https://flathub.org/repo/appstream/org.qgis.qgis.flatpakref

Whereas this one does not (note the dl subdomain):
https://dl.flathub.org/repo/appstream/org.qgis.qgis.flatpakref

Can someone clarify what exactly is happening? If this is a thing, it’s likely a bug in flathub.org’s server more than anything else.

Thanks!

The flathub.org URL has been changing because of nginx misconfiguration. It’s supposed to be redirecting to dl.flathub.org, but because of the additional leading slash, it was hitting the wrong cache key. Just fixed that. Note that the dl.flathub.org URL may eventually change if someone reaches it from “unpopular” location which does not have it cached.

The main problem here is that flat-manager has not been designed for applications having multiple branches, and operates with the assumption it’s always stable or beta depending on the target repository. The lack of validation causes it to rewrite the flatpakref file with various branch values every time a new QGIS build is published. (See generate_flatpakref function.)

I think it might be better to submit QGIS LTS as a separate application with different app ID. This would also allow user to install both, with separate configuration directories, and also have two desktop launchers visible.