Bug 31479 - Provide an option to skip the test for atomic updates
Summary: Provide an option to skip the test for atomic updates
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Test Suite (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Aleisha Amohia
QA Contact: Kyle M Hall
URL:
Keywords:
Depends on: 31108
Blocks:
  Show dependency treegraph
 
Reported: 2022-08-28 22:21 UTC by Aleisha Amohia
Modified: 2023-12-28 20:42 UTC (History)
4 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement adds an option to skip the check for leftover atomic updates when building custom packages. This is particularly useful for Koha providers or anyone else building Koha packages manually. In practice, this could be run like: sudo CUSTOM_PACKAGE=1 ./debian/build-git-snapshot -r ~/debian -v 21.11.01git -d
Version(s) released in:
23.05.00


Attachments
Bug 31479: Option to skip t/00-check-atomic-updates.t when building custom packages (2.32 KB, patch)
2022-08-28 23:12 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 31479: Option to skip t/00-check-atomic-updates.t when building custom packages (2.37 KB, patch)
2023-04-21 12:38 UTC, Mason James
Details | Diff | Splinter Review
Bug 31479: Option to skip t/00-check-atomic-updates.t when building custom packages (2.42 KB, patch)
2023-04-28 14:44 UTC, Kyle M Hall
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Aleisha Amohia 2022-08-28 22:21:43 UTC
Since t/00-check-atomic-updates.t was fixed in Bug 31108, if there are any atomic updates left when building a package manually, the test and build will fail.

Koha providers like Catalyst may keep atomic updates when building packages for customisations. Sometimes these are just temporary, while we wait for custom work to get upstreamed (in which case we can remove the atomic updates), but sometimes these are necessary customisations which must be kept for the library. So an option to skip this test when building a custom package would be useful.
Comment 1 Aleisha Amohia 2022-08-28 23:12:10 UTC
Created attachment 139934 [details] [review]
Bug 31479: Option to skip t/00-check-atomic-updates.t when building custom packages

This enhancement adds an option to skip the check for leftover atomic
updates when building custom packages. This is particularly useful for
Koha providers or anyone else building Koha packages manually.

In practice, this could be run like: sudo CUSTOM_PACKAGE=1
./debian/build-git-snapshot -r ~/debian -v 21.11.01git -d

This test plan should all take place within the shell.
0. sudo koha-shell kohadev
1. Run prove t/00-check-atomic-updates.t and confirm the test passes
2. Add a fake atomic update to installer/data/mysql/atomicupdate/ . You
can use the example from
https://wiki.koha-community.org/wiki/Database_updates#How_to_write_an_atomicupdate_file
3. Run prove t/00-check-atomic-updates.t and notice the test fails
4. Set the CUSTOM_PACKAGE environment variable so we can test this. You
can either set on the commandline (using export) or in /etc/environment
(remember to run source /etc/environment so the changes are accessed)
5. Run prove t/00-check-atomic-updates.t and the test should now pass.

Sponsored-by: Catalyst IT
Comment 2 Mason James 2023-04-21 12:38:36 UTC
Created attachment 150036 [details] [review]
Bug 31479: Option to skip t/00-check-atomic-updates.t when building custom packages

This enhancement adds an option to skip the check for leftover atomic
updates when building custom packages. This is particularly useful for
Koha providers or anyone else building Koha packages manually.

In practice, this could be run like: sudo CUSTOM_PACKAGE=1
./debian/build-git-snapshot -r ~/debian -v 21.11.01git -d

This test plan should all take place within the shell.
0. sudo koha-shell kohadev
1. Run prove t/00-check-atomic-updates.t and confirm the test passes
2. Add a fake atomic update to installer/data/mysql/atomicupdate/ . You
can use the example from
https://wiki.koha-community.org/wiki/Database_updates#How_to_write_an_atomicupdate_file
3. Run prove t/00-check-atomic-updates.t and notice the test fails
4. Set the CUSTOM_PACKAGE environment variable so we can test this. You
can either set on the commandline (using export) or in /etc/environment
(remember to run source /etc/environment so the changes are accessed)
5. Run prove t/00-check-atomic-updates.t and the test should now pass.

Sponsored-by: Catalyst IT
Signed-off-by: Mason James <mtj@kohaaloha.com>
Comment 3 Mason James 2023-04-21 12:39:19 UTC
signing off, looks good to me :)
Comment 4 Kyle M Hall 2023-04-28 14:44:31 UTC
Created attachment 150388 [details] [review]
Bug 31479: Option to skip t/00-check-atomic-updates.t when building custom packages

This enhancement adds an option to skip the check for leftover atomic
updates when building custom packages. This is particularly useful for
Koha providers or anyone else building Koha packages manually.

In practice, this could be run like: sudo CUSTOM_PACKAGE=1
./debian/build-git-snapshot -r ~/debian -v 21.11.01git -d

This test plan should all take place within the shell.
0. sudo koha-shell kohadev
1. Run prove t/00-check-atomic-updates.t and confirm the test passes
2. Add a fake atomic update to installer/data/mysql/atomicupdate/ . You
can use the example from
https://wiki.koha-community.org/wiki/Database_updates#How_to_write_an_atomicupdate_file
3. Run prove t/00-check-atomic-updates.t and notice the test fails
4. Set the CUSTOM_PACKAGE environment variable so we can test this. You
can either set on the commandline (using export) or in /etc/environment
(remember to run source /etc/environment so the changes are accessed)
5. Run prove t/00-check-atomic-updates.t and the test should now pass.

Sponsored-by: Catalyst IT
Signed-off-by: Mason James <mtj@kohaaloha.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 5 Tomás Cohen Arazi 2023-05-10 18:28:36 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 6 Matt Blenkinsop 2023-05-15 12:28:46 UTC
Enhancement - not backporting to 22.11.x
Comment 7 Caroline Cyr La Rose 2023-05-16 16:51:24 UTC
Nothing to add to the manual.