Skip to content

Add logging for user actions and umapi progress #598

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Dec 4, 2020

Conversation

vossen-adobe
Copy link
Contributor

@vossen-adobe vossen-adobe commented Apr 7, 2020

Addresses #597
DEPENDS ON adobe-apiplatform/umapi-client.py#75

Adds the config option:

  # (optional) log_progress (default value True)
  # Includes an indication of progress for user actions on the umapi
  # Useful for tracking sync progress for pulling down, creating,
  # or updating large numbers of users
  # eg: 71/100 (71.0%) Creating user with user key: federatedID,user71@example.com,
  log_progress: True

Which is true by default. When enabled, progress from both pulling down UMAPI users as well as user actions is logged in terms of percentage of count. This is an action progress, NOT a temporal estimate.

This is implemented not as another parameter being passed throughout the code, but as an extra logger function. The decision of whether to insert a progress measurement is made based on a pseudo log level called 'progress'. This enables uniform control over output whereever in the sync tool progress is included. This has the advantage of being easily portable across the code since one must simply call self.logger.progress to use it.

@vossen-adobe vossen-adobe linked an issue Apr 7, 2020 that may be closed by this pull request
Copy link
Collaborator

@adorton-adobe adorton-adobe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to add a method to QueryMultiple in the umapi-client so we don't have to access private members of those objects here.

@adorton-adobe adorton-adobe added this to the v2.6.2 milestone Sep 15, 2020
ddybvig-perf and others added 3 commits October 9, 2020 13:19
add bool option in user-sync-config to log progress. initialize umapi stats then update according to what gets returned from umapi_client. only print progress message every 10 actions
@adorton-adobe adorton-adobe merged commit fbaac2f into adobe-apiplatform:v2 Dec 4, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add logging for sync progress
3 participants