Rewrite Migration Logging Inconsistency [TMS 222177]
Pheotis opened this issue ยท 3 comments
When an older copy of the rewritten config is migrated to a newer version, it works as expected.
That is, except loggingLevel, which reverts to INFO regardless of what its existing value was.
Environment
Plugin Version: ALPHA-1.0.0.4
(Migrating simulated 1.0.0.2 config, Test Environment unit 2-Spigot-Offline-MigOld-Modern-SQL
)
Server Version: 3491-Spigot-b081915-95d233d
(MC: 1.18.2) Implementing API Version 1.18.2-R0.1-SNAPSHOT
Description.
Input
See here
# Possible Values:
# |=> SEVERE (Not recommended).
# | - ๐๐ข๐๐ ๐๐ฏ๐๐ซ๐ฒ๐ญ๐ก๐ข๐ง๐ . ๐๐๐๐ฆ ๐๐๐๐๐ก ๐ก๐ ๐๐๐๐ ๐๐๐ ๐๐ ๐๐๐ข๐๐๐ ๐๐๐ก๐๐๐๐ฆ ๐๐๐๐ โ๐๐
# |=> WARNING (Recommended for large and well-tested production implementations).
# | - ๐๐ข๐๐ ๐ง๐จ๐ซ๐ฆ๐๐ฅ ๐๐๐ก๐๐ฏ๐ข๐จ๐ฎ๐ซ. ๐๐๐๐ฆ ๐๐๐๐๐ก ๐๐๐ก๐๐๐ก๐๐๐ ๐๐ ๐ ๐ข๐๐ .
# |=> INFO (Recommended for most production implementations).
# | - ๐๐ซ๐ข๐ง๐ญ ๐ง๐จ๐ซ๐ฆ๐๐ฅ ๐๐๐ก๐๐ฏ๐ข๐จ๐ฎ๐ซ. ๐๐๐๐๐ก๐ ๐๐๐๐ก๐๐ ๐๐ฃ๐๐๐ก๐ (๐ข๐ ๐๐๐, ๐๐๐๐๐ก๐๐๐, ๐๐๐ ๐ก๐๐ข๐๐ก๐๐๐, ๐๐ก๐.)
# |=> CONFIG (Useful for configuring preproduction instances).
# | - ๐๐ซ๐ข๐ง๐ญ ๐ฉ๐๐ซ๐ฆ๐ข๐ฌ๐ฌ๐ข๐จ๐ง ๐๐ก๐๐๐ค๐ฌ. ๐๐๐๐๐ก๐ ๐โ๐๐๐๐ ๐๐๐๐ ๐ก๐ ๐๐๐ก๐๐๐๐๐๐ ๐๐ ๐๐๐๐ฆ๐๐๐ ๐๐๐ ๐๐๐๐๐๐๐ ๐๐ ๐๐๐ก๐๐๐.
# |=> FINE (Recommended for basic troubleshooting).
# | - ๐๐ซ๐ข๐ง๐ญ ๐ฅ๐ข๐ฆ๐ข๐ญ๐๐ ๐๐๐๐ฎ๐ ๐ข๐ง๐๐จ. ๐๐๐๐๐ก๐ ๐๐๐๐๐๐๐ ๐๐๐ข๐๐๐ ๐๐ฃ๐๐๐ก๐ (๐๐๐๐๐๐๐, ๐๐๐ ๐๐๐๐๐๐, ๐๐๐๐๐๐๐ก๐๐๐๐ , ๐๐ก๐.).
# |=> FINER (Recommended for some addon developers).
# | - ๐๐ซ๐ข๐ง๐ญ ๐ฆ๐จ๐ฌ๐ญ ๐๐๐๐ฎ๐ ๐ข๐ง๐๐จ. ๐๐๐๐๐ก๐ ๐๐๐ ๐ ๐๐๐๐ ๐๐๐ก๐๐๐๐๐๐ ๐กโ๐ ๐๐๐ข๐๐๐'๐ ๐๐๐๐๐ ๐๐๐ ๐๐โ๐๐ฃ๐๐๐ข๐.
# |=> FINEST (Only used by StarGate's core development team).
# | - ๐๐ซ๐ข๐ง๐ญ ๐๐ฏ๐๐ซ๐ฒ๐ญ๐ก๐ข๐ง๐ . ๐๐๐๐๐ก๐ ๐๐๐ก๐๐๐๐๐๐ฆ ๐๐ฃ๐๐๐ฆ๐กโ๐๐๐, ๐๐๐๐๐ข๐๐๐๐ ๐๐ข๐๐๐๐๐ข๐ ๐ ๐ก๐๐๐ ๐ก๐๐๐๐๐ .
loggingLevel: FINE
Migrated Output:
# Possible Values:
# |=> SEVERE (Not recommended).
# | - ๐๐ข๐๐ ๐๐ฏ๐๐ซ๐ฒ๐ญ๐ก๐ข๐ง๐ . ๐๐๐๐ฆ ๐๐๐๐๐ก ๐ก๐ ๐๐๐๐ ๐๐๐ ๐๐ ๐๐๐ข๐๐๐ ๐๐๐ก๐๐๐๐ฆ ๐๐๐๐ โ๐๐
# |=> WARNING (Recommended for large and well-tested production implementations).
# | - ๐๐ข๐๐ ๐ง๐จ๐ซ๐ฆ๐๐ฅ ๐๐๐ก๐๐ฏ๐ข๐จ๐ฎ๐ซ. ๐๐๐๐ฆ ๐๐๐๐๐ก ๐๐๐ก๐๐๐ก๐๐๐ ๐๐ ๐ ๐ข๐๐ .
# |=> INFO (Recommended for most production implementations).
# | - ๐๐ซ๐ข๐ง๐ญ ๐ง๐จ๐ซ๐ฆ๐๐ฅ ๐๐๐ก๐๐ฏ๐ข๐จ๐ฎ๐ซ. ๐๐๐๐๐ก๐ ๐๐๐๐ก๐๐ ๐๐ฃ๐๐๐ก๐ (๐ข๐ ๐๐๐, ๐๐๐๐๐ก๐๐๐, ๐๐๐ ๐ก๐๐ข๐๐ก๐๐๐, ๐๐ก๐.)
# |=> CONFIG (Useful for configuring preproduction instances).
# | - ๐๐ซ๐ข๐ง๐ญ ๐ฉ๐๐ซ๐ฆ๐ข๐ฌ๐ฌ๐ข๐จ๐ง ๐๐ก๐๐๐ค๐ฌ. ๐๐๐๐๐ก๐ ๐โ๐๐๐๐ ๐๐๐๐ ๐ก๐ ๐๐๐ก๐๐๐๐๐๐ ๐๐ ๐๐๐๐ฆ๐๐๐ ๐๐๐ ๐๐๐๐๐๐๐ ๐๐ ๐๐๐ก๐๐๐.
# |=> FINE (Recommended for basic troubleshooting).
# | - ๐๐ซ๐ข๐ง๐ญ ๐ฅ๐ข๐ฆ๐ข๐ญ๐๐ ๐๐๐๐ฎ๐ ๐ข๐ง๐๐จ. ๐๐๐๐๐ก๐ ๐๐๐๐๐๐๐ ๐๐๐ข๐๐๐ ๐๐ฃ๐๐๐ก๐ (๐๐๐๐๐๐๐, ๐๐๐ ๐๐๐๐๐๐, ๐๐๐๐๐๐๐ก๐๐๐๐ , ๐๐ก๐.).
# |=> FINER (Recommended for some addon developers).
# | - ๐๐ซ๐ข๐ง๐ญ ๐ฆ๐จ๐ฌ๐ญ ๐๐๐๐ฎ๐ ๐ข๐ง๐๐จ. ๐๐๐๐๐ก๐ ๐๐๐ ๐ ๐๐๐๐ ๐๐๐ก๐๐๐๐๐๐ ๐กโ๐ ๐๐๐ข๐๐๐'๐ ๐๐๐๐๐ ๐๐๐ ๐๐โ๐๐ฃ๐๐๐ข๐.
# |=> FINEST (Only used by StarGate's core development team).
# | - ๐๐ซ๐ข๐ง๐ญ ๐๐ฏ๐๐ซ๐ฒ๐ญ๐ก๐ข๐ง๐ . ๐๐๐๐๐ก๐ ๐๐๐ก๐๐๐๐๐๐ฆ ๐๐ฃ๐๐๐ฆ๐กโ๐๐๐, ๐๐๐๐๐ข๐๐๐๐ ๐๐ข๐๐๐๐๐ข๐ ๐ ๐ก๐๐๐ ๐ก๐๐๐๐๐ .
loggingLevel: INFO
usingBungee is also given the wrong description.
Comparing a migrated config with the default config, there are actually a lot of inconsistencies. General Preferences is replaced with Aesthetic tweaks. The language description is missing.
Default:
# +----------------------------------------------------------------------------------------------+ #
# | General Preferences | #
# +----------------------------------------------------------------------------------------------+ #
# What language will stargate use when communicating with your users?
# Supported values: [en,de,nl,no,nn,sv,zh,cs,fr,tr]
#
# If SG isn't yet available in your language, please consider becoming a translator:
# https://crowdin.com/project/stargate-bukkit
language: en
bungee:
# Are you connected to a bungee-compatible proxy?
# Set this to true if you intend on building gates with the 'u' flag.
usingBungee: false
# By default, StarGate uses a local SQLite database to store its data.
#
# If you are running a large server, we recommend using a remote database.
# Note that such a database is required if you intend on building gates with the 'i' flag.
useRemoteDatabase: false
Migrated:
# SG protects gate ๐๐๐๐๐ materials; should it also protect gate ๐๐๐๐๐ก๐ข๐๐ (open/closed) materials?
# ex. in nether.gate, should nether_portal be protected?
# +----------------------------------------------------------------------------------------------+ #
# | Aesthetic Tweaks | #
# +----------------------------------------------------------------------------------------------+ #
language: en
bungee:
# By default, SG will preface its remote database tables with `SG_`.
# If this conflicts with another plugin, you can change that prefix here.
usingBungee: false
# An internal value used by the plugin to determine how old your config is.
# Please do not change this.
useRemoteDatabase: false
For some reason, it's just this section that's problematic. Everything else is fine.
The migrator v.1.0.0.0. Is only used for legacy to 1.x.x, so it assumes loggingLevel is not yet an available value. For migrations from 1.0.0.0 to 1.0.0.1, a new Migrator object should be created, which is aware of all 1.0.0.0 configuration values.
The v1.0.0.0 migrator shouldn't run if a migration from legacy to 1.0.0.0 has already been run.