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

BCDA-7581: Utilize context logger for FHIR response writers in bcda-app #907

Merged
merged 4 commits into from
Jan 25, 2024

Conversation

laurenkrugen-navapbc
Copy link
Contributor

🎫 Ticket

https://jira.cms.gov/browse/BCDA-7581

🛠 Changes

  • Passing logger context to response writers to be consistent with use of ctx logger elsewhere.
  • Metadata endpoint still using log.API since there is no relevant ctx to use
  • auth middleware is using log.AUTH to create a ctx logger because auth middleware is processed before ctx logger middleware in the chi routers.
  • MakeTestStructuredLoggerEntry duplication is because of circular dependencies in testUtils. Would like to work on package reorganization later to start eliminating circular dependencies here and elsewhere.

ℹ️ Context for reviewers

We updated error logging but did not switch to using the context logger (which has standardized attributes) for the FHIR response v1 and v2 writer files (writer.go).

✅ Acceptance Validation

tests updated and passing.

🔒 Security Implications

  • This PR adds a new software dependency or dependencies.
  • This PR modifies or invalidates one or more of our security controls.
  • This PR stores or transmits data that was not stored or transmitted before.
  • This PR requires additional review of its security implications for other reasons.

If any security implications apply, add Jason Ashbaugh (GitHub username: StewGoin) as a reviewer and do not merge this PR without his approval.

@codecov-commenter
Copy link

Codecov Report

Attention: 19 lines in your changes are missing coverage. Please review.

Comparison is base (366105d) 79.69% compared to head (0a3ed38) 79.81%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #907      +/-   ##
==========================================
+ Coverage   79.69%   79.81%   +0.11%     
==========================================
  Files          98       98              
  Lines       10871    10874       +3     
==========================================
+ Hits         8664     8679      +15     
+ Misses       1657     1649       -8     
+ Partials      550      546       -4     
Files Coverage Δ
bcda/api/v1/api.go 62.20% <100.00%> (ø)
bcda/web/middleware/middleware.go 100.00% <100.00%> (ø)
bcda/web/middleware/ratelimit.go 84.00% <100.00%> (ø)
bcda/web/middleware/validation.go 97.81% <100.00%> (ø)
bcda/auth/middleware.go 93.57% <93.75%> (ø)
bcda/api/alr.go 41.42% <0.00%> (ø)
bcda/responseutils/writer.go 88.80% <66.66%> (+0.04%) ⬆️
bcda/api/requests.go 88.84% <83.33%> (+0.02%) ⬆️
bcda/responseutils/v2/writer.go 88.37% <57.14%> (+0.04%) ⬆️

... and 2 files with indirect coverage changes


Continue to review full report in Codecov by Sentry.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 366105d...0a3ed38. Read the comment docs.

Copy link
Contributor

@alex-dzeda alex-dzeda left a comment

Choose a reason for hiding this comment

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

LGTM; glad that the CI build issues are fixed, too.

@laurenkrugen-navapbc
Copy link
Contributor Author

LGTM; glad that the CI build issues are fixed, too.

Thanks for the help getting that fixed!

@laurenkrugen-navapbc laurenkrugen-navapbc merged commit 8268407 into master Jan 25, 2024
1 check passed
@laurenkrugen-navapbc laurenkrugen-navapbc deleted the lauren/BCDA-7581 branch January 25, 2024 21:55
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