Git integration using source-integration plugin fails
Posted: 02 Jan 2019, 20:58
Hi.
Before posting this I tried my best to search here and there the answers for my questions. I failed, therefore decided to ask for assistance here from more advanced Mantis users. Hope this is a right place.
I would like to integrate local Git with my local Mantis installation. This is few months old fresh install of 2.16.0 Mantis on Ubuntu 18.04 Server with Postgresql database and delivered via Apache https. source-integration plugin is at the 2.1.5 version. This is intranet only installation therefore cgit v 1.1 was installed and it is serving a test git repo webpage: repo name at index level, master branch at summary level, clone url, proper commits at log level, proper data (author, committer, commit, tree) at commit level. All good using cgit in the browser.
cgit repo in Mantis is configured:
Name: cgit test
Type: Cgit
URL: https://192.168.0.1/cgit/mantisrepotest/
cgit_root: https://192.168.0.1/cgit/
cgit_project: mantisrepotest
master_branch: master
Clone url is https://192.168.0.1/cgit/mantisrepotest
I can clone using git from this address without problems.
Unfortunately SourceCgit plugin doesn't work when using Import Everything/Import Latest Data button.
I am receiving the following error:
APPLICATION ERROR #401
Database query failed. Error received from database was #-1: ERROR null value in column "revision" violates not-null constraint.
DETAIL: Failing row contains (14, 14, null, master, 0, 1970-01-01 01:00:00...... null , null, null, 0). for the query: INSERT INTO mantis_plugin_Source_changeset_table (repo_id, revision, parent, branch, user_id, timestamp, author, message, info, ported, author_email, committer, committer_email, committer_id) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14).
I have found this script SourceCgit/SourceCgitTest.php but trying to run it from its directory with php SourceCgitTest.php gives me PHP Fatal error: Class 'MantisSourceGitBasePlugin' not found in /var/mantis/plugins/SourceCgit/SourceCgit.php on line 17.
I can't troubleshoot this and check if proper data is screenscrapped from my cgit service (before run I updated this file with my real data working commit string).
Hope someone can help me with cgit or plain Git configuration.
P.S.
Other Mantis plugins are working correctly. I managed to import some issues using them. There are no errors at admin check pages. Installation is working fine. Active Directory logins are working. All good apart Git....
Before posting this I tried my best to search here and there the answers for my questions. I failed, therefore decided to ask for assistance here from more advanced Mantis users. Hope this is a right place.
I would like to integrate local Git with my local Mantis installation. This is few months old fresh install of 2.16.0 Mantis on Ubuntu 18.04 Server with Postgresql database and delivered via Apache https. source-integration plugin is at the 2.1.5 version. This is intranet only installation therefore cgit v 1.1 was installed and it is serving a test git repo webpage: repo name at index level, master branch at summary level, clone url, proper commits at log level, proper data (author, committer, commit, tree) at commit level. All good using cgit in the browser.
cgit repo in Mantis is configured:
Name: cgit test
Type: Cgit
URL: https://192.168.0.1/cgit/mantisrepotest/
cgit_root: https://192.168.0.1/cgit/
cgit_project: mantisrepotest
master_branch: master
Clone url is https://192.168.0.1/cgit/mantisrepotest
I can clone using git from this address without problems.
Unfortunately SourceCgit plugin doesn't work when using Import Everything/Import Latest Data button.
I am receiving the following error:
APPLICATION ERROR #401
Database query failed. Error received from database was #-1: ERROR null value in column "revision" violates not-null constraint.
DETAIL: Failing row contains (14, 14, null, master, 0, 1970-01-01 01:00:00...... null , null, null, 0). for the query: INSERT INTO mantis_plugin_Source_changeset_table (repo_id, revision, parent, branch, user_id, timestamp, author, message, info, ported, author_email, committer, committer_email, committer_id) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14).
I have found this script SourceCgit/SourceCgitTest.php but trying to run it from its directory with php SourceCgitTest.php gives me PHP Fatal error: Class 'MantisSourceGitBasePlugin' not found in /var/mantis/plugins/SourceCgit/SourceCgit.php on line 17.
I can't troubleshoot this and check if proper data is screenscrapped from my cgit service (before run I updated this file with my real data working commit string).
Hope someone can help me with cgit or plain Git configuration.
P.S.
Other Mantis plugins are working correctly. I managed to import some issues using them. There are no errors at admin check pages. Installation is working fine. Active Directory logins are working. All good apart Git....