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

audit log first poc #60

Merged
merged 33 commits into from
Mar 5, 2024
Merged

audit log first poc #60

merged 33 commits into from
Mar 5, 2024

Conversation

lwalejko
Copy link
Collaborator

No description provided.

@lwalejko lwalejko requested a review from kamilsi February 19, 2024 09:29
Copy link

codecov bot commented Feb 20, 2024

Codecov Report

Attention: Patch coverage is 99.43182% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 99.69%. Comparing base (6cd8b92) to head (8c34747).
Report is 5 commits behind head on devel.

Files Patch % Lines
R/audit-trail.R 98.91% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##            devel      #60      +/-   ##
==========================================
+ Coverage   95.53%   99.69%   +4.16%     
==========================================
  Files           9       11       +2     
  Lines         537      657     +120     
==========================================
+ Hits          513      655     +142     
+ Misses         24        2      -22     

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

@lwalejko lwalejko marked this pull request as ready for review February 26, 2024 09:28
Copy link
Contributor

@kamilsi kamilsi left a comment

Choose a reason for hiding this comment

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

Hi @lwalejko,

I wanted to take a moment to express my genuine appreciation for the work you've done on implementing the audit log. Your solution has not only been a significant enhancement for the "unbiased" project but also promises to be a valuable asset for other API projects we have in the pipeline. The thoughtfulness and quality of your work truly stand out.

There are just two major points for discussion:

  1. Malformed Requests Handling: Currently, when the API encounters a malformed request (e.g., bad JSON), it returns a 500 error without logging the incident for audit purposes. Enhancing our error handling to include logging for these scenarios would not only improve our audit trail but also aid in debugging and monitoring the API's health. It would be beneficial to explore strategies to capture these events effectively.

  2. Use of R6 for Object-Oriented Programming: Your choice to use R's R6 framework for this project is understandable, given its familiarity and ease of use for those with backgrounds in other programming languages. However, as Hadley Wickham points out, the default recommendation for object-oriented programming in R is to use the S3 system. S3's simplicity and ubiquity in the R community, despite its imperfections, offer well-known solutions to common issues. Wickham cautions against the instinctual gravitation towards R6, highlighting potential pitfalls in creating non-idiomatic APIs and the missed opportunity to engage with a unique OOP perspective that S3 provides. Given these considerations, I think it's worth discussing the possibility of integrating or transitioning to S3 for its benefits in maintaining idiomatic R code and leveraging the system's inherent advantages.

Let's schedule some time to discuss these points further. I'm keen to hear your thoughts, especially on the object-oriented programming aspect, and explore how we can continue to refine and enhance our project.

Again, fantastic job on the work so far!

R/api-audit-log.R Outdated Show resolved Hide resolved
R/api_create_study.R Show resolved Hide resolved
R/audit-trail.R Outdated Show resolved Hide resolved
R/audit-trail.R Outdated Show resolved Hide resolved
R/audit-trail.R Show resolved Hide resolved
R/audit-trail.R Show resolved Hide resolved
R/audit-trail.R Outdated Show resolved Hide resolved
R/audit-trail.R Show resolved Hide resolved
R/audit-trail.R Show resolved Hide resolved
R/audit-trail.R Outdated Show resolved Hide resolved
@kamilsi kamilsi mentioned this pull request Feb 27, 2024
@salatak salatak linked an issue Feb 29, 2024 that may be closed by this pull request
@lwalejko lwalejko requested a review from kamilsi March 5, 2024 13:20
Copy link
Contributor

@kamilsi kamilsi left a comment

Choose a reason for hiding this comment

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

Great work @lwalejko

@kamilsi kamilsi merged commit 85919a4 into devel Mar 5, 2024
6 checks passed
@kamilsi kamilsi deleted the 52-randomization-audit-trail branch March 5, 2024 13:25
@kamilsi kamilsi linked an issue Mar 5, 2024 that may be closed by this pull request
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.

Printing errors to the console through sentry Randomization audit trail
2 participants