Project

General

Profile

Actions

tickets #164281

closed

Redmine queries with "tags" yield 500 error and tag filters unavailable

Added by livdywan 10 months ago. Updated 22 days ago.

Status:
Resolved
Priority:
High
Assignee:
Category:
Redmine
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Observation

Using the Filters on a query Tags are not available anymore. Although I can see tags listed on individual tickets, saved queries including tags don't work.

Steps to reproduce

Alternatively try and filter any query by Tags.


Related issues 1 (0 open1 closed)

Copied from openSUSE admin - tickets #159471: redmine queries with "tags" yield 500 errorResolvedcrameleon2024-04-23

Actions
Actions #1

Updated by livdywan 10 months ago

  • Copied from tickets #159471: redmine queries with "tags" yield 500 error added
Actions #2

Updated by crameleon 10 months ago

  • Private changed from Yes to No
Actions #3

Updated by crameleon 10 months ago

  • Status changed from New to In Progress
  • Assignee set to crameleon
Actions #4

Updated by crameleon 10 months ago

Resolved, but not sure why it happened again, one suspicion is that Unicorn might not have been started after redmine-update was executed, the timestamps suggest they run at the same time.

Actions #6

Updated by okurz 10 months ago

Thank you crameleon for a super-quick response and not only fixing the symptoms but coming up with a proper fix. Much appreciated!

Actions #7

Updated by crameleon 10 months ago

Glad I could help. :)

Actions #8

Updated by livdywan 10 months ago

  • Status changed from Resolved to In Progress
Actions #9

Updated by crameleon 10 months ago

The ordering does work correctly now:

Jul 23 02:06:37 progressoo systemd[1]: Finished Redmine update tasks.
Jul 23 02:06:37 progressoo systemd[1]: Started Redmine Project Management.

But there was no rebuild/migration, merely some dependencies were updated. I don't understand why the tags plugin wants database migration apparently before any start of Unicorn. I think it's still the same bug I already reported with RedmineUP but without me having had a chance to test the multitude of patched versions. I can make the package always run the rebuild, not sure how invasive that is, but let's try:

https://build.opensuse.org/package/rdiff/openSUSE:infrastructure:redmine/redmine?linkrev=base&rev=40

For now manually run, will check if it's still working after the automatic update tomorrow.

Actions #10

Updated by crameleon 10 months ago

  • Status changed from In Progress to Resolved

Update installed itself and your query link still works, I hope that's a success.

Actions #11

Updated by okurz 6 months ago

Unfortunately broken again. Did you update redmine recently?

Actions #12

Updated by okurz 6 months ago

  • Status changed from Resolved to Feedback
Actions #13

Updated by crameleon 6 months ago

  • Status changed from Feedback to Workable

Same error as the last times

E, [2024-11-25T17:09:32.983622 #1346] ERROR -- : [097d2a16-64c9-4084-88ca-4e5ee8f3992a] Query::StatementInvalid: Mysql2::Error: Unknown column 'issues.issue_tags' in 'where clause'

solved the same way too

progressoo (progress.o.o):~ # pushd /srv/www/vhosts/redmine
/srv/www/vhosts/redmine ~
progressoo (progress.o.o):/srv/www/vhosts/redmine # /usr/bin/bundle.ruby2.7 exec /usr/bin/rake.ruby2.7 -t redmine:plugins NAME=redmineup_tags RAILS_ENV=production
** Invoke redmine:plugins (first_time)
** Execute redmine:plugins
** Invoke redmine:plugins:migrate (first_time)
** Invoke environment (first_time)
** Execute environment
** Execute redmine:plugins:migrate
** Invoke db:schema:dump (first_time)
** Invoke db:load_config (first_time)
** Invoke environment
** Execute db:load_config
** Execute db:schema:dump
** Invoke redmine:plugins:assets (first_time)
** Invoke environment
** Execute redmine:plugins:assets
progressoo (progress.o.o):/srv/www/vhosts/redmine # rcredmine restart

Last change was

progressoo (progress.o.o):/srv/www/vhosts/redmine # grep -Ph '^2024.*\|install\|redmine\|' /var/log/zypp/history|tail -n2
2024-11-07 01:59:29|install|redmine|5.1.3-lp156.30.5|noarch||redmine|0ee682364a12d368bfe600cae178089076bb9a231f6a553144042774ea43dcd9|
2024-11-16 01:20:45|install|redmine|5.1.3-lp156.31.1|noarch||redmine|674eec1e1203f88c38ca4323f5351fbf7c903e2c157f389a918dc05fa4dccc92|

I only find errors after that last installation date starting yesterday

progressoo (progress.o.o):/srv/www/vhosts/redmine # xzgrep issue_tags /var/log/redmine/production.log-202411*.xz|head -n1
/var/log/redmine/production.log-20241125.xz:E, [2024-11-24T00:20:58.067441 #1346] ERROR -- : [db2dc763-caa2-45c6-8245-2b6169b5ebba] Query::StatementInvalid: Mysql2::Error: Unknown column 'issues.issue_tags' in 'where clause'

So either the update did not break it, or no one run such a problematic query in the last week.

In any case the plugin still seems flawed, as already mentioned in https://progress.opensuse.org/issues/159471 upstream wants us to test different patches which might potentially solve the issue, but I do not want to use our production as a patch test bed.

Actions #14

Updated by crameleon 22 days ago

  • Status changed from Workable to Resolved

With https://progress.opensuse.org/issues/177717 a newer version was installed which I hope incorporates the patches.

Actions

Also available in: Atom PDF