Skip to content

chore: Add additional log messages to directauth()#7716

Merged
rjsparks merged 2 commits intoietf-tools:mainfrom
microamp:chore/directauth-logging
Jul 21, 2024
Merged

chore: Add additional log messages to directauth()#7716
rjsparks merged 2 commits intoietf-tools:mainfrom
microamp:chore/directauth-logging

Conversation

@microamp
Copy link
Copy Markdown
Contributor

Resolves #7709

@microamp microamp marked this pull request as ready for review July 20, 2024 20:27
@codecov
Copy link
Copy Markdown

codecov Bot commented Jul 20, 2024

Codecov Report

Attention: Patch coverage is 88.88889% with 1 line in your changes missing coverage. Please review.

Project coverage is 88.79%. Comparing base (b00dfd3) to head (a4bb31c).
Report is 11 commits behind head on main.

Files Patch % Lines
ietf/api/views.py 88.88% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7716   +/-   ##
=======================================
  Coverage   88.79%   88.79%           
=======================================
  Files         296      296           
  Lines       41319    41328    +9     
=======================================
+ Hits        36688    36698   +10     
+ Misses       4631     4630    -1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Comment thread ietf/api/views.py Outdated
Comment on lines +458 to +462
if user_query.filter(person__isnull=True).count() == 1: # Can't inspect user.person direclty here
log.log(f"Direct auth of personless user {user.pk}:{user.username}")
else:
log.log(f"Direct auth: {user.pk}:{user.person.plain_name()}")
log.log(f"Direct auth success: {username}")
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

This is overly chatty - can we tighten it up so that we don't get two log lines as we go through this code?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Good point. I added the Direct auth success prefix to each successful response above.

@rjsparks rjsparks merged commit aa36f48 into ietf-tools:main Jul 21, 2024
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Jul 27, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add logging to directauth()

3 participants