Skip to content
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

Add session ownerId/type to log output if set #4155

Merged
merged 5 commits into from
Jul 11, 2024
Merged

Conversation

knolleary
Copy link
Member

Adds info on who is making http requests when using an access token rather than user session. For device/team tokens, ensures the hashid is provided. Project tokens are uuids already.

Copy link

codecov bot commented Jul 10, 2024

Codecov Report

Attention: Patch coverage is 30.30303% with 23 lines in your changes missing coverage. Please review.

Project coverage is 78.65%. Comparing base (ec4247a) to head (38cb50f).

Files Patch % Lines
forge/forge.js 0.00% 19 Missing ⚠️
forge/routes/api/assistant.js 71.42% 4 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4155      +/-   ##
==========================================
- Coverage   78.76%   78.65%   -0.12%     
==========================================
  Files         286      286              
  Lines       13055    13087      +32     
  Branches     2911     2922      +11     
==========================================
+ Hits        10283    10293      +10     
- Misses       2772     2794      +22     
Flag Coverage Δ
backend 78.65% <30.30%> (-0.12%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Steve-Mcl
Steve-Mcl previously approved these changes Jul 11, 2024
Copy link
Contributor

@Steve-Mcl Steve-Mcl left a comment

Choose a reason for hiding this comment

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

Approved in the interest of time with the knowledge ownerType and ownerId are (currently) only set to specific values in the src, however we should have tests that ensure IDs are alphanumeric

Scratch that, i would prefer we are explicit rather than have a default case. Will make a suggestion. Test would be good too, but less important if we are explicit

@Steve-Mcl Steve-Mcl self-requested a review July 11, 2024 07:39
forge/forge.js Outdated Show resolved Hide resolved
@Steve-Mcl Steve-Mcl self-requested a review July 11, 2024 07:42
@Steve-Mcl Steve-Mcl dismissed their stale review July 11, 2024 07:42

suggested change

Add headers identifying the owner in requests to assistant service
@Steve-Mcl Steve-Mcl merged commit ed6cb31 into main Jul 11, 2024
13 of 14 checks passed
@Steve-Mcl Steve-Mcl deleted the add-session-owner-to-log branch July 11, 2024 14:19
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.

2 participants