Bug 50347 - S4 Connector reloads extended attributes for every property change it does
S4 Connector reloads extended attributes for every property change it does
Status: RESOLVED WORKSFORME
Product: UCS
Classification: Unclassified
Component: S4 Connector
UCS 4.4
Other Linux
: P5 normal (vote)
: ---
Assigned To: Samba maintainers
Samba maintainers
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2019-10-10 19:56 CEST by Florian Best
Modified: 2021-11-12 13:35 CET (History)
1 user (show)

See Also:
What kind of report is it?: Development Internal
What type of bug is this?: ---
Who will be affected by this bug?: ---
How will those affected feel about the bug?: ---
User Pain:
Enterprise Customer affected?:
School Customer affected?:
ISV affected?:
Waiting Support:
Flags outvoted (downgraded) after PO Review:
Ticket number:
Bug group (optional): Cleanup, UCS Performance
Max CVSS v3 score:


Attachments
patch (git:fbest/50347-wtf-dont-reload-extended-attributes) (2.95 KB, patch)
2019-10-10 20:11 CEST, Florian Best
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Florian Best univentionstaff 2019-10-10 19:56:21 CEST
The s4-connector reloads the extended attributes (aka. modules.init() for every changed property):

services/univention-s4-connector/modules/univention/s4connector/__init__.py:
1148 »   def __set_values(self, property_type, object, ucs_object, modtype='modify'):
…
1154 »   »   def set_values(attributes):
…
1164 »   »   »   »   »   univention.admin.modules.init(self.lo, position, ucs_module)
…
1226 »   »   for attr_key in self.property[property_type].attributes.keys():
…
1232 »   »   »   »   if not object.get('changed_attributes') or con_attribute in object.get('changed_attributes') or (con_other_attribute and con_other_attribute in object.get('changed_attributes')):
…
1234 »   »   »   »   »   set_values(self.property[property_type].attributes[attr_key])
Comment 1 Florian Best univentionstaff 2019-10-10 20:11:26 CEST
Created attachment 10202 [details]
patch (git:fbest/50347-wtf-dont-reload-extended-attributes)

At least only reload extended attributes once per add/modify!
Maybe it can even be reduced less but this is the save change which doesn't break anything we aren't aware of.
Comment 2 Florian Best univentionstaff 2021-11-12 13:35:57 CET
Fixed since Python 3 migration: e082efec41f