[Bug 41274] New: Incremental test runs not properly skipping Schema files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Bug ID: 41274 Summary: Incremental test runs not properly skipping Schema files Initiative type: --- Sponsorship --- status: Product: Koha Version: Main Hardware: All OS: All Status: NEW Severity: enhancement Priority: P5 - low Component: Test Suite Assignee: chris@bigballofwax.co.nz Reporter: martin.renvoize@openfifth.co.uk QA Contact: testopia@bugs.koha-community.org The incremental test runs Koha::Devel::Files module is failing to skip the DBIx::Class generated Schema files -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|chris@bigballofwax.co.nz |martin.renvoize@openfifth.c | |o.uk -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|enhancement |blocker -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 --- Comment #1 from Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> --- Created attachment 189716 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189716&action=edit Bug 41274: Koha::Devel::Files - Fix exception filtering in incremental mode This patch fixes two bugs in the file exception filtering logic that caused generated files (like Koha/Schema/Result/*) to not be excluded properly when running in incremental/CI mode. Bug #1: Incorrect array assignment Lines 173 and 204 were assigning an arrayref as a single element instead of dereferencing it: my @exception_files = $exceptions->{...}; # Wrong: creates array with 1 element (arrayref) my @exception_files = @{ $exceptions->{...} }; # Correct: dereferences to array Bug #2: Pattern matching not supported array_minus() only performs exact string matches, so patterns like "Koha/Schema/Result" would not match "Koha/Schema/Result/Aqbasket.pm". The fix: - Properly dereferences exception patterns array - Replaces array_minus with grep + regex pattern matching - Uses /^\Q$_\E/ to match file paths starting with exception patterns - Removes now-unused Array::Utils dependency This ensures consistent behavior between: - Non-incremental mode: Uses git ls-files with :(exclude) patterns - Incremental mode: Now uses equivalent pattern matching Test plan: 1. Run tests locally (non-incremental): prove xt/perltidy.t 2. Verify Schema files are excluded 3. Run in CI (incremental mode) with Schema file changes 4. Verify Schema files are now correctly excluded (previously failing) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Martin Renvoize (ashimema) <martin.renvoize@openfifth.co.uk> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Assignee|martin.renvoize@openfifth.c |jonathan.druart@gmail.com |o.uk | Status|Needs Signoff |ASSIGNED CC| |jonathan.druart@gmail.com --- Comment #2 from Jonathan Druart <jonathan.druart@gmail.com> --- Related to https://gitlab.com/koha-community/koha-testing-docker/-/merge_requests/562 Without we cannot test locally. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 --- Comment #3 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 189776 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189776&action=edit Bug 41274: Remove range parameter from ls_perl_files It's not used. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 --- Comment #4 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 189777 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189777&action=edit Bug 41274: Remove the exceptions from git range When listing the files from a git range we want to remove the exception files from that list -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|ASSIGNED |Needs Signoff -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Jonathan Druart <jonathan.druart@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189716|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 --- Comment #5 from Jonathan Druart <jonathan.druart@gmail.com> --- Created attachment 189778 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189778&action=edit Bug 41274: Remove exceptions from files listed in the result repo IF we have pushed some files that should have been excluded from the tests but have been processed previously and failed, we should skip it the next build anyway -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189776|0 |1 is obsolete| | --- Comment #6 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 189854 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189854&action=edit Bug 41274: Remove range parameter from ls_perl_files It's not used. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189777|0 |1 is obsolete| | --- Comment #7 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 189855 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189855&action=edit Bug 41274: Remove the exceptions from git range When listing the files from a git range we want to remove the exception files from that list Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189778|0 |1 is obsolete| | --- Comment #8 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Created attachment 189856 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189856&action=edit Bug 41274: Remove exceptions from files listed in the result repo IF we have pushed some files that should have been excluded from the tests but have been processed previously and failed, we should skip it the next build anyway Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off Patch complexity|--- |Small patch -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 --- Comment #9 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 189857 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189857&action=edit Bug 41274: Remove range parameter from ls_perl_files It's not used. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 --- Comment #10 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 189858 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189858&action=edit Bug 41274: Remove the exceptions from git range When listing the files from a git range we want to remove the exception files from that list Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 --- Comment #11 from Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> --- Created attachment 189859 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=189859&action=edit Bug 41274: Remove exceptions from files listed in the result repo IF we have pushed some files that should have been excluded from the tests but have been processed previously and failed, we should skip it the next build anyway Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Tomás Cohen Arazi <tomascohen@theke.io> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189854|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189855|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Tomás Cohen Arazi (tcohen) <tomascohen@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #189856|0 |1 is obsolete| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |25.11.00 released in| | Status|Passed QA |Pushed to main -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 --- Comment #12 from Lucas Gass (lukeg) <lucas@bywatersolutions.com> --- Nice work everyone! Pushed to main for 25.11 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Lucas Gass (lukeg) <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- QA Contact|testopia@bugs.koha-communit |tomascohen@gmail.com |y.org | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |fridolin.somers@biblibre.co | |m Depends on| |39876 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39876 [Bug 39876] Centralize listing of files from our codebase -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on|39876 |39877 Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39876 [Bug 39876] Centralize listing of files from our codebase https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39877 [Bug 39877] CI - Incremental runs -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 --- Comment #13 from Fridolin Somers <fridolin.somers@biblibre.com> --- It's for Bug 39877, so no need to backport -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 Fridolin Somers <fridolin.somers@biblibre.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to main |Needs documenting -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=41274 David Nind <david@davidnind.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |david@davidnind.com Resolution|--- |FIXED Status|Needs documenting |RESOLVED --- Comment #14 from David Nind <david@davidnind.com> --- Test suite related, no changes requried to the manual. -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org