Issue Details (XML | Word | Printable)

Key: MBS-2662
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Normal Normal
Assignee: Oliver Charles
Reporter: Nicolás Tamargo
Votes: 10
Watchers: 4
Operations

If you were logged in you would be able to see more operations.
MusicBrainz Server

Allow filtering reports by subscribed entities

Created: 09/Jun/11 04:14 PM   Updated: 19/Apr/13 07:24 AM  Due: 19/May/12   Resolved: 23/Jul/12 05:24 AM
Component/s: Data display, Reports, User interface
Affects Version/s: None
Fix Version/s: Bug fixes, 2012-07-23

Issue Links:
Relates
Resolution
 

Size Estimate: City


 Description  « Hide

Especially for huge reports, it would be pretty useful to be able to filter them to see just the cases that affect subscribed artists. At the moment some reports are scary lists of thousands of entities, so this would make it easier for an user to dive into them and solve the cases he knows more about.



Sort Order: Ascending order - Click to sort in descending order
Johannes Weißl added a comment - 12/Jul/11 02:36 AM - edited

+1

I just wanted to file the same ticket... the motivation to start cleaning up these huge reports are near zero, it seems like endless work.

Also of course, one probably knows the subscribed entities better than random entities!


Oliver Charles added a comment - 18/Nov/11 05:33 PM

Putting a rough scale estimate as city on this. The reports are currently ran once, so we'd need to add in some extra logic to do the filtering. Also, it's not clear how each report should actually be filtered, so each report may need different logic.


Johannes Weißl added a comment - 18/Nov/11 05:39 PM

I guess the reports have to be filtered "at runtime" somehow, it is of course not possible to generate a different report for every user. Currently, I filter the reports myself (on my slave server) with a huge list of auto-generated SQL statements.

Since subscriptions are currently only possible for artists (not e.g. releases), the logic is quite similar for all the reports. Of course, if we allow subscriptions to releases, this is not clear anymore.


Johannes Weißl added a comment - 04/Dec/11 11:10 PM - edited

I'm working on this... currently I have a version running that filters by artist if "?subscribed_artists=1" is appended to a report. It needs to be polished (UI, code), than I will put it up for review.



Oliver Charles added a comment - 09/Feb/12 12:29 PM

How are we looking on this hrglgrmpf?


Johannes Weißl added a comment - 09/Feb/12 02:24 PM

I have a prototype that can filter all simple release reports. I'm still undecided how to handle MBS-2919: Either create a separate table (which reports are filtered/unfiltered), or store it in the same table as the report. I think I like the second option more, but it means a simple DROP/CREATE is not possible anymore, as the state of the flag must be preserved.

What do you think?


Oliver Charles added a comment - 09/Feb/12 02:27 PM

MBS-2919 can come later, for now filtering by subscriptions is more important. Let's deal with that one when we get to it. Is this ticket ready for review?


Oliver Charles added a comment - 21/Feb/12 09:47 AM

Any more news on this? Due yesterday apparently


Oliver Charles added a comment - 23/Feb/12 03:47 PM

Ping


Johannes Weißl added a comment - 23/Feb/12 04:11 PM

I'm afraid the prototype isn't ready for code review yet . I try to make it ready until end of this week. If this is too late, and you think you can achieve a solution in a much faster time, it is also no problem if you take the ticket after the week...


Oliver Charles added a comment - 20/Mar/12 11:23 AM

hrglgrmpf has said he'll need a bit more time for this, so I've pushed the due date back 3 months from the original date of February.


Luca Salini added a comment - 15/Jun/12 01:54 PM

It's almost a month past the due date. Any update?


Paul Taylor added a comment - 18/Jun/12 07:10 PM

Is that it, just assigning to no-one without any explanation makes it difficult for anyone considering taking on the work to know where to start form.


Oliver Charles added a comment - 18/Jun/12 07:23 PM

I will take this up. @Luca - it's going to slip a little more behind I'm afraid, but I will hopefully have something working by the end of July. No promises there though!


Johannes Weißl added a comment - 18/Jun/12 07:35 PM

