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

feat: request action validation framework created, and implemented on sign and submit endpoint #512

Merged
merged 12 commits into from
Dec 6, 2024

Conversation

lchen-2101
Copy link
Collaborator

@lchen-2101 lchen-2101 commented Nov 26, 2024

closes #482
closes #515

new context, and validation dependency concept, currently only applying to the sign endpoint, can extend to additional endpoints.

also removed some of the tasks code since we no longer going with that concept; allowing for some daos to not be detached.

Copy link

github-actions bot commented Nov 29, 2024

Coverage report

Click to see where and how coverage changed

FileStatementsMissingCoverageCoverage
(new stmts)
Lines missing
  src/sbl_filing_api
  config.py
  src/sbl_filing_api/entities/models
  dao.py
  src/sbl_filing_api/entities/repos
  submission_repo.py
  src/sbl_filing_api/routers
  filing.py
  src/sbl_filing_api/services
  request_action_validator.py 43, 56-57
Project Total  

This report was generated by python-coverage-comment-action

@lchen-2101 lchen-2101 marked this pull request as ready for review November 29, 2024 20:01
Copy link
Contributor

@jcadam14 jcadam14 left a comment

Choose a reason for hiding this comment

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

First thank you for cleaning up the task_actions! Left it in there just in case we revisited it but think that ship has sailed.

If someone fat fingers a validation function or adds one to the list without adding the corresponding impl what happens? Might be good to add a check and error gracefully?

@lchen-2101
Copy link
Collaborator Author

First thank you for cleaning up the task_actions! Left it in there just in case we revisited it but think that ship has sailed.

If someone fat fingers a validation function or adds one to the list without adding the corresponding impl what happens? Might be good to add a check and error gracefully?

at the moment, a non-existent check gets ignored, so it still runs through the remaining existing checks; although I should definitely at least log it.

@jcadam14
Copy link
Contributor

jcadam14 commented Dec 2, 2024

First thank you for cleaning up the task_actions! Left it in there just in case we revisited it but think that ship has sailed.
If someone fat fingers a validation function or adds one to the list without adding the corresponding impl what happens? Might be good to add a check and error gracefully?

at the moment, a non-existent check gets ignored, so it still runs through the remaining existing checks; although I should definitely at least log it.

Ok yeah I see where you're filtering now. So yeah I think that would be the only thing I would add here. Seems like if there is supposed to be a check we want to do, as configured by the environment, but we don't actually have that check we'd want to flag it somewhere. Not sure if that should fail validations? Doubt it's a case we'll come across a lot.

jcadam14
jcadam14 previously approved these changes Dec 3, 2024
Copy link
Contributor

@jcadam14 jcadam14 left a comment

Choose a reason for hiding this comment

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

Ok I think this looks good, I'm sure we'll iterate over stuff as it actually comes up.

Do we need an update to the configmap?

@lchen-2101
Copy link
Collaborator Author

Ok I think this looks good, I'm sure we'll iterate over stuff as it actually comes up.

Do we need an update to the configmap?

yeap, configmap will need to be updated; also api-commons, if we all are good with this route, the regtechexception needs to be able to accommodate a list; right now it's just a string repr of the list.

@lchen-2101 lchen-2101 changed the title poc: request action validation concept feat: request action validation framework created, and implemented on sign and submit endpoint Dec 3, 2024
Copy link
Contributor

@jcadam14 jcadam14 left a comment

Choose a reason for hiding this comment

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

Looks good. Hopefully will come into play for more endpoints in the future

@lchen-2101 lchen-2101 merged commit 56bbd3d into main Dec 6, 2024
5 checks passed
@lchen-2101 lchen-2101 deleted the feature/482_tin_lei_check branch December 6, 2024 18:06
@lchen-2101
Copy link
Collaborator Author

Looks good. Hopefully will come into play for more endpoints in the future

Yeap, I think some endpoints can leverage this already, will get a ticket created and check them out.

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.

[bug?] contact info update creates a new record Create Filing API action requirements check framework
2 participants