Uploaded image for project: 'PuppetDB'
  1. PuppetDB
  2. PDB-2840

consider using wire formats instead of query formats as reference report data

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Open
    • Priority: Normal
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Template:

      Description

      I've been hitting up against some of the issues that motivated PDB-2783 today, and I'm starting to think that whatever the resolution is there, we may get a big reduction in testing complexity just by using wire formats instead of query responses as the reference example data for reports. This problem is unique to reports – catalogs and facts do it already.

      We have a good mechanism for converting wire formats to query responses (PuppetDB), but going the other way is outside the purview of the application, so we've hacked up a bunch of test-only plumbing to convert from whatever the current report response format is to every single report wire format we support. If instead we just had a static copy of data in each wire format, I think the only remaining case for a query->wire conversion would be in export.clj:

      https://github.com/puppetlabs/puppetdb/blob/master/src/puppetlabs/puppetdb/export.clj#L64-64

      and we would only need to keep that up to spec with the currently supported wire format. I believe this would allow us to delete all the conversion code in reports.clj.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              Unassigned
              Reporter:
              wyatt Wyatt Alt
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Dates

                Created:
                Updated:

                  Zendesk Support