New issue
Advanced search Search tips

Issue 878404 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Aug 31
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 2
Type: Bug



Sign in to add a comment

"Refreshing due to a 401" is confusing

Project Member Reported by athilenius@chromium.org, Aug 28

Issue description

Chromite OAuth refresh prints lines like the following:

15:38:45: INFO: Refreshing due to a 401 (attempt 1/2)
15:38:45: INFO: Refreshing access_token

This wording is very confusing and waists a lot of time as people new to ChromeOS logs think it's an error (as did I the first time I saw it). This should either be removed (I don't personally think it adds any value) or changed to something like "Auto-refreshing OAuth token as it's TTL expired".
 
These seem to originate from https://cs.corp.google.com/chromeos_public/chromite/third_party/oauth2client/client.py?type=cs&q=chromite+%22Refreshing+due+to+a%22+attempt&g=0&l=570, but https://github.com/google/oauth2client is deprecated, so I think modifying third_party directly in this case is an acceptable hack. In reality this library needs to be stripped out of Chromite.
> [ ... ] This should either be removed [ ... ]

+1 for outright removal.  The message has negative value, even
if its wording is clarified.

Project Member

Comment 3 by bugdroid1@chromium.org, Aug 31

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/chromite/+/1940d7df3f6dafe1457cfff3c619d58fb6b8d86e

commit 1940d7df3f6dafe1457cfff3c619d58fb6b8d86e
Author: Alec Thilenius <athilenius@google.com>
Date: Fri Aug 31 02:34:02 2018

Changed oauth2 refresh logs wording

Changed the wording of logs from oauth2 refresh in both Chromite libs
and third_party oauth2client (which is deprecated).

BUG= chromium:878404 
TEST=none

Change-Id: Icb75e029133c418f6e42c4f4395ab727da628a3a
Reviewed-on: https://chromium-review.googlesource.com/1194303
Commit-Ready: Alec Thilenius <athilenius@google.com>
Tested-by: Alec Thilenius <athilenius@google.com>
Reviewed-by: Jason Clinton <jclinton@chromium.org>

[modify] https://crrev.com/1940d7df3f6dafe1457cfff3c619d58fb6b8d86e/lib/auth.py
[modify] https://crrev.com/1940d7df3f6dafe1457cfff3c619d58fb6b8d86e/third_party/oauth2client/client.py

Status: Fixed (was: Started)

Sign in to add a comment