Bug 36367 - Remove context stack
Summary: Remove context stack
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor
Assignee: Jonathan Druart
QA Contact: Martin Renvoize (ashimema)
URL:
Keywords:
Depends on: 36149
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-20 07:50 UTC by Jonathan Druart
Modified: 2024-11-18 16:25 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 36367: Remove get_schema_cached (675 bytes, patch)
2024-03-20 07:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36367: Remove flush_schema_cached (751 bytes, patch)
2024-03-20 07:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36367: Remove _new_userenv (17.88 KB, patch)
2024-03-20 07:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36367: Remove context stack (5.14 KB, patch)
2024-03-20 07:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36367: Remove dbh_stack (2.47 KB, patch)
2024-03-20 07:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36367: Remove schema_stack (3.72 KB, patch)
2024-03-20 07:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36367: Set to undef when unsetting (689 bytes, patch)
2024-03-20 07:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36367: Remove obsolete tests (1.93 KB, patch)
2024-03-20 07:54 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36367: Fix BackgroundJob.t (952 bytes, patch)
2024-03-20 08:13 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36367: Remove get_schema_cached (733 bytes, patch)
2024-04-18 14:41 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Remove flush_schema_cached (809 bytes, patch)
2024-04-18 14:41 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Remove _new_userenv (17.91 KB, patch)
2024-04-18 14:41 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Remove context stack (5.20 KB, patch)
2024-04-18 14:41 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Remove dbh_stack (2.53 KB, patch)
2024-04-18 14:41 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Remove schema_stack (3.78 KB, patch)
2024-04-18 14:41 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Set to undef when unsetting (748 bytes, patch)
2024-04-18 14:41 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Remove obsolete tests (1.99 KB, patch)
2024-04-18 14:42 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Fix BackgroundJob.t (1011 bytes, patch)
2024-04-18 14:42 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Remove call to non-existent subroutine new_userenv (765 bytes, patch)
2024-04-18 14:42 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Fix test t/Token.t (878 bytes, patch)
2024-04-18 14:42 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Fix test t/db_dependent/Auth.t (1.09 KB, patch)
2024-04-18 14:42 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 36367: Remove get_schema_cached (800 bytes, patch)
2024-06-04 12:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Remove flush_schema_cached (876 bytes, patch)
2024-06-04 12:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Remove _new_userenv (18.01 KB, patch)
2024-06-04 12:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Remove context stack (5.26 KB, patch)
2024-06-04 12:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Remove dbh_stack (2.60 KB, patch)
2024-06-04 12:10 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Remove schema_stack (3.84 KB, patch)
2024-06-04 12:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Set to undef when unsetting (815 bytes, patch)
2024-06-04 12:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Remove obsolete tests (2.06 KB, patch)
2024-06-04 12:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Fix BackgroundJob.t (1.05 KB, patch)
2024-06-04 12:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Remove call to non-existent subroutine new_userenv (832 bytes, patch)
2024-06-04 12:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Fix test t/Token.t (945 bytes, patch)
2024-06-04 12:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review
Bug 36367: Fix test t/db_dependent/Auth.t (1.15 KB, patch)
2024-06-04 12:11 UTC, Martin Renvoize (ashimema)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Druart 2024-03-20 07:50:15 UTC
It's not used and is confusing. It does not make sense for now with plack and our current codebase.

We should remove it (and the other places using this pattern) and reintroduce it later, correctly implemented, if we need it back.
Comment 1 Jonathan Druart 2024-03-20 07:54:10 UTC Comment hidden (obsolete)
Comment 2 Jonathan Druart 2024-03-20 07:54:13 UTC Comment hidden (obsolete)
Comment 3 Jonathan Druart 2024-03-20 07:54:15 UTC Comment hidden (obsolete)
Comment 4 Jonathan Druart 2024-03-20 07:54:17 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2024-03-20 07:54:20 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2024-03-20 07:54:22 UTC Comment hidden (obsolete)
Comment 7 Jonathan Druart 2024-03-20 07:54:25 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2024-03-20 07:54:27 UTC Comment hidden (obsolete)
Comment 9 Jonathan Druart 2024-03-20 08:13:39 UTC Comment hidden (obsolete)
Comment 10 Julian Maurice 2024-04-18 14:41:42 UTC Comment hidden (obsolete)
Comment 11 Julian Maurice 2024-04-18 14:41:44 UTC Comment hidden (obsolete)
Comment 12 Julian Maurice 2024-04-18 14:41:47 UTC Comment hidden (obsolete)
Comment 13 Julian Maurice 2024-04-18 14:41:50 UTC Comment hidden (obsolete)
Comment 14 Julian Maurice 2024-04-18 14:41:53 UTC Comment hidden (obsolete)
Comment 15 Julian Maurice 2024-04-18 14:41:56 UTC Comment hidden (obsolete)
Comment 16 Julian Maurice 2024-04-18 14:41:59 UTC Comment hidden (obsolete)
Comment 17 Julian Maurice 2024-04-18 14:42:01 UTC Comment hidden (obsolete)
Comment 18 Julian Maurice 2024-04-18 14:42:04 UTC Comment hidden (obsolete)
Comment 19 Julian Maurice 2024-04-18 14:42:06 UTC Comment hidden (obsolete)
Comment 20 Julian Maurice 2024-04-18 14:42:09 UTC Comment hidden (obsolete)
Comment 21 Julian Maurice 2024-04-18 14:42:11 UTC Comment hidden (obsolete)
Comment 22 Julian Maurice 2024-04-18 14:58:08 UTC
Patches look good. Tests pass. QA tests pass (except one about POD but I think it's a false negative).
I didn't notice any bug trying to login/logout with different patrons and using staff interface and opac
Comment 23 Martin Renvoize (ashimema) 2024-06-04 12:10:46 UTC
Created attachment 167380 [details] [review]
Bug 36367: Remove get_schema_cached

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 24 Martin Renvoize (ashimema) 2024-06-04 12:10:49 UTC
Created attachment 167381 [details] [review]
Bug 36367: Remove flush_schema_cached

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 25 Martin Renvoize (ashimema) 2024-06-04 12:10:52 UTC
Created attachment 167382 [details] [review]
Bug 36367: Remove _new_userenv

TODO - better review C4::Auth's changes. Are all the removal of
_new_userenv correct/enough?

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 26 Martin Renvoize (ashimema) 2024-06-04 12:10:55 UTC
Created attachment 167383 [details] [review]
Bug 36367: Remove context stack

We are not using it and it's confusing, let's remove the context stack.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 27 Martin Renvoize (ashimema) 2024-06-04 12:10:58 UTC
Created attachment 167384 [details] [review]
Bug 36367: Remove dbh_stack

Same pattern, remove dbh stack

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 28 Martin Renvoize (ashimema) 2024-06-04 12:11:01 UTC
Created attachment 167385 [details] [review]
Bug 36367: Remove schema_stack

Same pattern in Koha::Database

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 29 Martin Renvoize (ashimema) 2024-06-04 12:11:04 UTC
Created attachment 167386 [details] [review]
Bug 36367: Set to undef when unsetting

We usually test if C4::Context->userenv, so we need to undef when
unsetting, not {} (evaluated true)

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 30 Martin Renvoize (ashimema) 2024-06-04 12:11:07 UTC
Created attachment 167387 [details] [review]
Bug 36367: Remove obsolete tests

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 31 Martin Renvoize (ashimema) 2024-06-04 12:11:09 UTC
Created attachment 167388 [details] [review]
Bug 36367: Fix BackgroundJob.t

This test is useless it seems, it is not testing background jobs
behaviour.

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 32 Martin Renvoize (ashimema) 2024-06-04 12:11:12 UTC
Created attachment 167389 [details] [review]
Bug 36367: Remove call to non-existent subroutine new_userenv

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 33 Martin Renvoize (ashimema) 2024-06-04 12:11:15 UTC
Created attachment 167390 [details] [review]
Bug 36367: Fix test t/Token.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 34 Martin Renvoize (ashimema) 2024-06-04 12:11:18 UTC
Created attachment 167391 [details] [review]
Bug 36367: Fix test t/db_dependent/Auth.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 35 Martin Renvoize (ashimema) 2024-06-04 12:11:43 UTC
Awesome work here, thanks for following through on it.

Passing QA
Comment 36 Martin Renvoize (ashimema) 2024-06-14 10:22:12 UTC
Thanks for all the hard work!

Pushed to main for the next 24.11.00 release as RM Assistant