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

PBP 103350 Migrations for new form submissions and attempts tables #21205

Merged
merged 7 commits into from
Apr 1, 2025

Conversation

danlim715
Copy link
Contributor

@danlim715 danlim715 commented Mar 12, 2025

Summary

  • This work is behind a feature toggle (flipper): YES
  • Added some new tables to track form submissions and attempts to BPDS and Lighthouse systems, that's detached from the simple forms API. Here is the ADR flow for proposed tables:
    image
  • Pension and Burial Programs Team to own this work

Related issue(s)

Testing done

  • New code is covered by unit tests
  • Describe what the old behavior was prior to the change
  • Describe the steps required to verify your changes are working as expected. Exclusively stating 'Specs run' is NOT acceptable as appropriate testing
  • If this work is behind a flipper:
    • Tests need to be written for both the flipper on and flipper off scenarios. Docs.
    • What is the testing plan for rolling out the feature?

Screenshots

Note: Optional

What areas of the site does it impact?

(Describe what parts of the site are impacted andifcode touched other areas)

Acceptance criteria

  • I fixed|updated|added unit tests and integration tests for each feature (if applicable).
  • No error nor warning in the console.
  • Events are being sent to the appropriate logging solution
  • Documentation has been updated (link to documentation)
  • No sensitive information (i.e. PII/credentials/internal URLs/etc.) is captured in logging, hardcoded, or specs
  • Feature/bug has a monitor built into Datadog (if applicable)
  • If app impacted requires authentication, did you login to a local build and verify all authenticated routes work as expected
  • I added a screenshot of the developed feature

Requested Feedback

(OPTIONAL)What should the reviewers know in addition to the above. Is there anything specific you wish the reviewer to assist with. Do you have any concerns with this PR, why?

@va-vfs-bot va-vfs-bot temporarily deployed to bpds/submissions/migration/main/main March 12, 2025 09:38 Inactive
@balexandr balexandr requested a review from wayne-weibel March 12, 2025 14:40
@balexandr
Copy link
Contributor

@danlim715 The first thing that jumps out to me is that both of these sets of tables have identical, or almost identical, columns. Could we not just have two tables and add a service column that populates with either LightHouse or BPDS? And in the attempts table have both bpds_id and benefits_intake_uuid and it's only populated for the service that's being used?

@danlim715
Copy link
Contributor Author

danlim715 commented Mar 12, 2025

@danlim715 The first thing that jumps out to me is that both of these sets of tables have identical, or almost identical, columns. Could we not just have two tables and add a service column that populates with either LightHouse or BPDS? And in the attempts table have both bpds_id and benefits_intake_uuid and it's only populated for the service that's being used?

@balexandr I agree with the excessively DRY columns, but Wayne and Matt K specifically said they wanted to avoid STI at all costs cuz they didn't want null columns, especially cuz they foresee having to expand the tables with more service-specific attributes in the future. This is why I looked into delegated types and heavily considered implementing it into this setup since we would be able to eliminate the DRY columns but still allow for service-specific fields. But we discussed and concluded that using delegated types might be overkill for our use case, since the list of submission service types won't be growing anytime soon and we won't even leverage all the benefits of STI i.e. pagination, since we're not displaying this data. Plus, the setup and associations required for delegated types would make things more confusing and harder to maintain. But if you also want to advocate for usage of delegated types, then I'm with you.

@balexandr
Copy link
Contributor

@danlim715 The first thing that jumps out to me is that both of these sets of tables have identical, or almost identical, columns. Could we not just have two tables and add a service column that populates with either LightHouse or BPDS? And in the attempts table have both bpds_id and benefits_intake_uuid and it's only populated for the service that's being used?

