Parkour

Parkour

570k Downloads

Version confusion

SlimeDog opened this issue ยท 6 comments

commented

UPDATE: THIS WAS MISUNDERSTANDING DUE TO PARKOUR UPDATING AUTOMATICALLY

Parkour 5.1
https://www.spigotmc.org/resources/parkour.23685/history

It is standard practice to read the version string from plugin.yml.

plugin.yml contains:

version: 5.1

config.yml contains:

Version: 5.2

version reports:

>version Parkour
[22:21:59 INFO]: Parkour version 5.2
commented

I just need to update the resource on Spigot, which I didn't have time to yesterday.

commented

UPDATE: THIS WAS MISUNDERSTANDING DUE TO PARKOUR UPDATING AUTOMATICALLY

That is not all. Parkour is reading the version string from config.yml. I changed it to

Version: 5.1

and the plugin loaded as version 5.1. This is non-standard (and IMHO, wrong).

BTW, In order to control the software that is running on my servers, I disable all auto-updates and undocumented network callouts, of which Parkour makes 8. My automagical update-checker reports when updates are available.

commented

Hi SlimeDog, I understand what the problem is now.
Not sure how the problem originates, but if you check the sourcecode, all of the instances the version is displayed comes directly from Parkour.getPlugin().getDescription().getVersion() or through the Static class which converts that value to a Double. So I'm not entirely sure how you are getting this value without investigating further, which I will do when I have time.

As you mentioned, the updates can be disabled using "Other.CheckForUpdates" in the config.yml, which leaves bStats (which can also be disabled) and the MySQL connection the only network call from the plugin.

commented

So the initial issue raised is a misunderstanding? The plugin had in fact automatically updated unexpectedly?

In Bukkit's prime, the Updater included in Parkour was the official / accepted way for plugins to update themselves so this is a relic of the times and I'm sure it is outdated now but I believe it still serves the purpose of keeping the plugin up to the latest version to include required fixes and features.
Again this is documented and configurable so I'm happy for it to resume current functionality.

commented

Agreed with the analysis (see UPDATE notes above). I do not like automatic updates, but I am able to configure to disable them. YMMV.

commented

Thanks for the fast response. I do not enable MySQL, so that connection is not active.

I ran the test again on Spigot 1.13.2 latest.

  • Remove all vestiges of Parkour
  • Download and install Parkour 5.1
    • save as plugins/Parkour-5.1.jar
    • md5(plugins/Parkour-5.1.jar)=dde7d6686a0c449226475a0e1942631c
  • Start server
    • config.yml shows version 5.1
    • config.yml shows CheckForUpdates:true
    • version parkour reports version 5.1
  • Stop server
    • md5(plugins/Parkour-5.1.jar)=dde7d6686a0c449226475a0e1942631c
    • config.yml shows version 5.1
    • config.yml shows CheckForUpdates:true
  • Do not modify config.yml in any way (so, default configuration)
  • Start server
    • config.yml shows version 5.2 and was updated with 5.2 values
    • version parkour shows version 5.2
    • md5(plugins/Parkour-5.1.jar)=b7a1aec821c932cf41180253358978c3

So CheckForUpdates does not merely check and report that a newer version is available, but updates the plugin in situ (note that the plugin filename did not change). This is not a desirable outcome -- "check for update" does not mean "force update" (to me, others may disagree).