I'm very sorry about the delay... I started working recently and have less time than I thought to work on such a big ticket, so I'm unassigning myself. My progress so far was that I migrated some reports to a SQL table, which is then filterable on the fly. It was not that much work, but it was also quite hackish, so a clean solution (which covers all reports) needs a lot more work.

Here are some of the challenges that I found, for the next person to work on the ticket:

  • some records are hard to squeeze into an SQL row
  • if we want to solve MBS-2919 and this ticket in one solution (which we should in my opinion), we either need to have a primary key for every SQL row in the report table (e.g. release mbid for the simple release reports), or abstain from rebuilding the whole tables every day (which is probably harder).

I hope I could help, and the ticket will be solved soon (despite me unintentionally delaying it for several months...).


Oliver Charles added a comment - 26/Jun/12 04:46 PM

Oliver Charles added a comment - 26/Jun/12 04:49 PM

I should note that it's currently running reports on hobbes, so reports won't work just yet.


nikki added a comment - 26/Jun/12 05:07 PM

On http://test.musicbrainz.org/report/ISRCsWithManyRecordings I just got

Internal Server Error

Oops, something went wrong!

Error: 

Caught exception in MusicBrainz::Server::Controller::Report->show "Failed query:
	'SELECT DISTINCT report.* FROM report.isrc_with_many_recordings report  ORDER BY row_number OFFSET ?'
	(0)
