felddy / foundryvtt-docker

An easy-to-deploy Dockerized Foundry Virtual Tabletop server.
https://hub.docker.com/r/felddy/foundryvtt
MIT License
584 stars 115 forks source link

Allow ability to see module compatibility checks #979

Closed cs96and closed 3 months ago

cs96and commented 3 months ago

Feature description

The module compatibility checks are only viewable after you have clicked the "Check For Update" button. However, if you are running Foundry in a Docker container, this button does not work and throws up the error "This instance of Foundry Virtual Tabletop is running in a Docker container. To update, please pull a new Docker image and restart the container."

I understand why it does this, but this also prevents you from viewing the module compatibility checks. It would be good if you could view these, but still block the actual upgrade from happening.

It would be nice to fix this in the 11.315 image, to ease the upgrade to v12.

I initially reported this issue to core Foundry, but I was told on discord that the docker image must be injecting a check to prevent the backup

Motivation

Foundry added support for module compatibility checks in 11.315, but we are unable to use them when running in a docker container.

Example

Pitch

It would be useful to see the module compatibilty checks before upgrading to v12.

Code of Conduct

cs96and commented 3 months ago

I just realized that you are only changing the SETUP.UpdateNoUpdateMode message, so I think this is a core foundry problem, not a docker image problem. I've updated the issue on the foundryvtt repo.

felddy commented 3 months ago

Correct. I'm just patching the language displayed for the --noupdate flag. Thank you for opening the issue on the Foundry repo. I imagine that this is low on their priority list, and the window of usefulness is quickly closing for the v11 -> v12 transition. Hopefully they can fix it before v13.

See:

felddy commented 3 months ago

If you get a chance, I'd remove any mention of Docker from the issue you opened on FoundryVTT. They're very anti-containerization. I'd recommend changing the title to: "Unable to see module compatibility checks when running with --noupdate flag set." (Or something similar).

felddy commented 3 months ago

As a work-around I've created a container patch that will do a compatibility check when you startup the container.

You can have it run at container startup by adding the URL to the CONTAINER_PATCH_URLS environment variable:

      - CONTAINER_PATCH_URLS=
        https://gist.githubusercontent.com/felddy/a02d66c3817f8223652d96febe580153/raw/foundryvtt-module-check.sh

In the log you should then see output similar to this:

foundry-1  | Entrypoint | 2024-06-03 12:32:41 | [info] Checking module compatibility with FoundryVTT version 12
foundry-1  | Entrypoint | 2024-06-03 12:32:41 | [warn] Automated Animations (4.2.72), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:42 | [info] Break Time (12.01), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:42 | [warn] lib - Color Settings (3.0.3), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:42 | [info] Carousel Combat Tracker (3.0.1), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:42 | [info] Combat Booster: Turn Marker, Recent Actions and more (4.0.0), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:43 | [info] Dice Tray (2.1.11), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:43 | [warn] Dice So Nice! (4.6.10), NOT Verified: 11.315
foundry-1  | Entrypoint | 2024-06-03 12:32:43 | [warn] Drag Ruler (1.13.8), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:43 | [error] Manifest URL not found in /data/Data/modules/geekpad-felddy/module.json
foundry-1  | Entrypoint | 2024-06-03 12:32:43 | [info] Health Estimate (32.0), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:45 | [warn] JB2A - Patreon Complete Collection (0.6.7), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:45 | [info] libWrapper (1.12.13.1), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:45 | [warn] Michael Ghelfi Studios Audio Pack (1.4), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:46 | [warn] Miska's Maps - Battlemaps - Starter Pack (1.6), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:46 | [warn] PF2e Pathfinder Ui v3 (11.315.5153.5), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:46 | [warn] Export Sheet to PDF (0.24.9), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:47 | [warn] PF2e Flat Check (1.7.0), NOT Verified: 11.302
foundry-1  | Entrypoint | 2024-06-03 12:32:47 | [info] pf2e award xp (1.0.4), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:47 | [info] Pathfinder Beginner Box (4.0.2), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:47 | [info] PF2e Dailies (3.3.0), Verified: 12.324
foundry-1  | Entrypoint | 2024-06-03 12:32:48 | [warn] PF2e Dorako UI (3.4.11), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:48 | [warn] PF2e Dorako UX (1.3.6), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:48 | [warn] PF2e Drag Ruler Integration (3.0.9), NOT Verified: 11.315
foundry-1  | Entrypoint | 2024-06-03 12:32:49 | [warn] pf2E Extempore Effects (1.8.3), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:49 | [warn] PF2e Animation Macros (2.17.6), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:49 | [warn] Pf2E Modifiers Matter (1.9.1), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:50 | [info] PF2e Toolbelt (2.5.0), Verified: 12.322
foundry-1  | Entrypoint | 2024-06-03 12:32:50 | [info] Polyglot (2.4.12), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:50 | [warn] PopOut! (2.16), NOT Verified: 11.315
foundry-1  | Entrypoint | 2024-06-03 12:32:50 | [warn] Popout Resizer (1.5.1), NOT Verified: 11.306
foundry-1  | Entrypoint | 2024-06-03 12:32:51 | [info] Quick Insert - Search Widget (2.8.7), Verified: 12.324
foundry-1  | Entrypoint | 2024-06-03 12:32:51 | [warn] Sequencer (3.1.4), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:51 | [warn] SmallTime (1.20.0), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:52 | [warn] socketlib (1.0.13), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:52 | [info] Splatter (4.0.0), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:52 | [warn] Tidy UI - Game Settings (0.1.52), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:52 | [warn] Tidy5e Sheet (v0.10.1), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:53 | [warn] Token Action HUD Core (1.5.4), NOT Verified: 11.315
foundry-1  | Entrypoint | 2024-06-03 12:32:53 | [warn] Token Action HUD Pathfinder 2e (1.5.15), NOT Verified: 11.315
foundry-1  | Entrypoint | 2024-06-03 12:32:53 | [warn] Foundry VTT Anniversary Dice Set by The Rollsmith (1.0.1), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:54 | [warn] The Rollsmith - Iridescent Rainbow Dice Set (1.0.0), NOT Verified: 11.305
foundry-1  | Entrypoint | 2024-06-03 12:32:54 | [info] Tokenizer (4.3.6), Verified: 12
foundry-1  | Entrypoint | 2024-06-03 12:32:54 | [warn] Warp Gate (1.closing), NOT Verified: 11.315
foundry-1  | Entrypoint | 2024-06-03 12:32:55 | [warn] Dice So Nice - Weighted Companion Cube Dice Set (1.0.5), NOT Verified: 11
foundry-1  | Entrypoint | 2024-06-03 12:32:55 | [warn] PF2e Workbench (5.65.10), NOT Verified: 11.315
cs96and commented 3 months ago

