Summary: | Add a test to detect unneeded 'atomicupdate' files | ||
---|---|---|---|
Product: | Koha | Reporter: | Mason James <mtj> |
Component: | Test Suite | Assignee: | Mason James <mtj> |
Status: | Pushed to oldoldoldstable --- | QA Contact: | Testopia <testopia> |
Severity: | blocker | ||
Priority: | P1 - high | CC: | andrew, chris, jonathan.druart, kyle, mtj, victor, wainuiwitikapark |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: |
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=29596 https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=31108 |
||
Change sponsored?: | --- | Patch complexity: | Small patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
22.05.00,21.11.05,21.05.14,20.11.18,19.11.29
|
|
Circulation function: | |||
Bug Depends on: | |||
Bug Blocks: | 31108 | ||
Attachments: |
Bug 19169: Add a test to detect unneeded 'atomicupdate' files
Bug 19169: Add a test to detect unneeded 'atomicupdate' files Bug 19169: Add a test to detect unneeded 'atomicupdate' files |
Description
Mason James
2017-08-24 07:20:50 UTC
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 |