Bug 700670

Summary: Build release with unwritten topics
Product: [Community] PressGang CCMS Reporter: Joshua Wulf <jwulf>
Component: Web-UIAssignee: Matthew Casperson <mcaspers>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.xCC: cbredesen, lcarlon, topic-tool-list
Target Milestone: ---Keywords: Reopened
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-09 23:52:37 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Bug Depends On:    
Bug Blocks: 699603, 699936    

Description Joshua Wulf 2011-04-28 23:02:18 UTC
Allow building release with unwritten topics:

Where WRITTEN is unset, use the following:

<section>
  <title>Topic.Title</title>

  <xi:include href="Unwritten topic notice"/>

  Topic.Description
</section>

Comment 1 Joshua Wulf 2011-04-30 01:03:19 UTC
A little more detailed logic to allow for topics in Draft state, and topics that are marked as written, but can't be located at build time (see the referenced error message for a list of probably causes for that scenario):

ref: https://svn.devel.redhat.com/repos/ecs/TopicRepository/Skynet_System_Messages/

Here's the logic as pseudo-code.

While building:

if Topic.WRITTEN
  try
     topictouse = retrieve(Topic.SVNURL)
     use topictouse
  fail
     use Topic.Title;Topic.Descr
     inject Topic_Repository/Skynet_System_Messages/Missing_Topic_Notice.xml after tag[section.title]
  end:try

if not Topic.WRITTEN
  try
    topictouse = retrieve(Topic.SVNURL)
    use topictouse
    inject Topic_Repository/Skynet_System_Messages/Draft_Notice.xml after tag[section.title]
  fail
    use Topic.Title;Topic.Descr
  end:try

Comment 2 Matthew Casperson 2011-05-04 05:47:45 UTC
Done.

Comment 3 Joshua Wulf 2011-05-05 01:26:21 UTC
If the topic is flagged as not written:
 Check if it has an SVNURL. If it does, we can assume it is in draft state.
 If an SVNURL is set:
   Try to download the topic from the SVNURL. 
   If downloading the topic from the SVNURL fails:
     Use the Topic Title and Description, along with the "Missing Topic" error message [1] and "Draft topic" message [2].
     Write an error to the error list.
   If downloading the topic from the SVNURL succeeds: 
      Validate the topic.
      If the topic validates:
         Use the topic, with the "Draft topic" message [2] inserted.
      If the topic does not validate: 
         Use the "Topic fails validation message" error message [3] and "Draft topic" message [2].
         Write an error to the error list
  If no SVNURL is set:
    Use the Topic.Title and Topic.Descr along with the "Topic Not Written" message [4].

If the topic is flagged as written:
  Check if it has an SVNURL. 
  If it does not have an SVNURL: 
    Use the Topic Title and Description, along with the "Missing Topic" error message [1]
  If it does have an SVNURL:
    Try to download the topic from the SVNURL.
    If downloading the topic from the SVNURL fails:
      Use the Topic Title and Description, along with the "Missing Topic" error message [1]
    If downloading the topic from the SVNURL succeeds:
      Validate the topic.
      If the topic validates:
         Use the topic.
      If the topic does not validate: 
         Use the "Topic fails validation message" error message [3].
         Write an error to the error list.      

[1] https://svn.devel.redhat.com/repos/ecs/TopicRepository/Skynet_System_Messages/Missing_Topic_Notice.xml
[2] https://svn.devel.redhat.com/repos/ecs/TopicRepository/Skynet_System_Messages/Draft_Notice.xml
[3] https://svn.devel.redhat.com/repos/ecs/TopicRepository/Skynet_System_Messages/Topic_Fails_Validation.xml
[4] https://svn.devel.redhat.com/repos/ecs/TopicRepository/Skynet_System_Messages/Topic_Not_Written.xml

Comment 4 Joshua Wulf 2011-05-05 01:28:47 UTC
Update: whenever the "Missing Topic" message is used, just use the Topic.Title. Don't include the Topic.Descr.

We want to make it clear that something is wrong.

Comment 5 Matthew Casperson 2011-05-06 02:19:33 UTC
Topics with missing svn repo urls and those that link to docbook that failed validation have a note and a warning. This makes it obvious that something is wrong.

Comment 6 Joshua Wulf 2011-05-09 11:33:09 UTC
Regression. 

The latest Docbook build contains only topics which have a TopicSNVURL. An attempt to build the whole release (a query that returns 1000+ topics) results in a Docbook output with only ~60 topics in, and tons of compiler error messages that suggest that all topics with SVNURL were not included.


The idea of building the release with all topics, including unwritten ones, is to produce a "wire-frame model" of the release for information architecture preview.

Comment 7 Matthew Casperson 2011-05-09 23:52:37 UTC
fixed.