[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#780020: [UDD] bugs.cgi: YAML contains raw HTML and "ruby objects"



Package: qa.debian.org
Severity: minor

Hi,

The generated YAML contains raw HTML and Ruby specific objects, example
(from the query in [1]):

"""
- id: 644047
  package: gdm3
  [...]
  title: ! 'gdm3: /etc/default/locale ignored, locale set to C, breaks gnome-terminal'
  last_modified: !ruby/object:DateTime 2015-03-05 22:36:21.000000000 +00:00
  [...]
  chints: ! '<a href="http://release.debian.org/britney/hints/nthykier"; title="3.14.1-4
    nthykier #2015-03-06

    # #644047, #774889">unblock</a> '
  [...]
  caffected: (<abbr title='affects testing'>T</abbr>)
"""

At least, chints and caffected is basically just raw HTML dumped in a
YAML stream.  The last_modified is a seriraled Ruby object.  The rest
of the fields are just there fore reference and to make it easier to
find the example (as long as it lasts).

For me the issue with:
 * Raw HTML is that it is a poor machine parsable representation of the data.
   - For caffected, a list of the distribution names would be better (e.g. ["testing"]).
   - For chints, it would probably need to be split into a list of dictionaries with the following fields:
     - hinter => "nthykier" in this example
     - hint (or hint name/type) => "unblock" in this example
     - hinter_comment => The contents of the "title" attribute
 * Ruby objects is that the client may not be written in Ruby.  In such cases, we have "massage" the
   data to parse it with conventional parsers of other languages.
   - Note, I certainly do not mind that the YAML uses Ruby objects in addition to regular values.
     Alternatively, it could be an "opt-in"/"opt-out" feature to get ruby objects.

NB: Feel free to apply a healthy amount of bikeshedding to the above.
The proposed formats are only meant as a suggestion.

Thanks,
~Niels

[1] https://udd.debian.org/bugs/?release=jessie_not_sid&merged=ign&fnewerval=7&flastmodval=7&rc=1&cpopcon=1&chints=1&cseverity=1&ctags=1&cclaimed=1&cdeferred=1&caffected=1&crttags=1&sortby=id&sorto=asc&format=yaml#results


Reply to: