-
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-8351: Exclude MD TCoC requests from suppression #993
Conversation
## 🎫 Ticket https://jira.cms.gov/browse/BCDA-8350 ## 🛠 Changes - Adds database documentation in the repo using https://github.com/k1LoW/tbls - Adds github workflow to automatically update PRs that touch the migrations folders ## ℹ️ Context As part of BCDA-8350, I was interested in an easier way to keep the documentation up to date. Although ERDs can be generated manually by tooling like pgAdmin, it would be preferable for devs to have the diagrams generated automatically in a central location. We can still pull the main ERDs into confluence, but instead of making them ourselves we can download them directly from the PR after merging. ## 🧪 Validation See dbdocs in this PR. --------- Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sean Fern <[email protected]>
bcda/web/middleware/validation.go
Outdated
@@ -30,11 +30,11 @@ type requestkey int | |||
|
|||
const rk requestkey = 0 | |||
|
|||
func NewRequestParametersContext(ctx context.Context, rp RequestParameters) context.Context { | |||
func NewCtxRequestParams(ctx context.Context, rp RequestParameters) context.Context { |
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.
This function doesnt look like its doing a whole lot for us, do you think its useful? As far as I can tell the two are equivalent:
ctx := NewCtxRequestParams(r.Context(), rp)
ctx := context.WithValue(ctx, 0, rp)
The difference is the requestkey? I didnt understand the comment on it.
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.
it just checks the context for that particular key; it's not really doing anything for us at this point. It looks like it's used in about 11 places; shall I update those or do we want to keep this PR the current size?
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.
Added two minor nitpicks but overall this is looking great!
## 🎫 Ticket https://jira.cms.gov/browse/BCDA-8351 ## 🛠 Changes - When preparing beneficiaries for a request, if the source of the request was from TCoC, then the query to get suppressed beneficiaries will be skipped. - github.com/go-testfixtures is being used in combination with github.com/golang-migrate/migrate/v4 so that tests that utilize the application database are idempotent. There is [existing code](https://github.com/CMSgov/bcda-app/blob/main/bcda/database/databasetest/databasetest.go#L22) that will create a test database that can have migrations and fixtures applied to it. The long term goal (besides idemtpotence) is to eventually remove all dependency on init() calls, since those prohibit our ability to run singular tests in packages that import another package that uses init(). - Service_test.go has had test name updates, so that we can eventually separate our unit and integration tests in our `make unit-test` command. - protobuf version was bumped from v1.5.3 -> v1.5.4 due to failing build - test fixtures was bumped from v3.5.0 -> v3.7.0 to utilize additional library features that weren't available the previous library - the service folder contains a directory for data fixtures that was renamed from `testdata` to `fixtures`. Old files that were not in use were removed and new files have been added ## ℹ️ Context To onboard TCOC, we must exclude beneficiary suppression with their requests. <!-- If any of the following security implications apply, this PR must not be merged without Stephen Walter's approval. Explain in this section and add @SJWalter11 as a reviewer. - Adds a new software dependency or dependencies. - Modifies or invalidates one or more of our security controls. - Stores or transmits data that was not stored or transmitted before. - Requires additional review of security implications for other reasons. --> ## 🧪 Validation Added integration test will seeded database for suppression data. --------- Co-authored-by: Kevin Yeh <[email protected]> Co-authored-by: github-actions <41898282+github-actions[bot]@users.noreply.github.com> Co-authored-by: Sean Fern <[email protected]>
🎫 Ticket
https://jira.cms.gov/browse/BCDA-8351
🛠 Changes
make unit-test
command.testdata
tofixtures
. Old files that were not in use were removed and new files have been addedℹ️ Context
To onboard TCOC, we must exclude beneficiary suppression with their requests.
🧪 Validation
Added integration test will seeded database for suppression data.