-
Notifications
You must be signed in to change notification settings - Fork 15
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-7257: Split opt out utilities into a separate module #861
Conversation
This reverts commit 5074b33.
go.work
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
EDIT: you can disregard my comment, it's not applicable here!
this is neat. do we have to make changes in both modules or does one pack up the changes and apply it to the other?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the workspace file basically just tells each module about the other, so this makes the optout module visible to the main bcda module.
When bcda is packaged, it'll figure out that the optout package is housed together so it'll be able to package them together for the API 😄
@@ -13,7 +13,7 @@ mkdir -p test_results/latest | |||
echo "Running unit tests and placing results/coverage in test_results/${timestamp} on host..." | |||
|
|||
# Avoid the db/migrations package since it only contains test code | |||
PACKAGES_TO_COVER=$(go list ./... | egrep -v 'test|mock|db/migrations' | tr "\n" "," | sed -e 's/,$//g') | |||
PACKAGES_TO_COVER=$(go list ./... ./optout | egrep -v 'test|mock|db/migrations' | tr "\n" "," | sed -e 's/,$//g') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we need to also update the lint
command in the makefile to include this package?
Codecov Report
❗ Your organization is not using the GitHub App Integration. As a result you may experience degraded service beginning May 15th. Please install the Github App Integration for your organization. Read more. @@ Coverage Diff @@
## master #861 +/- ##
==========================================
- Coverage 75.02% 75.00% -0.02%
==========================================
Files 90 92 +2
Lines 10401 10393 -8
==========================================
- Hits 7803 7795 -8
Misses 1989 1989
Partials 609 609
... and 2 files with indirect coverage changes Continue to review full report in Codecov by Sentry.
|
🎫 Ticket
https://jira.cms.gov/browse/BCDA-7257
🛠 Changes
Create a new Golang module for optout code that can be imported separate from BCDA code. This includes:
All other changes to files are just updating the model names or changing the model fields from private to public (e.g.
suppression.fileID
-->suppression.FileID
) since the models are now in a separate module.For reviewers, I would recommend skimming the existing files and focusing mainly on the new
optout
folder 🙂ℹ️ Context for reviewers
AB2D and DPC are currently in the process of automating data-sharing opt-out requests. It is expected that the file formats will be consistent with the existing files that BCDA receives, so a lot of the existing Go code is reusable.
DPC is likely going to follow the pre-established pattern of building lambdas in Go, so we expect that BCDA's code could be directly used as part of the lambda. This PR pulls out generic utilities that are not related to BCDA's implementation in any way (e.g. reading from the local filesystem or saving to the BCDA database.)
✅ Acceptance Validation
go get github.com/CMSgov/bcda-app/output@777710bbe26fba867d10a61a84f68a1b1fdb1f76
.🔒 Security Implications