adobe-apiplatform / user-sync.py

Application for synchronizing Adobe customer directories via the User Management API
https://adobe-apiplatform.github.io/user-sync.py/en/user-manual/
MIT License
87 stars 67 forks source link

'--strategy push' behavior is broken starting in v2.9.0 #853

Closed knlandes closed 2 months ago

knlandes commented 2 months ago

Description Starting in v2.9.0, using --strategy push causes the user-sync tool to fail with the following stacktrace:

AttributeError: 'list' object has no attribute 'data'
  File "user_sync/engine/umapi.py", line 495, in sync_umapi_users
  File "user_sync/engine/umapi.py", line 197, in run
  File "user_sync/app.py", line 409, in begin_work_umapi
  File "user_sync/app.py", line 461, in run_sync

This is due to an extraneous .data accessor call on line 489 of user-sync/engine/umapi.py: primary_adds = umapi_info.get_desired_groups_by_user_key().data.

Removing the accessor call on that line resolves the issue: primary_adds = umapi_info.get_desired_groups_by_user_key()

We're currently running our own build of user-sync.py with this bug fix implemented but it would be great if it was implemented in an official release.

Steps to reproduce Run v2.9.0 or later of user-sync with the --strategy push CLI option.

Expected behavior I would expect the --strategy push behavior to function without erroring as it does in v2.8.0 and below.

Environment

knlandes commented 2 months ago

I just saw that this is a duplicate of https://github.com/adobe-apiplatform/user-sync.py/issues/838 and that there's already a commit merged into v2 that resolves this. As such this can be disregarded!