Bug 795233

Summary: Content spec processor b0rked
Product: [Community] PressGang CCMS Reporter: Joshua Wulf <jwulf>
Component: CSProcessorAssignee: Lee Newson <lnewson>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 1.xCC: jwulf, lcarlon
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-02-22 02:50:40 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Joshua Wulf 2012-02-20 03:26:09 UTC
Step 1: Push spec and get Spec ID

[jwulf@radhe Content Spec Processor]$ csprocessor push -cn Content_Spec_Processor_Guide.spec
CSProcessor client version: 0.16.3
Loading configuration from /home/jwulf/.config/csprocessor.ini
Web Service at http://csprocessor.cloud.lab.eng.bne.redhat.com:8080/ version: 0.21.1

INFO:  The Content Specification is valid.
WARN:  Note: All descriptions, tags, source urls and writers will be ignored for existing Topics.
INFO:  The Content Specification saved successfully.
Content Specification ID: 6192
Revision: 39398

Step 2: Attempt to pull Spec ID

[jwulf@radhe Content Spec Processor]$ csprocessor pull -c 6192
CSProcessor client version: 0.16.3
Loading configuration from /home/jwulf/.config/csprocessor.ini
Web Service at http://csprocessor.cloud.lab.eng.bne.redhat.com:8080/ version: 0.21.1

INFO:  No data was found for the specified ID!

Comment 1 Joshua Wulf 2012-02-20 03:33:59 UTC
Here's the Content spec:

Title = Content Spec Processor Guide
Subtitle = Using the Content Spec Processor for Topic-based Authoring
Description= A guide to using the Content Spec Processor subsystem of Skynet, for documentation authors 
Product = Internal
Version = 5.0
Edition = 1
DTD = Docbook 4.5
Brand = RedHat
Copyright Holder=Red Hat, Inc
publican.cfg=[git_branch: eng-docs-rhel-6]

[Content Spec Processor Guide]

Chapter: Introducing the Content Spec Processor
  A Case Study [6191]

Comment 2 Lee Newson 2012-02-20 04:13:10 UTC
The cause of the error is because there are two tuples in TopicToTopicSecondOrderData which maps a One-to-One relationship between Topic and TopicSecondOrderData. As such this makes it appear as though there are two topics with the same ID and therefore the REST interface returns no data.

Comment 3 Lee Newson 2012-02-20 05:25:33 UTC
Found the problem. The root cause was a wrong Constant ID which was trying to make the topic render and due to concurrency was inserting two ids. I've fixed the Constant.

Matt has also added unique constraints to the fields so that this can't happen.

Comment 4 Joshua Wulf 2012-02-22 02:50:40 UTC
[jwulf@radhe temp]$ csprocessor pull -c 6192
CSProcessor client version: 0.17.0
Loading configuration from /home/jwulf/.config/csprocessor.ini
Web Service at http://csprocessor.cloud.lab.eng.bne.redhat.com:8080/ version: 0.21.4

CHECKSUM=389f2bdf47a47d7ee0309e2f593e8c12
ID=6192
Title = Content Spec Processor Guide
.....