Add a test to detect unneeded 'atomicupdate' files
What do you mean?
Are you asking for something in the release tools, like a git hook? I use one I can share if you want.
Created attachment 131394 [details] [review] Bug 19169: Add a test to detect unneeded 'atomicupdate' files to test... 1/ set git repo $ git reset --hard v21.11.03 2/ run test $ prove ./t OK 3/ apply patch 4/ run test again, observe FAIL $ prove ./t/00-check-atomic-updates.pl ./t/00-check-atomic-updates.pl .. 1/? # Failed test 'check for unhandled atomic updates: bug_29596.pl' # at ./t/00-check-atomic-updates.pl line 34. # 'bug_29596.pl' # matches '(?^u:.*pl$)' # Looks like you failed 1 test of 3. ./t/00-check-atomic-updates.pl .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/3 subtests
(In reply to Jonathan Druart from comment #2) > Are you asking for something in the release tools, like a git hook? > I use one I can share if you want. hi Jonathan i added a test so we can catch this problem early, before the release :)
All RM and RMaints must have a pre-push hook with the following code in it. my @atomicupdate_files = `git show HEAD:installer/data/mysql/atomicupdate/|tr -s '\\n' | grep -v '^tree'|grep -v 'README'|grep -v skeleton`; chomp for @atomicupdate_files; for my $atomic ( @atomicupdate_files ) { push @errors, "Atomicupdate file exists - $atomic"; }
Created attachment 131429 [details] [review] Bug 19169: Add a test to detect unneeded 'atomicupdate' files to test... 1/ set git repo $ git reset --hard v21.11.03 2/ run test $ prove ./t OK 3/ apply patch 4/ run test again, observe FAIL $ prove ./t/00-check-atomic-updates.pl ./t/00-check-atomic-updates.pl .. 1/? # Failed test 'check for unhandled atomic updates: bug_29596.pl' # at ./t/00-check-atomic-updates.pl line 34. # 'bug_29596.pl' # matches '(?^u:.*pl$)' # Looks like you failed 1 test of 3. ./t/00-check-atomic-updates.pl .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/3 subtests JD Amended patch: fix copyright year Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Jonathan Druart from comment #5) > All RM and RMaints must have a pre-push hook with the following code in it. > > my @atomicupdate_files = `git show > HEAD:installer/data/mysql/atomicupdate/|tr -s '\\n' | grep -v '^tree'|grep > -v 'README'|grep -v skeleton`; > chomp for @atomicupdate_files; > for my $atomic ( @atomicupdate_files ) { > push @errors, "Atomicupdate file exists - $atomic"; > } Should we add this to https://wiki.koha-community.org/wiki/Release_maintenance or https://wiki.koha-community.org/wiki/Tips_and_tricks#pre-push? Maybe we could also do a version of the RMaint pre-push hook that includes this check?
Created attachment 131445 [details] [review] Bug 19169: Add a test to detect unneeded 'atomicupdate' files to test... 1/ set git repo $ git reset --hard v21.11.03 2/ run test $ prove ./t OK 3/ apply patch 4/ run test again, observe FAIL $ prove ./t/00-check-atomic-updates.pl ./t/00-check-atomic-updates.pl .. 1/? # Failed test 'check for unhandled atomic updates: bug_29596.pl' # at ./t/00-check-atomic-updates.pl line 34. # 'bug_29596.pl' # matches '(?^u:.*pl$)' # Looks like you failed 1 test of 3. ./t/00-check-atomic-updates.pl .. Dubious, test returned 1 (wstat 256, 0x100) Failed 1/3 subtests JD Amended patch: fix copyright year Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
(In reply to Katrin Fischer from comment #7) > Should we add this to > https://wiki.koha-community.org/wiki/Release_maintenance or > https://wiki.koha-community.org/wiki/Tips_and_tricks#pre-push? It's there already.
Pushed to master for 22.05, thanks to everybody involved [U+1F984]
(In reply to Fridolin Somers from comment #10) > Pushed to master for 22.05, thanks to everybody involved [U+1F984] can we apply this thru to 19.11 pleeese
Pushed to 21.11.x for 21.11.05
Pushed to 21.05.x for 21.05.14
Backported: Pushed to 20.11.x branch for 20.11.18
Note: has been backported and pushed to 19.11.x branch for 19.11.29