Skip to content

Conversation

@snacu
Copy link
Collaborator

@snacu snacu commented Mar 3, 2025

W-17954157

  • the 404, 429 errors now don't show the full stack traces
    • old -> 91 log events
    • new -> 11 log events
  • coalesce the log lines around failed oauth1 failures (signature and client)
  • don't log "shouldn't happen" messages for cases where the consumer key is invalid ( registers authenticator - bad credentials e2e test)
  • adjust the test Github workflow to test only python versions >= 3.11

  • Update CHANGELOG.md
  • Update README.md (as needed)
  • New dependencies were added to pyproject.toml
  • pip install succeeds with a clean virtualenv
  • There are new or modified tests that cover changes
  • Test coverage is maintained or expanded

@snacu snacu changed the title chore: don't log stack traces for client errors chore: don't log stack traces for client errors @W-17954157 Mar 3, 2025
@snacu snacu requested a review from demianbrecht March 5, 2025 18:49
Copy link
Member

@demianbrecht demianbrecht left a comment

Choose a reason for hiding this comment

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

i think it'd be worthwhile to keep the seemingly needless logs rather than changing behaviour altogether (silence). otherwise lgtm.

return self.consumer.secret
except Exception as e: # noqa
logger.error(
"This should never happen, since consumer is already validated"
Copy link
Member

Choose a reason for hiding this comment

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

imo it would make sense to remove the error handling here and let it bubble up, but given this log line has been helpful in the past, can the format of it just be changed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok I added back the error message, the content slightly updated in bc69a25

return self.consumer.rsa_public_key_pem
except Exception as e: # noqa
logger.error(
"This should never happen, since consumer is already validated"
Copy link
Member

Choose a reason for hiding this comment

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

Same thing here.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

ok I added back the error message, the content slightly updated in bc69a25

Copy link
Member

Choose a reason for hiding this comment

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

should the accompanying test be added back as well?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

added back in efd1ed3, it was slightly modified since now the key is logged and each test uses a random value

@snacu snacu merged commit 4bafd6d into main Mar 6, 2025
5 checks passed
@snacu snacu deleted the logging-exceptions branch March 6, 2025 17:47
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.

3 participants