[Bug 22522] New: ILL API breaks with updated Mojolicious version

classic Classic list List threaded Threaded
61 messages Options
123
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #59 from Martin Renvoize <[hidden email]> ---
Created attachment 105639
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105639&action=edit
Bug 22522: Add support for current Mojolicious in 19.11

This patch allows tests to succeed with the following versions:
JSON::Validator 3.18
Mojolicious 8.32
Mojolicious::Plugin::OpenAPI 2.21

Also Mojolicious::Plugin::OpenAPI version 1.17 and later 1.x versions
now work.

Calling valid_input in under() would cause ' Use of uninitialized value
$_[2] ' in more recent OpenAPI plugins, so that was changed too. As far
as I can see this does not affect authorization.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #60 from Martin Renvoize <[hidden email]> ---
I believe my alternative to Kyle's should do the trick.. it's literally the
REST/V1/Auth.pm changes from the first patch here, just without all the test
updates included.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #105591|0                           |1
        is obsolete|                            |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #61 from Jonathan Druart <[hidden email]> ---
still not working but it's better.

Only 3 are failing now:
t/db_dependent/api/v1/libraries.t
t/db_dependent/api/v1/patrons.t
t/db_dependent/api/v1/patrons_password.t

with things like
      #   Failed test 'has value for JSON Pointer "ARRAY(0x558849c58998)"'
        #   at t/db_dependent/api/v1/libraries.t line 92.                      
        # Looks like you failed 17 tests of 51.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #62 from Martin Renvoize <[hidden email]> ---
I've been looking at this and in reality.. I think what we really need is to
just backport the whole set correctly.. I'm not sure what stopped it from being
backported in the first place to be honest.

I've had a go at backporting locally and it applies with minor conflicts to
resolve on the 19.11 branch pretty easily. (all of it, including all the tests
fixes).. The problem I'm having however, is that running all the tests to check
they're now working against a KOHA_IMAGE=19.11-bionic koha-testing-docker
crashes my dev server entirely for unknown reasons at the moment.. hence I've
not submitted the set on mass yet.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #63 from Tomás Cohen Arazi <[hidden email]> ---
(In reply to Martin Renvoize from comment #62)

> I've been looking at this and in reality.. I think what we really need is to
> just backport the whole set correctly.. I'm not sure what stopped it from
> being backported in the first place to be honest.
>
> I've had a go at backporting locally and it applies with minor conflicts to
> resolve on the 19.11 branch pretty easily. (all of it, including all the
> tests fixes).. The problem I'm having however, is that running all the tests
> to check they're now working against a KOHA_IMAGE=19.11-bionic
> koha-testing-docker crashes my dev server entirely for unknown reasons at
> the moment.. hence I've not submitted the set on mass yet.

Are you by chance running it with CPAN and COVERAGE?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #64 from Martin Renvoize <[hidden email]> ---
Nope..

`KOHA_IMAGE=19.11-bionic docker-compose -f docker-compose.yml -f
docker-compose.mariadb_d9.yml -p koha up --force-recreate`

Then `kshell`, `kshell`, `prove -v t/db_dependant/api/v1/*`

It get's about 2/3rds through then the host OS runs out of memory and starts
OOMing, starting with ssh.. and finally it all just falls over and I have to
restart my dev box.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #65 from Martin Renvoize <[hidden email]> ---
https://gitlab.com/mrenvoize/Koha/-/commits/bug_22522 is my 19.11 branch with
backported patches applied if it helps.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

Jonathan Druart <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
 Attachment #105639|0                           |1
        is obsolete|                            |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #66 from Jonathan Druart <[hidden email]> ---
Created attachment 105657
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105657&action=edit
Bug 22522: [19.11.x] Add support for current Mojolicious and related packages

This patch allows tests to succeed with the following versions:
JSON::Validator 3.18
Mojolicious 8.32
Mojolicious::Plugin::OpenAPI 2.21

Also Mojolicious::Plugin::OpenAPI version 1.17 and later 1.x versions now work.

Calling valid_input in under() would cause ' Use of uninitialized value $_[2] '
in more recent OpenAPI plugins, so that was changed too. As far as I can see
this does not affect authorization.

Signed-off-by: Martin Renvoize <[hidden email]>

Signed-off-by: Jonathan Druart <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #67 from Jonathan Druart <[hidden email]> ---
Created attachment 105658
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105658&action=edit
Bug 22522: [19.11.x] Fix route typo

Signed-off-by: Martin Renvoize <[hidden email]>

Signed-off-by: Jonathan Druart <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #68 from Jonathan Druart <[hidden email]> ---
Created attachment 105659
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105659&action=edit
Bug 22522: [19.11.x] Fix several REST API tests

Fixes among others the invalid use of json_has() which caused broken tests to
pass with older Mojolicious versions.

Signed-off-by: Martin Renvoize <[hidden email]>

Signed-off-by: Jonathan Druart <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #69 from Jonathan Druart <[hidden email]> ---
I have tested Martin's remote branch on master-bionic and 19.11-bionic: all
tests pass!

Aleisha, could you push those 3 patches (the 19.11 ones) and see how behave
Jenkins?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #70 from Martin Renvoize <[hidden email]> ---
Awesome.. glad to hear it worked well for your Jonathan.. I think my OOM's were
local.. seems my dev server was due of a little maintenance and I can confirm
that test now pass for me too :)

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

