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

Bug#780020: marked as done ([UDD] bugs.cgi: YAML contains raw HTML and "ruby objects")



Your message dated Thu, 19 Mar 2015 23:20:55 +0100
with message-id <20150319222055.GA15716@xanadu.blop.info>
and subject line Re: Bug#780020: [UDD] bugs.cgi: YAML contains raw HTML and "ruby objects"
has caused the Debian Bug report #780020,
regarding [UDD] bugs.cgi: YAML contains raw HTML and "ruby objects"
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
780020: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=780020
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
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

--- End Message ---
--- Begin Message ---
On 19/03/15 at 07:54 +0100, Niels Thykier wrote:
> On 2015-03-18 18:38, Lucas Nussbaum wrote:
> > Hi Niels,
> > 
> > bugs.cgi started as a huge amount of spaghetti code, and is slightly
> > become better.
> > 
> > [...]
> > 
> > For last_modified, I've added a new 'last_modified_string' field that
> > shows the date as text. Should be easily parsable by about everything.
> > 
> > For caffected, the raw data is already available:
> >   affects_stable: false
> >   affects_testing: true
> >   affects_unstable: false
> >   affects_experimental: true
> > 
> > For cdeferred, it's probably easy enough to parse right now.
> > 
> > For chints, I did not manage to output something clean, for strange
> > reasons.
> > 
> > bugs.cgi needs a fall rewrite (with a design similar to DMD). In the
> > meantime, it's not possible to fix this properly.
> > 
> > Lucas
> > 
> 
> Ok, thanks for the changes so far. :)

Hi,

I took another stab at it and fixed all the known problems with the JSON
and YAML outputs. This required breaking the current key names quite
badly unfortunately.

Lucas

--- End Message ---

Reply to: