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

Only fetch MAD manifesto on server join #821

Merged

Conversation

Alystrasz
Copy link
Contributor

@Alystrasz Alystrasz commented Jul 14, 2024

Previously, the verified mods manifesto was fetched on game start without checking if the verified mod feature is enabled Squirrel-side; with this, the manifesto is only fetched when the user wants to download a mod (meaning they enabled the feature beforehand).

(must be merged with the launcher PR!)

Mod changes

  • Squirrel VM now has the responsability to fetch verified mods manifesto;
  • When joining a server requiring mods, if said mods aren't found in current player profile, verified mods manifesto will be fetched to check if they can be automatically downloaded.

TODOs

Testing

Without PRs:

  1. Launch game;
  2. Check the logs: they should display verified mods manifesto was fetched close to game launch;

With PRs:

  1. Install both launcher and mods PRs;
  2. Launch game, reach MP lobby and enable MAD (allow_mod_auto_download 1);
  3. Try and connect to a server requiring verified mods (Space battle or Parkour server should be up at the time of writing);
  4. Check the logs: manifesto should be fetched when trying to join the server.
Media
delayed_manifesto_fetching.webm

(if you look closely, you can see verified mods manifesto is fetched WHEN joining the server, around 0:12 in the video)

Previously, the verified mods manifesto was fetched on game start
without checking if the verified mod feature is enabled Squirrel
-side.

Now, the manifesto is only fetched when the user wants to
download a mod (meaning they enabled the feature beforehand).
@Alystrasz Alystrasz marked this pull request as ready for review July 15, 2024 22:41
@GeckoEidechse GeckoEidechse added needs testing Changes from the PR still need to be tested needs code review Changes from PR still need to be reviewed in code labels Jul 26, 2024
@Alystrasz Alystrasz marked this pull request as draft July 28, 2024 01:19
@Alystrasz Alystrasz marked this pull request as ready for review July 28, 2024 10:08
@GeckoEidechse
Copy link
Member

So uh I may have found an issue with requiring the exact matching mod version :3

image

@Alystrasz
Copy link
Contributor Author

So uh I may have found an issue with requiring the exact matching mod version :3

Well, main branch indeed is not up-to-date: https://github.com/R2Northstar/NorthstarMods/blob/main/Northstar.Custom/mod.json#L4
I guess final mods version is set in the CI when creating a release?

Copy link
Member

@GeckoEidechse GeckoEidechse left a comment

Choose a reason for hiding this comment

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

So uh maybe we should re-consider requiring exact matching version (or add an exception for Northstar.Custom (or Northstar.* in general)

In particular, cause the Northstar.Custom version I had was none matching, I got

image

And this is with MAD disabled btw

image

@GeckoEidechse
Copy link
Member

I guess final mods version is set in the CI when creating a release?

Yes but regardless of that we have the issue where if someone is not running the exact same version as server (maybe cause server is slightly outdated which is often the case) we end up with client being unable to join despite there not necessarily being breaking changes. Not sure what the best approach is here tbh...

@Alystrasz
Copy link
Contributor Author

I guess final mods version is set in the CI when creating a release?

Yes but regardless of that we have the issue where if someone is not running the exact same version as server (maybe cause server is slightly outdated which is often the case) we end up with client being unable to join despite there not necessarily being breaking changes. Not sure what the best approach is here tbh...

I guess we can be tolerant regarding core mods and simply add an exception to the rule regarding Northstar.* mods?

@GeckoEidechse
Copy link
Member

I guess we can be tolerant regarding core mods and simply add an exception to the rule regarding Northstar.* mods?

Yeah, I'd say that's the way to go until we figure out a nicer system ^^

@Alystrasz
Copy link
Contributor Author

So uh maybe we should re-consider requiring exact matching version (or add an exception for Northstar.Custom (or Northstar.* in general)

In particular, cause the Northstar.Custom version I had was none matching, I got

image

And this is with MAD disabled btw

image

This should be fixed with 9f1eb45.

Copy link
Member

@GeckoEidechse GeckoEidechse left a comment

Choose a reason for hiding this comment

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

Confirmed working in testing together with R2Northstar/NorthstarLauncher#751

Enabled MAD and joined a server. Observed the delayed manifesto fetching as intended.

@GeckoEidechse GeckoEidechse added almost ready to merge Apart from any small remaining other issues addressed by other labels, this would be ready to merge and removed needs testing Changes from the PR still need to be tested labels Jul 28, 2024
@GeckoEidechse GeckoEidechse requested a review from Zanieon July 28, 2024 23:57
@GeckoEidechse
Copy link
Member

GeckoEidechse commented Jul 28, 2024

@Zanieon offered to do code review some time soon later ^^
After that it's ready to merge together with R2Northstar/NorthstarLauncher#751

Copy link
Contributor

@Zanieon Zanieon left a comment

Choose a reason for hiding this comment

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

Code looks alright to me, good to go.

@GeckoEidechse GeckoEidechse changed the title refactor: MAD manifesto VM fetching Only fetch MAD manifesto on server join Jul 29, 2024
@GeckoEidechse GeckoEidechse merged commit d5b35ee into R2Northstar:main Jul 29, 2024
3 checks passed
@Alystrasz Alystrasz deleted the feat/mad-manifesto-vm-fetching branch July 29, 2024 23:16
wolf109909 pushed a commit to R2NorthstarCN/NorthstarMods that referenced this pull request Jul 30, 2024
Previously, the verified mods manifesto was fetched on game start without checking if the verified mod feature is enabled Squirrel-side; with this, the manifesto is only fetched when the user wants to download a mod (meaning they enabled the feature beforehand).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
almost ready to merge Apart from any small remaining other issues addressed by other labels, this would be ready to merge needs code review Changes from PR still need to be reviewed in code
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants