Bug 36367 - Remove context stack
Summary: Remove context stack
Status: Passed QA
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low minor (vote)
Assignee: Jonathan Druart
QA Contact: Martin Renvoize
URL:
Keywords:
Depends on: 36149
Blocks:
  Show dependency treegraph
 
Reported: 2024-03-20 07:50 UTC by Jonathan Druart
Modified: 2024-06-04 12:11 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:


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
Details | Diff | Splinter Review
Bug 36367: Remove flush_schema_cached (876 bytes, patch)
2024-06-04 12:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36367: Remove _new_userenv (18.01 KB, patch)
2024-06-04 12:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36367: Remove context stack (5.26 KB, patch)
2024-06-04 12:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36367: Remove dbh_stack (2.60 KB, patch)
2024-06-04 12:10 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36367: Remove schema_stack (3.84 KB, patch)
2024-06-04 12:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36367: Set to undef when unsetting (815 bytes, patch)
2024-06-04 12:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36367: Remove obsolete tests (2.06 KB, patch)
2024-06-04 12:11 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 36367: Fix BackgroundJob.t (1.05 KB, patch)
2024-06-04 12:11 UTC, Martin Renvoize
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
Details | Diff | Splinter Review
Bug 36367: Fix test t/Token.t (945 bytes, patch)
2024-06-04 12:11 UTC, Martin Renvoize
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
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
Created attachment 163500 [details] [review]
Bug 36367: Remove get_schema_cached
Comment 2 Jonathan Druart 2024-03-20 07:54:13 UTC
Created attachment 163501 [details] [review]
Bug 36367: Remove flush_schema_cached
Comment 3 Jonathan Druart 2024-03-20 07:54:15 UTC
Created attachment 163502 [details] [review]
Bug 36367: Remove _new_userenv

TODO - better review C4::Auth's changes. Are all the removal of
_new_userenv correct/enough?
Comment 4 Jonathan Druart 2024-03-20 07:54:17 UTC
Created attachment 163503 [details] [review]
Bug 36367: Remove context stack

We are not using it and it's confusing, let's remove the context stack.
Comment 5 Jonathan Druart 2024-03-20 07:54:20 UTC
Created attachment 163504 [details] [review]
Bug 36367: Remove dbh_stack

Same pattern, remove dbh stack
Comment 6 Jonathan Druart 2024-03-20 07:54:22 UTC
Created attachment 163505 [details] [review]
Bug 36367: Remove schema_stack

Same pattern in Koha::Database
Comment 7 Jonathan Druart 2024-03-20 07:54:25 UTC
Created attachment 163506 [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)
Comment 8 Jonathan Druart 2024-03-20 07:54:27 UTC
Created attachment 163507 [details] [review]
Bug 36367: Remove obsolete tests
Comment 9 Jonathan Druart 2024-03-20 08:13:39 UTC
Created attachment 163508 [details] [review]
Bug 36367: Fix BackgroundJob.t

This test is useless it seems, it is not testing background jobs
behaviour.
Comment 10 Julian Maurice 2024-04-18 14:41:42 UTC
Created attachment 165115 [details] [review]
Bug 36367: Remove get_schema_cached

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 11 Julian Maurice 2024-04-18 14:41:44 UTC
Created attachment 165116 [details] [review]
Bug 36367: Remove flush_schema_cached

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 12 Julian Maurice 2024-04-18 14:41:47 UTC
Created attachment 165117 [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>
Comment 13 Julian Maurice 2024-04-18 14:41:50 UTC
Created attachment 165118 [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>
Comment 14 Julian Maurice 2024-04-18 14:41:53 UTC
Created attachment 165119 [details] [review]
Bug 36367: Remove dbh_stack

Same pattern, remove dbh stack

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 15 Julian Maurice 2024-04-18 14:41:56 UTC
Created attachment 165120 [details] [review]
Bug 36367: Remove schema_stack

Same pattern in Koha::Database

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 16 Julian Maurice 2024-04-18 14:41:59 UTC
Created attachment 165121 [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>
Comment 17 Julian Maurice 2024-04-18 14:42:01 UTC
Created attachment 165122 [details] [review]
Bug 36367: Remove obsolete tests

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 18 Julian Maurice 2024-04-18 14:42:04 UTC
Created attachment 165123 [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>
Comment 19 Julian Maurice 2024-04-18 14:42:06 UTC
Created attachment 165124 [details] [review]
Bug 36367: Remove call to non-existent subroutine new_userenv

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 20 Julian Maurice 2024-04-18 14:42:09 UTC
Created attachment 165125 [details] [review]
Bug 36367: Fix test t/Token.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
Comment 21 Julian Maurice 2024-04-18 14:42:11 UTC
Created attachment 165126 [details] [review]
Bug 36367: Fix test t/db_dependent/Auth.t

Signed-off-by: Julian Maurice <julian.maurice@biblibre.com>
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 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 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 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 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 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 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 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 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 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 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 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 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 2024-06-04 12:11:43 UTC
Awesome work here, thanks for following through on it.

Passing QA