← Back to team overview

launchpad-dev team mailing list archive

RFC: Broken interface on IDiff

 

Hi!

IDiff.diffstat is defined and exported as a "Text" field but in the
implementation it contains a dict like this {'file1': (3, 8), 'file2': (4,
5)}. This causes the new marshaller that we wrote during the Tunderdome which
obfuscates email addresses in Text fields to break because it expects to see a
string value.

I have two to three possible solutions:

- Make the marshaller check the type of the value and leave non-string values
untouched. The simplest approach and will also catch other such cases that we
may not yet have discovered.

- Fix the interface to not define diffstat as a "Text" field. What are the
implications for the web api? Other such cases would need to be fixed, too.

- A possible broader solution might be to create a new field type
"ObfuscatedText" so that only selected fields will be treated by the
obfuscation code. This would not fix the IDiff interface and would entail
changes in all those interfaces that contain fields that should be obfuscated
(bug titles, descriptions, answers, blueprints, ...) This would also solve the
case were we currently obfuscate bzr revision ids, too. OTOH, I could define a
special field type for revision ids to solve that.

Any suggestions ?

Henning


Follow ups