DBD::Pg::st execute failed: ERROR:  relation "report.isrc_with_many_recordings" does not exist
LINE 1: SELECT DISTINCT report.* FROM report.isrc_with_many_recordin...
                                      ^ at lib/Sql.pm line 79.

 at lib/Sql.pm line 84
	Sql::__ANON__('DBD::Pg::st execute failed: ERROR:  relation "report.isrc_wit...') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Try/Tiny.pm line 100
	Try::Tiny::try('CODE(0xc3843a8)', 'Try::Tiny::Catch=REF(0xc3becd8)') called at lib/Sql.pm line 86
	Sql::select('Sql=HASH(0xba82620)', 'SELECT DISTINCT report.* FROM report.isrc_with_many_recording...', 0) called at lib/MusicBrainz/Server/Data/Utils.pm line 224
	MusicBrainz::Server::Data::Utils::query_to_list_limited('Sql=HASH(0xba82620)', 0, 50, 'CODE(0x5f85a30)', 'SELECT DISTINCT report.* FROM report.isrc_with_many_recording...', 0) called at lib/MusicBrainz/Server/Report.pm line 47
	MusicBrainz::Server::Report::_load('MusicBrainz::Server::Report::ISRCsWithManyRecordings=HASH(0xc...', '', 0, 50) called at lib/MusicBrainz/Server/Report.pm line 30
	MusicBrainz::Server::Report::load('MusicBrainz::Server::Report::ISRCsWithManyRecordings=HASH(0xc...', 50, 0) called at lib/MusicBrainz/Server/Controller/Report.pm line 38
	MusicBrainz::Server::Controller::Report::__ANON__(50, 0) called at lib/MusicBrainz/Server/Controller.pm line 191
	MusicBrainz::Server::Controller::_load_paged('MusicBrainz::Server::Controller::Report=HASH(0xacf5490)', 'MusicBrainz::Server=HASH(0xc203560)', 'CODE(0xc3be690)') called at lib/MusicBrainz/Server/Controller/Report.pm line 40
	MusicBrainz::Server::Controller::Report::show('MusicBrainz::Server::Controller::Report=HASH(0xacf5490)', 'MusicBrainz::Server=HASH(0xc203560)', 'ISRCsWithManyRecordings') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 65
	Catalyst::Action::execute('Catalyst::Action=HASH(0xb194890)', 'MusicBrainz::Server::Controller::Report=HASH(0xacf5490)', 'MusicBrainz::Server=HASH(0xc203560)', 'ISRCsWithManyRecordings') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1667
	eval {...} called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1667
	Catalyst::execute('MusicBrainz::Server=HASH(0xc203560)', 'MusicBrainz::Server::Controller::Report', 'Catalyst::Action=HASH(0xb194890)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
	Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0xc203560)', 'MusicBrainz::Server::Controller::Report', 'Catalyst::Action=HASH(0xb194890)') called at lib/MusicBrainz/Server.pm line 306
	MusicBrainz::Server::execute('MusicBrainz::Server=HASH(0xc203560)', 'MusicBrainz::Server::Controller::Report', 'Catalyst::Action=HASH(0xb194890)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 60
	Catalyst::Action::dispatch('Catalyst::Action=HASH(0xb194890)', 'MusicBrainz::Server=HASH(0xc203560)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Controller.pm line 125
	Catalyst::Controller::_ACTION('MusicBrainz::Server::Controller::Report=HASH(0xacf5490)', 'MusicBrainz::Server=HASH(0xc203560)', 'ISRCsWithManyRecordings') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 65
	Catalyst::Action::execute('Catalyst::Action=HASH(0xb1944a0)', 'MusicBrainz::Server::Controller::Report=HASH(0xacf5490)', 'MusicBrainz::Server=HASH(0xc203560)', 'ISRCsWithManyRecordings') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1667
	eval {...} called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1667
	Catalyst::execute('MusicBrainz::Server=HASH(0xc203560)', 'MusicBrainz::Server::Controller::Report', 'Catalyst::Action=HASH(0xb1944a0)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
	Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0xc203560)', 'MusicBrainz::Server::Controller::Report', 'Catalyst::Action=HASH(0xb1944a0)') called at lib/MusicBrainz/Server.pm line 306
	MusicBrainz::Server::execute('MusicBrainz::Server=HASH(0xc203560)', 'MusicBrainz::Server::Controller::Report', 'Catalyst::Action=HASH(0xb1944a0)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 60
	Catalyst::Action::dispatch('Catalyst::Action=HASH(0xb1944a0)', 'MusicBrainz::Server=HASH(0xc203560)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 257
	Catalyst::Dispatcher::_do_forward('Catalyst::Dispatcher=HASH(0x2e052f8)', 'forward', 'MusicBrainz::Server=HASH(0xc203560)', '_ACTION') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 237
	Catalyst::Dispatcher::forward('Catalyst::Dispatcher=HASH(0x2e052f8)', 'MusicBrainz::Server=HASH(0xc203560)', '_ACTION') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 342
	Catalyst::forward('MusicBrainz::Server=HASH(0xc203560)', '_ACTION') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Controller.pm line 99
	Catalyst::Controller::_DISPATCH('MusicBrainz::Server::Controller::Report=HASH(0xacf5490)', 'MusicBrainz::Server=HASH(0xc203560)', 'ISRCsWithManyRecordings') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 65
	Catalyst::Action::execute('Catalyst::Action=HASH(0xb193b88)', 'MusicBrainz::Server::Controller::Report=HASH(0xacf5490)', 'MusicBrainz::Server=HASH(0xc203560)', 'ISRCsWithManyRecordings') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1667
	eval {...} called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1667
	Catalyst::execute('MusicBrainz::Server=HASH(0xc203560)', 'MusicBrainz::Server::Controller::Report', 'Catalyst::Action=HASH(0xb193b88)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Plugin/StackTrace.pm line 94
	Catalyst::Plugin::StackTrace::execute('MusicBrainz::Server=HASH(0xc203560)', 'MusicBrainz::Server::Controller::Report', 'Catalyst::Action=HASH(0xb193b88)') called at lib/MusicBrainz/Server.pm line 306
	MusicBrainz::Server::execute('MusicBrainz::Server=HASH(0xc203560)', 'MusicBrainz::Server::Controller::Report', 'Catalyst::Action=HASH(0xb193b88)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Action.pm line 60
	Catalyst::Action::dispatch('Catalyst::Action=HASH(0xb193b88)', 'MusicBrainz::Server=HASH(0xc203560)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 257
	Catalyst::Dispatcher::_do_forward('Catalyst::Dispatcher=HASH(0x2e052f8)', 'forward', 'MusicBrainz::Server=HASH(0xc203560)', '/report/_DISPATCH') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 237
	Catalyst::Dispatcher::forward('Catalyst::Dispatcher=HASH(0x2e052f8)', 'MusicBrainz::Server=HASH(0xc203560)', '/report/_DISPATCH') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 342
	Catalyst::forward('MusicBrainz::Server=HASH(0xc203560)', '/report/_DISPATCH') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Dispatcher.pm line 105
	Catalyst::Dispatcher::dispatch('Catalyst::Dispatcher=HASH(0x2e052f8)', 'MusicBrainz::Server=HASH(0xc203560)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1613
	Catalyst::dispatch('MusicBrainz::Server=HASH(0xc203560)') called at lib/MusicBrainz/Server.pm line 275
	Class::MOP::Class:::around('CODE(0x26331b0)', 'MusicBrainz::Server=HASH(0xc203560)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 162
	Class::MOP::Method::Wrapped::__ANON__('MusicBrainz::Server=HASH(0xc203560)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/x86_64-linux-gnu-thread-multi/Class/MOP/Method/Wrapped.pm line 91
	MusicBrainz::Server::dispatch('MusicBrainz::Server=HASH(0xc203560)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1963
	Catalyst::__ANON__() called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Try/Tiny.pm line 76
	eval {...} called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Try/Tiny.pm line 67
	Try::Tiny::try('CODE(0xb30a608)', 'Try::Tiny::Catch=REF(0xc34aa40)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst.pm line 1969
	Catalyst::handle_request('MusicBrainz::Server', 'env', 'HASH(0xb2dba80)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Catalyst/Engine.pm line 856
	Catalyst::Engine::__ANON__('CODE(0xb30a8c0)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Plack/Handler/FCGI.pm line 134
	Plack::Handler::FCGI::run('Plack::Handler::FCGI=HASH(0x9e6d90)', 'CODE(0xb266c58)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Plack/Loader.pm line 88
	Plack::Loader::run('Plack::Loader=HASH(0x9af9d0)', 'Plack::Handler::FCGI=HASH(0x9e6d90)') called at /home/musicbrainz/musicbrainz-server/admin/../local/lib/perl5/Plack/Runner.pm line 263
	Plack::Runner::run('Plack::Runner=HASH(0x7ab000)') called at /home/musicbrainz/musicbrainz-server/admin/../local/bin/plackup line 10"


Stack trace:
line 224 MusicBrainz::Server::Data::Utils
line 47 MusicBrainz::Server::Report
line 30 MusicBrainz::Server::Report
line 38 MusicBrainz::Server::Controller::Report
line 191 MusicBrainz::Server::Controller
line 40 MusicBrainz::Server::Controller::Report
line 306 MusicBrainz::Server
line 306 MusicBrainz::Server
line 306 MusicBrainz::Server
line 275 MusicBrainz::Server


Request data: 
$VAR1 = {
          'query_parameters' => {},
          'body_parameters' => {}
        };

If this is because the reports haven't finished running, I presume it shouldn't be ISEing and should just show the old message about no data being available right now instead.


Oliver Charles added a comment - 26/Jun/12 05:28 PM

It's because reports don't exist and have never ran. I guess it would be nicer if they didn't crash.


Oliver Charles added a comment - 29/Jun/12 10:52 AM

This is now live on http://beta.musicbrainz.org/



Oliver Charles added a comment - 29/Jun/12 11:56 AM

Thanks, fixed.


nikki added a comment - 30/Jun/12 01:40 AM

nikki added a comment - 30/Jun/12 02:09 AM

Compare http://musicbrainz.org/report/ReleasesInCAAWithCoverArtRelationships?page=8 and http://beta.musicbrainz.org/report/ReleasesInCAAWithCoverArtRelationships?page=13
Ghosts I-IV by Nine Inch Nails appears once on the former and way too many times on the latter.


nikki added a comment - 30/Jun/12 03:50 AM

http://beta.musicbrainz.org/report/ReleasedTooEarly has the same problem of releases being duplicated.


nikki added a comment - 30/Jun/12 04:26 AM

Oliver Charles added a comment - 09/Jul/12 07:35 AM

This has too many open issues and will not make the 2012-07-09 release. It will stay in beta testing and hopefully make the 2012-07-24 release.


Oliver Charles added a comment - 10/Jul/12 10:53 AM

I believe I've fixed these remaining open isuses and have updated beta. Please let me know if I've missed anything, or you find new problems.