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

task/WI-239: Add audit logs for datafiles/projects endpoints #1047

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

jarosenb
Copy link
Collaborator

Overview

Add audit logs and Tapis tracking tokens for Data Files and Projects endpoints

Related

Changes

  • Update metrics log format to match Designsafe
  • Add metrics logging to Data Files and Projects endpoints
  • Add Tapis tracking tokens to Tapipy requests in Data Files.

Testing

  1. In Data Files, perform a listing, file upload, and file rename. Metrics logs should appear that look like:
[METRICS] INFO views metrics.portal.apps.datafiles.views.get:101: Data Files user=jarosenb ip=172.18.0.1 agent=Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/131.0.0.0 Safari/537.36 sessionId=ix0ydn7j0cuoehuawt6sv55v6yu5tg9p op=listing info={'api': 'tapis', 'systemId': 'drp.project.review.test', 'filePath': '/', 'query': {'limit': '100', 'nextPageToken': '', 'offset': '0', 'query_string': ''}} timestamp=2025-01-30 19:29:46,132 trackingId=portals.ix0ydn7j0cuoehuawt6sv55v6yu5tg9p guid=6751506153924933a25d9693e97f57db portal=DRP tenant=https://portals.tapis.io

UI

Notes

Copy link

codecov bot commented Jan 30, 2025

Codecov Report

Attention: Patch coverage is 76.92308% with 12 lines in your changes missing coverage. Please review.

Project coverage is 70.46%. Comparing base (44e2dff) to head (1213d12).

Files with missing lines Patch % Lines
server/portal/settings/settings.py 0.00% 6 Missing ⚠️
server/portal/apps/datafiles/views.py 84.61% 2 Missing ⚠️
server/portal/apps/projects/views.py 80.00% 2 Missing ⚠️
server/portal/utils/__init__.py 66.66% 1 Missing and 1 partial ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1047      +/-   ##
==========================================
- Coverage   70.47%   70.46%   -0.02%     
==========================================
  Files         538      539       +1     
  Lines       34028    34056      +28     
  Branches     2941     2942       +1     
==========================================
+ Hits        23980    23996      +16     
- Misses       9848     9859      +11     
- Partials      200      201       +1     
Flag Coverage Δ
javascript 72.66% <ø> (ø)
unittests 60.76% <76.92%> (-0.02%) ⬇️

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

Files with missing lines Coverage Δ
...r/portal/apps/datafiles/handlers/tapis_handlers.py 70.00% <100.00%> (ø)
...orkspace_operations/shared_workspace_operations.py 94.69% <100.00%> (ø)
server/portal/libs/agave/operations.py 65.00% <100.00%> (ø)
server/portal/apps/datafiles/views.py 75.52% <84.61%> (-0.16%) ⬇️
server/portal/apps/projects/views.py 85.12% <80.00%> (-0.60%) ⬇️
server/portal/utils/__init__.py 66.66% <66.66%> (ø)
server/portal/settings/settings.py 0.00% <0.00%> (ø)

@rstijerina rstijerina force-pushed the task/WI-239--audit-logs-datafiles branch from 661849b to 3dc2329 Compare February 6, 2025 23:35
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