Yukkuricraft / YakumoDash

Webtool for managing all Yukkuricraft software infrastructure
0 stars 0 forks source link

Add option to add custom cluster env vars at env creation screen #38

Open remiscarlet opened 1 month ago

remiscarlet commented 1 month ago

When we create a new environment, we should give the option to add custom env vars in the UI.

Why: For Forge type servers, we perform a ServerTypeAction that downloads the FabricProxy-Lite mod. However, it currently defaults to querying for a plugin of the same version as the MC version. If the proxy plugin does not have a version released that exactly matches the MC version, such as 1.21.1 for MC and 1.21 for fabric, the plugin API query fails. Normally, we would just have the user add something like a FABRIC_PROXY_VERSION via cluster config edits. However, because the ServerTypeAction.perform_only_once() method is invoked at env creation time, we need to allow the user to specify something like the cluster var before the env is actually created - ie before the user has the change to modify the cluster config.

This requires an API change to support adding custom cluster vars to the env cluster config section of the env toml as well.