Bug 39304

Summary: Jenkins not failing when git command fails
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Test SuiteAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to stable --- QA Contact: Marcel de Rooy <m.de.rooy>
Severity: major    
Priority: P5 - low CC: fridolin.somers, m.de.rooy, tomascohen
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=36381
GIT URL: Change sponsored?: ---
Patch complexity: Trivial patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00,24.11.06
Circulation function:
Attachments: Bug 39304: Make sure git commands return something
Bug 39304: Make sure git commands return something

Description Jonathan Druart 2025-03-11 14:00:06 UTC
We edited the config and it broke the git repo:

13:32:35 koha_1       | error: unable to normalize alternate object path: /srv/jenkins/workspace/Koha_Source/.git/objects
13:32:35 koha_1       | fatal: not a tree object
13:32:35 koha_1       | [12:29:31] xt/check_makefile.t 

So tests were not running correctly
Comment 1 Jonathan Druart 2025-03-11 14:00:30 UTC
Related to https://tree.taiga.io/project/koha-ils/task/328 and bug 36381
Comment 2 Jonathan Druart 2025-03-11 14:03:38 UTC
Created attachment 179167 [details] [review]
Bug 39304: Make sure git commands return something

Jenkins is not failing when git command fails.

We edited the config and it broke the git repo:

13:32:35 koha_1       | error: unable to normalize alternate object path: /srv/jenkins/workspace/Koha_Source/.git/objects
13:32:35 koha_1       | fatal: not a tree object
13:32:35 koha_1       | [12:29:31] xt/check_makefile.t

So tests were not running correctly

Maybe it will be a problem for people running the tests without being
inside a git repo, but for now we need to ensure the community CI does
what we think it does.
Comment 3 Marcel de Rooy 2025-04-18 06:53:37 UTC
Created attachment 181148 [details] [review]
Bug 39304: Make sure git commands return something

Jenkins is not failing when git command fails.

We edited the config and it broke the git repo:

13:32:35 koha_1       | error: unable to normalize alternate object path: /srv/jenkins/workspace/Koha_Source/.git/objects
13:32:35 koha_1       | fatal: not a tree object
13:32:35 koha_1       | [12:29:31] xt/check_makefile.t

So tests were not running correctly

Maybe it will be a problem for people running the tests without being
inside a git repo, but for now we need to ensure the community CI does
what we think it does.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 4 Marcel de Rooy 2025-04-18 06:55:11 UTC
(In reply to Jonathan Druart from comment #2)
> Maybe it will be a problem for people running the tests without being
> inside a git repo, but for now we need to ensure the community CI does
> what we think it does.

Without the git repo or even without git, running the test makes no sense whether it fails or passes. So looks good to me.
Comment 5 Katrin Fischer 2025-04-22 06:50:18 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2025-06-19 10:29:01 UTC
Pushed to 24.11.x for 24.11.06