Excellent, thanks!

cs96and commented 3 months ago

You can probably close this issue now, as this is a core foundry issue.

cs96and commented 3 months ago

I modified the script to do all compatibility checks in parallel. Massively speeds up the startup time if you have lots of modules, but the results no longer appear in alphabetical order... https://gist.github.com/cs96and/d4493860f769c6d1c2febdee0906d44c

felddy commented 3 months ago

Awesome improvement. 💪 I don't think the ordering my module name is too important. We just want to know when we can upgrade.
Thanks again.

felddy commented 3 months ago

I was inspired by your update. I've taken it a step further and am using semver to do actual checks against the maximum version, as well as the verified versions of the manifest. This results in output that mimics the four different dispositions Foundry assigns a module in the GUI:

 | 2024-06-03 16:51:37 | [info] Checking module compatibility with FoundryVTT version 12.325
 | 2024-06-03 16:51:37 | [info] ✅ Break Time (12.01), Verified: 12
 | 2024-06-03 16:51:37 | [info] 🟠 Automated Animations (4.2.72), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:37 | [info] 🟠 lib - Color Settings (3.0.3), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:37 | [info] ✅ Combat Booster: Turn Marker, Recent Actions and more (4.0.0), Verified: 12
 | 2024-06-03 16:51:37 | [info] ✅ Carousel Combat Tracker (3.0.1), Verified: 12
 | 2024-06-03 16:51:37 | [warn] Manifest URL not found in /data/Data/modules/geekpad-felddy/module.json
 | 2024-06-03 16:51:37 | [info] ✅ Dice Tray (2.1.11), Verified: 12
 | 2024-06-03 16:51:37 | [info] 🟠 Dice So Nice! (4.6.10), Compatibility risk: last verified for version 11.315
 | 2024-06-03 16:51:37 | [info] 🟠 Drag Ruler (1.13.8), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:37 | [info] ✅ Health Estimate (32.0), Verified: 12
 | 2024-06-03 16:51:37 | [info] ✅ libWrapper (1.12.13.1), Verified: 12
 | 2024-06-03 16:51:38 | [info] 🟠 Export Sheet to PDF (0.24.9), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:38 | [info] ❌ PF2e Flat Check (1.7.0), UNSUPPORTED: maximum version: 11
 | 2024-06-03 16:51:38 | [info] ✅ pf2e award xp (1.0.4), Verified: 12
 | 2024-06-03 16:51:38 | [info] 🟠 Michael Ghelfi Studios Audio Pack (1.4), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:38 | [info] 🟠 Miska's Maps - Battlemaps - Starter Pack (1.6), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:38 | [info] 🟠 PF2e Pathfinder Ui v3 (11.315.5153.5), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:38 | [info] ⚠️ PF2e Dailies (3.3.0), Compatibility risk: last verified for version 12.324
 | 2024-06-03 16:51:38 | [info] 🟠 PF2e Dorako UI (3.4.11), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:38 | [info] ✅ Pathfinder Beginner Box (4.0.2), Verified: 12
 | 2024-06-03 16:51:38 | [info] 🟠 PF2e Dorako UX (1.3.6), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:38 | [info] 🟠 JB2A - Patreon Complete Collection (0.6.7), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:38 | [info] ❌ PF2e Drag Ruler Integration (3.0.9), UNSUPPORTED: maximum version: 11
 | 2024-06-03 16:51:38 | [info] 🟠 pf2E Extempore Effects (1.8.3), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:39 | [info] 🟠 PF2e Animation Macros (2.17.6), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:39 | [info] 🟠 Pf2E Modifiers Matter (1.9.1), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:39 | [info] ❌ PopOut! (2.16), UNSUPPORTED: maximum version: 11
 | 2024-06-03 16:51:39 | [info] ⚠️ PF2e Toolbelt (2.5.0), Compatibility risk: last verified for version 12.322
 | 2024-06-03 16:51:39 | [info] ✅ Polyglot (2.4.12), Verified: 12
 | 2024-06-03 16:51:39 | [info] ❌ Popout Resizer (1.5.1), UNSUPPORTED: maximum version: 11
 | 2024-06-03 16:51:39 | [info] 🟠 Sequencer (3.1.4), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:39 | [info] 🟠 Tidy UI - Game Settings (0.1.52), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:39 | [info] 🟠 socketlib (1.0.13), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:39 | [info] ✅ Splatter (4.0.1), Verified: 12
 | 2024-06-03 16:51:39 | [info] ❌ Tidy5e Sheet (v0.10.1), UNSUPPORTED: maximum version: 11
 | 2024-06-03 16:51:39 | [info] 🟠 SmallTime (1.20.0), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:39 | [info] 🟠 Token Action HUD Core (1.5.4), Compatibility risk: last verified for version 11.315
 | 2024-06-03 16:51:39 | [info] ⚠️ Quick Insert - Search Widget (2.8.7), Compatibility risk: last verified for version 12.324
 | 2024-06-03 16:51:40 | [info] 🟠 Token Action HUD Pathfinder 2e (1.5.15), Compatibility risk: last verified for version 11.315
 | 2024-06-03 16:51:40 | [info] 🟠 The Rollsmith - Iridescent Rainbow Dice Set (1.0.0), Compatibility risk: last verified for version 11.305
 | 2024-06-03 16:51:40 | [info] ❌ Warp Gate (1.closing), UNSUPPORTED: maximum version: 11.316
 | 2024-06-03 16:51:40 | [info] ✅ Tokenizer (4.3.6), Verified: 12
 | 2024-06-03 16:51:40 | [info] 🟠 Foundry VTT Anniversary Dice Set by The Rollsmith (1.0.1), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:40 | [info] 🟠 Dice So Nice - Weighted Companion Cube Dice Set (1.0.5), Compatibility risk: last verified for version 11
 | 2024-06-03 16:51:40 | [info] ❌ PF2e Workbench (5.65.10), UNSUPPORTED: maximum version: 11.999
