[rt-devel] rt-dump-metadata improvements
kai
kai at xs4all.nl
Wed Apr 3 09:50:10 EDT 2013
Dear Best Practical,
I needed to create a working copy of our main RT instance, so I had to
patch a few things on rt-dump-metadata to make it useful. Bear with me
for 5 branches, of which a few are quite dependent on each other.
a) Fix the dumping of non-local groups
https://github.com/giganteous/rt/compare/4.0-trunk...4.0/fix-dump-nonlocal-groups
I might've missed a reason why this code was inside the $Local_Only if,
but it seemed implausible to ever dump non-user defined groups. I'm
curious why it's not been noticed before.
b) An option to limit the Users to only dump the privileged ones
https://github.com/giganteous/rt/compare/4.0/fix-dump-nonlocal-groups...4.0/feature-limit-dump-to-privileged-users
Since we have 680k unprivileged users this feature really shines for
us.
c) The previous patch will introduce a bug, the current ACL dumping
code doesn't work when principal IDs get renumbered. This is probably a
bug in itself, because we could've used the rt-shredder to remove users,
so the ACL code is bugged anyway. I've fixed the ACL dumping, sadly
leading to a large diff:
https://github.com/giganteous/rt/compare/4.0/feature-limit-dump-to-privileged-users...4.0/feature-dump-working-acls
Running git diff by hand with -w will show you the diff without the
whitespace. Dunno how to massage github's web compare :).
This is basically a reverse engineered version of the documentation of
Initialdata you guys made available on the website. That was a great
help.
d) Then, as I thought this would be handy, but again, the patch might
be a bit on the ugly side as it creates tests on several key points in
the code:
https://github.com/giganteous/rt/compare/4.0/feature-dump-working-acls%E2%80%A64.0/feature-skip-disabled
This partly fixes a few bugs in the 4.0/feature-dump-working-acls, as I
used a bare 'return' where that obviously wouldn't work.
e) A week later I needed to move a few CustomFields from a testing
environment back to production, and the Categories were missing. I
crafted another patch.
https://github.com/giganteous/rt/compare/4.0-trunk...4.0/fix-dump-metadata-customfieldvalues-attributes
This last one (e) is not dependent on the other work.
Anyway, is it worth to create pull requests for these units of work? Or
is the 4.2 work too much in the way? Are there any tests to be taken
into account?
Regards,
Kai
More information about the rt-devel
mailing list