ubuntu/adsys

Feature: Stage .pol files as XML and convert to .pol on the fly

GabrielNagy opened this issue · 0 comments

Is there an existing request for this feature?

  • I have searched the existing issues and found none that matched mine

Describe the feature

We have a number of .pol files checked in that we use for tests which are currently edited by hand when needed. This can easily become overwhelming as the file is partly encoded in UTF-16 except for the first few bytes and we need to use a hex editor to do so.

Moreover, git cannot provide a clear view of the changes due to the same reason, making reviews almost impossible. As the file is not plain text, we cannot to a roundtrip conversion from UTF-16 to UTF-8 without losing data in the process.

Describe the ideal solution

Ideally these files are staged in a human readable format (e.g. XML), and compiled to .pol files on the fly, before tests are run. This would simplify content manipulation, and make code review much easier.

This functionality can be achieved by using the GPPolParser class provided by samba, which we can use to convert all our .pol files to XML files, then convert back when tests are being run. Thus, .pol files will no longer be committed to version control.

Alternatives and current workarounds

n/a

Ubuntu users: System information

n/a

Non Ubuntu users: System information

n/a

Additional information

No response

Double check your logs

  • I have redacted any sensitive information from the logs