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

[Fix] Only download Winetricks every 7 days #3527

Merged
merged 1 commit into from
Feb 6, 2024
Merged

Conversation

CommandMC
Copy link
Collaborator

Before, we'd re-download Winetricks on every Heroic startup. This isn't a good idea for many reasons

utils/inet's downloadFile function already has the option to cache if the file it's pointing to is younger than X seconds, so we can just use it.
Ideally we'd consolidate the two downloadFiles into one, but they have a very different featureset & function, so that'd be a larger refactor


Use the following Checklist if you have changed something on the Backend or Frontend:

  • Tested the feature and it's working on a current and clean install.
  • Tested the main App features and they are still working on a current and clean install. (Login, Install, Play, Uninstall, Move games, etc.)
  • Created / Updated Tests (If necessary)
  • Created / Updated documentation (If necessary)

@CommandMC CommandMC added the pr:ready-for-review Feature-complete, ready for the grind! :P label Feb 5, 2024
@CommandMC CommandMC requested a review from a team February 5, 2024 22:34
@CommandMC CommandMC self-assigned this Feb 5, 2024
@CommandMC CommandMC requested review from arielj, flavioislima, Etaash-mathamsetty, Nocccer and imLinguin and removed request for a team February 5, 2024 22:34
@arielj
Copy link
Collaborator

arielj commented Feb 5, 2024

I'd make it even longer than 24hs, I'd pick 1 week minimum, or even 1 month.

I don't think we need to be on the edge of winetricks. Most of the use cases we have are installing d3dcompiler/vcrun/etc

and if a user really needs to get it updated we can instruct them to clear the cache

@arielj
Copy link
Collaborator

arielj commented Feb 5, 2024

Like... if I understand this right, between the last 2 releases of winetricks it took like 10 months
image

@CommandMC
Copy link
Collaborator Author

We're not looking at Winetricks releases, we're looking at the master version (precisely because releases are so far apart)

Bumping up the delay does sound sensible though. Are you sure clearing the cache also clears this file?

@arielj
Copy link
Collaborator

arielj commented Feb 5, 2024

We're not looking at Winetricks releases, we're looking at the master version (precisely because releases are so far apart)

I see, at least from a quick look at the commits it looks like once a month is enough? I see the last commit is from 2 weeks ago for example

Are you sure clearing the cache also clears this file?

Oh now I'm not sure, I was expecting the clear cache to clear this cache too haha... well... we can instruct the user to delete the file manually haha

@Etaash-mathamsetty
Copy link
Member

I'd make it even longer than 24hs, I'd pick 1 week minimum, or even 1 month.

I don't think we need to be on the edge of winetricks. Most of the use cases we have are installing d3dcompiler/vcrun/etc

and if a user really needs to get it updated we can instruct them to clear the cache

agreed, 1 week seems good

This is done by moving the download to `utils/inet`'s `downloadFile`
@CommandMC CommandMC force-pushed the fix/winetricks-daily branch from 3cf3a68 to 47b140f Compare February 5, 2024 23:01
@CommandMC
Copy link
Collaborator Author

I was expecting the clear cache to clear this cache too

Heroic as a whole doesn't really know about this file being cached, so that's currently not the case. Could of course make that a thing if this ends up being an issue, but Winetricks has also made some changes over the years so slightly-outdated versions should no longer be an issue

@CommandMC CommandMC changed the title [Fix] Only download Winetricks every 24 hours [Fix] Only download Winetricks every 7 days Feb 5, 2024
Copy link
Collaborator

@arielj arielj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@CommandMC CommandMC merged commit 72be39a into main Feb 6, 2024
9 checks passed
@CommandMC CommandMC deleted the fix/winetricks-daily branch February 6, 2024 01:56
@Heroic-Games-Launcher Heroic-Games-Launcher locked and limited conversation to collaborators Feb 6, 2024
Copy link
Member

@flavioislima flavioislima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
pr:ready-for-review Feature-complete, ready for the grind! :P
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants