takezoe / gitbucket-ci-plugin

GitBucket plug-in that adds simple CI ability to GitBucket.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Upgrading issues

kmasuyama opened this issue · comments

I installed gitbucket-ci-plugin-assembly-1.6.0.jar some time ago and had been using it without problems. I recently upgraded the base gitbucket installation to 4.31.1, and decided to update the plugins as well. I could not find upgrade instructions for plugins, but since the builtin notifications plugins just kept adding newer jar files to the plugins folder, I did the same.

My other plugins (gist, notifications) updated without issues, but the CI plugin would not update. The log shows that "QUEUED TIME" is duplicated, thus throwing an error on initializing the newer jar files. I also tried several builds, including 1.8.1 for 4.31.1 and 4.31.0, 1.7.x builds, and later 1.6.x builds. Same problem every time.

Running gitbucket 4.31.1 on Apache Tomcat 9.0

This may be related to #67 - I'm not familiar with sql migrations, but I can try playing with it.

Edit: Not sure if relevant, but the CI plugin version reads 1.5.0 despite being a 1.6.0.jar

Edit: Not sure if relevant, but the CI plugin version reads 1.5.0 despite being a 1.6.0.jar

Yes. This migration failure is caused by a bug in 1.6.0. It wouldn't occur in clean installation of CI plugin, or upgrading from versions other than 1.6.0. Manual operation is necessary if migrate from 1.6.0. Probably you only need to update VERSIONS table as follows before upgrading CI plugin:

UPDATE VERSIONS SET VERSION='1.6.0' WHERE MODULE_ID='1.6.0';

We need to replace an released artifact of 1.6.0 to fix this problem, but we won't do it because it doesn't help users who already installed 1.6.0 and new users will use newer versions. It does't help anyone.

After fixing the VERSIONS table as you stated, I was able to upgrade to ci plugin 1.8.1 without problems. It seems to be running fine, and no errors logged. Just a small fix for the module_id:

UPDATE VERSIONS SET VERSION='1.6.0' WHERE MODULE_ID='ci';

thanks!

Oh, sorry. My SQL was wrong. Thanks for fixing!