-
Notifications
You must be signed in to change notification settings - Fork 18
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
aedara/APPEALS-26087 Setup monitoring for deprecation warnings #19078
Conversation
Code Climate has analyzed commit a645a40 and detected 0 issues on this pull request. View more on Code Climate. |
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.
First off, really nice work on this! 👏
- I was not aware of
ActiveSupport::Deprecation.behavior
, so thank you for brining it to my attention! 💚 - I also think you made a good decision to emit a warning to the application log as well, since messages to Sentry and/or Slack could fail.
Instead of polluting your PR with a bunch of comments, I've pushed up a branch with a refactor and a spec for your consideration. Happy to go through it with you and the reasons behind my decisions. After that, you're welcome to incorporate our agreed changes into your PR here.
A few more overall suggestions:
- The PR title should have format
devname/APPEALS-XXXX <description>
.- So in this case
aedara/APPEALS-26087 Setup monitoring for deprecation warnings
.
- So in this case
- I think it would be good to finish filling out the template in the PR description.
- A Jira Test issue (Xray test) is required on all new code (per our contract)
- In preparation for that, it would be good if you were to write out the manual steps for your test plan under the Testing Plan section.
- For this, a simple test of accessing the Rails console, executing
ActiveSupport::Deprecation.warn("test deprecation warning")
, and checking that Sentry and the#appeals-deprecation-alerts
Slack channel received messages should be sufficient.
- For this, a simple test of accessing the Rails console, executing
- I can work with you on creating a Jira Test story if you haven't done this before.
- In preparation for that, it would be good if you were to write out the manual steps for your test plan under the Testing Plan section.
- It's generally good practice to add test coverage whenever possible, even for "little things" like this. It helps keeps our SimpleCov score high, so that future Rails upgraders will thank us 😄
Also, before we test this in UAT, I think we'll need to wait until we have a resolution to the UAT no-op guard clause in SlackService #send_notification
:
app/services/slack_service.rb
def send_notification(msg, title = "", channel = DEFAULT_CHANNEL)
return unless url && (aws_env != "uat")
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.
We tested successfully in UAT, but there is one small improvement we can make to the Slack alert titles...
Co-authored-by: Jeremy Croteau <jcroteau@users.noreply.github.com>
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.
⭐
UAT ResultsThis was tested successfully in UAT. Also, a message was posted successfully to DSVA |
(Puts on tin foil hat) Prevent potential exceptions from SlackService from impacting user experience
This reverts commit 50bf09f.
Resolves Jira Issue Title
Description
Please explain the changes you made here.
Acceptance Criteria
Testing Plan
Frontend
User Facing Changes
Storybook Story
For Frontend (Presentation) Components
MyComponent.stories.js
alongsideMyComponent.jsx
)Backend
Database Changes
Only for Schema Changes
created_at
,updated_at
) for new tablesCaseflow::Migration
, especially when adding indexes (useadd_safe_index
) (see Writing DB migrations)migrate:rollback
works as desired (change
supported functions)make check-fks
; add any missing foreign keys or add toconfig/initializers/immigrant.rb
(see Record associations and Foreign Keys)belongs_to
for associations to enable the schema diagrams to be automatically updatedIntegrations: Adding endpoints for external APIs
Best practices
Code Documentation Updates
Tests
Test Coverage
Did you include any test coverage for your code? Check below:
Code Climate
Your code does not add any new code climate offenses? If so why?
Monitoring, Logging, Auditing, Error, and Exception Handling Checklist
Monitoring
Logging
Auditing
Error Handling
Exception Handling