Aleisha Amohia <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |[hidden email]

--- Comment #71 from Aleisha Amohia <[hidden email]> ---
Hi all, the tests fail in Jenkins in 19.11. Output below:

10:41:09 koha_1       | DBD::mysql::st execute failed: Unknown column 'name' in
'where clause' [for Statement "SELECT COUNT( * ) FROM `cities` `me` WHERE (
`name` LIKE ? )" with ParamValues: 0="manuel%"] at
/usr/share/perl5/DBIx/Class/Storage/DBI.pm line 1836.
10:41:09 koha_1       |
10:41:09 koha_1       |     #   Failed test '200 OK'
10:41:09 koha_1       |     #   at t/db_dependent/Koha/REST/Plugin/Objects.t
line 155.
10:41:09 koha_1       |     #          got: '500'
10:41:09 koha_1       |     #     expected: '200'
10:41:09 koha_1       |
10:41:09 koha_1       |     #   Failed test 'has value for JSON Pointer "/0"'
10:41:09 koha_1       |     #   at t/db_dependent/Koha/REST/Plugin/Objects.t
line 155.
10:41:09 koha_1       |
10:41:09 koha_1       |     #   Failed test 'has value for JSON Pointer "/1"'
10:41:09 koha_1       |     #   at t/db_dependent/Koha/REST/Plugin/Objects.t
line 155.
10:41:09 koha_1       |
10:41:09 koha_1       |     #   Failed test 'has value for JSON Pointer "/2"'
10:41:09 koha_1       |     #   at t/db_dependent/Koha/REST/Plugin/Objects.t
line 155.
10:41:09 koha_1       |
10:41:09 koha_1       |     #   Failed test 'exact match for JSON Pointer
"/0/name"'
10:41:09 koha_1       |     #   at t/db_dependent/Koha/REST/Plugin/Objects.t
line 155.
10:41:09 koha_1       |     #          got: undef
10:41:09 koha_1       |     #     expected: 'Manuel'
10:41:09 koha_1       |
10:41:09 koha_1       |     #   Failed test 'exact match for JSON Pointer
"/1/name"'
10:41:09 koha_1       |     #   at t/db_dependent/Koha/REST/Plugin/Objects.t
line 155.
10:41:09 koha_1       |     #          got: undef
10:41:09 koha_1       |     #     expected: 'Manuela'
10:41:09 koha_1       |
10:41:09 koha_1       |     #   Failed test 'exact match for JSON Pointer
"/2/name"'
10:41:09 koha_1       |     #   at t/db_dependent/Koha/REST/Plugin/Objects.t
line 155.
10:41:09 koha_1       |     #          got: undef
10:41:09 koha_1       |     #     expected: 'Manuelab'

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #72 from Jonathan Druart <[hidden email]> ---
19.11: There is something wrong in the paths, and so plack does not start
correctly.
I have cherry-picked a07c5c153aaecc5cc8b0d1de5c53f184da5971b9
  Bug 25279: Add general query parameters to the /cities route

But there is still something wrong in the tests, name is not reversed with
city_name but I did not find what was missing.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #73 from Tomás Cohen Arazi <[hidden email]> ---
Created attachment 105692
  -->
https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=105692&action=edit
[19.11.x] Bug 22522: Adjust tests to previous changes

Signed-off-by: Tomas Cohen Arazi <[hidden email]>

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #74 from Jonathan Druart <[hidden email]> ---
(In reply to Jonathan Druart from comment #72)
> 19.11: There is something wrong in the paths, and so plack does not start
> correctly.
> I have cherry-picked a07c5c153aaecc5cc8b0d1de5c53f184da5971b9
>   Bug 25279: Add general query parameters to the /cities route

Forget about this.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #75 from Jonathan Druart <[hidden email]> ---
(In reply to Tomás Cohen Arazi from comment #73)
> Created attachment 105692 [details] [review]
> [19.11.x] Bug 22522: Adjust tests to previous changes
>
> Signed-off-by: Tomas Cohen Arazi <[hidden email]>

Aleisha, this one is read for you :)

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

Aleisha Amohia <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Pushed to master            |Pushed to stable
         Version(s)|20.05.00                    |20.05.00, 19.11.07
        released in|                            |

--- Comment #76 from Aleisha Amohia <[hidden email]> ---
Jenkins is happy now :) backported to 19.11.x for 19.11.07

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

