Ravenbrook / Projects / Perforce Defect Tracking Integration / Project Documents
Perforce Defect Tracking Integration Project
This document outlines things that need to be done in order to develop and deliver the Perforce/Defect Tracker integration kit, to meet requirements 20, 21 and 22.
The intended readership is P4DTI development staff.
This document is not confidential.
It will be the "Perforce Defect Tracking Integration Kit", or "P4DTI Kit" for short.
It's probably best for the deliverable to be a tarball of
/project/p4dti/version/VERSION/...
. Keeping things simple
is good because it reduces the error rate. (The P4DTI release procedure
is getting very heavy and error-prone.)
The deliverable will be called
p4dti-kit-RELEASE.tar.gz
.
When the P4DTI Kit is produced from the same sources as a release of the P4DTI proper, it should share the same release number. Otherwise, it gets the next release number in sequence, as for the P4DTI.
We've been planning to give identifiers to messages since early on (see job000030). If we don't do so now, then people writing extensions won't use them and it'll be hard for users of the extensions to understand what's going on.
Also, it would be very useful for people debugging the replicator (or their extension to it) to have access to verbosity control (see job000060 and job000065).
I suggest the following steps:
Make a class for messages (with message id and level of importance); see [RB 2000-12-16].
Use this class and suitable subclasses thereof when raising exceptions of logging messages.
Document the message class hierarchy and how to use it.
Provide a procedure for generating new message ids (how do we allow people to develop extensions independently without their messages conflicting?).
Turn the verbose flag into a verbosity level.
Add suitable levels of importance to existing messages.
Add more debugging messages to the replicator.
Update the AG to use the new message ids.
Why does the replicator.py
contain both the interface
definitions (defect_tracker
,
defect_tracker_issue
and so on) and the implementation of
the replicator
class? This has led to problems of import
loops, where a module needs the interface definition but has to import
the implementation as well.
Source code should be laid out like documents, with introduction, sections, references, document history. (The last is done already.)
See [RB 2001-03-09] for some suggestions on how this should look.
The code does not refer to its design. We should add proper references. See [RB 2001-03-09] for some suggestions on how to do this.
Implementations and design notes should refer to the Integrator's Guide where relevant.
No-one has requested the ability to specify their own conflict resolution policies, or shown any hint of wanting such a feature. We found in alpha testing that the resolver would be an onerous role.
So why not remove all code to do with the P4DTI-action field and the resolver? We could remove the P4DTI-action field from the jobspec and simplify the replicator algorithm considerably (the conflict resolution bits are very long and hard to follow).
The Architecture needs bringing up to date. It still mentions the tracker-client architecture, for example.
The replicator design should be brought up to date by integrating all e-mail design decisions. The following decisions need to be integrated:
See also [RB 2001-03-09] for some suggestions from RB for improvements to the design document.
The design should refer to the architecture, and the architecture should be covered by the design documents (expand on the architecture to get to the design documents; for example by exploding the architecture diagram to show design elements).
The design should refer to requirements wherever appropriate.
Bugzilla needs a schema document that contains all the elements listed in Section 4, "Defect tracker database schema extensions" of the Integrator's Guide.
The following work needs doing for the Integrator's Guide:
Add defect_tracker_filespec
class documentation to
Section
6, "The defect tracker interface module".
Write section Section 6.5, "Logging and error handling". (Once we've done the work listed in section 3.1 above.)
Document the p4.py
module somewhere; describe the
Perforce interface configuration in Section
7.2, "Perforce interface configuration".
Document the replicator configuration in Section 7.3, "Replicator configuration".
Explain in more detail what a
configure_dt.py
module needs to do in Section
9, "Adapting the configuration module" (perhaps give some example
code).
Explain how to make the fabled "advanced configuration" in Section 7.5, "Making your own configurations".
Describe how to adapt the manuals in Section 10, "Adapting the manuals".
Write Section 11, "Making your work available to the community". Use P4DTI Project Contributions Procedure as a basis or refer to it.
Provide some examples. The TeamTrack and Bugzilla integrations are probably the best source of examples, it's just a matter of making the relation between each bit of code and the relevant bit of the Integrator's Guide clear.
Make the Integrator's Guide refer to new design documents.
The bugzilla.py
module may need some design
documentation, perhaps along the lines of the TeamTrack interface
documentation. Not very important, except insofar as it can be used to
illustrate the Integrator's Guide by example.
Work on the P4DTI Integration Kit should start with the elements that integrators will need (documentation and improvements to the code that affect the interfaces to which integrators will be working), and work out from that point through to the design documents. Changes to code that integrators won't look at can be left if resources are scarce.
Based on this priniciple, I suggest the following order of work:
Essential work on the Integrator's Guide (items 1, 3, 4, 5 in section 4.4).
Replicator design (section 4.2).
Messages (section 3.1; item 2 in section 4.3).
Action field (section 3.5).
Module organization (section 3.2).
Remaining Integrator's Guide work (items 6 to 10 in section 4.4).
References from design to architecture and requirements (section 4.2).
References from code to design (section 3.4).
[GDR 2000-11-17] | "Re: TeamShare/Perforce integration planning meeting, 2000-08-16" (e-mail message); Gareth Rees; Ravenbrook; 2000-11-17. |
[NB 2000-11-23] | "No explicit replication poll call in replicator/dt interface" (e-mail message); Nick Barnes; Ravenbrook; 2000-11-23. |
[NB 2000-11-24] | "Defect tracker design discussion" (e-mail messages); Nick Barnes; Ravenbrook; 2000-11-24. |
[RB 2000-11-08] | "Replicator architecture design discussion, 2000-11-01/02"; Richard Brooksby; Ravenbrook; 2000-11-08. |
[RB 2000-11-20a] | "Automatic configuration design" (e-mail message); Richard Brooksby; Ravenbrook; 2000-11-20. |
[RB 2000-11-20b] | "Re: Automatic configuration design" (e-mail message); Richard Brooksby; Ravenbrook; 2000-11-20. |
[RB 2000-11-20c] | "Re: Automatic configuration design" (e-mail message); Richard Brooksby; Ravenbrook; 2000-11-20. |
[RB 2000-11-28a] | "Case of state names" (e-mail message); Richard Brooksby; Ravenbrook; 2000-11-28. |
[RB 2000-11-28b] | "Distinguished state to map to 'closed'" (e-mail message); Richard Brooksby; Ravenbrook; 2000-11-28. |
[RB 2000-11-28c] | "Abolishing the role of resolver" (e-mail message); Richard Brooksby; Ravenbrook; 2000-11-28. |
[RB 2000-11-29] | "Setting items to be replicated" (e-mail message); Richard Brooksby; Ravenbrook; 2000-11-29. |
[RB 2000-12-16] | "Should exceptions be classes?" (e-mail message); Richard Brooksby; Ravenbrook; 2000-12-16. |
[RB 2001-03-09] | "Suggestions for code formatting and documentation" (e-mail message); Richard Brooksby; Ravenbrook; 2001-03-09. |
2001-03-09 | GDR | Created. |
Copyright © 2001 Ravenbrook Limited. This document is provided "as is", without any express or implied warranty. In no event will the authors be held liable for any damages arising from the use of this document. You may make and distribute verbatim copies of this document provided that you do not charge a fee for this document or for its distribution.
$Id: //info.ravenbrook.com/project/p4dti/doc/2001-03-09/integration-kit/index.html#3 $
Ravenbrook / Projects / Perforce Defect Tracking Integration / Project Documents