[Koha-devel] Mojolicious controllers for Koha plugins

Renvoize, Martin martin.renvoize at ptfs-europe.com
Mon Aug 22 22:43:09 CEST 2022


This looks great, I'll have a go at QA when I have a fresher brain tomorrow.

On Fri, 19 Aug 2022, 1:24 am , <dcook at prosentient.com.au> wrote:

> Awesome! Thanks, Kyle!
>
>
>
> I would love to get this into 22.11.
>
>
>
> David Cook
>
> Senior Software Engineer
>
> Prosentient Systems
>
> Suite 7.03
>
> 6a Glen St
>
> Milsons Point NSW 2061
>
> Australia
>
>
>
> Office: 02 9212 0899
>
> Online: 02 8005 0595
>
>
>
> *From:* Kyle Hall <kyle at bywatersolutions.com>
> *Sent:* Friday, 19 August 2022 1:14 AM
> *To:* dcook at prosentient.com.au
> *Cc:* koha-devel at lists.koha-community.org; Tomas Cohen Arazi <
> tomascohen at theke.io>; Renvoize, Martin <martin.renvoize at ptfs-europe.com>
> *Subject:* Re: Mojolicious controllers for Koha plugins
>
>
>
> Excellent! Tested and signed off on everything :)
>
>
>
> Kyle
>
>
>
>
>
> On Thu, Aug 18, 2022 at 3:04 AM <dcook at prosentient.com.au> wrote:
>
> Thanks, Kyle!
>
>
>
> Leveraging some past work, I was able to put something together fairly
> quickly. I’ve posted it to
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31380
>
>
>
> It has two dependent bug reports but I’ve posted patches for them too, and
> they’re fairly straightforward.
>
>
>
> It should be very easy to test, so hopefully you can have a look and let
> me know what you think.
>
>
>
> David Cook
>
> Senior Software Engineer
>
> Prosentient Systems
>
> Suite 7.03
>
> 6a Glen St
>
> Milsons Point NSW 2061
>
> Australia
>
>
>
> Office: 02 9212 0899
>
> Online: 02 8005 0595
>
>
>
> *From:* Kyle Hall <kyle at bywatersolutions.com>
> *Sent:* Tuesday, 16 August 2022 9:27 PM
> *To:* dcook at prosentient.com.au
> *Cc:* koha-devel at lists.koha-community.org; Tomas Cohen Arazi <
> tomascohen at theke.io>; Renvoize, Martin <martin.renvoize at ptfs-europe.com>
> *Subject:* Re: Mojolicious controllers for Koha plugins
>
>
>
> That sounds great to me David! I'll 100% assist you with testing and qa!
>
>
>
> On Tue, Aug 16, 2022 at 3:42 AM <dcook at prosentient.com.au> wrote:
>
> Hi all,
>
>
>
> I was just writing a Koha plugin to do a big data export, but I realize
> that it’s probably going to timeout, because Koha plugins run under
> Plack::App::CGIBin which buffers the entire response before it returns it
> to Apache to return to the client browser. It’s the reason Koha uses CGI
> instead of Plack for export.pl
>
>
>
> While we can use Mojolicious controllers with Koha plugins when it adds
> REST API endpoints, we can’t do that for Koha plugins themselves.
>
>
>
> This is a topic that I’ve touched on before, and there are challenges when
> it comes to Authentication and Templates, but they’re solvable challenges:
>
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=26791 “Build
> Mojolicious controller replacement for export.pl”
>
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=28325 “Build
> Mojolicious controller replacement for tools-home.pl”
>
>
>
> We could just start by supporting “tool” and “report” with the Mojolicious
> controllers, and that would just mean plugins-home.pl detecting that
> there is Mojolicious support in that plugin, and then building a URL to
> “/staff/plugins/run” instead of “/cgi-bin/koha/plugins/run.pl” for
> instance.
>
>
>
> That Mojolicious controller would really just need to check
> authentication/authorization, which is very doable with a fairly minor
> refactor.
>
>
>
> If I could get the support of just a couple other people, I’d be happy to
> do a lot of the authoring (or testing or whatever needs to be done just to
> get it done).
>
>
>
> By using Mojolicious controllers for select plugins, we’d also be able to
> shake out any issues without causing any regressions in core Koha, and then
> hopefully be able to start refactoring core Koha too…
>
>
>
> Anyways, please give it some consideration, and ask me if you have any
> questions.
>
>
>
> I’ll be looking more into export problems tomorrow, so I might end up
> going a different route for the sake of time in the short-term, but I think
> we should still be looking at shifting away from CGI and Plack::App::CGIBin
> due to their limitations…
>
>
>
> David Cook
>
> Senior Software Engineer
>
> Prosentient Systems
>
> Suite 7.03
>
> 6a Glen St
>
> Milsons Point NSW 2061
>
> Australia
>
>
>
> Office: 02 9212 0899
>
> Online: 02 8005 0595
>
>
>
>
>
> --
>
> Kyle M. Hall
>
> Loose Cannon, ByWater Solutions
>
> kyle at bywatersolutions.com
> https://bywatersolutions.com <http://bywatersolutions.com/>
>
> *What is Koha? <http://bywatersolutions.com/what-is-koha/>*
>
>
>
> --
>
> Kyle M. Hall
>
> Loose Cannon, ByWater Solutions
>
> kyle at bywatersolutions.com
> https://bywatersolutions.com <http://bywatersolutions.com/>
>
> *What is Koha? <http://bywatersolutions.com/what-is-koha/>*
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.koha-community.org/pipermail/koha-devel/attachments/20220822/b347e6ab/attachment-0001.htm>


More information about the Koha-devel mailing list