Skip to content

Conversation

FrankSommer-64
Copy link

Contribution provides support for Trac bugtracker from Kiwi TCMS.
Requires Trac version 1.6 or above, and Plugin trac-ticketrpc installed and enabled in Trac server (see documentation on https://pypi.org/project/trac-ticketrpc/).
Docker files for tests against Trac server are included, automated tests to be implemented.

Copy link
Member

@atodorov atodorov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Overall looks good as a start but it needs some improvements and there are several open questions which need answers/resolution.

Copy link

codecov bot commented Jul 28, 2025

Codecov Report

❌ Patch coverage is 13.60544% with 127 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.00%. Comparing base (88c15e9) to head (7346e28).
⚠️ Report is 21 commits behind head on main.

Files with missing lines Patch % Lines
trackers_integration/tests/test_trac.py 0.00% 69 Missing ⚠️
trackers_integration/issuetracker/trac.py 24.67% 58 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #88       +/-   ##
===========================================
- Coverage   95.28%   80.00%   -15.29%     
===========================================
  Files          17       19        +2     
  Lines         615      760      +145     
===========================================
+ Hits          586      608       +22     
- Misses         29      152      +123     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@atodorov
Copy link
Member

@FrankSommer-64 just a reminder for whenever you are able to get back to this:

Please copy test_mantis.py into a test_trac.py file and adjust it accordingly so we can see the new integration being exercised. Once we have logs (know how it works) I can continue with the review.

@FrankSommer-64
Copy link
Author

I adapted test_mantis.py to test_trac.py. There's one problem left: how to cope with product name, as it must be the same in KiwiTCMS and Trac. In contrast to Mantis you can't create a Trac product using API/browser, that must be done when starting the docker container. Can a fix name be used (in Trac container yes), or will it cause trouble in KiwiTCMS instance when repeating tests (product already exists) ?

@atodorov
Copy link
Member

I adapted test_mantis.py to test_trac.py. There's one problem left: how to cope with product name, as it must be the same in KiwiTCMS and Trac.

Can you push the code so I can see exactly what's going on. Don't know this answer at the top of my head.

In contrast to Mantis you can't create a Trac product using API/browser, that must be done when starting the docker container. Can a fix name be used (in Trac container yes), or will it cause trouble in KiwiTCMS instance when repeating tests (product already exists) ?

Frank Sommer and others added 2 commits September 24, 2025 19:03
…zable with environment variables.

Pylint warnings fixed.
Test module added.
Copy link
Member

@atodorov atodorov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"""
:meta private:
Proxy class for Trac ticket JSON-RPC interface.
Trac server must have plugin trac-ticketrpc installed (https://pypi.org/project/trac-ticketrpc)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This line should be duplicated into the main Trac class too.

@@ -0,0 +1,3 @@
passlib
trac == 1.6
trac_ticketrpc == 0.9.3
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

# Licensed under GNU Affero General Public License v3 or later (AGPLv3+)
# https://www.gnu.org/licenses/agpl-3.0.html

FROM python:3.11-slim
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

src =

[project]
descr = Kiwi integration with Trac
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
descr = Kiwi integration with Trac
descr = Kiwi TCMS integration with Trac

self.project_name = os.getenv("TRAC_PRODUCT", "MyProject")

def _fixture_setup(self):
super()._fixture_setup()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Failing b/c in latest versions Django has changed this method. See #91 for the relevant changes necessary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants