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

Adds new fields to va_notify_notifications #19502

Merged
merged 3 commits into from
Nov 19, 2024
Merged

Conversation

MarchandMD
Copy link
Contributor

Note: Delete the description statements, complete each step. None are optional, but can be justified as to why they cannot be completed as written. Provide known gaps to testing that may raise the risk of merging to production.

Summary

  • This work is behind a feature toggle (flipper): YES/NO

Yes

  • (Summarize the changes that have been made to the platform)

Before this PR:

  • The va_notify_notifications table did not have a callback_klass field
  • The same table did not have a template_id field

After this PR:

  • The va_notify_notifications table will be replacing the callback field with the callback_klass field to aid in clarity
  • The same table will receive a field of template_id as requested to provide additional transparency RE notification statuses
  • (If bug, how to reproduce)

N/A

  • (What is the solution, why is this the solution?)

This is the solution because the new table fields must be added before the code can be updated to use the fields; Also, the additional callback_options being passed in will adhere to a similar naming convention, which follows a more conventional, idiomatic approach

  • (Which team do you work for, does your team own the maintenance of this component?)

VA Notify

  • (If introducing a flipper, what is the success criteria being targeted?)

N/A

Related issue(s)

  1. https://github.com/orgs/department-of-veterans-affairs/projects/1415/views/1?pane=issue&itemId=85247150&issue=department-of-veterans-affairs%7Cvanotify-team%7C1411
  2. Adds jsonb field to va_notify_notfications #19472
  3. https://github.com/orgs/department-of-veterans-affairs/projects/1415/views/1?pane=issue&itemId=85247327&issue=department-of-veterans-affairs%7Cvanotify-team%7C1410
  4. Uses new callback_metadata field in VANotify::Notification #19494

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
bundle exec rspec modules/va_notify/spec/

This will confirm that the updated schema does not interfere with the existing specs, and are still backwards-compatible

  • 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?

@@ -0,0 +1,6 @@
class AppliesModificationsToVANotifyNotifications < ActiveRecord::Migration[7.1]
def change
add_column :va_notify_notifications, :callback_klass, :text
Copy link
Member

Choose a reason for hiding this comment

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

Please add if_not_exists: true to each add_column line.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added! Thanks!

@RachalCassity RachalCassity self-assigned this Nov 19, 2024
Copy link

Backend-review-group approval confirmed.

@MarchandMD MarchandMD merged commit d6debe9 into master Nov 19, 2024
40 of 41 checks passed
@MarchandMD MarchandMD deleted the mm/1422-v4-add-columns branch November 19, 2024 18:18
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.

4 participants