-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Auto-update mods option (enabled by github access token) #11682
base: master
Are you sure you want to change the base?
Conversation
"Update All" button inside mods page also better. Great repo that never existed. |
Good point, but I'm not sure translating that down to ratelimit points will be enough to overload the ratelimit. Not every player there will open mod manager or relaunch often. And the GraphQL ratelimit is a) much more generous and b) depends on query - count of nodes. This is balanced so any query roundtrip costs one point (ahem, I did those calculations a while ago, hope they still hold), meaning per hour we can cover 5000 autoupdate queries or 625 mod manager launches (assuming 800 mods in existence). So... the overload likelihood is possibly even comparable to the REST ratelimit, hard to say. But then again that's why I stalled this for so long - I simply didn't have the idea to let users enter their own PAT, which makes the ratelimit a thing of the past.
Possibly. Then again, took me just under a minute just now, most of that searching "where did they hide that again?". With a nice terse wiki entry1, we could enable a lot of them - and the ones la... ahem, the rest is simply stuck with REST and manual updates... Footnotes
|
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
# Conflicts: # core/src/com/unciv/ui/screens/modmanager/ModManagementScreen.kt
Conflicts have been resolved. |
This one is still a "no" for me, so long as it uses a Github PAT. |
Would take 15-20s, not 500ms, as you cannot ask the REST api to cough up metadata on a specific preselected list of repositories. I only merged this forward to get us more thinking time. |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
This PR is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 10 days. |
References
Notes
- Start Unciv (or change access token while options is open from main menu).
- Immediately starts a background query to github asking for limited metadata of just the mods you installed, query and answer have chances to fit in one packet.
- While this runs there's the old animated loading icon in the bottom left corner of the Mods button - and it's grayed.
- When the answer comes, is can be a failure or partially successful: Errors are displayed, the prevalent one (you got a mod without public repo) made translatable.
- The "Ignore" button of the error popup causes that exact same set of errors to be ignored on subsequent starts
- Timestamps are compared, and if any mod is outdated the Mods button text changes to "Update Mods"
- Clicking "Update Mods" asks whether you want to update, listing the mods, and a No goes directly to the mod manager
- "Yes" starts another background job downloading and installing the outdated mods
- While this runs the Mods button is grayed and disabled - but all others are not and will cancel the job
- I' convinced browsing Civilopedia while the autoupdater finishes is possible - untested.
Questions
addGoodSizedLabel
method globally instead?Visuals
An outdated video - too lazy to artificially outdate mods to capture a fresh one
(and the percentage is off due to boxing closures and concurrency - long fixed):
Peek.2024-06-01.Autoupdate.mp4
"wanna update" question:
"hey errors" popup: