job000425 #2

  • //
  • spec/
  • job/
  • job000425
  • View
  • Commits
  • Open Download .zip Download (5 KB)
# The form data below was edited by perforce
# Perforce Workshop Jobs
#
#  Job:           The job name. 'new' generates a sequenced job number.
#
#  Status:        Job status; required field.  There is no enforced or
#                 promoted workflow for transition of jobs from one
#                 status to another, just a set of job status values
#                 for users to apply as they see fit.  Possible values:
#
#                 open - Issue is available to be worked on.
#
#                 inprogress - Active development is in progress.
#
#                 blocked - Issue cannot be implemented for some reason.
#
#                 fixed - Fixed, optional status to use before closed.
#                 
#                 closed - Issue has been dealt with definitively.
#
#                 punted - Decision made not to address the issue,
#                    possibly not ever.
#
#                 suspended - Decision made not to address the issue
#                    in the immediate future, but noting that it may
#                    have some merit and may be revisited later.
#
#                 duplicate - Duplicate of another issue that.
#
#                 obsolete - The need behind the request has become
#                    overcome by events.
#
#  Project:       The project this job is for. Required.
#
#  Severity:      [A/B/C] (A is highest)  Required.
#
#  ReportedBy     The user who created the job. Can be changed.
#
#  ReportedDate:  The date the job was created.  Automatic.
#
#  ModifiedBy:    The user who last modified this job. Automatic.
#
#  ModifiedDate:  The date this job was last modified. Automatic.
#
#  OwnedBy:       The owner, responsible for doing the job. Optional.
#
#  Description:   Description of the job.  Required.
#
#  DevNotes:      Developer's comments.  Optional.  Can be used to
#                 explain a status, e.g. for blocked, punted,
#                 obsolete or duplicate jobs.  May also provide
#                 additional information such as the earliest release
#                 in which a bug is known to exist.
#
# Component:      Projects may use this optional field to indicate
#                 which component of the project a givenjob is associated
#                 with.
#
#                 For the SDP, the list of components is defined in:
#                 //guest/perforce_software/sdp/tools/components.txt
#
#  Type:          Type of job [Bug/Feature].  Required.
#
#  Release:       Release in which job is intended to be fixed.

Job:	job000425

Status:	open

Project:	perforce-software-p4api-net

Severity:	C

ReportedBy:	QAP

ReportedDate:	2015/12/15 07:52:27

ModifiedBy:	perforce

ModifiedDate:	2019/02/19 10:51:27

OwnedBy:	QAP

Description:
	We're new to using P4API.NET, and we've found one aspect particularly confusing: the lifecycle of a Connection and its private P4Server object.
	
	1) Naming confusion.
	
	Semantically, the Connection class represents a "connector" rather than a connection (it can connect and disconnect), while the P4Server object represents the connection. The naming is rather confusing.
	
	--------
	2) Phantom events.
	
	There are various events defined on the Connection class (CommandEcho, ErrorReceived, InfoResultsReceived, TaggedOutputReceived, TextResultsReceived) but this is a little illusory ("phantom" events): the events are really on the P4Server object. Consider these:
	
	* you subscribe to CommandEcho before Connect()ing and you get a NullReferenceException because there's no underlying P4Server object yet
	* OK, so you Connect() first, then subscribe to CommandEcho; then you Disconnect() and Connect() again and - guess what - your subscription has been lost
	
	--------
	3) Phantom property: CommandTimeout
	
	Same as above: setting Connection.CommandTimeout before Connect() throws a NullReferenceException.
	
	--------
	4) Ineffective (and inconsistent) property: CurrentWorkingDirectory
	
	Similar to CommandTimeout, setting Connection.CurrentWorkingDirectory is completely ineffective before Connect(). However, unlike in the cases above, calling it before Connect() does *not* throw. It just does nothing. This is not only confusing, but it's also inconsistent with the behaviour of the other "phantom" events/properties above.
	
	--------
	In all of 2), 3), 4), one must be familiar with the internals of Connection to be able to use it. Specifically, one must know that all these events and properties are passed through to the private (!) _p4server field, and also that the field is disposed in Disconnect().
	
	AFAICT, all this is undocumented.

DevNotes:

Type:	Bug
# Change User Description Committed
#2 default
#1 default