Issue #7630 has been updated by Matt Robinson.

Here comes the brain dump.

The more I work with the new terms of pending and compliant the more potential 
I see for confusion.  Besides the color scheme orange being reused to note 
pending and changed #7674, I'm seeing problems with how pending  interacts with 
changed.  Currently in the agreed upon definition for pending, a report is 
pending if any of it's resources is pending and none are failing.  There's a 
status field on report that currently can only have values of changed, 
unchanged or failed 
http://projects.puppetlabs.com/projects/puppet/wiki/Report_Format_2.  It seems 
that pending should be taken into account there as well, but it does have the 
downside that if someone marks one resource in their catalog as pending, the 
status of the report wouldn't show as changed or unchanged even though there 
might be changes that take place. 

As part of this ticket Nick and I made a conscious decision to put the counts 
on the report and resource_status tables instead of making them additional 
metrics.  The thinking was that metrics only link to reports, not resource 
statuses, so you couldn't get a noop_event_count per status in the metrics 
table that would make sense.  It also seemed like part of the point behind the 
metrics table was that you could easily add or remove metrics to the report, 
which should be easier than modifying the report schema.  In practice this 
isn't really true, and we end up often having to modify the schema to 
denormalize it for performance.  

Also, the ticket specifies adding pending_count to resource_status, but after 
thinking about it, it seemed to me that resource events aren't pending, they 
just have events with different statuses (again refer to report doc link above: 
one of the following strings: "success", "failure", "noop", "audit"), so I 
decided the column on resource_statuses should be noop_event_count.  I toyed 
with the idea of adding success, failure, and audit event counts for 
consistency, but they weren't needed to accomplish the goal of deciding the 
state of a report ('compliant', 'failed', 'pending' which as discussed in 
paragraph one are different than the possible values in the status field on 
report which are failed, changed and unchanged).

So in general, there needs to be some discussion about how to reconcile some of 
our terms, which I expect will happen more in #7674 and #7597.  For now, I'm 
moving forward with minimal changes here to unblock the work for #6992.
----------------------------------------
Bug #7630: Add pending_count to resource_statuses in the report format
https://projects.puppetlabs.com/issues/7630

Author: Nick Lewis
Status: Accepted
Priority: Normal
Assignee: 
Category: 
Target version: 
Keywords: 
Branch: https://github.com/nicklewis/puppet-dashboard/tree/ticket/next/7630
Affected URL: 
Affected Dashboard version: 


pending_count is analogous to failed_count and out_of_sync_count, and lets us 
query for resource_statuses which are pending without having to look at 
resource_events. A resource_status is pending, in this case, if it is not 
failed and has a pending_count > 0.

This will need to be changed in:
- the Dashboard db with a migration
- the report transformer, with a handler for the new report format
- the report generator
- existing queries in Dashboard
- Puppet will need to add this field

A corresponding change may need to be made to report and/or node, perhaps by 
including "pending" as a possible value for the denormalized "status" field.

This will be a part of report format 3.


-- 
You have received this notification because you have either subscribed to it, 
or are involved in it.
To change your notification preferences, please click here: 
http://projects.puppetlabs.com/my/account

-- 
You received this message because you are subscribed to the Google Groups 
"Puppet Bugs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/puppet-bugs?hl=en.

Reply via email to