I've just committed this change to the fas git repo that fixes a change in the dump format from fas1 to fas2. In fas1, the role_type was accurate when dumped from the account system. In fas2, role_type was always "user" even if the person was a sponsor or administrator.
I'd like to have this applied to the production FAS so that the Package Status Scripts can be run again.
Changes: * Correct information which has been inaccurate since migration to FAS2. * No longer check if the user is in the group their trying to dump as they can retrieve the information by retrieving the list of all users anyway. * Speed up dumping when a groupname is specified (probably significantly on app5) by making a single database query per call instead of one db query per user in the group.
Risk: * FAS is a major service. Many third-party apps consume this particular page as it's an easy way for them to get username=>email mappings. * This adds a field to the data as retrieved via json. It adds a field for role_type of the user to each record.
Mitigation: * The format of the page isn't changing, just the accuracy of one of the fields. * The patch is very small and limited to this single method and one line in its template. * Tested when group name is unspecified, group name is specified, and whether retrieving json or plain text.
Benefits: * Allows Package Status Scripts to run once again * Speedier
-Toshio
On Thu, 1 May 2008, Toshio Kuratomi wrote:
I've just committed this change to the fas git repo that fixes a change in the dump format from fas1 to fas2. In fas1, the role_type was accurate when dumped from the account system. In fas2, role_type was always "user" even if the person was a sponsor or administrator.
I'd like to have this applied to the production FAS so that the Package Status Scripts can be run again.
Changes:
- Correct information which has been inaccurate since migration to FAS2.
- No longer check if the user is in the group their trying to dump as they
can retrieve the information by retrieving the list of all users anyway.
- Speed up dumping when a groupname is specified (probably significantly on
app5) by making a single database query per call instead of one db query per user in the group.
Risk:
- FAS is a major service. Many third-party apps consume this particular
page as it's an easy way for them to get username=>email mappings.
- This adds a field to the data as retrieved via json. It adds a field for
role_type of the user to each record.
Mitigation:
- The format of the page isn't changing, just the accuracy of one of the
fields.
- The patch is very small and limited to this single method and one line in
its template.
- Tested when group name is unspecified, group name is specified, and
whether retrieving json or plain text.
Benefits:
- Allows Package Status Scripts to run once again
- Speedier
+1. I'm familiar with this bug and completely forgot about it. Sorry bout that.
-Mike
On 2008-05-01 06:24:32 PM, Toshio Kuratomi wrote:
I've just committed this change to the fas git repo that fixes a change in the dump format from fas1 to fas2. In fas1, the role_type was accurate when dumped from the account system. In fas2, role_type was always "user" even if the person was a sponsor or administrator.
I'd like to have this applied to the production FAS so that the Package Status Scripts can be run again.
+1 for the role_type fix (If the last field, the number of people sponsored, isn't vital to those scripts, then we can fix that last omissions after the freeze.)
Thanks, Ricky
Ricky Zhou wrote:
On 2008-05-01 06:24:32 PM, Toshio Kuratomi wrote:
I've just committed this change to the fas git repo that fixes a change in the dump format from fas1 to fas2. In fas1, the role_type was accurate when dumped from the account system. In fas2, role_type was always "user" even if the person was a sponsor or administrator.
I'd like to have this applied to the production FAS so that the Package Status Scripts can be run again.
+1 for the role_type fix (If the last field, the number of people sponsored, isn't vital to those scripts, then we can fix that last omissions after the freeze.)
Shoot. I didn't know that field was broken as well. Am I correct that that's the number of people that the given person has sponsored?
If so, here's a new version of the patch that fixes that as well (committed to fas's git). It makes two db queries inside of the method body[1]_ per request. I'm pretty sure that it could be made into a single query per request but I don't think that's a necessary change at the moment.
This has been tested on pt3 for plain text and json calls, with a groupname and without a groupname specified. It imports a few methods from sqlalchemy but otherwise it only touches the dump method and its template just like the last patch.
.. _[1]: There are additional queries that we don't have much control over for authentication and such.
-Toshio
Dear Toshio and Ricky,
Thanks for fixing the group dumps. It works fine now.
Cheers, Christian
infrastructure@lists.fedoraproject.org