cs96and commented 3 months ago

This is great, thanks! I've found one minor bug though. It claims that DAE is not supported, but it is...

Entrypoint | 2024-06-04 09:46:23 | [info] ❌ Dynamic effects using Active Effects (DAE) (11.3.28), UNSUPPORTED: maximum version: 12.999

felddy commented 3 months ago

I'll take a look at it, and fix the bug.

Module manifest:

felddy commented 3 months ago

Fixed... the comparison for maximum version just needed a <= in the range check.

 | 2024-06-04 11:04:21 | [info] 🟠 Dynamic effects using Active Effects (DAE) (11.3.28), Compatibility risk: last verified for version 11.315
cs96and commented 3 months ago

Thanks, looks like that fixed it.

One more very minor niggle. npm outputs an upgrade message in the startup log...

npm notice New minor version of npm available! 10.2.3 -> 10.8.1
npm notice Changelog: <https://github.com/npm/cli/releases/tag/v10.8.1>
npm notice Run `npm install -g npm@10.8.1` to update!
npm notice

Supposedly you can disable this message https://stackoverflow.com/a/60525400

npm config set update-notifier false

felddy commented 3 months ago

Fixed. I wasn't seeing the nag since I was using the 12.325.0 container which has an up-to-date npm install.

felddy commented 3 months ago

I thought this solution was worthy of sharing with the community. Thank you again for the help implementing it.