@balexandr I agree with the excessively DRY columns, but Wayne and Matt K specifically said they wanted to avoid STI at all costs cuz they didn't want null columns, especially cuz they foresee having to expand the tables with more service-specific attributes in the future. This is why I looked into delegated types and heavily considered implementing it into this setup since we would be able to eliminate the DRY columns but still allow for service-specific fields. But we discussed and concluded that using delegated types might be overkill for our use case, since the list of submission service types won't be growing anytime soon and we won't even leverage all the benefits of STI i.e. pagination, since we're not displaying this data. Plus, the setup and associations required for delegated types would make things more confusing and harder to maintain. But if you also want to advocate for usage of delegated types, then I'm with you.

Ahh okay I guess it;s safer this way and easier to query if need be especially if it plans to grow in different directions.

balexandr
balexandr previously approved these changes Mar 12, 2025
@TaiWilkin
Copy link
Contributor

It looks like SavedClaim has stuff for the encrypted columns on the model and the table. Do we need that here?

@va-vfs-bot va-vfs-bot temporarily deployed to bpds/submissions/migration/main/main March 13, 2025 16:59 Inactive
wayne-weibel
wayne-weibel previously approved these changes Mar 14, 2025
Copy link
Contributor

@wayne-weibel wayne-weibel left a comment

Choose a reason for hiding this comment

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

The 'other' file danger is complaining about is the bpds readme

@wayne-weibel wayne-weibel marked this pull request as ready for review March 14, 2025 15:00
@wayne-weibel wayne-weibel requested review from a team as code owners March 14, 2025 15:00
@wayne-weibel wayne-weibel changed the title Migrations for new form submissions and attempts tables PBP 103350 Migrations for new form submissions and attempts tables Mar 14, 2025
Copy link
Contributor

@mjknight50 mjknight50 left a comment

Choose a reason for hiding this comment

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

Please hold off on merging this.

@danlim715 danlim715 added the NOT_YET Don't merge this PR w/o the authors permission label Mar 17, 2025
@sanjabaj2
Copy link

Can we resolve conflicts and push it for approval?

@danlim715 danlim715 force-pushed the bpds/submissions/migration branch from dbc5f4a to c5ea649 Compare March 24, 2025 18:16
@va-vfs-bot va-vfs-bot temporarily deployed to bpds/submissions/migration/main/main March 24, 2025 18:17 Inactive
@va-vfs-bot va-vfs-bot temporarily deployed to bpds/submissions/migration/main/main March 26, 2025 17:18 Inactive
mjknight50
mjknight50 previously approved these changes Mar 26, 2025
Copy link
Contributor

@mjknight50 mjknight50 left a comment

Choose a reason for hiding this comment

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

GTG

@danlim715 danlim715 requested a review from mjknight50 March 27, 2025 14:58
@va-vfs-bot va-vfs-bot temporarily deployed to bpds/submissions/migration/main/main March 27, 2025 14:59 Inactive
mjknight50
mjknight50 previously approved these changes Mar 27, 2025
Copy link
Contributor

@mjknight50 mjknight50 left a comment

Choose a reason for hiding this comment

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

Even better! GTG

@LindseySaari
Copy link
Contributor

Danger is failing due to the README updates going out with the migration changes (see danger failure)

@rmtolmach rmtolmach requested a review from a team March 31, 2025 15:30
wayne-weibel
wayne-weibel previously approved these changes Mar 31, 2025
@danlim715 danlim715 dismissed stale reviews from wayne-weibel and mjknight50 via 82920b4 March 31, 2025 19:12
@va-vfs-bot va-vfs-bot temporarily deployed to bpds/submissions/migration/main/main March 31, 2025 19:13 Inactive
@danlim715 danlim715 force-pushed the bpds/submissions/migration branch from 82920b4 to ea00b29 Compare March 31, 2025 19:22
Copy link
Contributor

@rmtolmach rmtolmach left a comment

Choose a reason for hiding this comment

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

updates look good ✅

@danlim715 danlim715 merged commit 61b144c into master Apr 1, 2025
27 checks passed
@danlim715 danlim715 deleted the bpds/submissions/migration branch April 1, 2025 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants