Replies: 1 comment
-
Working implementation of the target mapper here Some stats for the crawl, using a sequential cooldown of
So the crawl takes 10mn, and you probably request data faster going through the folders on the Qt repo when doing it manually! 0.2s is fast enough and not too straining. The user agent is also very open about who/what it is.
|
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
The idea is simple, and is a way to answer last year's call from sir @miurahr! Let's make
aqtinstall
less high maintenanceWhat's the data, theta? 🐬
The main problem is very obviously that at its core,
aqtinstall
is a two teams project that don't communicate (us and Qt). So, is the solution communication? Of course not, I'm an autistic engineer, the solution is automation.The main maintenance requirements is the changes done by the Qt team in their remote repository. It is not all update requirements, but removing this from our concerns would significantly reduce the update rate. It is because, even when those changes seem like 'a simple edge case to add', it quickly gets out of hand when it becomes the heart of a project that is serving tons of packages and that needs to be reliable for its users. Some versions have special rules, some miss things, then tools are removed from versions altogether... Sum this over a few months/year and you turn the project into a massive fractal of switch statement for each user request.
Speedrunning the steady state
As mentioned, the project is converging to a state where each user request has its own hard-coded answer. Well, let's do that at once instead of doing it case by case. It's not as stupid as it sounds, hear me out.
Definitions
Let's agree on those terms to make discussions easier
target repositories
(ortarget repos
) are the folders that contain everything relevant for a host and a target (e.g.linux x64
+desktop
). They hold aUpdates.xml
file.online/qtsdkrepository/linux_x64/desktop/
is thetarget repository
Linux x64 on desktoppackages
are the name of the leaves of the folder structure, they hold the tarballs for a host, a target, a version, and module(s)qt.qt6.683.linux_gcc_64
is apackage
of the target repositorylinux_x64-desktop
for the module root (aka the base module, '') of version6.8.3
on architecturelinux_gcc_64
.extensions.qtpdf.683.win64_msvc2022_64
is a package of thetarget repository
windows_x86-extensions
for the moduleqtpdf
of version6.8.3
on architecturemsvc2022_64
download paths
ofpackages
are the URL pathname that, when appended to a base server URL, point to the folder of apackage
online/qtsdkrepository/linux_x64/desktop/qt6_660/qt.qt6.660.gcc_64
is thedownload path
ofqt.qt6.660.gcc_64
Needs
packages
to adownload path
, and that is automated. Let's call this the Target MapperMandatory requirements
Solutions
Target Mapper
Description
This tool is running entirely on the Github Actions servers. This tool automatically crawls through the
downloat.qt.io
tree, and keeps a map associating eachpackage
with their URL on the remote. It is easier than it seems, as it only has to pull eachUpdates.xml
file it finds and correctly map everything in a JSONFeatures
workflow_dispatch
, ideally some project contributor should be able to manually start this specific workflowmissing package
): there's a lot of automation possible using Github Actionsqt-packages.json
file. Looks like:aqtinstall
repo, on its own branch (unusual git usage): each generation automatically commit the changes to the generated target map file to the special branchNotes
url
field of the JSON and it works no matter the base mirror chosen:https://download.qt.io/${url}/../Updates.xml
since those files contain the hash of the packageaqtinstall
flagEstimated performance
Target Finder
Description
Just an alias for... well
aqtinstall
.Features
aqtinstall
interface, except for the addition of flags:--target-map TAG_NAME
that defaults tolatest
and is used to know what target map version to pull--refresh-target-map
that updates the local target map using git, making this super quick--disable-target-map
that basically revertsaqtinstall
to its current behavior--map [PACKAGE:URL]
that allows for run-time additions to the target map (useful to debug users with special issues)--target-package [NAME]
to install a specific package without going throughaqtinstall
internal logic--refresh-target-map
(discuss? a update each run is possible but maybe overkill) the target mapper branch repo is cloned to the cache directory of the useraqtinstall
is ran without--disable-target-map
inputted:--map
was inputted, create a priority temporary map with user specified data, that takes priority whenever the program needs to read the target map. If one package is described in the target map, but the user choses to change it using--map
, then the user inputted update is prioritized, but then the target map is used if needed: that means that the temporary user map is merged onto the official target map.aqt list-*
command:aqt list-*
command:Conclusions
This should solve all future issues of Qt repo architecture. It is safe for the clients because that list may be third party, it is not hosting URLs, only pathnames. Moreover, each feature of this update is designed so it can only add entries to the current ones, never remove, making sure the software is at least as good as it is now.
It makes updating repo issues much faster as a workflow manual start is all it takes, and with automatic periodic workflow runs, we are guaranteed that if Qt breaks something, the users are at most locked out for 24h (0h if they chose to use the official installer feature).
The actual updates requiring real programming work are now easier to prioritize. Plus, for special issues, we can share a
--map
command to users that immediately fixes their issue without having to update the code. It can be used in wild ways likepython -m aqt install-qt --map "notqt.special:https://noqtsite.com/specialpackage" --target-package "noqt.special"
and enable virtually any addition/fix live without having to touch the code. This being a CLI value make it possible to use frominstall-qt-action
as wellTell me what you think about this, give me your feedback on the idea!
Beta Was this translation helpful? Give feedback.
All reactions