Aleisha Amohia <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Pushed to stable            |Pushed to oldstable

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #77 from Victor Grousset/tuxayo <[hidden email]> ---
I got a conflict when trying to backport to 19.05. (note the tests pass without
these patches, no API issues on 19.05)

I'm not sure about InstallPlugins, it doesn't exist in 19.05 vs 19.11. So I
don't know how valid that is if I don't use it.

About `Koha::Plugins::Methods->search->delete;` there is also uncertainly.

(note that HEAD means 19.05.x,
parent of 6eef54e940 means 19.11.x before the patch that I'm backporting,
and the last section is the patch that I'm backporting)
<<<<<<< HEAD
    my @plugins = Koha::Plugins->new->GetPlugins( { all => 1 } );
||||||| parent of 6eef54e940... [SIGNED-OFF] Bug 22522: [19.11.x] Add support
for current Mojolicious and related packages
    my $plugins = Koha::Plugins->new;
    $plugins->InstallPlugins;

    my @plugins = $plugins->GetPlugins( { all => 1 } );
=======
    # remove any existing plugins that might interfere
    Koha::Plugins::Methods->search->delete;
    my $plugins = Koha::Plugins->new;
    $plugins->InstallPlugins;

    my @plugins = $plugins->GetPlugins( { all => 1 } );
>>>>>>> 6eef54e940... [SIGNED-OFF] Bug 22522: [19.11.x] Add support for current Mojolicious and related packages


It's only in PluginRoutes.t I could just try and see which tests pass...



Next conflict!
(note that HEAD means 19.05.x,
parent of 095948c43f means 19.11.x before the patch that I'm backporting,
and the last section is the patch that I'm backporting)
t/db_dependent/api/v1/patrons.t
<<<<<<< HEAD
        $tx = $t->ua->build_tx(PUT => "/api/v1/patrons/" . $patron_2->id =>
json => $newpatron);
        $tx->req->cookies({name => 'CGISESSID', value => $session_id});
        $t->request_ok($tx)
          ->status_is(200, 'Patron updated successfully')
          ->json_has($newpatron);
||||||| parent of 095948c43f... [SIGNED-OFF] Bug 22522: [19.11.x] Fix several
REST API tests
        $t->put_ok( "//$userid:$password@/api/v1/patrons/" .
$patron_2->borrowernumber => json => $newpatron )
          ->status_is(200, 'Patron updated successfully')
          ->json_has($newpatron);
=======
        my $result = $t->put_ok( "//$userid:$password@/api/v1/patrons/" .
$patron_2->borrowernumber => json => $newpatron )
          ->status_is(200, 'Patron updated successfully');

        # Put back the RO attributes
        $newpatron->{patron_id} = $unauthorized_patron->to_api->{patron_id};
        $newpatron->{restricted} = $unauthorized_patron->to_api->{restricted};
        $newpatron->{anonymized} = $unauthorized_patron->to_api->{anonymized};
        is_deeply($result->tx->res->json, $newpatron, 'Returned patron from
update matches expected');

>>>>>>> 095948c43f... [SIGNED-OFF] Bug 22522: [19.11.x] Fix several REST API tests

I don't know if 19.11 supports that way to authenticate.
The tests will tell.

Another similar conflict.


Tests: it doesn't work. That was to be expected, that would have been so lucky
to just hammer it like that.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #78 from Jonathan Druart <[hidden email]> ---
(In reply to Aleisha Amohia from comment #76)
> Jenkins is happy now :) backported to 19.11.x for 19.11.07

It seems that there is something wrong for D10 however:

19.11_D10 (#14)

18:34:00 koha_1       | #   at t/00-load.t line 62.
18:34:00 koha_1       | #     Tried to use 'Koha::REST::V1'.
18:34:00 koha_1       | #     Error:  Can't locate
JSON/Validator/OpenAPI/Mojolicious.pm in @INC (you may need to install the
JSON::Validator::OpenAPI::Mojolicious module) (@INC contains: /kohadevbox/koha
/etc/perl /usr/local/lib/x86_64-linux-gnu/perl/5.28.1
/usr/local/share/perl/5.28.1 /usr/lib/x86_64-linux-gnu/perl5/5.28
/usr/share/perl5 /usr/lib/x86_64-linux-gnu/perl/5.28 /usr/share/perl/5.28
/usr/local/lib/site_perl /usr/lib/x86_64-linux-gnu/perl-base
/var/lib/koha/kohadev/plugins) at /kohadevbox/koha/Koha/REST/V1.pm line 23.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #79 from Martin Renvoize <[hidden email]> ---
I'm confused.. in the 19.11 D10 package we seem to be getting the following
Mojolicious::Plugin::OpenAPI version:

kohadev-koha@ecc849b0f6ab:/kohadevbox/koha$ apt-cache policy
libmojolicious-plugin-openapi-perl
libmojolicious-plugin-openapi-perl:
  Installed: 1.15-1~kohadev1
  Candidate: 1.15-1~kohadev1
  Version table:
 *** 1.15-1~kohadev1 500
        500 http://debian.koha-community.org/koha 19.11/main amd64 Packages
        100 /var/lib/dpkg/status

This version predates the movement of code from the core plugin into
JSON::Validator::OpenAPI::Mojolicious as as such we don't get that module
installed.. which leads to the errors Jonathan mentions above.. did something
go weird with the packaging here?

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #80 from Martin Renvoize <[hidden email]> ---
Even more confused.. seems we're using those versions elsewhere too.. so I'm
not understanding how the tests are passing elsewhere but not no D10.

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #81 from Mason James <[hidden email]> ---
(In reply to Martin Renvoize from comment #80)
> Even more confused.. seems we're using those versions elsewhere too.. so I'm
> not understanding how the tests are passing elsewhere but not no D10.

(In reply to Martin Renvoize from comment #79)

> I'm confused.. in the 19.11 D10 package we seem to be getting the following
> Mojolicious::Plugin::OpenAPI version:
>
> kohadev-koha@ecc849b0f6ab:/kohadevbox/koha$ apt-cache policy
> libmojolicious-plugin-openapi-perl
> libmojolicious-plugin-openapi-perl:
>   Installed: 1.15-1~kohadev1
>   Candidate: 1.15-1~kohadev1
>   Version table:
>  *** 1.15-1~kohadev1 500
>         500 http://debian.koha-community.org/koha 19.11/main amd64 Packages
>         100 /var/lib/dpkg/status
>
> This version predates the movement of code from the core plugin into
> JSON::Validator::OpenAPI::Mojolicious as as such we don't get that module
> installed.. which leads to the errors Jonathan mentions above.. did
> something go weird with the packaging here?

hi Martin
this behaviour is actually expected

the 'koha on debian-10' APT fixes have currently only been applied to the koha
dev and 20.05 suites, and not the 19.11 and 19.05 suites
appling the fixes for koha 19.11 on debian 10, will actually break koha 19.11
on debian 8


i recommend that we fix koha 19.11 on debian 10, with the acceptance that koha
19.11 on debian 8 will break


the following patches are required to be applied to the 19.11.x branch for this
to happen

        https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25633
        https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25591
        https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25633


NOTE: users running 19.11 on older debian versions (oldoldstable and older) can
continue to use the koha 19.11 packages by using the following
/etc/apt/sources.d/koha line...

        deb http://debian.koha-community.org/koha 19.11 main OS_VERSION

replacing OS_VERSION with jessie, xenial, bionic

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #82 from Aleisha Amohia <[hidden email]> ---
(In reply to Mason James from comment #81)
> the following patches are required to be applied to the 19.11.x branch for
> this to happen
>
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25633
> https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=25591

Thanks all I have backported these two to 19.11.x for 19.11.07

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

--- Comment #83 from Aleisha Amohia <[hidden email]> ---
(In reply to Mason James from comment #81)

> hi Martin
> this behaviour is actually expected
>
> the 'koha on debian-10' APT fixes have currently only been applied to the
> koha dev and 20.05 suites, and not the 19.11 and 19.05 suites
> appling the fixes for koha 19.11 on debian 10, will actually break koha
> 19.11 on debian 8
>
>
> i recommend that we fix koha 19.11 on debian 10, with the acceptance that
> koha 19.11 on debian 8 will break
>

Noting that, as expected, the 19.11_D8 node is broken

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

Andrew Isherwood <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|andrew.isherwood@ptfs-europ |
                   |e.com                       |

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
Reply | Threaded
Open this post in threaded view
|

[Bug 22522] API authentication breaks with updated Mojolicious version

bugzilla-daemon
In reply to this post by bugzilla-daemon
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22522

Mason James <[hidden email]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           See Also|                            |https://bugs.koha-community
                   |                            |.org/bugzilla3/show_bug.cgi
                   |                            |?id=23653

--
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[hidden email]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/
123