How are module updates handled?

As a module developer, there are some things that are unclear about how the Forge handles ‘normal’ modules. By ‘normal’, I mean ones that are published through Foundry’s module system.

When I push an update to my module, I notice that it takes some time before it get’s updated on the bazaar. How does the Forge detect these updates? Does it periodically compare the module list in the bazaar with a ‘master’ list provided by Foundry?

I believe that the Forge stores all modules locally, so when someone downloads a module, it isn’t grabbed from, for example, GitHub, instead it is loaded from the Forge server, right?
What does this mean for changes that are made to the module’s repository? For example, when I push a hotfix, without publishing a new version, does this get updated on the Forge?
So does it only update the module when an official update is pushed, or does it track changes to the module’s repository? In case of the former, is there a way to tell the Forge that it should grab a new version (without officially pushing an update)?

  1. Forge periodically scans the published FoundryVTT Updates and pulls them onto The Bazaar
  2. Yes, loaded from The Bazaar (on the Forge)
  3. You should NEVER push a Hotfix without a version bump, that’s extremely bad coding practice (no, it won’t be picked up by Forge, as there’s nothing to key The Bazaar that a change has been made in a reasonable way (ie, version number didn’t change))
1 Like

Thanks for your reply.
I’m aware that pushing a hotfix like that is bad coding practise. But, for example, earlier today I pushed an update, and within a few minutes I found another bug, and updated it on GitHub. The chance that anyone downloaded the earlier version is very slim (this was a niche module, so not a lot of users). So I didn’t consider it to be a big problem.
However, now that I know how the Forge handles the updates, I see that this isn’t a good idea.

Hi,
This has been discussed so many times in the past on the Foundry and the League’s Discord, and many developers have the reflex of thinking “it’s not a big issue” or “the chance is small”, but the reality is that it’s not true, even if the change is done within 1 minute, with let’s say 1 million Foundry users, there might be thousands of users who did the update during that 1 minute. If the Forge had the time to grab that update, then users also likely did.
Also, that completely defeats the purpose of versioning because someone could be complaining about a bug, and you’re asking which version they use, and they say it’s the latest, and you’re wasting time trying to figure out why they have that bug, not realizing that they downloaded it at the wrong time… If someone tells you they use Version X, then that should tell you with 100% certainty which version of the code they are actually using (that’s the whole purpose of versioning, otherwise, why bother!).
Finally, it is very very highly recommend that all your download URLs point to your specific release. Never make your download link point to the github master branch, because the version users are downloading will be whatever master is at the time of download, which could be unstable. This means that if you’re setting up the manifest/download release system properly, then pushing a fix would not have any effect on your actual release.
Check out the league’s module template repo for the workflow to set it up so you can make releases and it builds the module.json/zip and attaches it to the release properly : GitHub - League-of-Foundry-Developers/FoundryVTT-Module-Template: A template repository for FoundryVTT module development that comes with versioned CI/CD
I hope that helps